|
|
@ -54,6 +54,7 @@ |
|
|
|
@handleDeleteTable="handleDeleteTable" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@submitForm="submitForm" |
|
|
|
:isShowButton = isShowButton |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 详情 --> |
|
|
@ -98,6 +99,8 @@ const customerCode = ref() |
|
|
|
routeName.value = route.name |
|
|
|
const tableColumns = ref(CustomerreturnRequestMain.allSchemas.tableColumns) |
|
|
|
|
|
|
|
const isShowButton = ref(true) |
|
|
|
|
|
|
|
// 字段设置 更新主列表字段 |
|
|
|
const updataTableColumns = (val) => { |
|
|
|
tableColumns.value = val |
|
|
@ -106,25 +109,6 @@ const updataTableColumns = (val) => { |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
if(formField == 'customerCode'){ |
|
|
|
customerCode.value = val[0]['code'] |
|
|
|
} |
|
|
|
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
|
if(item.field == 'packingNumber') { |
|
|
|
item.tableForm.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'customerCode', |
|
|
|
value: customerCode.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
item.form.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'customerCode', |
|
|
|
value: customerCode.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
}) |
|
|
|
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => { |
|
|
|
if(item.field == 'deliverRecordNumber') { |
|
|
|
if(customerCode.value != null){ |
|
|
@ -153,13 +137,15 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
} else { |
|
|
|
console.log(11111111) |
|
|
|
const setV = {} |
|
|
|
if(formField == 'deliverRecordNumber') { |
|
|
|
setV['deliverRecordNumber'] = val[0]['number'] |
|
|
|
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] |
|
|
|
setV['customerCode'] = val[0]['customerCode'] |
|
|
|
setV['customerDockCode'] = val[0]['customerDockCode'] |
|
|
|
if(setV['deliverRecordNumber'] != null){ |
|
|
|
isShowButton.value = false |
|
|
|
} |
|
|
|
// 获取子表数据 |
|
|
|
DeliverRecordDetailApi.getDeliverRecordDetailPage({masterId:val[0]['id']}) |
|
|
|
.then(res => { |
|
|
@ -168,8 +154,14 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
value = obj.fromLocationCode |
|
|
|
obj.fromLocationCode = obj.toLocationCode |
|
|
|
obj.toLocationCode = value |
|
|
|
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item =>{ |
|
|
|
if(item.field == 'packingNumber') { |
|
|
|
item.isInpuFocusShow = false |
|
|
|
item.tableForm.isInpuFocusShow = false |
|
|
|
item.tableForm.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
console.log(555,res) |
|
|
|
if (res) tableData.value = res.list |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
@ -476,7 +468,6 @@ const submitForm = async (formType, data) => { |
|
|
|
if(obj.qty == 0){ |
|
|
|
message.error(`数量不能为0!`) |
|
|
|
flag.value = true |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
}) |
|
|
|