采购订单默认带出的物料的辅助资料,怎么选择辅助资料.....

栏目:k3wise知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

采购订单默认带出的物料的辅助资料,怎么选择辅助资料.....


采购订单默认带出的物料的辅助资料,怎么选择辅助资料里的其他选项,不是到物料基础资料里去修改,在这个界面就想修改,默认是来料待检仓, 里面还有一个待检仓我想选他怎么做
数据来源 物料代码 属性默认待检仓库 默认带出的默认待检仓库第一个,里面改成默认待检仓库里面的其他选项
求解答,怎么做

下面这个是我写的一个插件的部分功能 应该和你的需求差不多 但是我的只都是string类型 你的那个应该是个基础资料 在赋值的时候应该用基础资料的代码进行赋值。

'Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
'定义插件对象接口. 必须具有的声明, 以此来获得事件
Private WithEvents m_BillTransfer As k3BillTransfer.Bill
Private cn As ADODB.Connection
Private rs As New ADODB.Recordset
Private strSql As String
Private CustIndex As Integer '购货单位
Private MarkIndex As Integer '唛头

Private DiameterIndex As Integer '管料外径索引
Private ThickIndex As Integer '管料壁厚索引
Private VolumeIndex As Integer '货品规格索引
Private ItemTypeIndex As Integer '产品类型索引
Private MaterialIndex As Integer '材质索引
Private OpenSizeIndex As Integer '开口尺寸索引
Private BuccCharIndex As Integer '巴克/客户图纸号索引
Private LengthIndex As Integer '长度索引
Private PressureIndex As Integer '最大承压索引
Private UStampIndex As Integer 'U钢印索引
Private NBRegisterIndex As Integer 'NB注册索引
Private SortIndex As Integer '排序索引
Private SurfaceIndex As Integer '表面处理要求索引
Private AntirustIndex As Integer '防锈要求索引
Private StampIndex As Integer '钢印图号索引
Private SupplementIndex As Integer '补充技术要求索引
Private InStockIndex As Integer '入库单专用备注索引
Private InteriorIndex As Integer '内部备注索引
Private WeightIndex As Integer '重量索引
Private CustItemNoIndex As Integer '客户零件号索引
Private ItemNumberIndex As Integer '产品代码索引

Private oldValue As String

Private Sub m_BillTransfer_BillInitialize()
'TODO: 请在此处添加代码响应事件 BillInitialize
'创建数据库连接

Set cn = New ADODB.Connection
cn.CursorLocation = adUseClient
cn.Open m_BillTransfer.Cnnstring

For i = 0 To UBound(m_BillTransfer.HeadCtl) - 1
Select Case m_BillTransfer.HeadCtl(i).Caption
Case "购货单位:"
CustIndex = i
Case "唛头:"
MarkIndex = i
End Select
Next i


For i = 1 To UBound(m_BillTransfer.EntryCtl)
Select Case m_BillTransfer.EntryCtl(i).HeadCaption

Case "管料外径"
DiameterIndex = i
Case "管料壁厚"
ThickIndex = i
Case "货品规格"
VolumeIndex = i
Case "产品类型"
ItemTypeIndex = i
Case "材质"
MaterialIndex = i
Case "口部尺寸"
OpenSizeIndex = i
Case "巴克/客户图纸号"
BuccCharIndex = i
Case "长度"
LengthIndex = i
Case "最大承压"
PressureIndex = i
Case "U钢印"
UStampIndex = i
Case "NB注册"
NBRegisterIndex = i
Case "排序"
SortIndex = i
Case "表面处理要求"
SurfaceIndex = i
Case "防锈要求"
AntirustIndex = i
Case "钢印图号"
StampIndex = i
Case "补充技术要求"
SupplementIndex = i
Case "入库单专用备注"
InStockIndex = i
Case "内部备注"
InteriorIndex = i
Case "重量"
WeightIndex = i
Case "客户零件号"
CustItemNoIndex = i
Case "产品代码"
ItemNumberIndex = i
End Select
Next i

End Sub

Public Sub Show(ByVal oBillTransfer As Object)

'接口实现
'注意: 此方法必须存在, 请勿修改
Set m_BillTransfer = oBillTransfer

End Sub

Private Sub Class_Terminate()

'释放接口对象
'注意: 此方法必须存在, 请勿修改
Set m_BillTransfer = Nothing

End Sub

Private Sub m_BillTransfer_GridChange(ByVal Col As Long, ByVal Row As Long, ByVal Value As Variant, ByVal bNewBill As Boolean, Cancel As Boolean)

'TODO: 请在此处添加代码响应事件 GridChange

If Col = CustItemNoIndex Or Col = ItemNumberIndex Then

If m_BillTransfer.EntryCtl(ItemNumberIndex).DInterID(Row) <> "" Then
strSql = "select F_102,F_103,F_104,F_105,F_106,F_107,F_108,F_119,F_110,F_111,F_112,F_113,F_114,F_115,F_116,F_117,F_121,F_118,F_122 from t_ICItem where FItemID = " & m_BillTransfer.EntryCtl(ItemNumberIndex).DInterID(Row)
rs.Open strSql, cn, adOpenDynamic, adLockBatchOptimistic
Else
Exit Sub
End If

