Browse Source

HL-5978WMS发货申请新增选择发货计划单号后应该自动带出月台和明细,目前没自动带出

hella_online_20240927
yufei_wang 2 months ago
parent
commit
3c2f2fed1f
  1. 6
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts
  2. 54
      src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

6
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/deliverRequestMain.data.ts

@ -234,6 +234,12 @@ export const DeliverRequestMain = useCrudSchemas(
value: 'TRUE', value: 'TRUE',
isMainValue: false isMainValue: false
}, },
{
key: 'customerCode',
value: 'customerCode',
message: '请填写客户代码!',
isMainValue: true
},
{ {
key: 'status', key: 'status',
value: '6', value: '6',

54
src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue

@ -181,27 +181,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
if(formField == 'deliverPlanNumber') { if(formField == 'deliverPlanNumber') {
setV['deliverPlanNumber'] = val[0]['number'] setV['deliverPlanNumber'] = val[0]['number']
setV['customerCode'] = val[0]['customerCode']
let res = await CustomerdockApi.getCustomerdockPage({
by:"ASC",
pageNo:1,
pageSize:20,
available: "TRUE",
customerCode: val[0]['customerCode']
})
if(res&&res.list&&res.list.length>0){
setV['customerDockCode'] = res.list[0]['code']//-
setV['toWarehouseCode'] = res.list[0]['warehouseCode']//
setV['toLocationCode'] = res.list[0]['defaultLocationCode']//
let res2 = await AreabasicApi.selectAreabasicDOByCode(res.list[0]['defaultLocationCode'])
if(res2){
setV['deliverType'] = res2['type']
}
}else{
setV['toWarehouseCode'] = ''//
setV['toLocationCode'] = ''//
setV['deliverType'] = ''//
}
tableData.value = [] tableData.value = []
//- //-
let subRes = await DeliverPlanDetailApi.getDeliverPlanDetailPage({ let subRes = await DeliverPlanDetailApi.getDeliverPlanDetailPage({
@ -229,10 +208,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =
} }
} else if(formField == 'customerCode'){ } else if(formField == 'customerCode'){
// //
setV['customerDockCode'] = ''
setV['toWarehouseCode'] = '' let res = await CustomerdockApi.getCustomerdockPage({
setV['toLocationCode'] = '' by:"ASC",
setV['deliverType'] = '' pageNo:1,
pageSize:20,
available: "TRUE",
customerCode: val[0]['code']
})
if(res&&res.list&&res.list.length>0){
setV['customerDockCode'] = res.list[0]['code']//-
setV['toWarehouseCode'] = res.list[0]['warehouseCode']//
setV['toLocationCode'] = res.list[0]['defaultLocationCode']//
let res2 = await AreabasicApi.selectAreabasicDOByCode(res.list[0]['defaultLocationCode'])
if(res2){
setV['deliverType'] = res2['type']
}
}else{
setV['customerDockCode'] = ''
setV['toWarehouseCode'] = ''//
setV['toLocationCode'] = ''//
setV['deliverType'] = ''//
}
tableData.value = [] tableData.value = []
}else { }else {
setV[formField] = val[0][searchField] setV[formField] = val[0][searchField]
@ -243,21 +240,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) =
} }
const clearSearchInput = (field)=>{ const clearSearchInput = (field)=>{
console.log('field',field) console.log('field',field)
if('customerCode'==field){ if('customerCode' == field){
// //
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
customerDockCode: '', customerDockCode: '',
toWarehouseCode: '', toWarehouseCode: '',
toLocationCode: '', toLocationCode: '',
deliverPlanNumber: '',
deliverType: '', deliverType: '',
}) })
tableData.value = [] tableData.value = []
}else if('customerDockCode'==field){ }else if('customerDockCode' == field){
basicFormRef.value.formRef.setValues({ basicFormRef.value.formRef.setValues({
toWarehouseCode: '', toWarehouseCode: '',
toLocationCode: '', toLocationCode: '',
deliverType: '', deliverType: '',
}) })
}else if('deliverPlanNumber' == field){
tableData.value = []
} }
} }
// //

Loading…
Cancel
Save