diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue index 86ab889fa..e7e6ecf7f 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue @@ -75,6 +75,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 报废出库任务主 defineOptions({ name: 'ScrapJobMain' }) @@ -87,6 +88,27 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref([...ScrapJobMain.allSchemas.tableColumns,...ScrapJobDetail.allSchemas.tableMainColumns]) +const ScrapJobMainAllSchema =ref(JSON.parse(JSON.stringify(ScrapJobMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ScrapJobMain.allSchemas = ScrapJobMainAllSchema.value.allSchemas + } else { + ScrapJobMain.allSchemas.formSchema = ScrapJobMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapJobMain.allSchemas.tableColumns = ScrapJobMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapJobMain.allSchemas.tableFormColumns = ScrapJobMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapJobMain.allSchemas.tableMainColumns = ScrapJobMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapJobMain.allSchemas.detailSchema = ScrapJobMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapJobMain.allSchemas.searchSchema = ScrapJobMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue index 0104e9141..ddfa35d62 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue @@ -70,6 +70,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 报废出库记录主 defineOptions({ name: 'ScrapRecordMain' }) @@ -82,6 +83,27 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref([...ScrapRecordMain.allSchemas.tableColumns,...ScrapRecordDetail.allSchemas.tableMainColumns]) +const ScrapRecordMainAllSchema =ref(JSON.parse(JSON.stringify(ScrapRecordMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ScrapRecordMain.allSchemas = ScrapRecordMainAllSchema .value.allSchemas + } else { + ScrapRecordMain.allSchemas.formSchema = ScrapRecordMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRecordMain.allSchemas.tableColumns = ScrapRecordMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRecordMain.allSchemas.tableFormColumns = ScrapRecordMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRecordMain.allSchemas.tableMainColumns = ScrapRecordMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRecordMain.allSchemas.detailSchema = ScrapRecordMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRecordMain.allSchemas.searchSchema = ScrapRecordMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 8065b3e74..fbc71c901 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -73,6 +73,7 @@ @submitForm="submitForm" @tableFormSelectOnBlur="tableFormSelectOnBlur" @clearSearchInput="clearSearchInput" + :key="updateKey" /> @@ -118,6 +119,7 @@ import * as ScrapRequestMainApi from '@/api/wms/scrapRequestMain' import * as ScrapRequestDetailApi from '@/api/wms/scrapRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as StdcostpriceApi from '@/api/wms/stdcostprice' +import { getSwitchByCode } from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' const { loadStart, loadDone } = usePageLoading() @@ -134,7 +136,27 @@ const tableColumns = ref([ ...ScrapRequestMain.allSchemas.tableColumns, ...ScrapRequestDetail.allSchemas.tableMainColumns ]) - +const ScrapRequestMainAllSchema =ref(JSON.parse(JSON.stringify(ScrapRequestMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ScrapRequestMain.allSchemas = ScrapRequestMainAllSchema.value.allSchemas + } else { + ScrapRequestMain.allSchemas.formSchema = ScrapRequestMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRequestMain.allSchemas.tableColumns = ScrapRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRequestMain.allSchemas.tableFormColumns = ScrapRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRequestMain.allSchemas.tableMainColumns = ScrapRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRequestMain.allSchemas.detailSchema = ScrapRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + ScrapRequestMain.allSchemas.searchSchema = ScrapRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number'&&item.field != 'q2Number'&&item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue index ad0813ccb..02f63edee 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -77,6 +77,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 生产退料记录主 defineOptions({ name: 'ProductionscrapRecordMain' }) @@ -88,7 +89,27 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...ProductionscrapRecordMain.allSchemas.tableColumns,...ProductionscrapRecordDetail.allSchemas.tableMainColumns]) - +const ProductionscrapRecordMainAllSchema =ref(JSON.parse(JSON.stringify(ProductionscrapRecordMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ProductionscrapRecordMain.allSchemas = ProductionscrapRecordMainAllSchema.value.allSchemas + } else { + ProductionscrapRecordMain.allSchemas.formSchema = ProductionscrapRecordMainAllSchema.value.allSchemas.formSchema.filter(item =>item.field != 'q3Number') + ProductionscrapRecordMain.allSchemas.tableColumns = ProductionscrapRecordMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q3Number') + ProductionscrapRecordMain.allSchemas.tableFormColumns = ProductionscrapRecordMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q3Number') + ProductionscrapRecordMain.allSchemas.tableMainColumns = ProductionscrapRecordMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q3Number') + ProductionscrapRecordMain.allSchemas.detailSchema = ProductionscrapRecordMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q3Number') + ProductionscrapRecordMain.allSchemas.searchSchema = ProductionscrapRecordMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue index 68a12bbec..5889d6aa2 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -64,6 +64,7 @@ @submitForm="submitForm" @inputNumberChange="inputNumberChange" @clearSearchInput="clearSearchInput" + :key="updateKey" /> @@ -125,6 +126,7 @@ import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 线标原料报废申请 defineOptions({ name: 'ProductionscrapRequestMain' }) @@ -136,6 +138,28 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...ProductionscrapRequestMain.allSchemas.tableColumns,...ProductionscrapRequestDetail.allSchemas.tableMainColumns]) +const ProductionscrapRequestMainAllSchema =ref(JSON.parse(JSON.stringify(ProductionscrapRequestMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ProductionscrapRequestMain.allSchemas = ProductionscrapRequestMainAllSchema.value.allSchemas + } else { + ProductionscrapRequestMain.allSchemas.formSchema = ProductionscrapRequestMainAllSchema.value.allSchemas.formSchema.filter(item =>item.field != 'q3Number') + ProductionscrapRequestMain.allSchemas.tableColumns = ProductionscrapRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q3Number') + ProductionscrapRequestMain.allSchemas.tableFormColumns = ProductionscrapRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q3Number') + ProductionscrapRequestMain.allSchemas.tableMainColumns = ProductionscrapRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q3Number') + ProductionscrapRequestMain.allSchemas.detailSchema = ProductionscrapRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q3Number') + ProductionscrapRequestMain.allSchemas.searchSchema = ProductionscrapRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() + //创建标签 const detailListTableColumns = ProductionscrapRequestDetailLabel.allSchemas diff --git a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue index ae2d97a3c..5fc2871a6 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue @@ -97,6 +97,7 @@ import {getProductscrapBomDismantleRecordPage} from "@/api/wms/bomDismantle"; import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 制品报废记录主 defineOptions({ name: 'ProductscrapRecordMain' }) @@ -108,6 +109,27 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...ProductscrapRecordMain.allSchemas.tableColumns,...ProductscrapRecordDetail.allSchemas.tableMainColumns]) +const ProductscrapRecordMainAllSchema =ref(JSON.parse(JSON.stringify(ProductscrapRecordMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ProductscrapRecordMain.allSchemas = ProductscrapRecordMainAllSchema.value.allSchemas + } else { + ProductscrapRecordMain.allSchemas.formSchema = ProductscrapRecordMainAllSchema.value.allSchemas.formSchema.filter(item =>item.field != 'q3Number') + ProductscrapRecordMain.allSchemas.tableColumns = ProductscrapRecordMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q3Number') + ProductscrapRecordMain.allSchemas.tableFormColumns = ProductscrapRecordMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q3Number') + ProductscrapRecordMain.allSchemas.tableMainColumns = ProductscrapRecordMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q3Number') + ProductscrapRecordMain.allSchemas.detailSchema = ProductscrapRecordMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q3Number') + ProductscrapRecordMain.allSchemas.searchSchema = ProductscrapRecordMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 详情 table 操作扩展 按钮 const buttondataTable = ref([{ diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index aee3e1a01..178fd96fe 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -63,6 +63,7 @@ @submitForm="submitForm" @buttonOperationClick="buttonOperationClick" @clearSearchInput="clearSearchInput" + :key='updateKey' /> @@ -143,6 +144,7 @@ import * as BomApi from "@/api/wms/bom"; import * as BalanceApi from "@/api/wms/balance"; import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 制品报废申请 defineOptions({ name: 'ProductscrapRequestMain' }) @@ -154,6 +156,27 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...ProductscrapRequestMain.allSchemas.tableColumns,...ProductscrapRequestDetail.allSchemas.tableMainColumns]) +const ProductscrapRequestMainAllSchema =ref(JSON.parse(JSON.stringify(ProductscrapRequestMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + ProductscrapRequestMain.allSchemas = ProductscrapRequestMainAllSchema.value.allSchemas + } else { + ProductscrapRequestMain.allSchemas.formSchema = ProductscrapRequestMainAllSchema.value.allSchemas.formSchema.filter(item =>item.field != 'q3Number') + ProductscrapRequestMain.allSchemas.tableColumns = ProductscrapRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q3Number') + ProductscrapRequestMain.allSchemas.tableFormColumns = ProductscrapRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q3Number') + ProductscrapRequestMain.allSchemas.tableMainColumns = ProductscrapRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q3Number') + ProductscrapRequestMain.allSchemas.detailSchema = ProductscrapRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q3Number') + ProductscrapRequestMain.allSchemas.searchSchema = ProductscrapRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q3Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 详情 table 操作扩展 按钮 const buttondataTable = ref([{ diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue index 8facc3d1b..a91864288 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue @@ -75,6 +75,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 采购退货任务主 defineOptions({ name: 'PurchasereturnJobMain' }) @@ -86,7 +87,28 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...PurchasereturnJobMain.allSchemas.tableColumns,...PurchasereturnJobDetail.allSchemas.tableColumns]) +const PurchasereturnJobMainAllSchema =ref(JSON.parse(JSON.stringify(PurchasereturnJobMain))) +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + PurchasereturnJobMain.allSchemas = PurchasereturnJobMainAllSchema.value.allSchemas + } else { + PurchasereturnJobMain.allSchemas.formSchema = PurchasereturnJobMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q2Number') + PurchasereturnJobMain.allSchemas.tableColumns = PurchasereturnJobMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q2Number') + PurchasereturnJobMain.allSchemas.tableFormColumns = PurchasereturnJobMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q2Number') + PurchasereturnJobMain.allSchemas.tableMainColumns = PurchasereturnJobMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q2Number') + PurchasereturnJobMain.allSchemas.detailSchema = PurchasereturnJobMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q2Number') + PurchasereturnJobMain.allSchemas.searchSchema = PurchasereturnJobMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q2Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index 8dfa91796..9ab16f26e 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -72,6 +72,7 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import { usePageLoading } from '@/hooks/web/usePageLoading' +import { getSwitchByCode } from '@/api/wms/switch' const { loadStart, loadDone } = usePageLoading() // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordMain' }) @@ -83,6 +84,28 @@ const route = useRoute() // 路由信息 const routeName = ref() routeName.value = route.name const tableColumns = ref([...PurchasereturnRecordMain.allSchemas.tableColumns,...PurchasereturnRecordDetail.allSchemas.tableMainColumns]) +const PurchasereturnRecordMainAllSchema =ref(JSON.parse(JSON.stringify(PurchasereturnRecordMain))) + +// 是否启用QMS开启显示q1q2q3 +const EnableQms = ref(true) +const updateKey = ref(0) +const getSwitchByCode1 =async () => { + await getSwitchByCode("EnableQms").then((res) => { + EnableQms.value = res == 'TRUE' ? true : false + if (EnableQms.value) { + PurchasereturnRecordMain.allSchemas = PurchasereturnRecordMainAllSchema.value.allSchemas + } else { + PurchasereturnRecordMain.allSchemas.formSchema = PurchasereturnRecordMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q2Number') + PurchasereturnRecordMain.allSchemas.tableColumns = PurchasereturnRecordMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q2Number') + PurchasereturnRecordMain.allSchemas.tableFormColumns = PurchasereturnRecordMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q2Number') + PurchasereturnRecordMain.allSchemas.tableMainColumns = PurchasereturnRecordMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q2Number') + PurchasereturnRecordMain.allSchemas.detailSchema = PurchasereturnRecordMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q2Number') + PurchasereturnRecordMain.allSchemas.searchSchema = PurchasereturnRecordMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q2Number') + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index 6f4b41026..87a66d973 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -206,6 +206,7 @@ const isShowButton = ref(true) const PurchasereturnRequestMainNewAllSchema =ref(JSON.parse(JSON.stringify(PurchasereturnRequestMainNew))) +const PurchasereturnRequestMainAllSchema =ref(JSON.parse(JSON.stringify(PurchasereturnRequestMain))) // 是否启用QMS开启显示q1q2q3 const EnableQms = ref(true) const updateKey = ref(0) @@ -214,6 +215,7 @@ const getSwitchByCode1 =async () => { EnableQms.value = res == 'TRUE' ? true : false if (EnableQms.value) { PurchasereturnRequestMainNew.allSchemas = PurchasereturnRequestMainNewAllSchema.value.allSchemas + PurchasereturnRequestMain.allSchemas = PurchasereturnRequestMainAllSchema.value.allSchemas } else { PurchasereturnRequestMainNew.allSchemas.formSchema = PurchasereturnRequestMainNewAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q2Number') PurchasereturnRequestMainNew.allSchemas.tableColumns = PurchasereturnRequestMainNewAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q2Number') @@ -221,8 +223,14 @@ const getSwitchByCode1 =async () => { PurchasereturnRequestMainNew.allSchemas.tableMainColumns = PurchasereturnRequestMainNewAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q2Number') PurchasereturnRequestMainNew.allSchemas.detailSchema = PurchasereturnRequestMainNewAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q2Number') PurchasereturnRequestMainNew.allSchemas.searchSchema = PurchasereturnRequestMainNewAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q2Number') + + PurchasereturnRequestMain.allSchemas.formSchema = PurchasereturnRequestMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q2Number') + PurchasereturnRequestMain.allSchemas.tableColumns = PurchasereturnRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q2Number') + PurchasereturnRequestMain.allSchemas.tableFormColumns = PurchasereturnRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q2Number') + PurchasereturnRequestMain.allSchemas.tableMainColumns = PurchasereturnRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q2Number') + PurchasereturnRequestMain.allSchemas.detailSchema = PurchasereturnRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q2Number') + PurchasereturnRequestMain.allSchemas.searchSchema = PurchasereturnRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q2Number') } - console.log(999,PurchasereturnRequestMainNew.allSchemas) updateKey.value++ }) } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts index 73e9266a3..13c162522 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/purchasereturnRequestMainNew.data.ts @@ -261,7 +261,7 @@ export const PurchasereturnRequestMainNew = useCrudSchemas( } }, { - label: 'Q2通知单号11', + label: 'Q2通知单号', field: 'q2Number', sort: 'custom', isSearch: false,