Browse Source

Merge branch 'feature_20241129_渠道客诉'

zhujindu 1 year ago
parent
commit
4bcb5fa8d3

+ 1 - 0
src/store/modules/user.js

@@ -31,6 +31,7 @@ const user = {
             localStorage.setItem('zipPhoto', res.data.zipPhoto);
             localStorage.setItem('deptLevel', res.data.depts[0].deptLevel);
             localStorage.setItem('userId', res.data.userId);
+            localStorage.setItem('deptIds', JSON.stringify(res.data.deptIds));
             resolve();
           })
           .catch((error) => {

+ 20 - 6
src/views/clew/complaintDetail/index.vue

@@ -134,7 +134,7 @@
     <van-popup v-model="showPicker1" position="bottom">
       <van-picker
         show-toolbar
-        value-key="dictLabel"
+        value-key="remark"
         :columns="customerClassifyOption"
         @confirm="onConfirm1"
         @cancel="showPicker1 = false" />
@@ -252,7 +252,7 @@ export default {
       let item = this.customerClassifyOption.find(
         (val) => val.dictValue == this.infoData.customerClassify
       );
-      this.customerClassifyValue = item.dictLabel || '';
+      this.customerClassifyValue = item.remark || '';
       this.customerClassify = item.dictValue;
       this.getCustomerSubClassify(this.customerClassify);
     },
@@ -281,7 +281,8 @@ export default {
           }
           this.getCustomerClassify();
           // 当前客资归属人不是当前登录人
-          if (this.infoData.sendUserId != localStorage.getItem('userId')) {
+          let deptIds = JSON.parse(localStorage.getItem('deptIds'));
+          if (deptIds.indexOf(this.infoData.deptId) == -1) {
             this.$dialog
               .confirm({
                 title: '提示',
@@ -386,13 +387,26 @@ export default {
     },
     isRequiredFlag(optionList) {
       // console.log(optionList);
-      // 必填类型
       for (let i = 0; i < optionList.length; i++) {
-        if (optionList[i].answerType == 'wb' && optionList[i].isMust == 0) {
+        if (
+          (optionList[i].answerType == 'wb' || optionList[i].answerType == 'wb') &&
+          optionList[i].isMust == 0
+        ) {
           if (!optionList[i].answerValue) {
+            // 必填类型
             this.requiredFlag = false;
             this.requiredMessage = optionList[i].remark;
             return;
+          } else {
+            // 条件校验
+            if (optionList[i].minTextLength) {
+              // 输入内容长度校验
+              if (optionList[i].answerValue.length < optionList[i].minTextLength) {
+                this.requiredFlag = false;
+                this.requiredMessage = optionList[i].remark;
+                return;
+              }
+            }
           }
         }
       }
@@ -408,7 +422,7 @@ export default {
       this.showView = true;
     },
     onConfirm1(value) {
-      this.customerClassifyValue = value.dictLabel;
+      this.customerClassifyValue = value.remark;
       this.customerClassify = value.dictValue;
       this.showPicker1 = false;
       this.getCustomerSubClassify(this.customerClassify);

+ 39 - 7
src/views/clew/complaintDetail/radioGroup.vue

@@ -19,11 +19,34 @@
           </template>
         </van-radio-group>
       </template>
+      <!-- 回答类型:wb-文本,sz-数字,rq-日期,zp-照片,dx -->
       <template v-if="val.answerType == 'wb'">
         <template v-if="parentOptionList.searchValue == val.itemOptionParentId">
-          <van-field v-model="val.answerValue" :placeholder="val.remark" />
+          <van-field
+            v-model="val.answerValue"
+            :placeholder="val.remark"
+            :minTextLength="val.minTextLength"
+            :error-message="val.remark"
+            :class="{
+              fieldInput: true,
+              rulesClass: val.answerValue != null && val.answerValue.length < val.minTextLength,
+            }" />
+          <span
+            class="rulesErrorMessage"
+            v-if="val.answerValue != null && val.answerValue.length < val.minTextLength">
+            {{ val.remark }}
+          </span>
         </template>
       </template>
+      <template v-if="val.answerType == 'sz'">
+        <van-field
+          class="fieldInput"
+          v-model="val.answerValue"
+          :placeholder="val.remark"
+          :minTextLength="val.minTextLength"
+          :error-message="val.remark"
+          type="number"></van-field>
+      </template>
     </template>
   </div>
 </template>
@@ -113,7 +136,6 @@ export default {
     border: 0;
   }
   .van-field {
-    border: 1px solid #cdc8c8;
     padding: 0;
     width: 100%;
     border-radius: 4px;
@@ -121,13 +143,12 @@ export default {
     background-color: unset;
     height: 30px;
     line-height: 30px;
-    margin: 5px 0;
-  }
-  .van-field__control {
-    padding: 0 10px;
+    border: 1px solid #cdc8c8;
   }
   .van-field__control {
-    padding: 0 10px;
+    /* padding: 0 10px; */
+    /* margin: 5px 0; */
+    padding-left: 10px;
   }
   .van-radio__label {
     /* font-size: 14px; */
@@ -135,5 +156,16 @@ export default {
   .van-f-red {
     font-size: 14px;
   }
+  .rulesClass {
+    border: 1px solid #ff0505;
+  }
+  .fieldInput {
+    /* height: 38px; */
+  }
+  .rulesErrorMessage {
+    color: red;
+    font-size: 12px;
+    padding: 3px 0;
+  }
 }
 </style>

+ 2 - 2
src/views/clew/index.vue

@@ -2,14 +2,14 @@
   <div class="bgcolor clew">
     <div class="navBarTOP">
       <van-nav-bar class="navBar" title="客资任务" left-arrow @click-left="onClickLeft">
-        <!-- <template #right>
+        <template #right>
           <van-dropdown-menu>
             <van-dropdown-item
               v-model="cid"
               :options="customerClueOption"
               @change="dropdownChange" />
           </van-dropdown-menu>
-        </template> -->
+        </template>
       </van-nav-bar>
       <van-tabs v-model="isHandle" color="#0057ba" @change="tabChange">
         <van-tab title="未跟进" name="-1" :disabled="disabled"></van-tab>

+ 1 - 0
src/views/home/ABtarget.vue

@@ -943,6 +943,7 @@ export default {
           localStorage.setItem('storeType', res.data.user.type);
           localStorage.setItem('deptLevel', res.data.user.depts[0].deptLevel);
           localStorage.setItem('userId', res.data.user.userId);
+          localStorage.setItem('deptIds', JSON.stringify(res.data.user.deptIds));
           this.monthNoVisit = res.data.monthNoVisit;
         } else {
           this.$toast(res.msg);