Jelajahi Sumber

Merge branch 'feature_20250822_经销商逾期改成单选' into release

zhujindu 3 bulan lalu
induk
melakukan
8ff120c0a5
1 mengubah file dengan 41 tambahan dan 4 penghapusan
  1. 41 4
      src/views/agentList/index.vue

+ 41 - 4
src/views/agentList/index.vue

@@ -357,6 +357,16 @@
             <van-radio name="0">未拜访</van-radio>
           </template>
         </van-radio-group>
+        <p class="searchchecktitle" @click="isYuQiVisited = !isYuQiVisited">
+          &nbsp;逾期<van-icon name="arrow-down" style="float: right" />
+        </p>
+        <van-radio-group v-model="YuQiVisitedTypes" direction="horizontal" class="monthVisited">
+          <template v-if="isYuQiVisited">
+            <van-radio :name="item.dictValue" v-for="item in YuQiList">{{
+              item.dictLabel
+            }}</van-radio>
+          </template>
+        </van-radio-group>
         <van-checkbox-group v-model="chainLabelTypes" direction="horizontal">
           <p class="searchchecktitle" @click="otherbqShow = !otherbqShow">
             &nbsp;经销商标签<van-icon name="arrow-down" style="float: right" />
@@ -554,6 +564,9 @@ export default {
       SKUDateShow: false,
       SKUList: [],
       showChainsVisitButton: true,
+      isYuQiVisited: true,
+      YuQiList: [],
+      YuQiVisitedTypes: '', //逾期
     };
   },
   created() {
@@ -656,8 +669,22 @@ export default {
       this.onSearch();
     },
     getStoreLabels() {
+      this.YuQiList = [];
+      this.chainLabelTypesOption = [];
       getDictOption({}, 'chain_labels').then((res) => {
-        this.chainLabelTypesOption = res.data;
+        if (res.code == 200 && res.data) {
+          let YuQiList = [];
+          let chainLabelTypesOption = [];
+          res.data.forEach((val) => {
+            if (val.remark == 'overdue') {
+              YuQiList.push(val);
+            } else {
+              chainLabelTypesOption.push(val);
+            }
+          });
+          this.YuQiList = YuQiList;
+          this.chainLabelTypesOption = chainLabelTypesOption;
+        }
       });
     },
     setStroeNameStyle(item) {
@@ -699,6 +726,7 @@ export default {
       this.chainName = '';
       this.chainCode = '';
       this.monthVisited = '';
+      this.YuQiVisitedTypes = '';
       this.onSearch();
     },
     setChainTypeList() {
@@ -723,12 +751,17 @@ export default {
       }
       this.disabled = true;
       this.toastLoading(0, '加载中...', true);
+      // 添加逾期筛选
+      let chainLabelTypes =
+        this.YuQiVisitedTypes != ''
+          ? this.chainLabelTypes.join(',') + ',' + this.YuQiVisitedTypes
+          : this.chainLabelTypes.join(',');
       queryMyChainsGroupListByDept({
         lat: this.lat,
         lon: this.lon,
         pageNum: this.pageNum,
         typeCode2List: this.result.join(','),
-        chainLabelTypes: this.chainLabelTypes.join(','),
+        chainLabelTypes: chainLabelTypes,
         pageSize: this.pageSize,
         chainsName: this.chainsName.trim(),
         monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
@@ -770,12 +803,16 @@ export default {
         this.list = [];
         this.refreshing = false;
       }
+      let chainLabelTypes =
+        this.YuQiVisitedTypes != ''
+          ? this.chainLabelTypes.join(',') + ',' + this.YuQiVisitedTypes
+          : this.chainLabelTypes.join(',');
       queryMyChainsGroupList({
         lat: this.lat,
         lon: this.lon,
         pageNum: this.pageNum,
         typeCode2List: this.result.join(','),
-        chainLabelTypes: this.chainLabelTypes.join(','),
+        chainLabelTypes: chainLabelTypes,
         pageSize: this.pageSize,
         chainsName: this.chainsName.trim(),
         monthVisited: this.monthVisited, //本月是否拜访1=拜访,0=未拜访
@@ -1285,7 +1322,7 @@ export default {
   margin: 0px 10px;
   .van-radio {
     width: 50%;
-    margin: 0;
+    margin: 3px 0;
   }
 }
 </style>