Переглянути джерело

feature_20260428_完美门店报告生成中

zhujindu 10 годин тому
батько
коміт
de05d3f076

BIN
src/assets/wanmeiStoreImg.gif


+ 86 - 48
src/views/historicalVisit/perfectStore.vue

@@ -2,19 +2,26 @@
   <div class="perfectStore">
     <!--        顶部条-->
     <van-nav-bar class="navBar" title="AI完美门店报告" left-arrow @click-left="onClickLeft">
-      <template #right>
-        <span
-          style="
-            color: white;
-            background: #74a4d9;
-            display: block;
-            padding: 6px 10px;
-            border-radius: 6px;
-          "
-          @click="editorFn"
-          v-if="!remarkShow && sameDay"
-          >编辑</span
-        >
+      <template #right v-if="list">
+        <template v-if="list.wanmeiStore">
+          <span
+            style="
+              color: white;
+              background: #74a4d9;
+              display: block;
+              padding: 6px 10px;
+              border-radius: 6px;
+            "
+            @click="editorFn"
+            v-if="!remarkShow && sameDay"
+            >编辑
+          </span>
+        </template>
+        <template v-else>
+          <span style="font-size: 18px; color: #1989fa; display: flex; align-items: center"
+            ><img width="35px" :src="require('@/assets/wanmeiStoreImg.gif')" />生成中</span
+          >
+        </template>
       </template>
     </van-nav-bar>
     <!--        主体内容-->
@@ -60,15 +67,20 @@
           <div class="SignText">AI 店招识别</div>
           <div class="signContent">
             <div class="" style="display: flex">
-              <van-button round type="primary" v-if="shopSignDetail.qualifiedState == '1'"
-                >通过</van-button
-              >
-              <van-button round type="danger" v-if="shopSignDetail.qualifiedState == '0'"
-                >不通过</van-button
-              >
-              <div class="jiantou">
-                <van-icon name="arrow" />
-              </div>
+              <template v-if="shopSignDetail.qualifiedState != null">
+                <van-button round type="primary" v-if="shopSignDetail.qualifiedState == '1'"
+                  >通过</van-button
+                >
+                <van-button round type="danger" v-else-if="shopSignDetail.qualifiedState == '0'"
+                  >不通过</van-button
+                >
+                <div class="jiantou">
+                  <van-icon name="arrow" />
+                </div>
+              </template>
+              <template v-else>
+                <span style="color: #1989fa; margin-right: 16px">AI识别中</span>
+              </template>
             </div>
           </div>
         </div>
@@ -79,15 +91,20 @@
           <div class="SignText">AI 调色机识别</div>
           <div class="signContent">
             <div class="" style="display: flex">
-              <van-button round type="primary" v-if="tiaoSJDetail.qualifiedState == '1'"
-                >通过</van-button
-              >
-              <van-button round type="danger" v-if="tiaoSJDetail.qualifiedState == '0'"
-                >不通过</van-button
-              >
-              <div class="jiantou">
-                <van-icon name="arrow" />
-              </div>
+              <template v-if="tiaoSJDetail.qualifiedState != null">
+                <van-button round type="primary" v-if="tiaoSJDetail.qualifiedState == '1'"
+                  >通过</van-button
+                >
+                <van-button round type="danger" v-if="tiaoSJDetail.qualifiedState == '0'"
+                  >不通过</van-button
+                >
+                <div class="jiantou">
+                  <van-icon name="arrow" />
+                </div>
+              </template>
+              <template v-else>
+                <span style="color: #1989fa; margin-right: 16px">AI识别中</span>
+              </template>
             </div>
           </div>
         </div>
@@ -100,10 +117,15 @@
           </div>
           <div class="signContent" @click="toSkuRecognize">
             <div class="" style="display: flex">
-              <span style="color: rgb(25, 137, 250)">查看详情</span>
-              <div class="jiantou">
-                <van-icon name="arrow" />
-              </div>
+              <template v-if="list.wanmeiStore">
+                <span style="color: rgb(25, 137, 250)">查看详情</span>
+                <div class="jiantou">
+                  <van-icon name="arrow" />
+                </div>
+              </template>
+              <template v-else>
+                <span style="color: #1989fa; margin-right: 16px">AI识别中</span>
+              </template>
             </div>
           </div>
         </div>
@@ -122,15 +144,20 @@
             @click="historiStoreVisit(value)">
             <div class="itemTitle">{{ convertToChinese(index + 1) }}、{{ value.taskName }}</div>
             <div class="" style="display: flex">
-              <van-button round type="primary" v-if="value.taskPhotoConditionPassed == 1"
-                >通过</van-button
-              >
-              <van-button round type="danger" v-if="value.taskPhotoConditionPassed == 0"
-                >不通过</van-button
-              >
-              <div class="jiantou">
-                <van-icon name="arrow" />
-              </div>
+              <template v-if="value.taskPhotoConditionPassed != null">
+                <van-button round type="primary" v-if="value.taskPhotoConditionPassed == 1"
+                  >通过</van-button
+                >
+                <van-button round type="danger" v-if="value.taskPhotoConditionPassed == 0"
+                  >不通过</van-button
+                >
+                <div class="jiantou">
+                  <van-icon name="arrow" />
+                </div>
+              </template>
+              <template v-else>
+                <span style="color: #1989fa; margin-right: 16px">AI识别中</span>
+              </template>
             </div>
           </div>
         </div>
@@ -407,6 +434,9 @@ export default {
     },
     historiStoreVisit(val, index) {
       if (val.taskType == '5') {
+        if (val.taskPhotoConditionPassed == null) {
+          return;
+        }
         this.$router.push({
           path: '/perfectStoreTask',
           query: {
@@ -427,10 +457,12 @@ export default {
       sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
     },
     toSkuRecognize() {
-      this.$router.push({
-        path: '/perfectStoreSku',
-        query: { visitId: this.visitsId },
-      });
+      if (this.list.wanmeiStore) {
+        this.$router.push({
+          path: '/perfectStoreSku',
+          query: { visitId: this.visitsId },
+        });
+      }
     },
     onClickLeft() {
       if (this.$route.query.token) {
@@ -445,12 +477,18 @@ export default {
       ImagePreview([url]);
     },
     openPerfectStoreSign(val) {
+      if (val.qualifiedState == null) {
+        return;
+      }
       this.$router.push({
         path: '/perfectStoreSign',
         query: { visitId: this.visitsId, taskId: val.taskId },
       });
     },
     openPerfectStoreTSJ(val) {
+      if (val.qualifiedState == null) {
+        return;
+      }
       let tiaoSJArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '3');
       let taskIds = tiaoSJArr.map((item) => item.taskId).join(',');
       this.$router.push({