Browse Source

结算出库对于已完成状态单据增加作废按钮,作废同时进行WMS库存归还,状态标记作废,作废接口传递三个动作,并且作废状态不能重新打开

hella_online_20240829
李达明 4 months ago
parent
commit
105658ea37
  1. 6
      src/api/wms/saleShipmentMain/index.ts
  2. 1
      src/utils/dict.ts
  3. 13
      src/utils/disposition/defaultButtons.ts
  4. 12
      src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

6
src/api/wms/saleShipmentMain/index.ts

@ -98,3 +98,9 @@ export const agree = async (id) => {
export const handle = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/handle?id=` + id })
}
// 处理-结算出库废弃
export const abort = async (id) => {
return await request.put({ url: `/wms/sale-shipment-main-request/abort?id=` + id })
}

1
src/utils/dict.ts

@ -323,7 +323,6 @@ export enum DICT_TYPE {
QMS_CODE = 'qms_code', // 质量通知代码
DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置
DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型
PROBLEM_REASON = 'problem_reason', // 质量通知问题原因
// ========== 业务 - mes -gaojs ==========

13
src/utils/disposition/defaultButtons.ts

@ -645,6 +645,19 @@ export function mainListHandleBtn(option: any) {
})
}
// 主列表-申请流程-作废按钮
export function mainListAbortBtn(option: any) {
return __defaultBtnOption(option, {
label: t(`ts.终止`).replace('ts.', ''),
name: 'mainAbort',
hide: false,
type: 'primary',
color: '',
link: true, // 文本展现按钮
hasPermi: ''
})
}
// 主列表-订单流程-发布按钮
export function mainListOrderPubBtn(option: any) {
return __defaultBtnOption(option, {

12
src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue

@ -243,6 +243,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainListTurnDownBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:refused'}), //
defaultButtons.mainListApproveBtn({hide:isShowMainButton(row,['2']),hasPermi:'wms:sale-shipment-main-request:agree'}), //
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
defaultButtons.mainListAbortBtn({hide:isShowMainButton(row,['8']),hasPermi:'wms:sale-shipment-main-request:handle'}), //
// defaultButtons.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), //
]
}
@ -317,6 +318,17 @@ const buttonTableClick = async (val, row) => {
tableObject.loading = false
console.log(err)
})
} else if (val == 'mainAbort') { //
await message.confirm('确认要终止吗?')
tableObject.loading = true
SaleShipmentMainApi.abort(row.masterId).then(() => {
message.success(t('common.updateSuccess'))
tableObject.loading = false
getList()
}).catch(err => {
tableObject.loading = false
console.log(err)
})
}else if (val == 'edit') { //
openForm('update', row)
} else if (val == 'delete') { //

Loading…
Cancel
Save