From 385d27af7b646f2eb0cce27f171ca16f31dd855d Mon Sep 17 00:00:00 2001
From: "YEJIAXING-PC\\lenovo" <591141169@qq.com>
Date: Tue, 15 Oct 2024 15:48:32 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E8=B4=A7?=
=?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=93=8D=E4=BD=9C=E7=BC=BA=E5=B0=91=E4=B8=8A?=
=?UTF-8?q?=E4=BC=A0=E8=B4=A8=E9=87=8F=E6=8A=A5=E5=91=8A=E6=8C=89=E9=92=AE?=
=?UTF-8?q?=20=20YT-334?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../purchasereceiptJobMain/index.vue | 257 +++++++------
.../purchasereceiptRecordMTypeMain/index.vue | 41 +-
.../purchasereceiptRecordMain/index.vue | 349 +++++++++++-------
.../purchasereceiptRecordRefuseMain/index.vue | 267 +++++++++-----
.../purchasereceiptRequestMain/index.vue | 27 +-
5 files changed, 584 insertions(+), 357 deletions(-)
diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
index 2e1e4d1fe..6ea8b010d 100644
--- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue
@@ -1,23 +1,31 @@
-
+
-
-
+
+
-
-
+
{{ row.number }}
-
-
+
+
@@ -82,26 +93,29 @@
:isShowFooterButtton="false"
/>
-
+ v-model="showQualityReport"
+ :title="t('质检明细')"
+ :append-to-body="false"
+ destroy-on-close
+ fullscreen
+ >
+
diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/index.vue
index 4a01ed300..93dddadb1 100644
--- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMTypeMain/index.vue
@@ -115,7 +115,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList'
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
import {getJmreportBaseUrl, getReportUrl} from '@/utils/systemParam'
-
+import { getSwitchByCode } from '@/api/wms/switch'
import { formatDate } from '@/utils/formatTime'
import { usePageLoading } from '@/hooks/web/usePageLoading'
import {mainListPointBtn, mainListPrintInspectionBtn} from "@/utils/disposition/defaultButtons";
@@ -170,27 +170,45 @@ const buttonBaseClick = (val, item) => {
}
}
-// 根据收货来源判断该按钮是否显示
+// 根据收货来源判断该按钮是否显示,根据QMS开关判断该按钮是否显示(检验相关)
+const EnableQms = ref(true)
const isShowSourceTypeButton = (row) => {
- if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
+ if (EnableQms.value) {
+ if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
+ return true
+ } else {
+ return false
+ }
+ } else {
return true
+ }
+}
+
+// 根据QMS开关判断该按钮是否显示(检验相关)
+const isShowSCPAndQMSButton = () => {
+ if (EnableQms.value) {
+ if (routeName.value.includes('SCP')) {
+ return true
+ } else {
+ return false
+ }
} else {
- return false
+ return true
}
}
// 列表-操作按钮
const butttondata = (row,$index) => {
- // const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
- // if(findIndex>-1&&findIndex<$index){
- // return [defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')})]
- // }
+ const findIndex = row['masterId']?tableObject.tableList.findIndex(item=>item['masterId'] == row['masterId']):-1
+ if(findIndex>-1&&findIndex<$index){
+ return [defaultButtons.mainListPrintInspectionBtn({hide:isShowSCPAndQMSButton()})]
+ }
return [
defaultButtons.mainInspectRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createInspectRequest',hide:row.inspectRequestFlag == "FALSE" }),// 生成到货检验申请
defaultButtons.mainPutawayRequestBtn({hasPermi:'wms:purchasereceipt-record-main:createPutawayRequest',hide:row.putawayRequestFlag == "FALSE" }),// 生成采购上架申请
//defaultButtons.mainListPlanCheckQualityReportBtn({hide:row.orderTypeM == "2"}), // 查看质检报告
- // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告
- // defaultButtons.mainListPrintInspectionBtn({hide:routeName.value.includes('SCP')})
+ defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告
+ defaultButtons.mainListPrintInspectionBtn({hide:isShowSCPAndQMSButton()})
]
}
@@ -384,6 +402,9 @@ onMounted(async () => {
tableObject.params = {
orderTypeM : '2'
}
+ await getSwitchByCode('EnableQms').then((res) => {
+ EnableQms.value = res == 'TRUE' ? true : false
+ })
getList()
})
onActivated(() => {
diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
index 7195d526a..78c777a5c 100644
--- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue
@@ -1,23 +1,31 @@
-
+
-
-
+
+
-
-
+
{{ row.number }}
-
-
+
+
@@ -77,8 +88,8 @@
:isShowFooterButtton="false"
/>
-
-
+
-
+ v-model="showQualityReport"
+ :title="t('质检明细')"
+ :append-to-body="false"
+ destroy-on-close
+ fullscreen
+ >
+
-
-
diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
index 75c48c672..92abf9afb 100644
--- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
+++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue
@@ -181,6 +181,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import { formatDate } from '@/utils/formatTime'
import * as SupplieritemApi from '@/api/wms/supplieritem'
import { getAccessToken } from '@/utils/auth'
+import { getSwitchByCode } from '@/api/wms/switch'
import * as PurchaseDetailApi from '@/api/wms/purchaseDetail'
import * as ItembasicApi from '@/api/wms/itembasic'
import { getJmreportBaseUrl } from '@/utils/systemParam'
@@ -356,12 +357,17 @@ const isShowMainButton = (row,val) => {
}
}
-// 根据收货来源判断该按钮是否显示
+// 根据收货来源判断该按钮是否显示,根据QMS开关判断该按钮是否显示(检验相关)
+const EnableQms = ref(true)
const isShowSourceTypeButton = (row) => {
- if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
- return true
+ if (EnableQms.value) {
+ if (row.sourceType == 'EDI' || row.sourceType == 'ASN_ExternalReceipt') {
+ return true
+ } else {
+ return false
+ }
} else {
- return false
+ return true
}
}
@@ -415,7 +421,7 @@ const butttondata = (row,$index) => {
defaultButtons.mainListPointBtn({ hide: isASNShowMainButton(row, ['3','6','8']) }), // 标签打印
defaultButtons.mainListHandleBtn({hide:isShowMainButton(row,['3']),hasPermi:'wms:purchasereceipt-request-main:handle'}), // 处理
defaultButtons.mainListCloseBtn({hide:isShowMainButton(row,['1','2','3','4','6']),hasPermi:'wms:purchasereceipt-request-main:close'}), // 关闭
- // defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告
+ defaultButtons.mainListPlanCheckQualityReportBtn({hide:isShowSourceTypeButton(row)}), // 查看质检报告
]
}
@@ -461,10 +467,10 @@ const buttonTableClick = async (val, row) => {
// 标签打印
labelPrint(row)
}
- // else if(val == 'mainPlanCheckQualityReport'){
- // // 查看质检报告
- // checkQualityReport(row)
- // }
+ else if(val == 'mainPlanCheckQualityReport'){
+ // 查看质检报告
+ checkQualityReport(row)
+ }
}
// 生成标签选择
const onChangeLabel =(field,e,row, index) => {
@@ -902,6 +908,9 @@ const formFormDateChange = (field, val,row, index) => {
/** 初始化 **/
onMounted(async () => {
+ await getSwitchByCode('EnableQms').then((res) => {
+ EnableQms.value = res == 'TRUE' ? true : false
+ })
getList()
importTemplateData.templateUrl = await PurchasereceiptRequestMainApi.importTemplate()
})