Prechádzať zdrojové kódy

Merge branch 'feature_20260413_陈列照片提交后修改' into uat(dev)

# Conflicts:
#	src/views/historicalVisit/perfectStore.vue
zhujindu 11 hodín pred
rodič
commit
dc813ef544
1 zmenil súbory, kde vykonal 178 pridanie a 166 odobranie
  1. 178 166
      src/views/historicalVisit/perfectStore.vue

+ 178 - 166
src/views/historicalVisit/perfectStore.vue

@@ -95,192 +95,195 @@
     </van-nav-bar>
     <!--        主体内容-->
     <div class="container" v-if="list">
-      <div class="lineGrey"></div>
-      <div class="card mt10">
-        <div class="title">
-          {{ list.storeName }}(<span style="color: #1989fa">{{ list.storeCode }}</span
-          >)
+      <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
+        <div class="lineGrey"></div>
+        <div class="card mt10">
+          <div class="title">
+            {{ list.storeName }}(<span style="color: #1989fa">{{ list.storeCode }}</span
+            >)
+          </div>
+          <div class="subtitle">地址:{{ list.addressLine }}</div>
+          <div class="subtitle">拜访人:{{ list.nickName }}</div>
+          <div class="subtitle">拜访日期:{{ list.startTime }}~{{ list.stopTime }}</div>
+          <div class="subtitle" v-if="list.dwellTime">拜访时长:{{ list.dwellTime }}</div>
+          <!-- 分销店 -->
+          <template
+            v-if="
+              verifyStoreType(list.storeCategory) &&
+              verifyStoreType(list.storeCategory).type == 'fxd'
+            ">
+            <div class="subtitle" style="display: flex">
+              <div class="label" style="width: 75px">经销商:</div>
+              <div class="valuue TCFXList">
+                <div
+                  class="sfaStoreChainsContactList"
+                  v-for="(item, index) in list.sfaStoreChainsContactList"
+                  :key="index">
+                  {{ item.categoryDescribe }}
+                  {{ item.chainCode }}
+                  {{ item.chainName }}
+                </div>
+              </div>
+            </div>
+          </template>
+          <template v-else>
+            <div class="subtitle">经销商:{{ list.chainName }}</div>
+          </template>
+          <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
         </div>
-        <div class="subtitle">地址:{{ list.addressLine }}</div>
-        <div class="subtitle">拜访人:{{ list.nickName }}</div>
-        <div class="subtitle">拜访日期:{{ list.startTime }}~{{ list.stopTime }}</div>
-        <div class="subtitle" v-if="list.dwellTime">拜访时长:{{ list.dwellTime }}</div>
-        <!-- 分销店 -->
-        <template
-          v-if="
-            verifyStoreType(list.storeCategory) && verifyStoreType(list.storeCategory).type == 'fxd'
-          ">
-          <div class="subtitle" style="display: flex">
-            <div class="label" style="width: 75px">经销商:</div>
-            <div class="valuue TCFXList">
-              <div
-                class="sfaStoreChainsContactList"
-                v-for="(item, index) in list.sfaStoreChainsContactList"
-                :key="index">
-                {{ item.categoryDescribe }}
-                {{ item.chainCode }}
-                {{ item.chainName }}
+        <!-- 特殊任务展示 -->
+        <!-- 店招 -->
+        <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
+          <div class="specialTaskLeft" @click="openPerfectStoreSign(shopSignDetail)">
+            <div class="SignText">AI 店招识别</div>
+            <div class="signContent">
+              <div class="" style="display: flex">
+                <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 class="AISpan">AI识别中</span>
+                </template>
               </div>
             </div>
           </div>
