Browse Source

采购索赔修改BUG YT-309

intex
YEJIAXING-PC\lenovo 1 week ago
parent
commit
b8c28119e3
  1. 9
      src/api/wms/purchaseClaimRequestMain/index.ts
  2. 10
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts
  3. 2
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts
  4. 33
      src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

9
src/api/wms/purchaseClaimRequestMain/index.ts

@ -44,6 +44,15 @@ export const deletePurchaseClaimRequestMain = async (id: number) => {
return await request.delete({ url: `/wms/purchaseClaim-request-main/delete?id=` + id }) return await request.delete({ url: `/wms/purchaseClaim-request-main/delete?id=` + id })
} }
// 关闭审批采购索赔
export const closePurchaseClaimRequestMain = async (id: number) => {
return await request.put({ url: `/wms/purchaseClaim-request-main/close?id=` + id })
}
// 关闭审批采购索赔
export const reAddPurchaseClaimRequestMain = async (id: number) => {
return await request.put({ url: `/wms/purchaseClaim-request-main/reAdd?id=` + id })
}
// 提交审批采购索赔 // 提交审批采购索赔
export const subPurchaseClaimRequestMain = async (id: number) => { export const subPurchaseClaimRequestMain = async (id: number) => {
return await request.post({ url: `/wms/purchaseClaim-request-main/sub?id=` + id }) return await request.post({ url: `/wms/purchaseClaim-request-main/sub?id=` + id })

10
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRecord/PurchaseClaimRecordMain.data.ts

@ -29,6 +29,16 @@ export const PurchaseClaimRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
width: 150 width: 150
}, },
}, },
{
label: '申请单号',
field: 'requestNumber',
sort: 'custom',
isSearch: true,
isForm: false,
table: {
width: 150
},
},
{ {
label: '供应商代码', label: '供应商代码',
field: 'supplierCode', field: 'supplierCode',

2
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/PurchaseClaimRequestMain.data.ts

@ -118,7 +118,7 @@ export const PurchaseClaimRequestMain = useCrudSchemas(reactive<CrudSchema[]>([
{ {
label: '状态', label: '状态',
field: 'status', field: 'status',
dictType: DICT_TYPE.PURCHASECLAIM_REQUEST_STATUS, dictType: DICT_TYPE.REQUEST_STATUS,
dictClass: 'string', dictClass: 'string',
isTable: true, isTable: true,
isForm:false, isForm:false,

33
src/views/wms/supplierManage/purchaseClaim/purchaseClaimRequest/index.vue

@ -239,7 +239,7 @@ const butttondata = (row, $index) => {
} }
return [ return [
defaultButtons.mainListPlanSubBtn({ defaultButtons.mainListPlanSubBtn({
hide: isShowMainButton(row, ['0']), hide: isShowMainButton(row, ['1']),
hasPermi: `wms:purchaseClaimRequest:sub` hasPermi: `wms:purchaseClaimRequest:sub`
}), // }), //
defaultButtons.mainListPlanAppBtn({ defaultButtons.mainListPlanAppBtn({
@ -251,9 +251,12 @@ const butttondata = (row, $index) => {
hasPermi: `wms:purchaseClaimRequest:reject` hasPermi: `wms:purchaseClaimRequest:reject`
}), // }), //
defaultButtons.mainListEditBtn({ defaultButtons.mainListEditBtn({
hide: isShowMainButton(row, ['0','2']), hide: isShowMainButton(row, ['1']),
hasPermi: `wms:purchaseClaimRequest:update` hasPermi: `wms:purchaseClaimRequest:update`
}) // }), //
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3']),hasPhasPermiermi:`wms:purchaseClaimRequest:close`}), //
defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4']),hasPhasPermiermi:`wms:purchaseClaimRequest:reAdd`}), //
] ]
} }
@ -277,7 +280,29 @@ const buttonTableClick = async (val, row) => {
else if (val == 'delete') { else if (val == 'delete') {
// //
handleDelete(row.masterId) handleDelete(row.masterId)
} }else if (val == 'mainClose') { //
await message.confirm('确认要关闭吗?')
tableObject.loading = true
PurchaseClaimRequestMainApi.closePurchaseClaimRequestMain(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
buttonBaseClick('refresh',null)
}).catch(err => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainReAdd') { //
    await message.confirm('确认要重新添加吗?')
    tableObject.loading = true
    PurchaseClaimRequestMainApi.reAddPurchaseClaimRequestMain(row.masterId).then(() => {
      message.success(t('common.updateSuccess'))
      tableObject.loading = false
      buttonBaseClick('refresh',null)
    }).catch(err => {
      tableObject.loading = false
      console.log(err)
    })
  }
} }

Loading…
Cancel
Save