Browse Source

新版-采购退货申请-查询采购退货申请子列表

hella_online_20240819
wangyufei 3 months ago
parent
commit
2f213ba1ab
  1. 5
      src/api/wms/purchasereturnRequestDetail/index.ts
  2. 60
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue
  3. 6
      src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

5
src/api/wms/purchasereturnRequestDetail/index.ts

@ -37,6 +37,11 @@ export const getPurchasereturnRequestDetailPage = async (params) => {
return await request.get({ url: `/wms/purchasereturn-request-detail/page`, params })
}
}
// 查询采购退货申请子列表
export const getPurchasereturnRequestDetailEditData = async (params) => {
return await request.get({ url: `/wms/purchasereturn-request-main/editReturnNew`, params })
}
// 物料供应商查询
export const getPurchasereturnSupplierByCode = async (params) => {
return await request.get({ url: `/wms/supplieritem/querySupplierByCode`, params })

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

@ -265,32 +265,36 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro
if(formField=='itemCode'){
setV['itemName'] = val[0]['name']
//
let res = await PurchasereturnRequestDetailApi.getPurchasereturnSupplierByCode({
itemCode:val[0][searchField]
})
console.log('物料供应商',res)
if(res&&res.length>0){
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode'){
//
setV['supplierCode'] = ''
setV['supplierName'] = ''
setV['hahaha'] = ''
setV['poNumber'] = ''
setV['poLine'] = ''
setV['receiptNumber'] = ''
setV['asnNumber'] = ''
tableData.value = []
item.componentProps.options = res
}
})
}
//
setV['supplierCode'] = ''
setV['supplierName'] = ''
setV['hahaha'] = ''
setV['poNumber'] = ''
setV['poLine'] = ''
setV['receiptNumber'] = ''
setV['asnNumber'] = ''
tableData.value = []
getSupplierOptions(val[0][searchField])
}
formRef.setValues(setV)
}
})
}
const getSupplierOptions = async (itemCode)=>{
let res = await PurchasereturnRequestDetailApi.getPurchasereturnSupplierByCode({
itemCode
})
console.log('物料供应商',res)
if(res&&res.length>0){
PurchasereturnRequestMainNew.allSchemas.formSchema.forEach(item=>{
if(item.field == 'supplierCode'){
item.componentProps.options = res
}
})
}
}
//
const searchTableSuccessDetail = (formField, searchField, val, formRef) => {
nextTick(() => {
@ -507,7 +511,7 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
const openForm = async (type: string, row?: Object) => {
isShowButton.value = true
if (type == 'create') {
@ -525,6 +529,14 @@ const openForm = async (type: string, row?: number) => {
})
}
if (type == 'update') {
let updateData = await PurchasereturnRequestDetailApi.getPurchasereturnRequestDetailEditData({
masterId:row.masterId
})
console.log('updateData',updateData)
if(updateData){
updateData['hahaha'] = updateData['poNumber']
}
getSupplierOptions(updateData['itemCode'])
PurchasereturnRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'supplierCode') {
item.componentProps.disabled = true
@ -535,9 +547,7 @@ const openForm = async (type: string, row?: number) => {
item.componentProps.isSearchList = false
}
})
tableData.value = [{
}]
tableData.value = updateData.subList||[]
}
formRef.value.open(type, row)
}
@ -839,7 +849,7 @@ const searchTableSuccess1 = (formField, searchField, val, type, row) => {
if(formField=='hahaha'){
//
const setV = {}
setV['hahaha'] = val[0]['asnNumber']
setV['hahaha'] = val[0]['poNumber']
setV['poNumber'] = val[0]['poNumber']
setV['poLine'] = val[0]['poLine']
setV['receiptNumber'] = val[0]['receiptNumber']

6
src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts

@ -478,12 +478,14 @@ export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema
},
{
label: '状态',
field: 'status',
field: 'inventoryStatus',
dictType: DICT_TYPE.INVENTORY_STATUS,
sort: 'custom',
table: {
width: 150
},
tableForm:{
type: 'Select',
disabled:true
},
form: {
@ -543,7 +545,7 @@ export const PurchasereturnRequestDetailNew = useCrudSchemas(reactive<CrudSchema
},
{
label: '退货原因',
field: 'reason_type',
field: 'reasonType',
dictType: DICT_TYPE.UOM,
dictClass: 'string',
// isSearch: true,

Loading…
Cancel
Save