From 75f491617f115a3926314da921918d75e6553231 Mon Sep 17 00:00:00 2001 From: syruan <15555146157@163.com> Date: Mon, 28 Jul 2025 15:54:16 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E7=8A=B6=E6=80=81=EF=BC=8C?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../direct-rotation-apply/index.vue | 4 ++++ .../business-examine/receive-apply/index.vue | 7 +++++++ .../reduction-apply/index.vue | 2 ++ .../material/purchase/goodsAccept/index.vue | 4 ++++ .../purchase/goodsArrived/component/home.vue | 4 ++++ .../purchase/goodsBind/component/home.vue | 4 ++++ .../material/purchase/goodsEntry/index.vue | 4 ++++ .../repair/repairManage/component/home.vue | 21 ++++++++++++++++++- .../scrapManage/component/homeApply.vue | 4 ++++ .../testExamine/component/homeApply.vue | 18 +++++++++++++++- .../repair/testedInBound/component/home.vue | 15 ++++++++++++- 11 files changed, 84 insertions(+), 3 deletions(-) diff --git a/src/views/business-examine/direct-rotation-apply/index.vue b/src/views/business-examine/direct-rotation-apply/index.vue index 1339ada5..bfa6a4a8 100644 --- a/src/views/business-examine/direct-rotation-apply/index.vue +++ b/src/views/business-examine/direct-rotation-apply/index.vue @@ -144,6 +144,10 @@ export default { }, created() { this.userId = sessionStorage.getItem('userId') + // 设置默认状态为第一个选项(待审核) + if (this.statusOptions.length > 0) { + this.queryParams.status = this.statusOptions[0].value + } this.getList() }, methods: { diff --git a/src/views/business-examine/receive-apply/index.vue b/src/views/business-examine/receive-apply/index.vue index f398497c..55048936 100644 --- a/src/views/business-examine/receive-apply/index.vue +++ b/src/views/business-examine/receive-apply/index.vue @@ -188,6 +188,13 @@ export default { } } else { this.userId = sessionStorage.getItem('userId') + // 设置默认状态为第一个选项(待审核) + if (this.statusOptions.length > 0) { + this.queryParams.taskStatus = this.statusOptions[0].value + } + // if (this.statusOptions.length > 1) { + // this.queryParams.taskStatus = this.statusOptions[1].value + // } this.getList() } }, diff --git a/src/views/business-examine/reduction-apply/index.vue b/src/views/business-examine/reduction-apply/index.vue index f5322f2c..20feafec 100644 --- a/src/views/business-examine/reduction-apply/index.vue +++ b/src/views/business-examine/reduction-apply/index.vue @@ -464,6 +464,8 @@ export default { }, created() { this.userId = sessionStorage.getItem('userId') + // 设置默认状态为第一个选项(待审核) + this.queryParams.status = '0' this.getList() }, computed: { diff --git a/src/views/material/purchase/goodsAccept/index.vue b/src/views/material/purchase/goodsAccept/index.vue index 2563b80c..217361a5 100644 --- a/src/views/material/purchase/goodsAccept/index.vue +++ b/src/views/material/purchase/goodsAccept/index.vue @@ -294,6 +294,10 @@ }; }, created() { + // 设置默认状态为第一个选项(未完成) + if (this.taskStatusList.length > 0) { + this.queryParams.isFinish = this.taskStatusList[0].id + } this.getList() }, methods: { diff --git a/src/views/material/purchase/goodsArrived/component/home.vue b/src/views/material/purchase/goodsArrived/component/home.vue index 2c2a61bf..361238da 100644 --- a/src/views/material/purchase/goodsArrived/component/home.vue +++ b/src/views/material/purchase/goodsArrived/component/home.vue @@ -477,6 +477,10 @@ export default { }; }, created() { + // 设置默认状态为第一个选项(未完成) + if (this.taskStatusList.length > 0) { + this.queryParams.isFinish = this.taskStatusList[0].id + } this.getList(); // this.getTypeList() }, diff --git a/src/views/material/purchase/goodsBind/component/home.vue b/src/views/material/purchase/goodsBind/component/home.vue index 17dbd384..8649515d 100644 --- a/src/views/material/purchase/goodsBind/component/home.vue +++ b/src/views/material/purchase/goodsBind/component/home.vue @@ -228,6 +228,10 @@ export default { } }, created() { + // 设置默认状态为第一个选项(未完成) + if (this.taskStatusList.length > 0) { + this.queryParams.isFinish = this.taskStatusList[0].id + } this.getList() }, methods: { diff --git a/src/views/material/purchase/goodsEntry/index.vue b/src/views/material/purchase/goodsEntry/index.vue index 498313c0..284222a7 100644 --- a/src/views/material/purchase/goodsEntry/index.vue +++ b/src/views/material/purchase/goodsEntry/index.vue @@ -269,6 +269,10 @@ export default { if (this.$route.query.buyTask) { this.queryParams.keyWord = this.$route.query.buyTask } + // 设置默认状态为第一个选项(未完成) + if (this.taskStatusList.length > 0) { + this.queryParams.isFinish = this.taskStatusList[0].id + } this.getList() }, methods: { diff --git a/src/views/material/repair/repairManage/component/home.vue b/src/views/material/repair/repairManage/component/home.vue index 9602a426..31079ae6 100644 --- a/src/views/material/repair/repairManage/component/home.vue +++ b/src/views/material/repair/repairManage/component/home.vue @@ -365,12 +365,31 @@ export default { let start = new Date() start.setMonth(start.getMonth() - 1) this.queryParams.time = [this.format(start), this.format(end)] - this.getList(); + // 不在这里直接调用getList,等字典数据加载完成后再调用 // this.initSelectData() // this.InitIGetInfo() }, components: { vueEasyPrint }, methods: { + // 字典数据加载完成后的回调 + onDictReady(dict) { + // 获取repair_task_status的所有选项,并过滤出有效的选项(值为0、1、2、4) + const allOptions = dict.type.repair_task_status || [] + const validOptions = allOptions.filter(item => + item.value == 0 || item.value == 1 || item.value == 2 || item.value == 4 + ) + + // 如果有有效选项,设置第一个为默认值 + if (validOptions.length > 0) { + this.queryParams.repairStatus = validOptions[0].value + } + if (validOptions.length > 1) { + this.queryParams.repairStatus = validOptions[1].value + } + + // 执行查询 + this.getList() + }, format(date) { const y = date.getFullYear() const m = String(date.getMonth() + 1).padStart(2, '0') diff --git a/src/views/material/repair/scrapManage/component/homeApply.vue b/src/views/material/repair/scrapManage/component/homeApply.vue index ffe0f343..145cf610 100644 --- a/src/views/material/repair/scrapManage/component/homeApply.vue +++ b/src/views/material/repair/scrapManage/component/homeApply.vue @@ -127,6 +127,10 @@ export default { }; }, created() { + // 设置默认状态为第一个选项(进行中) + if (this.statusList.length > 0) { + this.queryParams.taskStatus = this.statusList[0].value + } this.getList(); }, methods: { diff --git a/src/views/material/repair/testExamine/component/homeApply.vue b/src/views/material/repair/testExamine/component/homeApply.vue index 9d4ec851..d215bb5a 100644 --- a/src/views/material/repair/testExamine/component/homeApply.vue +++ b/src/views/material/repair/testExamine/component/homeApply.vue @@ -299,9 +299,25 @@ export default { let start = new Date() start.setMonth(start.getMonth() - 1) this.queryParams.time = [this.format(start), this.format(end)] - this.getList(); + // 不在这里直接调用getList,等字典数据加载完成后再调用 }, methods: { + // 字典数据加载完成后的回调 + onDictReady(dict) { + // 获取repair_task_status的所有选项,并过滤出有效的选项(值为10、11、12) + const allOptions = dict.type.repair_task_status || [] + const validOptions = allOptions.filter(item => + item.value == 10 || item.value == 11 || item.value == 12 + ) + + // 如果有有效选项,设置第一个为默认值 + if (validOptions.length > 0) { + this.queryParams.taskStatus = validOptions[0].value + } + + // 执行查询 + this.getList() + }, format(date) { const y = date.getFullYear() const m = String(date.getMonth() + 1).padStart(2, '0') diff --git a/src/views/material/repair/testedInBound/component/home.vue b/src/views/material/repair/testedInBound/component/home.vue index 507b0b8e..30824f8f 100644 --- a/src/views/material/repair/testedInBound/component/home.vue +++ b/src/views/material/repair/testedInBound/component/home.vue @@ -208,10 +208,23 @@ export default { if(this.$route.query.code){ this.queryParams.keyWord=this.$route.query.code } - this.getList(); + // 不在这里直接调用getList,等字典数据加载完成后再调用 }, components: {}, methods: { + // 字典数据加载完成后的回调 + onDictReady(dict) { + // 获取repair_end_task_status的所有选项 + const validOptions = dict.type.repair_end_task_status || [] + + // 如果有有效选项,设置第一个为默认值 + if (validOptions.length > 0) { + this.queryParams.taskStatus = validOptions[0].value + } + + // 执行查询 + this.getList() + }, format(date) { const y = date.getFullYear() const m = String(date.getMonth() + 1).padStart(2, '0')