瀏覽代碼

主管任务审批

zhujindu 6 月之前
父節點
當前提交
5cfabfb139
共有 3 個文件被更改,包括 33 次插入25 次删除
  1. 8 0
      src/api/index.js
  2. 0 24
      src/views/week/VisitSummaryAdd.vue
  3. 25 1
      src/views/week/componVisitSummary.vue

+ 8 - 0
src/api/index.js

@@ -978,3 +978,11 @@ export function getMaterialHistory(query) {
     params: query,
   });
 }
+// 根据当前用户获取下级所有销售部接口
+export function getDeptsByUser(query) {
+  return request({
+    url: '/mobile/summaryMobile/getDeptsByUser',
+    method: 'get',
+    params: query,
+  });
+}

+ 0 - 24
src/views/week/VisitSummaryAdd.vue

@@ -614,30 +614,6 @@ export default {
         }
       });
     },
-    getDeptsBy(answerValue) {
-      getDeptsByUser().then((res) => {
-        if (res.data && res.code == 200) {
-          let arr = [];
-          res.data.forEach((val) => {
-            arr.push({
-              ancestors: val.ancestors || '',
-              deptCode: val.deptCode || '',
-              deptId: val.deptId || '',
-              deptLevel: val.deptLevel || '',
-              deptName: val.deptName || '',
-              parentId: val.parentId || '',
-            });
-          });
-          this.deptList = arr;
-          if (answerValue) {
-            let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
-            // this.onSalesDepartmentConfirm(findCompany);
-          } else {
-            this.onSalesDepartmentConfirm(this.deptList[0]);
-          }
-        }
-      });
-    },
     dailyFn(row) {
       if (row.status != '0') {
         if (row.status == -1) {

+ 25 - 1
src/views/week/componVisitSummary.vue

@@ -241,7 +241,7 @@
 </template>
 
 <script>
-import { insertCustomAnswer, getSummaryMobileDeptInfo } from '@/api/index';
+import { insertCustomAnswer, getSummaryMobileDeptInfo, getDeptsByUser } from '@/api/index';
 import zRadio from '@/components/zRadio2';
 import zCheckbox from '@/components/zCheckbox2';
 import uploadImg from '@/components/uploadVTask';
@@ -613,6 +613,30 @@ export default {
         }
       });
     },
+    getDeptsBy(answerValue) {
+      getDeptsByUser().then((res) => {
+        if (res.data && res.code == 200) {
+          let arr = [];
+          res.data.forEach((val) => {
+            arr.push({
+              ancestors: val.ancestors || '',
+              deptCode: val.deptCode || '',
+              deptId: val.deptId || '',
+              deptLevel: val.deptLevel || '',
+              deptName: val.deptName || '',
+              parentId: val.parentId || '',
+            });
+          });
+          this.deptList = arr;
+          if (answerValue) {
+            let findCompany = this.regionList.find((item) => item.deptCode == answerValue);
+            // this.onSalesDepartmentConfirm(findCompany);
+          } else {
+            this.onSalesDepartmentConfirm(this.deptList[0]);
+          }
+        }
+      });
+    },
     dailyFn(row) {
       if (row.status != '0') {
         if (row.status == -1) {