From aa93376b22be3195d702750b7e0a22afeb77cff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B7=BB=E7=A0=96-JAVA=5CAdministrator?= <591141169@qq.com> Date: Fri, 16 Aug 2024 18:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8A=A5=E5=BA=9F=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E4=B8=AD=E7=9A=84q1=20q2=20q3=E9=80=9A=E7=9F=A5?= =?UTF-8?q?=E5=8D=95=E5=B1=9E=E6=80=A7=20HL-5263?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scrap/scrapJobMain/scrapJobMain.data.ts | 29 +++++++- .../scrapRecordMain/scrapRecordMain.data.ts | 27 ++++++++ .../scrap/scrapRequestMain/index.vue | 69 +++++++++++++++++-- 3 files changed, 117 insertions(+), 8 deletions(-) diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts index 57b7f701a..8eb790095 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/scrapJobMain.data.ts @@ -26,6 +26,33 @@ export const ScrapJobMain = useCrudSchemas( }, isSearch: true }, + { + label: 'Q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q3通知单号', + field: 'q3Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, { label: '状态', field: 'status', @@ -465,7 +492,7 @@ export const ScrapJobMain = useCrudSchemas( type: 'daterange', defaultTime: [new Date('1 00:00:00'), new Date('1 23:59:59')] } - }, + } }, { label: '创建者', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts index e53fc5a87..1f76fd57c 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/scrapRecordMain.data.ts @@ -35,6 +35,33 @@ export const ScrapRecordMain = useCrudSchemas( }, isSearch: true }, + { + label: 'Q1通知单号', + field: 'q1Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q2通知单号', + field: 'q2Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, + { + label: 'Q3通知单号', + field: 'q3Number', + sort: 'custom', + table: { + width: 180 + }, + isSearch: false + }, { label: '申请时间', field: 'requestTime', diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 76fc6168f..1e99700f7 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -483,14 +483,69 @@ const handleHandle = async (id: number) => { /** 添加/修改操作 */ const formRef = ref() -const openForm = async (type: string, row?: number) => { - ScrapRequestMain.allSchemas.formSchema.forEach((item) => { - if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { - item.componentProps.enterSearch = true - item.componentProps.isSearchList = true - item.componentProps.disabled = false +const openForm = async (type: string, row?: any) => { + if (type == 'create') { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + }) + } else { + if (row.q1Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) } - }) + if (row.q2Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q2Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q1Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) + } + if (row.q3Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + if (item.field == 'q1Number' || item.field == 'q2Number') { + item.componentProps.enterSearch = false + item.componentProps.isSearchList = false + item.componentProps.disabled = true + } + }) + } + if (!row.q3Number && !row.q2Number && !row.q1Number) { + ScrapRequestMain.allSchemas.formSchema.forEach((item) => { + if (item.field == 'q1Number' || item.field == 'q2Number' || item.field == 'q3Number') { + item.componentProps.enterSearch = true + item.componentProps.isSearchList = true + item.componentProps.disabled = false + } + }) + } + } + tableData.value = [] // 重置明细数据 formRef.value.open(type, row) }