Browse Source

库存移动记录-新增

linshi20240813
wangyufei 3 months ago
parent
commit
631a0578bb
  1. 4
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue
  2. 82
      src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

4
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue

@ -43,7 +43,7 @@
<BasicForm <BasicForm
ref="formRef" ref="formRef"
:isOpenSearchTable="true" :isOpenSearchTable="true"
fieldTableColumn="fromPackingNumber" fieldTableColumn="itemCode"
@success="getList" @success="getList"
:rules="InventorymoveRequestMainRules" :rules="InventorymoveRequestMainRules"
:formAllSchemas="InventorymoveRequestMain.allSchemas" :formAllSchemas="InventorymoveRequestMain.allSchemas"
@ -270,7 +270,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =>
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
if(formField == 'fromPackingNumber'){ if(formField == 'itemCode'){
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['origin_fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus'])) val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromPackingNumber']==item['packingNumber']&&item1['origin_fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus']))
if(val.length==0) return if(val.length==0) return
val.forEach(item=>{ val.forEach(item=>{

82
src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/inventorymoveRecordRequestMain.data.ts

@ -217,14 +217,45 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm:{
disabled: true multiple:true,
disabled: true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'businessType',
value: 'Move',
isMainValue: false
},{
key:'locationCode', // 查询列表中字段
value:'fromLocationCode', // 指主表某字段
message: '请选择从库位代码!', // 当前置条件为空时 弹出信息提示
isMainValue: true, // 表示查询条件是主表的字段的值
action: '==', // 查询拼接条件
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
disabled: true disabled: true,
isSearchList: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'businessType',
value: 'Move',
isMainValue: false
}]
} }
} }
}, },
{ {
label: '批次', label: '批次',
@ -249,36 +280,12 @@ export const InventorymoveRequestDetail = useCrudSchemas(reactive<CrudSchema[]>(
table: { table: {
width: 150 width: 150
}, },
tableForm:{ tableForm: {
multiple:true, disabled: true
disabled: true,
isInpuFocusShow: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'businessType',
value: 'Move',
isMainValue: false
}]
}, },
form: { form: {
// labelMessage: '信息提示说明!!!',
componentProps: { componentProps: {
disabled: true, disabled: true
isSearchList: false, // 开启查询弹窗
searchListPlaceholder: '请选择从包装号',
searchField: 'packingNumber',
searchTitle: '库存余额信息',
searchAllSchemas: Balance.allSchemas,
searchPage: BalanceApi.selectLocationTypeToBalance,
searchCondition: [{
key: 'businessType',
value: 'Move',
isMainValue: false
}]
} }
} }
}, },
@ -402,19 +409,10 @@ export const InventorymoveRequestDetailRules = reactive({
itemCode: [ itemCode: [
{ required: true, message: '请点击从包装号选择物料代码', trigger: 'change' } { required: true, message: '请点击从包装号选择物料代码', trigger: 'change' }
], ],
fromLocationCode: [
{ required: true, message: '请选择从库位代码', trigger: 'change' }
],
fromPackingNumber: [
{ required: true, message: '请选择从包装号', trigger: 'change' }
],
fromInventoryStatus: [ fromInventoryStatus: [
{ required: true, message: '请选择从库存状态', trigger: 'change' } { required: true, message: '请选择从库存状态', trigger: 'change' }
], ],
toLocationCode: [ toInventoryStatus: [
{ required: true, message: '请选择到库位代码', trigger: 'change' } { required: true, message: '请选择到库存状态', trigger: 'change' }
], ]
remark: [
{ max: 50, message: '不得超过50个字符', trigger: 'blur' }
],
}) })

Loading…
Cancel
Save