-        </template>
-        <template v-else>
-          <div class="subtitle">经销商:{{ list.chainName }}</div>
-        </template>
-        <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
-      </div>
-      <!-- 特殊任务展示 -->
-      <!-- 店招 -->
-      <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
-        <div class="specialTaskLeft" @click="openPerfectStoreSign(shopSignDetail)">
-          <div class="SignText">AI 店招识别</div>
-          <div class="signContent">
-            <div class="" style="display: flex">
-              <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 class="AISpan">AI识别中</span>
-              </template>
+        </div>
+        <!-- 调色机 -->
+        <div class="TSJBox specialTask" v-if="tiaoSJDetail">
+          <div class="specialTaskLeft" @click="openPerfectStoreTSJ(tiaoSJDetail)">
+            <div class="SignText">AI 调色机识别</div>
+            <div class="signContent">
+              <div class="" style="display: flex">
+                <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 class="AISpan">AI识别中</span>
+                </template>
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <!-- 调色机 -->
-      <div class="TSJBox specialTask" v-if="tiaoSJDetail">
-        <div class="specialTaskLeft" @click="openPerfectStoreTSJ(tiaoSJDetail)">
-          <div class="SignText">AI 调色机识别</div>
-          <div class="signContent">
-            <div class="" style="display: flex">
-              <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 class="AISpan">AI识别中</span>
-              </template>
+        <!-- 陈列SKU个数: -->
+        <div class="TSJBox specialTask" v-if="list.isSku == '是'">
+          <div class="specialTaskLeft">
+            <div class="SignText">
+              AI SKU个数识别: <span v-if="list.skuNum">{{ list.skuNum }}个</span>
+            </div>
+            <div class="signContent" @click="toSkuRecognize">
+              <div class="" style="display: flex">
+                <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 class="AISpan">AI识别中</span>
+                </template>
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <!-- 陈列SKU个数: -->
-      <div class="TSJBox specialTask" v-if="list.isSku == '是'">
-        <div class="specialTaskLeft">
-          <div class="SignText">
-            AI SKU个数识别: <span v-if="list.skuNum">{{ list.skuNum }}个</span>
+        <!-- 目前陈列任务 -->
+        <div class="TSJBox specialTask" v-if="taskTypeArr && taskTypeArr.length">
+          <div class="specialTaskLeft">
+            <div class="SignText">AI 陈列任务识别</div>
           </div>
-          <div class="signContent" @click="toSkuRecognize">
-            <div class="" style="display: flex">
-              <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 class="AISpan">AI识别中</span>
-              </template>
+        </div>
+        <div class="SKUBox" v-if="taskTypeArr && taskTypeArr.length">
+          <div class="SKUList">
+            <div
+              class="itemList"
+              v-for="(value, index) in taskTypeArr"
+              @click="historiStoreVisit(value)">
+              <div class="itemTitle">{{ convertToChinese(index + 1) }}、{{ value.taskName }}</div>
+              <div class="" style="display: flex">
+                <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 class="AISpan">AI识别中</span>
+                </template>
+              </div>
             </div>
           </div>
         </div>
-      </div>
-      <!-- 目前陈列任务 -->
-      <div class="TSJBox specialTask" v-if="taskTypeArr && taskTypeArr.length">
-        <div class="specialTaskLeft">
-          <div class="SignText">AI 陈列任务识别</div>
+
+        <div style="padding: 15px 16px; font-size: 16px; font-weight: bold; background: #f5f5f5">
+          其他拜访任务
         </div>
-      </div>
-      <div class="SKUBox" v-if="taskTypeArr && taskTypeArr.length">
-        <div class="SKUList">
+        <div class="card" v-if="list.visitSource != 2">
           <div