If Not rs.EOF And Not rs.BOF Then '有对应的数据时,填充对应数据,没有时填充空数据
m_BillTransfer.SetGridText Row, DiameterIndex, IIf(IsNull(rs(0)), "", rs(0))
m_BillTransfer.SetGridText Row, ThickIndex, IIf(IsNull(rs(1)), "", rs(1))
m_BillTransfer.SetGridText Row, VolumeIndex, IIf(IsNull(rs(2)), "", rs(2))
m_BillTransfer.SetGridText Row, ItemTypeIndex, IIf(IsNull(rs(3)), "", rs(3))
m_BillTransfer.SetGridText Row, MaterialIndex, IIf(IsNull(rs(4)), "", rs(4))
m_BillTransfer.SetGridText Row, OpenSizeIndex, IIf(IsNull(rs(5)), "", rs(5))
m_BillTransfer.SetGridText Row, BuccCharIndex, IIf(IsNull(rs(6)), "", rs(6))
m_BillTransfer.SetGridText Row, LengthIndex, IIf(IsNull(rs(7)), "", rs(7))
m_BillTransfer.SetGridText Row, PressureIndex, IIf(IsNull(rs(8)), "", rs(8))
m_BillTransfer.SetGridText Row, UStampIndex, IIf(IsNull(rs(9)), "", rs(9))
m_BillTransfer.SetGridText Row, NBRegisterIndex, IIf(IsNull(rs(10)), "", rs(10))
m_BillTransfer.SetGridText Row, SortIndex, IIf(IsNull(rs(11)), "", rs(11))
m_BillTransfer.SetGridText Row, SurfaceIndex, IIf(IsNull(rs(12)), "", rs(12))
m_BillTransfer.SetGridText Row, AntirustIndex, IIf(IsNull(rs(13)), "", rs(13))
m_BillTransfer.SetGridText Row, StampIndex, IIf(IsNull(rs(14)), "", rs(14))
m_BillTransfer.SetGridText Row, SupplementIndex, IIf(IsNull(rs(15)), "", rs(15))
m_BillTransfer.SetGridText Row, InStockIndex, IIf(IsNull(rs(16)), "", rs(16))
m_BillTransfer.SetGridText Row, InteriorIndex, IIf(IsNull(rs(17)), "", rs(17))
m_BillTransfer.SetGridText Row, WeightIndex, IIf(IsNull(rs(18)), "", rs(18))
Else
m_BillTransfer.SetGridText Row, DiameterIndex, ""
m_BillTransfer.SetGridText Row, ThickIndex, ""
m_BillTransfer.SetGridText Row, VolumeIndex, ""
m_BillTransfer.SetGridText Row, ItemTypeIndex, ""
m_BillTransfer.SetGridText Row, MaterialIndex, ""
m_BillTransfer.SetGridText Row, OpenSizeIndex, ""
m_BillTransfer.SetGridText Row, BuccCharIndex, ""
m_BillTransfer.SetGridText Row, LengthIndex, ""
m_BillTransfer.SetGridText Row, PressureIndex, ""
m_BillTransfer.SetGridText Row, UStampIndex, ""
m_BillTransfer.SetGridText Row, NBRegisterIndex, ""
m_BillTransfer.SetGridText Row, SortIndex, ""
m_BillTransfer.SetGridText Row, SurfaceIndex, ""
m_BillTransfer.SetGridText Row, AntirustIndex, ""
m_BillTransfer.SetGridText Row, StampIndex, ""
m_BillTransfer.SetGridText Row, SupplementIndex, ""
m_BillTransfer.SetGridText Row, InStockIndex, ""
m_BillTransfer.SetGridText Row, InteriorIndex, ""
m_BillTransfer.SetGridText Row, WeightIndex, ""
End If
rs.Close
End If

End Sub

Private Sub m_BillTransfer_BillTerminate()

'TODO: 请在此处添加代码响应事件 BillTerminate

End Sub


通过插件,可以实现,携带默认,又可以手改
您好,我们的物料与属性是一对一关系,所以你设定来源方式为“分录已有基础资料属性”则该字段的值就只能来源于物料属性且不可修改。如果你想在做单时可以修改,则可能只有将来源方式选择为“基础资料”或“手工录入”啦,这样每次都可以自己选择。请参考!!
自定义没有设置好,属于应该为取自系统基础资料
辅助属性怎么会默认带出来料待检仓呢?是辅助属性还是仓库?

采购订单默认带出的物料的辅助资料,怎么选择辅助资料.....

采购订单默认带出的物料的辅助资料,怎么选择辅助资料里的其他选项,不是到物料基础资料里去修改,在这个界面就想修改,默认是来料待检仓,...
点击下载文档
标签: # K/3 WISE-BOS
分享:
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息