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(); } ,