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