-            class="itemList"
-            v-for="(value, index) in taskTypeArr"
-            @click="historiStoreVisit(value)">
-            <div class="itemTitle">{{ convertToChinese(index + 1) }}、{{ value.taskName }}</div>
-            <div class="" style="display: flex">
-              <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" />
+            class="info"
+            style="
+              font-size: 14px;
+              display: flex;
+              align-items: center;
+              justify-content: space-between;
+              padding: 3px;
+            "
+            v-for="(item, index) in list.sfaTaskList"
+            :key="index"
+            v-if="
+              item.photoIdentifyType != '1' && item.photoIdentifyType != '3' && item.taskType != '5'
+            "
+            @click="historiStoreVisit(item, index)">
+            <p style="flex: 1; margin: 0">
+              {{ item.taskName }}
+            </p>
+
+            <div class="taskPhotoConditionPassed" @click.stop>
+              <el-popover
+                :popper-class="item.taskPhotoConditionPassed == 1 ? 'zpoverSuccess' : 'zpover'"
+                placement="bottom"
+                width="120"
+                trigger="click"
+                :content="
+                  item.taskPhotoConditionPassed == 1
+                    ? '陈列奖励案拍照AI识别通过'
+                    : '陈列奖励案拍照AI识别不通过'
+                ">
+                <div class="taskPhotoConditionPassed" slot="reference">
+                  <img
+                    v-if="item.taskPhotoConditionPassed == 1"
+                    :src="require('@/assets/taskPhotoSu.png')" />
+                  <img
+                    v-if="item.taskPhotoConditionPassed == 0"
+                    :src="require('@/assets/taskPhotoErr.png')" />
                 </div>
-              </template>
-              <template v-else>
-                <span class="AISpan">AI识别中</span>
-              </template>
+              </el-popover>
             </div>
+            <p class="arrowdetils1">
+              <van-icon name="arrow" />
+            </p>
           </div>
         </div>
-      </div>
-
-      <div style="padding: 15px 16px; font-size: 16px; font-weight: bold; background: #f5f5f5">
-        其他拜访任务
-      </div>
-      <div class="card" v-if="list.visitSource != 2">
-        <div
-          class="info"
-          style="
-            font-size: 14px;
-            display: flex;
-            align-items: center;
-            justify-content: space-between;
-            padding: 3px;
-          "
-          v-for="(item, index) in list.sfaTaskList"
-          :key="index"
-          v-if="
-            item.photoIdentifyType != '1' && item.photoIdentifyType != '3' && item.taskType != '5'
-          "
-          @click="historiStoreVisit(item, index)">
-          <p style="flex: 1; margin: 0">
-            {{ item.taskName }}
-          </p>
-
-          <div class="taskPhotoConditionPassed" @click.stop>
-            <el-popover
-              :popper-class="item.taskPhotoConditionPassed == 1 ? 'zpoverSuccess' : 'zpover'"
-              placement="bottom"
-              width="120"
-              trigger="click"
-              :content="
-                item.taskPhotoConditionPassed == 1
-                  ? '陈列奖励案拍照AI识别通过'
-                  : '陈列奖励案拍照AI识别不通过'
-              ">
-              <div class="taskPhotoConditionPassed" slot="reference">
-                <img
-                  v-if="item.taskPhotoConditionPassed == 1"
-                  :src="require('@/assets/taskPhotoSu.png')" />
-                <img
-                  v-if="item.taskPhotoConditionPassed == 0"
-                  :src="require('@/assets/taskPhotoErr.png')" />
-              </div>
-            </el-popover>
-          </div>
-          <p class="arrowdetils1">
-            <van-icon name="arrow" />
-          </p>
-        </div>
-      </div>
+      </van-pull-refresh>
     </div>
   </div>
 </template>
@@ -322,6 +325,7 @@ export default {
       shopSignDetail: null,
       tiaoSJDetail: null,
       taskTypeArr: null,
+      refreshing: false,
     };
   },
   activated() {
@@ -337,6 +341,11 @@ export default {
     this.getPhotoTypeList();
   },
   methods: {
+    onRefresh() {
+      this.refreshing = true;
+      this.toastLoading(0, '加载中...', true);
+      this.getVisitsDetailFn();
+    },
     resultCorrect(resultCorrect) {
       let data = this.AIResultOption.find((item) => item.dictValue == resultCorrect);
       return data ? data.dictLabel : '';
@@ -440,6 +449,9 @@ export default {
       this.taskTypeArr = null;
       getVisitsDetailPerfectStore({ visitsId: this.$route.query.visitId }).then((res) => {
         this.toastLoading().clear();
+        if (this.refreshing) {
+          this.refreshing = false;
+        }
         if (res.code == 200) {
           this.list = res.data;
           this.filterSfaTaskList(this.list.sfaTaskList);