From 105658ea378d132bbac62b16fe6a10fd68e2a56a Mon Sep 17 00:00:00 2001 From: lidm0086 Date: Fri, 2 Aug 2024 11:33:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=93=E7=AE=97=E5=87=BA=E5=BA=93=E5=AF=B9?= =?UTF-8?q?=E4=BA=8E=E5=B7=B2=E5=AE=8C=E6=88=90=E7=8A=B6=E6=80=81=E5=8D=95?= =?UTF-8?q?=E6=8D=AE=E5=A2=9E=E5=8A=A0=E4=BD=9C=E5=BA=9F=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=8C=E4=BD=9C=E5=BA=9F=E5=90=8C=E6=97=B6=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?WMS=E5=BA=93=E5=AD=98=E5=BD=92=E8=BF=98=EF=BC=8C=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=A0=87=E8=AE=B0=E4=BD=9C=E5=BA=9F=EF=BC=8C=E4=BD=9C?= =?UTF-8?q?=E5=BA=9F=E6=8E=A5=E5=8F=A3=E4=BC=A0=E9=80=92=E4=B8=89=E4=B8=AA?= =?UTF-8?q?=E5=8A=A8=E4=BD=9C=EF=BC=8C=E5=B9=B6=E4=B8=94=E4=BD=9C=E5=BA=9F?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E4=B8=8D=E8=83=BD=E9=87=8D=E6=96=B0=E6=89=93?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/saleShipmentMain/index.ts | 6 +++ src/utils/dict.ts | 5 +- src/utils/disposition/defaultButtons.ts | 13 +++++ .../saleShipmentMainRequest/index.vue | 48 ++++++++++++------- 4 files changed, 51 insertions(+), 21 deletions(-) diff --git a/src/api/wms/saleShipmentMain/index.ts b/src/api/wms/saleShipmentMain/index.ts index a3e3c94eb..b0b6b60b5 100644 --- a/src/api/wms/saleShipmentMain/index.ts +++ b/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 }) +} + diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 415b356f2..b433eb591 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -322,9 +322,8 @@ export enum DICT_TYPE { CLAIM_REASON = 'claim_Reason', // 质量通知索赔原因 QMS_CODE = 'qms_code', // 质量通知代码 DEFECT_LOCATION = 'defect_location', // 质量通知缺陷位置 -DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型 - - PROBLEM_REASON = 'problem_reason', // 质量通知问题原因 + DEFECT_TYPE = 'defect_type', // 质量通知缺陷类型 + PROBLEM_REASON = 'problem_reason', // 质量通知问题原因 // ========== 业务 - mes -gaojs ========== QUALIFY_STATUS = 'qualify_status', //质检状态 diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index 523425c8b..70f714e53 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/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, { diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index 81b5664b5..c22665b6e 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -121,13 +121,13 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => val.forEach(item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['soLine'] = item['lineNumber'] - newRow['soNumber'] = item['number'] + newRow['soNumber'] = item['number'] newRow['itemCode'] = item['itemCode'] newRow['projectCode'] = item['projectCode'] newRow['uom'] = item['uom'] tableData.value.push(newRow) }) - + }else if(formField == 'fromLocationCode'){ row['fromLocationCode'] = val[0]['defaultLocationCode'] }else{ @@ -135,7 +135,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => } }else { const setV = {} - setV[formField] = val[0][searchField] + setV[formField] = val[0][searchField] if(formField == 'CustomerCode') { setV['CustomerCode'] = val[0]['CustomerCode'] } else { @@ -152,7 +152,7 @@ const searchTableSuccessDetail = (formField, searchField, val, formRef ) => { const setV = {} if(formField == 'soLine') { setV['soLine'] = val[0]['lineNumber'] - setV['soNumber'] = val[0]['number'] + setV['soNumber'] = val[0]['number'] setV['itemCode'] = val[0]['itemCode'] setV['projectCode'] = val[0]['projectCode'] setV['uom'] = val[0]['uom'] @@ -235,22 +235,23 @@ const butttondata = (row,$index) => { if(findIndex>-1&&findIndex<$index){ return [] } - return [ - defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','4']),hasPermi:'wms:sale-shipment-main-request:update'}), // 编辑 - defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), // 关闭 - defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //重新添加 - defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // 提交审批 - 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.mainListDeleteBtn({hasPermi:'wms:sale-shipment-main-request:delete'}), // 删除 - ] + return [ + defaultButtons.mainListEditBtn({hide:isShowMainButton(row,['1','4']),hasPermi:'wms:sale-shipment-main-request:update'}), // 编辑 + defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:sale-shipment-main-request:close'}), // 关闭 + defaultButtons.mainListReAddBtn({hide:isShowMainButton(row,['4','5']),hasPermi:'wms:sale-shipment-main-request:reAdd'}), //重新添加 + defaultButtons.mainListSubmitBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:sale-shipment-main-request:submit'}), // 提交审批 + 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'}), // 删除 + ] } const tableData = ref([]) // 列表-操作按钮事件 -const buttonTableClick = async (val, row) => { +const buttonTableClick = async (val, row) => { if (val == 'mainClose') { // 关闭 await message.confirm('确认要关闭吗?') tableObject.loading = true @@ -307,7 +308,7 @@ const buttonTableClick = async (val, row) => { console.log(err) }) } else if (val == 'mainHandle') { // 处理 - await message.confirm('确认要 处理吗?') + await message.confirm('确认要处理吗?') tableObject.loading = true SaleShipmentMainApi.handle(row.masterId).then(() => { message.success(t('common.updateSuccess')) @@ -317,7 +318,18 @@ const buttonTableClick = async (val, row) => { tableObject.loading = false console.log(err) }) - } else if (val == 'edit') { // 编辑 + } 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') { // 删除 handleDelete(row.id) @@ -327,7 +339,7 @@ const buttonTableClick = async (val, row) => { /** * 详情 编辑页面打开 - * @param row + * @param row */ const detailOpenForm = (type) => {