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) => {
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
toAreaCodes: string
available: string
putawayRequestFlag: boolean
putawayRequestNumber: string
inspectRequestFlag: boolean
inspectRequestNumber: string
}
// 查询采购收货记录主列表
@ -77,4 +81,14 @@ export const exportPurchasereceiptRecordMain = async (params) => {
// 下载用户导入模板
export const importTemplate = () => {
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) => {
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) => {
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'
}
}
},
{
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('是否处理所选中数据?')
tableObject.loading = true
//
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id).then(res => {
message.success(t('处理成功!'))
if(!res){
SupplierdeliverRecordMainApi.createPurchasereceiptRequest(res.number)
message.success(t('采购申请生成成功'))
}
})
await SupplierdeliverRequestMainApi.genRecordsSupplierdeliverRequestMain(id)
message.success(t('处理成功!'))
//
await getList()
} catch {}finally{

Loading…
Cancel
Save