From 5d04261295c93ba7577f72e2015b5eed0412a1dc Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Wed, 26 Jun 2024 18:04:00 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=87=87=E8=B4=AD=E6=94=B6=E8=B4=A7?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/purchasereceiptJobMain/index.ts | 4 +-- src/locales/en-US.ts | 3 +- src/locales/zh-CN.ts | 1 + .../purchasereceiptJobMain/index.vue | 33 +++++++++++++++---- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/api/wms/purchasereceiptJobMain/index.ts b/src/api/wms/purchasereceiptJobMain/index.ts index 25f05c601..79e546090 100644 --- a/src/api/wms/purchasereceiptJobMain/index.ts +++ b/src/api/wms/purchasereceiptJobMain/index.ts @@ -136,6 +136,6 @@ export const acceptPurchasereceiptJobMain = (id: number) => { } // 拒收采购收货任务主 -export const refusalPurchasereceiptJobMain = (id: number) => { - return request.put({ url: '/wms/purchasereceipt-job-main/refusal?id=' + id }) +export const refusalPurchasereceiptJobMain = (data) => { + return request.post({ url: '/wms/purchasereceipt-job-main/refusal',data}) } diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts index ec715bc6f..19f98f6c5 100644 --- a/src/locales/en-US.ts +++ b/src/locales/en-US.ts @@ -1137,7 +1137,8 @@ export default { '驳回原因不能为空,且不超过60字':'The reason for rejection cannot be empty and cannot exceed 60 words', 批量发布:'Batch release', '重新生成标签会删除上次生成的标签,是否确认继续?':'Regenerating labels will delete the last generated label. Are you sure you want to continue?', - '确 认':'Confirm' + '确 认':'Confirm', + 请输入拒收原因:'Please enter the reason for rejection' }, diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts index f7586d6ea..3b9c17161 100644 --- a/src/locales/zh-CN.ts +++ b/src/locales/zh-CN.ts @@ -1138,6 +1138,7 @@ export default { 批量发布:'批量发布', '重新生成标签会删除上次生成的标签,是否确认继续?':'重新生成标签会删除上次生成的标签,是否确认继续?', '确 认':'确 认', + 请输入拒收原因:'请输入拒收原因' }, } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 58a8a2000..4843c49c6 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -249,8 +249,8 @@ const buttonTableClick = async (val, row) => { // 查看质检报告 checkQualityReport(row) } else if(val == 'mainJobRefusal'){ - handleRefusal(row.masterId) - getList() + // handleRefusal(row.masterId) + resonSubmit(row) } } // 查看质检报告 @@ -270,12 +270,33 @@ const handleClose = async (id: number) => { await getList() } catch {} } - +const resonSubmit = async (row)=>{ + + ElMessageBox.prompt(t('ts.请输入拒收原因'), t('ts.提示'), { + confirmButtonText: t('common.ok'), + cancelButtonText: t('common.cancel'), + inputPattern: /^[\s\S]*.*\S[\s\S]*$/, // 判断非空,且非空格 + inputErrorMessage: t(`ts.${'驳回原因不能为空,且不超过256字'}`), + inputType:'textarea', + inputValidator:(value)=>{ + if(value.length>60||value.length==0){ + return false + }else{ + return true + } + } + }).then(({ value }) => { + // 驳回原因 + handleRefusal(row.masterId,value) + }) + .catch(() => { + }) + } /** 拒收按钮操作 */ -const handleRefusal = async (id: number) => { +const handleRefusal = async (id: number,refuseReason:string) => { + // refuseReason try { - await message.confirm(t('common.confirmRefusal')) - await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain(id) + await PurchasereceiptJobMainApi.refusalPurchasereceiptJobMain({id,refuseReason}) message.success(t('common.refusalSuccess')) await getList() } catch {} From 757a3cc41a6b712a96cda160a7f318cbe94d8365 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 26 Jun 2024 18:16:33 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8B=92=E6=94=B6=E6=98=8E=E7=BB=86?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/disposition/tabsList.ts | 6 ++++++ .../purchasereceipt/purchasereceiptJobMain/index.vue | 2 +- .../purchasereceiptRecordRefuseMain/index.vue | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/utils/disposition/tabsList.ts b/src/utils/disposition/tabsList.ts index 77e9c47c6..64d82ab79 100644 --- a/src/utils/disposition/tabsList.ts +++ b/src/utils/disposition/tabsList.ts @@ -38,3 +38,9 @@ export const PurchasereceiptRequestTabsList = [{ } ] +export const PurchasereceiptRefuseRequestTabsList = [{ + label: "拒收明细", + prop: 'receiptDetail', +} +] + diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 4843c49c6..a1fe92cdd 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -220,7 +220,7 @@ const butttondata = (row,$index) => { { label: '拒收', name: 'mainJobRefusal', - hide: isShowMainButton(row, ['1']), + hide: isShowMainButton(row, ['2']), type: 'primary', icon: '', color: '', diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue index c4befcd4d..a9c77fe87 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue @@ -58,7 +58,7 @@ :detailAllSchemas="detailAllSchemas" :detailAllSchemasRules="PurchasereceiptRecordDetailRules" :apiPage="apiPage" - :tabs="PurchasereceiptRequestTabsList" + :tabs="PurchasereceiptRefuseRequestTabsList" @changeTabs="changeTabs" :buttondataTable="buttondataTable" @tableFormButton="tableFormButton" @@ -112,7 +112,7 @@ import { PurchasereceiptRecordMain, import * as PurchasereceiptRecordMainApi from '@/api/wms/purchasereceiptRecordMain' import * as PurchasereceiptRecordDetailApi from '@/api/wms/purchasereceiptRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' -import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' +import { PurchasereceiptRefuseRequestTabsList } from '@/utils/disposition/tabsList' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' // 采购收货记录主 @@ -314,7 +314,7 @@ const searchFormClick = (searchData) => { const changeTabs = (data) =>{ if(data.prop == 'receiptDetail'){ console.log(data) - apiPage.value = routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPage + apiPage.value = routeName.value.includes('SCP')?PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailPageSCP:PurchasereceiptRecordDetailApi.getPurchasereceiptRecordDetailRefusePage detailAllSchemas.value = PurchasereceiptRecordDetail.allSchemas tabeKey.value = 'receiptDetail' }else if(data.prop == 'scarceGoodsDetail'){ From d9d5208eff6fc4a609555a4712eacf646fb489e7 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Wed, 26 Jun 2024 19:53:03 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=88=B6=E5=93=81=E4=B8=8A=E6=9E=B6?= =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productputaway/productputawayJobMain/index.vue | 12 ++++++++++++ .../productputawayJobMain.data.ts | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 9ca0bd98f..e4209c074 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -73,6 +73,8 @@ import * as ProductputawayJobMainApi from '@/api/wms/productputawayJobMain' import * as ProductputawayJobDetailApi from '@/api/wms/productputawayJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' +import {getAccessToken} from "@/utils/auth"; +import { getJmreportBaseUrl } from '@/utils/systemParam' // 制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -156,6 +158,7 @@ const butttondata = (row,$index) => { return [] } return [ + defaultButtons.mainListDocumentPrintBtn(null), // 单据打印 defaultButtons.mainListJobAccBtn({hide:isShowMainButton(row,['1'])}), // 承接 defaultButtons.mainListJobCloBtn({hide:isShowMainButton(row,['1'])}), // 关闭 defaultButtons.mainListJobAbaBtn({hide:isShowMainButton(row,['2'])}), // 放弃 @@ -244,6 +247,9 @@ const buttonTableClick = async (val, row) => { } else if (val == 'mainJobAcc') { // 承接 await ProductputawayJobMainApi.acceptProductputawayMain(row.masterId) getList() + } else if (val == 'documentPrint') { + // 单据打印 + handleDocumentPrint(row) } } // 获取部门 用于详情 部门回显 @@ -256,6 +262,12 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { detailRef.value.openDetail(row, titleName, titleValue,'jobProductputawayMain') } +const BASE_URL = getJmreportBaseUrl() +const src = ref(BASE_URL + '/jmreport/view/965858364788637696?token=' + getAccessToken()) +const handleDocumentPrint = async (row) => { + window.open(src.value+'&id='+row.masterId) +} + /** 导出按钮操作 */ const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts index ba00d25be..bed4de6a6 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/productputawayJobMain.data.ts @@ -575,7 +575,7 @@ export const ProductputawayJobMain = useCrudSchemas(reactive([ isDetail: false, isForm: false, table: { - width: 150, + width: 300, fixed: 'right' }, }