Browse Source

新版-采购退货申请

hella_online_20240819
wangyufei 3 months ago
parent
commit
ebc5855f54
  1. 19
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

19
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue

@ -83,7 +83,7 @@
</template> </template>
</BasicForm> </BasicForm>
<!-- 添加明细采购收货记录单号 --> <!-- 添加明细采购收货记录单号 -->
<SearchTable ref="searchTableRef" @searchTableSuccess="searchTableSuccess1" > <SearchTable ref="searchTableRef" :hiddenFilterBtn="true" @searchTableSuccess="searchTableSuccess1" >
<template #searchQueryhahaha> <template #searchQueryhahaha>
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="供应商"> <el-form-item label="供应商">
@ -278,10 +278,13 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
setV['asnNumber'] = '' setV['asnNumber'] = ''
tableData.value = [] tableData.value = []
getSupplierOptions(val[0][searchField]) getSupplierOptions(val[0][searchField])
} }
formRef.setValues(setV) formRef.setValues(setV)
if(formField=='itemCode'){
onChangeForm('itemCode',null,formRef)
}
} }
}) })
} }
@ -788,7 +791,6 @@ const handleAddTable = () => {
// }) // })
} }
const onChangeForm = async (field, cur, formRef)=>{ const onChangeForm = async (field, cur, formRef)=>{
console.log('onChangeForm',field, cur, formRef)
if(field=='supplierCode'){ if(field=='supplierCode'){
// //
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{ PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
@ -799,11 +801,16 @@ const onChangeForm = async (field, cur, formRef)=>{
formRef.value.setValues(setV) formRef.value.setValues(setV)
} }
}) })
}else if(field == 'locationCode'){ }else if(field == 'locationCode' || field == 'itemCode'){
// 退 // 退
let itemCode = field == 'locationCode'?formRef.value.formModel.itemCode:formRef.formModel.itemCode
let fromLocationCode = field == 'locationCode'?formRef.value.formModel.locationCode:formRef.formModel.locationCode
if(!itemCode||!fromLocationCode){
return
}
let subList = await PurchasereturnRequestDetailApi.getBalancePurchaseReceiptReturn({ let subList = await PurchasereturnRequestDetailApi.getBalancePurchaseReceiptReturn({
itemCode:formRef.value.formModel.itemCode, itemCode,
fromLocationCode:formRef.value.formModel.locationCode fromLocationCode
}) })
console.log('subList',subList) console.log('subList',subList)

Loading…
Cancel
Save