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) }