|
|
@ -181,27 +181,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) = |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|
if(formField == 'deliverPlanNumber') { |
|
|
|
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 = [] |
|
|
|
//物料代码-子表 |
|
|
|
let subRes = await DeliverPlanDetailApi.getDeliverPlanDetailPage({ |
|
|
@ -229,10 +208,28 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) = |
|
|
|
} |
|
|
|
} else if(formField == 'customerCode'){ |
|
|
|
//客户代码 |
|
|
|
setV['customerDockCode'] = '' |
|
|
|
setV['toWarehouseCode'] = '' |
|
|
|
setV['toLocationCode'] = '' |
|
|
|
setV['deliverType'] = '' |
|
|
|
|
|
|
|
let res = await CustomerdockApi.getCustomerdockPage({ |
|
|
|
by:"ASC", |
|
|
|
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 = [] |
|
|
|
}else { |
|
|
|
setV[formField] = val[0][searchField] |
|
|
@ -243,21 +240,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) = |
|
|
|
} |
|
|
|
const clearSearchInput = (field)=>{ |
|
|
|
console.log('field',field) |
|
|
|
if('customerCode'==field){ |
|
|
|
if('customerCode' == field){ |
|
|
|
//客户代码 |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
customerDockCode: '', |
|
|
|
toWarehouseCode: '', |
|
|
|
toLocationCode: '', |
|
|
|
deliverPlanNumber: '', |
|
|
|
deliverType: '', |
|
|
|
}) |
|
|
|
tableData.value = [] |
|
|
|
}else if('customerDockCode'==field){ |
|
|
|
}else if('customerDockCode' == field){ |
|
|
|
basicFormRef.value.formRef.setValues({ |
|
|
|
toWarehouseCode: '', |
|
|
|
toLocationCode: '', |
|
|
|
deliverType: '', |
|
|
|
}) |
|
|
|
}else if('deliverPlanNumber' == field){ |
|
|
|
tableData.value = [] |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询页面返回——详情 |
|
|
|