From 5f50a11ae5a805063f8149c0940faaab682e4d3c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 15 Oct 2024 11:55:34 +0800 Subject: [PATCH] =?UTF-8?q?YT-378Q1=E5=85=B3=E8=81=94WMS=E7=9A=84=E8=8F=9C?= =?UTF-8?q?=E5=8D=95=20:=20=E5=AE=A2=E6=88=B7=E9=80=80=E8=B4=A7=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=EF=BC=8C=E4=BB=BB=E5=8A=A1=EF=BC=8C=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20Q2=E5=85=B3=E8=81=94WMS=E7=9A=84=E8=8F=9C=E5=8D=95=20:=20?= =?UTF-8?q?=E9=87=87=E8=B4=AD=E9=80=80=E8=B4=A7=E7=94=B3=E8=AF=B7=EF=BC=8C?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=EF=BC=8C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/wms/switch/index.ts | 7 +++- src/components/BasicForm/src/BasicForm.vue | 2 +- .../customerreturnJobMain/index.vue | 23 +++++++++++ .../customerreturnRecordMain/index.vue | 23 +++++++++++ .../customerreturnRequestMain/index.vue | 41 ++++++++++++++++--- .../customerStatement/index.vue | 11 +++-- .../purchasereturnRequestMainNew/index.vue | 28 +++++++++++++ .../purchasereturnRequestMainNew.data.ts | 2 +- 8 files changed, 125 insertions(+), 12 deletions(-) diff --git a/src/api/wms/switch/index.ts b/src/api/wms/switch/index.ts index fa520e9e3..b9fdb8370 100644 --- a/src/api/wms/switch/index.ts +++ b/src/api/wms/switch/index.ts @@ -52,5 +52,10 @@ export const exportSwitch = async (params) => { // 下载用户导入模板 export const importTemplate = () => { - return request.download({ url: '/wms/switch/get-import-template' }) + return request.download({ url: '/wms/switch/get-import-template'}) +} + +// 获取开关详情 +export const getSwitchByCode = async (code) => { + return await request.get({ url: '/wms/switch/getByCode?code=' + code }) } \ No newline at end of file diff --git a/src/components/BasicForm/src/BasicForm.vue b/src/components/BasicForm/src/BasicForm.vue index 3d0c9f2e5..cd429fc71 100644 --- a/src/components/BasicForm/src/BasicForm.vue +++ b/src/components/BasicForm/src/BasicForm.vue @@ -444,7 +444,7 @@ const tabChange = (item) => { tabSheet.value = item.prop } - +console.log(898989,formSchema.value) // 列表-按钮 // const buttondata = [ // defaultButtons.mainListEditBtn(null), // 编辑 diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index 2bebcf828..a3523ca59 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/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: 'CustomerreturnJobMain' }) @@ -87,6 +88,28 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref([...CustomerreturnJobMain.allSchemas.tableColumns,...CustomerreturnJobDetail.allSchemas.tableMainColumns]) +const CustomerreturnJobMainAllSchema =ref(JSON.parse(JSON.stringify(CustomerreturnJobMain))) +// 是否启用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) { + CustomerreturnJobMain.allSchemas = CustomerreturnJobMainAllSchema.value.allSchemas + } else { + CustomerreturnJobMain.allSchemas.formSchema = CustomerreturnJobMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number') + CustomerreturnJobMain.allSchemas.tableColumns = CustomerreturnJobMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number') + CustomerreturnJobMain.allSchemas.tableFormColumns = CustomerreturnJobMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number') + CustomerreturnJobMain.allSchemas.tableMainColumns = CustomerreturnJobMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number') + CustomerreturnJobMain.allSchemas.detailSchema = CustomerreturnJobMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number') + CustomerreturnJobMain.allSchemas.searchSchema = CustomerreturnJobMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number') +} + updateKey.value++ + }) +} +getSwitchByCode1() + // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue index a4a8136da..e0802e765 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/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: 'CustomerreturnRecordMain' }) @@ -84,6 +85,28 @@ const routeName = ref() routeName.value = route.name const tableColumns = ref([...CustomerreturnRecordMain.allSchemas.tableColumns,...CustomerreturnRecordDetail.allSchemas.tableMainColumns]) +const CustomerreturnRecordMainAllSchema =ref(JSON.parse(JSON.stringify(CustomerreturnRecordMain))) +// 是否启用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) { + CustomerreturnRecordMain.allSchemas = CustomerreturnRecordMainAllSchema.value.allSchemas + } else { + CustomerreturnRecordMain.allSchemas.formSchema = CustomerreturnRecordMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number') + CustomerreturnRecordMain.allSchemas.tableColumns = CustomerreturnRecordMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number') + CustomerreturnRecordMain.allSchemas.tableFormColumns = CustomerreturnRecordMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number') + CustomerreturnRecordMain.allSchemas.tableMainColumns = CustomerreturnRecordMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number') + CustomerreturnRecordMain.allSchemas.detailSchema = CustomerreturnRecordMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number') + CustomerreturnRecordMain.allSchemas.searchSchema = CustomerreturnRecordMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number') +} + updateKey.value++ + }) +} +getSwitchByCode1() + // 字段设置 更新主列表字段 const updataTableColumns = (val) => { tableColumns.value = val diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index dfeeb45b7..799793a0b 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -60,6 +60,7 @@ @onEnter="onEnter" @inputNumberChange="inputNumberChange" @clearSearchInput="clearSearchInput" + :key="updateKey" /> @@ -119,6 +120,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: 'CustomerreturnRequestMain' }) @@ -131,8 +133,30 @@ const routeName = ref() const customerCode = ref() const genLabelId = ref(); //主表ID routeName.value = route.name -const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns,...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) - +const CustomerreturnRequestMainAllSchema =ref(JSON.parse(JSON.stringify(CustomerreturnRequestMain))) +const tableColumns = ref([...CustomerreturnRequestMain.allSchemas.tableColumns, ...CustomerreturnRequestDetail.allSchemas.tableMainColumns]) + +// 是否启用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) { + CustomerreturnRequestMain.allSchemas = CustomerreturnRequestMainAllSchema.value.allSchemas + } else { + CustomerreturnRequestMain.allSchemas.formSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.formSchema.filter(item => item.field != 'q1Number') + CustomerreturnRequestMain.allSchemas.tableColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableColumns.filter(item => item.field != 'q1Number') + CustomerreturnRequestMain.allSchemas.tableFormColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableFormColumns.filter(item => item.field != 'q1Number') + CustomerreturnRequestMain.allSchemas.tableMainColumns = CustomerreturnRequestMainAllSchema.value.allSchemas.tableMainColumns.filter(item => item.field != 'q1Number') + CustomerreturnRequestMain.allSchemas.detailSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.detailSchema.filter(item => item.field != 'q1Number') + CustomerreturnRequestMain.allSchemas.searchSchema = CustomerreturnRequestMainAllSchema.value.allSchemas.searchSchema.filter(item => item.field != 'q1Number') + console.log(344,CustomerreturnRequestMain.allSchemas) + } + updateKey.value++ + }) +} +getSwitchByCode1() // 字段设置 更新主列表字段 const updataTableColumns = (val) => { @@ -224,10 +248,10 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => obj.packingNumber = '' // 包装号所有为空 CustomerreturnRequestDetail.allSchemas.tableFormColumns.map(item =>{ if(item.field == 'packingNumber') { - item.isInpuFocusShow = false - item.tableForm.isInpuFocusShow = false - item.tableForm.disabled = true - } + item.isInpuFocusShow = false + item.tableForm.isInpuFocusShow = false + item.tableForm.disabled = true + } }) }) if (res) { @@ -561,6 +585,7 @@ const showLabelSuccess = async (formField, searchField, val, formRef, type, row) const formRef = ref() const openForm =async (type: string, row?: number) => { originTableData.value = [] + if(type == "update"){ CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { if(item.field == 'deliverRecordNumber'){ @@ -577,6 +602,7 @@ const openForm =async (type: string, row?: number) => { // } }) }else { + CustomerreturnRequestMain.allSchemas.formSchema.forEach((item) => { if(item.field == 'deliverRecordNumber'){ item.componentProps.isSearchList = true @@ -831,8 +857,11 @@ const searchFormClick = (searchData) => { } /** 初始化 **/ + onMounted(async () => { getList() importTemplateData.templateUrl = await CustomerreturnRequestMainApi.importTemplate() + + }) diff --git a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue index ed07882ab..2050d0668 100644 --- a/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue +++ b/src/views/wms/deliversettlementManage/moldAllocation/customerStatement/index.vue @@ -283,7 +283,7 @@ const detailRef = ref() const chooseRow = ref() const openDetail = (row: any, titleName: any, titleValue: any) => { chooseRow.value = row - detailRef.value.openDetail(row, titleName, titleValue, 'basicCustomerStatementMain') + detailRef.value.openDetail( chooseRow.value, titleName, titleValue, 'basicCustomerStatementMain') } /** 删除按钮操作 */ @@ -531,7 +531,7 @@ const changeTabs = async (item) => { } } // 点击子表按钮事件 -const detailButtonBaseClick = (val, item, detailTableObject) => { +const detailButtonBaseClick =async (val, item, detailTableObject) => { console.log(val, item, detailTableObject) if (val == 'export') { // 子表导出明细 @@ -545,7 +545,12 @@ const detailButtonBaseClick = (val, item, detailTableObject) => { } }else if (val == 'againContrast') { // 重新对比 - tapRematch(chooseRow.value.id) + try{ + await tapRematch(chooseRow.value.id) + chooseRow.value = 3 + } catch { + + } }else if (val == 'confirmResults') { // 确认对比结果 tapConfirmationContrast(chooseRow.value.id) diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index cf11e26b5..6f4b41026 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -35,6 +35,7 @@ v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage" v-model:sort="tableObject.sort" + :key="updateKey" >