|
|
@ -93,7 +93,7 @@ |
|
|
|
:isShowButton="false" |
|
|
|
:isShowReduceButton="false" |
|
|
|
@submitForm="submitFormLabel" |
|
|
|
@searchTableSuccess="searchTableSuccess" |
|
|
|
@searchTableSuccess="searchTableSuccessLabel" |
|
|
|
|
|
|
|
/> |
|
|
|
<!-- 标签打印 --> |
|
|
@ -144,6 +144,86 @@ const onEnter = async (field,value)=>{ |
|
|
|
console.log('onEnter',field,value) |
|
|
|
} |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccessLabel = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) |
|
|
|
CustomerreturnRequestMain.allSchemas.formSchema.forEach(item => { |
|
|
|
if(item.field == 'deliverRecordNumber') { |
|
|
|
if(customerCode.value != null){ |
|
|
|
item.componentProps.searchCondition = [ |
|
|
|
{ |
|
|
|
key: 'customerCode', |
|
|
|
value: customerCode.value , |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
console.log(128, customerCode.value) |
|
|
|
|
|
|
|
if (type == 'tableForm') { |
|
|
|
if(formField == 'packingNumber') { |
|
|
|
row['packingNumber'] = val[0]['packingNumber'] |
|
|
|
row['containerNumber'] = val[0]['containerNumber'] |
|
|
|
row['batch'] = val[0]['batch'] |
|
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['fromLocationCode'] = val[0]['locationCode'] |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
}else if(formField == 'packUnit'){ |
|
|
|
row['packUnit'] = val[0]['packUnit'] |
|
|
|
row['packQty'] = val[0]['packQty'] |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
if (formField == 'customerCode') { |
|
|
|
setV['deliverRecordNumber'] = '' |
|
|
|
setV['q1Number'] = '' |
|
|
|
tableData.value = [] |
|
|
|
} |
|
|
|
if(formField == 'deliverRecordNumber') { |
|
|
|
setV['deliverRecordNumber'] = val[0]['number'] |
|
|
|
setV['deliverPlanNumber'] = val[0]['deliverPlanNumber'] |
|
|
|
// setV['customerCode'] = val[0]['customerCode'] |
|
|
|
// setV['customerDockCode'] = val[0]['customerDockCode'] |
|
|
|
|
|
|
|
// 获取子表数据 |
|
|
|
DeliverRecordDetailApi.getDeliverRecordDetailPageCustomerreturn({pageSize:999,masterId:val[0]['masterId']}).then(res => { |
|
|
|
|
|
|
|
res.list.forEach(obj => { |
|
|
|
let value = null |
|
|
|
value = obj.fromLocationCode |
|
|
|
obj.fromLocationCode = obj.toLocationCode |
|
|
|
obj.toLocationCode = '' |
|
|
|
obj.packingNumber = '' // 包装号所有为空 |
|
|
|
CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item =>{ |
|
|
|
if(item.field == 'packingNumber') { |
|
|
|
item.isInpuFocusShow = false |
|
|
|
item.tableForm.isInpuFocusShow = false |
|
|
|
item.tableForm.disabled = true |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
if (res) { |
|
|
|
tableData.value = [...res.list] |
|
|
|
originTableData.value = [...res.list] |
|
|
|
} |
|
|
|
|
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
message.error('错误') |
|
|
|
}) |
|
|
|
} else { |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
formRef.setValues(setV) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) |
|
|
|