From 9bf053cb3c1bb99212a5f1d50fe32e54c68ad0ae Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Mon, 15 Jan 2024 14:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A6=81=E8=B4=A7=E8=AE=A1=E5=88=92=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../purchasePlanMain/index.vue | 37 ++++++++++++++++--- 1 file changed, 31 insertions(+), 6 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index c52d7dae4..ec70f1d80 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -35,12 +35,17 @@ @searchTableSuccess="searchTableSuccess" @submitForm="submitForm" /> - @@ -55,6 +60,7 @@ import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' + import {mainListPurchasePlanModBtn} from "@/utils/disposition/defaultButtons"; // 要货计划 defineOptions({ name: 'PurchasePlanMain' }) @@ -191,6 +197,7 @@ defaultButtons.mainListPurchasePlanAccBtn({ hide: isShowMainButton(row, ['3']) }), // 接受 defaultButtons.mainListPurchasePlanRejBtn({ hide: isShowMainButton(row, ['3']) }), // 不接受 defaultButtons.mainListPurchasePlanWitBtn({ hide: isShowMainButton(row, ['3']) }), // 下架 + defaultButtons.mainListPurchasePlanModBtn({ hide: isShowMainButton(row, ['5']) }), // 修改 // defaultButtons.mainListEditBtn({ hide: isShowMainButton(row, ['1']), hasPermi: 'wms:purchase-plan-main:update' }), // 编辑 // defaultButtons.mainListDeleteBtn({hide:isShowMainButton(row,['1']),hasPermi:'wms:purchase-plan-main:delete'}), // 删除 ] @@ -210,7 +217,9 @@ handleRej(row.id) } else if (val == 'mainPurPlanWit') { // 下架 handleWit(row.id) - } else if (val == 'edit') { // 编辑 + } else if(val == 'mainPurPlanMod'){ // 修改 + handleReOpen(row.id) + }else if (val == 'edit') { // 编辑 openForm('update', row) } else if (val == 'delete') { // 删除 handleDelete(row.id) @@ -269,6 +278,20 @@ } catch { } } + + /** 打开按钮操作 */ + const handleReOpen = async (id : number) => { + try { + // 打开的二次确认 + await message.confirm('是否重新打开所选中数据?') + // 发起打开 + await PurchasePlanMainApi.openPurchasePlanMain(id) + message.success(t('打开成功!')) + // 刷新列表 + await getList() + } catch { } + } + /** 发布按钮操作 */ const handlePublish = async (id : number) => { try { @@ -391,9 +414,9 @@ } // 子表新增/编辑校验 - const detailValidate = (data) => { + const detailValidate = async (data) => { let tag = false - PurchaseDetailApi.getPurchaseDetailPage({ + await PurchaseDetailApi.getPurchaseDetailPage({ number: data.poNumber, lineNumber: data.poLine }).then(res => { @@ -403,6 +426,8 @@ } else { tag = true } + }).catch(err =>{ + console.log(err); }) return tag }