From 32260416dc889e4f6d478f203d28560e30194b1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=83=91=E6=98=8E=E6=A2=81?= <2429105222@qq.com> Date: Mon, 24 Apr 2023 11:07:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=8D=95=E6=8D=AE=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/purchase/purApply/purApply.vue | 3 +- .../purchase/purApply/pureApplyAudit.vue | 38 ++++++++++++------- .../purchase/purApply/pureApplySearch.vue | 24 +++++++++--- src/views/purchase/purPlan/purPlan.vue | 26 +++++++++---- src/views/purchase/purPlan/purPlanAudit.vue | 23 ++++++++--- src/views/purchase/purPlan/purPlanSearch.vue | 26 +++++++++---- 6 files changed, 99 insertions(+), 41 deletions(-) diff --git a/src/views/purchase/purApply/purApply.vue b/src/views/purchase/purApply/purApply.vue index 9506a61c..36b10996 100644 --- a/src/views/purchase/purApply/purApply.vue +++ b/src/views/purchase/purApply/purApply.vue @@ -26,7 +26,7 @@ - + { this.invList = res.data || []; - this.getBusType(); }) }, getDeptList() { diff --git a/src/views/purchase/purApply/pureApplyAudit.vue b/src/views/purchase/purApply/pureApplyAudit.vue index ba0c05f4..2364418b 100644 --- a/src/views/purchase/purApply/pureApplyAudit.vue +++ b/src/views/purchase/purApply/pureApplyAudit.vue @@ -26,7 +26,7 @@ - + { - this.invList = res.data || []; - this.getBusType(); - }) - }, - getDeptList() { - getDeptListByUser().then((res) => { - this.deptList = res.data || []; - }); + getInvList() { + var query={ + parentId:this.filterQuery.targetDeptCode + } + filterSubAll(query).then((res) => { + this.invList = res.data || []; + }) + }, + getDeptList() { + getDeptListByUser().then((res) => { + this.deptList = res.data || []; + if(this.deptList.length>0){ + this.filterQuery.targetDeptCode=this.deptList[0].code + this.invCodebe=this.filterQuery.targetDeptCode + } + this.getList(); + this. getInvList(); + }); }, } , @@ -401,8 +415,6 @@ export default { let start = new Date(); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); this.actDateRange = [start, end]; - this.getList(); - this.getInvList(); this.getDeptList(); } , diff --git a/src/views/purchase/purApply/pureApplySearch.vue b/src/views/purchase/purApply/pureApplySearch.vue index daa24c9c..d278bf74 100644 --- a/src/views/purchase/purApply/pureApplySearch.vue +++ b/src/views/purchase/purApply/pureApplySearch.vue @@ -11,7 +11,7 @@ - + - + { + var query={ + parentId:this.filterQuery.targetDeptCode + } + filterSubAll(query).then((res) => { this.invList = res.data || []; - this.getBusType(); }) }, getDeptList() { getDeptListByUser().then((res) => { this.deptList = res.data || []; + if(this.deptList.length>0){ + this.filterQuery.targetDeptCode=this.deptList[0].code + this.invCodebe=this.filterQuery.targetDeptCode + } + this.getList(); + this. getInvList(); }); }, } @@ -463,8 +477,6 @@ export default { } , created() { - this.getList(); - this.getInvList(); this.getDeptList(); } , diff --git a/src/views/purchase/purPlan/purPlan.vue b/src/views/purchase/purPlan/purPlan.vue index 62bce91d..1466489f 100644 --- a/src/views/purchase/purPlan/purPlan.vue +++ b/src/views/purchase/purPlan/purPlan.vue @@ -11,7 +11,7 @@ - + - + { + var query={ + parentId:this.filterQuery.targetDeptCode + } + filterSubAll(query).then((res) => { this.invList = res.data || []; - this.getBusType(); }) }, getDeptList() { getDeptListByUser().then((res) => { this.deptList = res.data || []; + if(this.deptList.length>0){ + this.filterQuery.targetDeptCode=this.deptList[0].code + this.invCodebe=this.filterQuery.targetDeptCode + } + this.getList(); + this. getInvList(); }); }, + newDistributionForm(index, row) { this.idQuery.id = ''; if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) { @@ -440,8 +454,6 @@ export default { } , created() { - this.getList(); - this.getInvList(); this.getDeptList(); } , diff --git a/src/views/purchase/purPlan/purPlanAudit.vue b/src/views/purchase/purPlan/purPlanAudit.vue index 902b9d93..ed1bbefa 100644 --- a/src/views/purchase/purPlan/purPlanAudit.vue +++ b/src/views/purchase/purPlan/purPlanAudit.vue @@ -11,7 +11,7 @@ - + { + var query={ + parentId:this.filterQuery.targetDeptCode + } + filterSubAll(query).then((res) => { this.invList = res.data || []; - this.getBusType(); }) }, getDeptList() { getDeptListByUser().then((res) => { this.deptList = res.data || []; + if(this.deptList.length>0){ + this.filterQuery.targetDeptCode=this.deptList[0].code + this.invCodebe=this.filterQuery.targetDeptCode + } + this.getList(); + this. getInvList(); }); }, } @@ -381,9 +395,6 @@ export default { } , created() { - - this.getList(); - this.getInvList(); this.getDeptList(); } , diff --git a/src/views/purchase/purPlan/purPlanSearch.vue b/src/views/purchase/purPlan/purPlanSearch.vue index 25bc8965..7758f0fe 100644 --- a/src/views/purchase/purPlan/purPlanSearch.vue +++ b/src/views/purchase/purPlan/purPlanSearch.vue @@ -5,12 +5,12 @@ - + - + - + { + var query={ + parentId:this.filterQuery.targetDeptCode + } + filterSubAll(query).then((res) => { this.invList = res.data || []; - this.getBusType(); }) }, getDeptList() { getDeptListByUser().then((res) => { this.deptList = res.data || []; + if(this.deptList.length>0){ + this.filterQuery.targetDeptCode=this.deptList[0].code + this.invCodebe=this.filterQuery.targetDeptCode + } + this.getList(); + this. getInvList(); }); }, @@ -440,8 +454,6 @@ export default { } , created() { - this.getList(); - this.getInvList(); this.getDeptList(); } ,