Browse Source

采购收货任务记录修改

master_hella_20240701
zhaoxuebing 9 months ago
parent
commit
361d1ef664
  1. 2
      src/api/wms/inspectRecordMain/index.ts
  2. 14
      src/api/wms/purchasereceiptRecordMain/index.ts
  3. 34
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
  4. 10
      src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts
  5. 9
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

2
src/api/wms/inspectRecordMain/index.ts

@ -90,5 +90,5 @@ export const importTemplate = () => {
// 创建上架申请 // 创建上架申请
export const createPutAwayRequest = async (number:string) => { export const createPutAwayRequest = async (number:string) => {
return await request.post({ url: `/wms/inspect-record-main/createPutAwayRequest?number=`+number }) return await request.post({ url: `/wms/inspect-record-main/createPutAwayRequestPC?number=`+number })
} }

14
src/api/wms/purchasereceiptRecordMain/index.ts

@ -31,6 +31,10 @@ export interface PurchasereceiptRecordMainVO {
fromAreaCodes: string fromAreaCodes: string
toAreaCodes: string toAreaCodes: string
available: string available: string
putawayRequestFlag: boolean
putawayRequestNumber: string
inspectRequestFlag: boolean
inspectRequestNumber: string
} }
// 查询采购收货记录主列表 // 查询采购收货记录主列表
@ -78,3 +82,13 @@ export const exportPurchasereceiptRecordMain = async (params) => {
export const importTemplate = () => { export const importTemplate = () => {
return request.download({ url: '/wms/purchasereceipt-record-main/get-import-template' }) return request.download({ url: '/wms/purchasereceipt-record-main/get-import-template' })
} }
// 创建上架申请
export const createPutawayRequest = async (number:string) => {
return await request.post({ url: `/wms/purchasereceipt-record-main/createPutawayRequest?number=`+number })
}
// 创建检验申请
export const createInspectRequest = async (number:string) => {
return await request.post({ url: `/wms/purchasereceipt-record-main/createInspectRequest?number=`+number })
}

34
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue

@ -125,14 +125,44 @@ const buttonBaseClick = (val, item) => {
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceiptRecordMain:inspectRequest'}), // defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:!row.inspectRequestFlag}),//
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:!row.putawayRequestFlag}),//
] ]
} }
// - // -
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'putawayRequest') { // if (val == 'putawayRequest') { //
handleExport() handleCreatePutawayRequest(row.number)
}else if(val == 'inspectRequest'){//
handleCreateInspectRequest(row.number)
}
}
/** 生成采购上架申请按钮操作 */
const handleCreatePutawayRequest = async (number:string) => {
try{
await message.confirm(t('确认生成上架申请吗?'))
tableObject.loading = true
await PurchasereceiptRecordMainApi.createPutawayRequest(number)
message.success(t('上架申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
}
}
/** 生成到货检验申请按钮操作 */
const handleCreateInspectRequest = async (number:string) => {
try{
await message.confirm(t('确认生成到货检验申请吗?'))
tableObject.loading = true
await PurchasereceiptRecordMainApi.createPutawayRequest(number)
message.success(t('到货检验申请生成成功'))
await getList()
}catch{}finally{
tableObject.loading = false
} }
} }

10
src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/purchasereceiptRecordMain.data.ts

@ -333,6 +333,16 @@ export const PurchasereceiptRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
activeValue: 'TRUE' activeValue: 'TRUE'
} }
} }
},
{
label: '操作',
field: 'action',
isDetail: false,
isForm: false,
table: {
width: 300,
fixed: 'right'
},
} }
])) ]))

9
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue

@ -466,13 +466,8 @@ const genRecords = async (id: number) => {
await message.confirm('是否处理所选中数据?') await message.confirm('是否处理所选中数据?')
tableObject.loading = true tableObject.loading = true
// //
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => { await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id)
message.success(t('处理成功!')) message.success(t('处理成功!'))
if(!res){
SupplierdeliverRecordMainApi.createPurchasereceiptRequest(res.number)
message.success(t('采购申请生成成功'))
}
})
// //
await getList() await getList()
} catch {}finally{ } catch {}finally{

Loading…
Cancel
Save