Browse Source

HL-6188打印标签

hella_online_20241017
yufei_wang 2 months ago
parent
commit
cc67b1f7bc
  1. 82
      src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

82
src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue

@ -93,7 +93,7 @@
:isShowButton="false" :isShowButton="false"
:isShowReduceButton="false" :isShowReduceButton="false"
@submitForm="submitFormLabel" @submitForm="submitFormLabel"
@searchTableSuccess="searchTableSuccess" @searchTableSuccess="searchTableSuccessLabel"
/> />
<!-- 标签打印 --> <!-- 标签打印 -->
@ -144,6 +144,86 @@ const onEnter = async (field,value)=>{
console.log('onEnter',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 ) => { const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => {
nextTick(() => { nextTick(() => {
console.log('searchTableSuccess',formField, searchField, val, formRef, type, row) console.log('searchTableSuccess',formField, searchField, val, formRef, type, row)

Loading…
Cancel
Save