|
@ -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" |
|
@ -251,7 +251,7 @@ InventorymoveRequestMain.allSchemas.tableFormColumns.map(item =>{ |
|
|
}) |
|
|
}) |
|
|
// 修改 tableform 属性 |
|
|
// 修改 tableform 属性 |
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
if(item.field == 'fromPackingNumber') { |
|
|
if(item.field == 'itemCode') { |
|
|
if (fromInventoryStatus.value) { |
|
|
if (fromInventoryStatus.value) { |
|
|
item.tableForm.searchCondition = [ |
|
|
item.tableForm.searchCondition = [ |
|
|
{ |
|
|
{ |
|
@ -354,12 +354,12 @@ const fromManagementPrecision = ref('') |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
nextTick(async() => { |
|
|
nextTick(async() => { |
|
|
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['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus'])) |
|
|
val = val.filter(item=>!tableData.value.find(item1=>item1['itemCode']==item['itemCode']&&item1['fromBatch']==item['batch']&&item1['fromLocationCode']==item['locationCode']&&item1['fromInventoryStatus']==item['inventoryStatus'])) |
|
|
if(val.length==0) return |
|
|
if(val.length==0) return |
|
|
val.forEach(async item=>{ |
|
|
val.forEach(async item=>{ |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
newRow['fromPackingNumber'] = item['packingNumber'] |
|
|
// newRow['fromPackingNumber'] = item['packingNumber'] |
|
|
newRow['fromContainerNumber'] = item['containerNumber'] |
|
|
newRow['fromContainerNumber'] = item['containerNumber'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
if (item['batch'] != '') { |
|
|
if (item['batch'] != '') { |
|
@ -406,14 +406,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
} else { |
|
|
} else { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
if (formField == 'fromWarehouseCode') { |
|
|
if (formField == 'fromWarehouseCode') { |
|
|
if(InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ |
|
|
if(InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.find(item => (item.key == 'warehouseCode')) == undefined){ |
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.push({ |
|
|
InventorymoveRequestDetail?.allSchemas?.tableFormColumns?.find(item => (item.field == 'itemCode'))?.tableForm?.searchCondition?.push({ |
|
|
key: 'warehouseCode', |
|
|
key: 'warehouseCode', |
|
|
value: val[0]["code"], |
|
|
value: val[0]["code"], |
|
|
isMainValue: false |
|
|
isMainValue: false |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'fromPackingNumber')).tableForm.searchCondition.find(item => { |
|
|
InventorymoveRequestDetail.allSchemas.tableFormColumns.find(item => (item.field == 'itemCode')).tableForm.searchCondition.find(item => { |
|
|
if (item.key == 'warehouseCode') { |
|
|
if (item.key == 'warehouseCode') { |
|
|
item.value = val[0]["code"] |
|
|
item.value = val[0]["code"] |
|
|
} |
|
|
} |
|
@ -429,8 +429,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { |
|
|
nextTick(() => { |
|
|
nextTick(() => { |
|
|
const setV = {} |
|
|
const setV = {} |
|
|
if(formField == 'fromPackingNumber') { |
|
|
if(formField == 'itemCode') { |
|
|
setV['fromPackingNumber'] = val[0]['packingNumber'] |
|
|
|
|
|
setV['fromContainerNumber'] = val[0]['containerNumber'] |
|
|
setV['fromContainerNumber'] = val[0]['containerNumber'] |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['itemCode'] = val[0]['itemCode'] |
|
|
setV['fromBatch'] = val[0]['batch'] |
|
|
setV['fromBatch'] = val[0]['batch'] |
|
@ -625,14 +624,14 @@ const detailOpenForm = (type, row) => { |
|
|
item.componentProps.disabled = routeName.value == "HoldtookRequestMain" |
|
|
item.componentProps.disabled = routeName.value == "HoldtookRequestMain" |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ |
|
|
if(InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => (item.key == 'warehouseCode')) == undefined){ |
|
|
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.push({ |
|
|
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.push({ |
|
|
key: 'warehouseCode', |
|
|
key: 'warehouseCode', |
|
|
value: fromWarehouseCodeMain.value, |
|
|
value: fromWarehouseCodeMain.value, |
|
|
isMainValue: false |
|
|
isMainValue: false |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'fromPackingNumber'))?.componentProps?.searchCondition.find(item => { |
|
|
InventorymoveRequestDetail.allSchemas.formSchema.find(item => (item.field == 'itemCode'))?.componentProps?.searchCondition.find(item => { |
|
|
if (item.key == 'warehouseCode') { |
|
|
if (item.key == 'warehouseCode') { |
|
|
item.value = fromWarehouseCodeMain.value |
|
|
item.value = fromWarehouseCodeMain.value |
|
|
} |
|
|
} |
|
@ -741,7 +740,7 @@ const submitForm = async (formType, submitData) => { |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
data.subList = tableData.value // 拼接子表数据参数 |
|
|
let isExist = false |
|
|
let isExist = false |
|
|
tableData.value.forEach(item => { |
|
|
tableData.value.forEach(item => { |
|
|
let rs = tableData.value.filter(filterItem => (filterItem.fromPackingNumber&&filterItem.fromPackingNumber == item.fromPackingNumber) ) |
|
|
let rs = tableData.value.filter(filterItem => (filterItem.itemCode&&filterItem.itemCode == item.itemCode) ) |
|
|
console.log(rs,5666); |
|
|
console.log(rs,5666); |
|
|
if(rs.length > 1) isExist = true |
|
|
if(rs.length > 1) isExist = true |
|
|
}) |
|
|
}) |
|
|