zhujindu 1 rok pred
rodič
commit
2dd0b3962e

+ 28 - 24
src/components/imageAIVerifyErr.vue

@@ -19,12 +19,23 @@
           </div>
         </div>
         <!-- shopSignChange 与历史照片是否一致(是否要更换照片) 0一致(要更换),1不一致(不要更换) -->
-        <template v-if="shopSignChange == 0">
+        <template v-if="shopSignChange == 0 && shotsNum >= 3">
           <!-- 拜访店招显示 -->
-          <div class="tipsAIVerify" v-if="shotsNum >= 3 && npkpiData.recognizeType == 1">
+          <div class="tipsAIVerify" v-if="npkpiData.recognizeType == 1">
             <van-icon name="question-o" />上传后作为本店标准店招,未来每次拜访时校验。
           </div>
-          <div class="uploadBtnAIVerify" v-if="shotsNum >= 3">
+          <div class="feedback">
+            <div class="label">反馈图像识别不正确:</div>
+            <div class="value">
+              <van-field
+                v-model="feedbackMessage"
+                rows="2"
+                autosize
+                type="textarea"
+                placeholder="请输入反馈意见" />
+            </div>
+          </div>
+          <div class="uploadBtnAIVerify">
             <div
               class="confirmUploadAIVerify"
               @click="confirmUpload"
@@ -159,6 +170,7 @@ export default {
       // cheatType	作弊类型
       // qualifiedState 是否合格(0:不合格,1:合格)
       // unqualifiedReason	不合格原因
+      this.feedbackMessage = '';
       this.shopSignChange = 0;
       this.npkpiData =
         this.source == 'visit'
@@ -184,13 +196,12 @@ export default {
           this.contentMessage = this.contentMessage + this.npkpiData.checkInfo.unqualifiedReason;
           return;
         }
-        // 识别次数大于等于3先确认是否仍要上传,仍要上传在校验是否和历史照片一致
-        // if (this.shotsNum >= 3) {
-        //   return;
-        // } else {
-        // 照片和历史照片是否一致
-        this.comparisonImage();
-        // }
+        // recognizeType 识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别)
+        if (this.npkpiData.recognizeType == 1) {
+          this.comparisonImage();
+        } else {
+          this.confirmUpload();
+        }
       }
     },
     // 照片和历史照片是否一致
@@ -200,10 +211,7 @@ export default {
         this.contentMessage = '与历史照片不一致,请确认店招是否更换?';
         return false;
       } else {
-        // 照片合格并且没有作弊
-        // recognizeType 识别目的(1:店招内容识别,2:门店代码识别,3:调色机识别)
-        let isUpdate = this.npkpiData.recognizeType == 1 ? 'isUpdate' : null;
-        this.confirmUpload(isUpdate);
+        this.confirmUpload('isUpdate');
       }
     },
     // 重新拍照
@@ -214,16 +222,12 @@ export default {
     // 照片是否入库,1.照片识别三次不通过仍要上传,2.照片识别通过
     // isUpdate:是否更新店招照片,只有门店店招需要更新
     confirmUpload(isUpdate) {
-      if (!isUpdate) {
-        this.comparisonImage();
-      } else {
-        this.$emit('close');
-        this.$emit('confirmUpload', {
-          data: this.imageAIVerifyData,
-          isUpdate: isUpdate ? 'true' : null,
-          feedbackMessage: this.feedbackMessage,
-        });
-      }
+      this.$emit('close');
+      this.$emit('confirmUpload', {
+        data: this.imageAIVerifyData,
+        isUpdate: isUpdate ? 'true' : null,
+        feedbackMessage: this.feedbackMessage,
+      });
     },
     close() {
       this.$emit('close');

+ 1 - 1
src/components/uploadVNormal.vue

@@ -47,7 +47,7 @@ export default {
       default: '',
     },
     secondCollectionId: {
-      type: String,
+      type: [String, Number],
       default: '',
     },
     firstCollectionId: {