Bläddra i källkod

feature_20260203_完美门店

zhujindu 1 vecka sedan
förälder
incheckning
1bb448f1a2

+ 2 - 2
src/api/index.js

@@ -1153,9 +1153,9 @@ export function addCollectionAnswerBatch(data) {
 }
 
 // 完美门店
-export function getVisitsDetailperfectStore(query) {
+export function getVisitsDetailPerfectStore(query) {
   return request({
-    url: 'mobile/storeGroup/getVisitsDetailperfectStore',
+    url: 'mobile/storeGroup/getVisitsDetailPerfectStore',
     method: 'get',
     params: query,
   });

+ 16 - 25
src/views/deviceOutside/index.vue

@@ -82,8 +82,15 @@
                   >
                 </template>
               </div>
-              <div class="info" style="position: relative">
-                联系人:{{ item.contactName }}
+              <div class="info" style="position: relative">联系人:{{ item.contactName }}</div>
+              <div class="info">类型:{{ item.storeCategory }}&nbsp;</div>
+              <div class="info" style="position: relative" @click="buryingPointFn(item)">
+                联系电话:<a
+                  v-if="item.telephone"
+                  style="color: #0057ba; font-weight: bold; text-decoration: underline"
+                  :href="'tel:' + item.telephone"
+                  >{{ item.telephone }}<van-icon name="phone"
+                /></a>
                 <div style="position: absolute; bottom: 0px; right: 0px">
                   <!-- 凤凰客户 -->
                   <el-popover
@@ -287,26 +294,6 @@
                   </el-popover>
                 </div>
               </div>
-              <div class="info">
-                类型:{{ item.storeCategory }}&nbsp;
-                <!-- 以后需要再打开 -->
-                <!-- <el-popover popper-class="zpover zpover6" placement="bottom-start" trigger="click">
-                  <div>
-                    <p>
-                      本店经营品项指导:
-                      <a @click="linkimg(item)" style="text-decoration: underline">点击查看</a>
-                    </p>
-                  </div>
-                  <van-icon name="question-o" size="18" slot="reference" />
-                </el-popover> -->
-              </div>
-              <div class="info" v-if="item.telephone" @click="buryingPointFn(item)">
-                联系电话:<a
-                  style="color: #0057ba; font-weight: bold; text-decoration: underline"
-                  :href="'tel:' + item.telephone"
-                  >{{ item.telephone }}<van-icon name="phone"
-                /></a>
-              </div>
               <div class="info">
                 地址:{{ item.addressLine }}
                 <img
@@ -371,10 +358,14 @@
             <template v-if="item.stateString == '已拜访'">
               <div
                 class="statstext"
-                style="background-color: #ed5c68"
-                v-if="true"
+                style="border-bottom-left-radius: 15px; border-top-left-radius: 15px"
+                v-if="item.jinpaiStore"
                 @click="openPerfectStore(item)">
-                jinpaidian
+                已拜访<br />
+                <div style="margin: 3px 0">
+                  <p style="line-height: 18px; margin: 0">点击查看</p>
+                  <p style="line-height: 18px; margin: 0">完美门店</p>
+                </div>
               </div>
               <div class="statstext" v-else>已拜访</div>
             </template>

+ 31 - 24
src/views/historicalVisit/perfectStore.vue

@@ -123,13 +123,18 @@
           <div class="SignText">店招:</div>
           <div class="signContent">
             <div class="icon">
-              <van-icon name="checked" color="#07c160" v-if="shopSignDetail.status == '1'" />
+              <van-icon
+                name="checked"
+                color="#07c160"
+                v-if="shopSignDetail.qualifiedState == '1'" />
               <van-icon name="warning" color="#ee0a24" v-else />
             </div>
             <div
               class="content"
-              :style="{ color: shopSignDetail.status == '1' ? '#07c160' : '#ee0a24' }">
-              {{ shopSignDetail.status == '1' ? '已通过' : '未通过' }}
+              :style="{ color: shopSignDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
+              {{
+                shopSignDetail.qualifiedState == '1' ? '已通过' : shopSignDetail.unqualifiedReason
+              }}
             </div>
           </div>
         </div>
@@ -143,17 +148,18 @@
           <div class="SignText">调色机:</div>
           <div class="signContent">
             <div class="icon">
-              <van-icon name="checked" color="#07c160" v-if="tiaoSJDetail.status == '1'" />
+              <van-icon name="checked" color="#07c160" v-if="tiaoSJDetail.qualifiedState == '1'" />
               <van-icon name="warning" color="#ee0a24" v-else />
             </div>
             <div
+              v-if="tiaoSJDetail.qualifiedState"
               class="content"
-              :style="{ color: tiaoSJDetail.status == '1' ? '#07c160' : '#ee0a24' }">
-              {{ tiaoSJDetail.status == '1' ? '已通过' : '未通过' }}
+              :style="{ color: tiaoSJDetail.qualifiedState == '1' ? '#07c160' : '#ee0a24' }">
+              {{ tiaoSJDetail.qualifiedState == '1' ? '已通过' : tiaoSJDetail.unqualifiedReason }}
             </div>
           </div>
         </div>
-        <div class="shopSignImg">
+        <div class="shopSignImg" v-if="tiaoSJDetail.qualifiedState">
           <img :src="tiaoSJDetail.fileUrl" @click="previewsImg(tiaoSJDetail.fileUrl)" />
         </div>
       </div>
@@ -173,10 +179,12 @@
             class="itemList"
             v-for="(value, index) in taskTypeArr"
             @click="historiStoreVisit(value)">
-            <div class="itemTitle">{{ convertToChinese(index + 1) }}、{{ value.taskName }}</div>
-            <div class="jiantou">
-              <van-icon name="arrow" />
+            <div class="itemTitle">
+              {{ convertToChinese(index + 1) }}、{{ value.taskName }} <van-icon name="arrow" />
             </div>
+            <!-- <div class="jiantou">
+              <van-icon name="arrow" />
+            </div> -->
             <div class="">
               <van-icon name="success" color="#07c160" v-if="value.taskPhotoConditionPassed == 1" />
               <van-icon name="cross" color="#ee0a24" v-else />
@@ -313,7 +321,7 @@
 <script>
 import deleteUploadImg from '@/components/deleteUploadImg';
 import {
-  getVisitsDetailperfectStore,
+  getVisitsDetailPerfectStore,
   getPhotoTypeList1,
   insertVisitRemark,
   getListHistoryList,
@@ -462,22 +470,17 @@ export default {
       this.shopSignDetail = null;
       this.tiaoSJDetail = null;
       this.taskTypeArr = null;
-      getVisitsDetailperfectStore({ visitsId: this.$route.query.visitId }).then((res) => {
+      getVisitsDetailPerfectStore({ visitsId: this.$route.query.visitId }).then((res) => {
         this.toastLoading().clear();
         if (res.code == 200) {
           this.list = res.data;
           this.filterSfaTaskList(this.list.sfaTaskList);
           let shopSignArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
           if (shopSignArr.length) this.shopSignDetail = shopSignArr[0];
-          let tiaoSJArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '1');
+          let tiaoSJArr = this.list.sfaTaskList.filter((val) => val.photoIdentifyType == '3');
           if (tiaoSJArr.length) {
-            // 有成功的显示成功的,没有显示第一个
-            tiaoSJArr.forEach((val) => {
-              if (val.status == '1') {
-                this.tiaoSJDetail = val;
-              }
-            });
-            this.tiaoSJDetail = this.tiaoSJDetail || tiaoSJArr[0];
+            this.tiaoSJDetail = tiaoSJArr[0];
+            console.log(this.tiaoSJDetail);
           }
           if (res.data.visitSource != 2) {
             this.getListHistoryList(res.data.instanceId);
@@ -529,7 +532,7 @@ export default {
           query: {
             storeCode: this.$route.query.storeCode || this.list.storeCode,
             visitsId: this.visitsId,
-            taskIds: [val.taskId],
+            taskId: val.taskId,
             storeGroupId: this.list.storeGroupId,
             insert: 0,
             source: 'historicalDetails',
@@ -580,20 +583,24 @@ export default {
       flex-direction: row;
     }
     .SignText {
-      margin-right: 10px;
       color: rgb(25, 137, 250);
+      width: 55px;
     }
     .signContent {
       display: flex;
       flex-direction: row;
+      margin: 0 8px;
+      flex: 1;
       .icon {
         padding-top: 2px;
         margin-right: 5px;
       }
     }
     .shopSignImg {
-      height: 100%;
-      width: 70px;
+      img {
+        height: 80px;
+        width: 80px;
+      }
     }
   }
   .shopSign {

+ 55 - 45
src/views/historicalVisit/perfectStoreTask.vue

@@ -1,6 +1,6 @@
 <template>
-  <div class="perfectStoreTask">
-    <van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
+  <div class="perfectStoreTask" v-if="formData">
+    <van-nav-bar class="navBar" left-arrow :title="formData.taskName" @click-left="onClickLeft">
       <template #right>
         <!-- <span
           v-if="isEdit && insert == '1'"
@@ -26,7 +26,7 @@
                   <!-- <span v-if="item.isMust == 0" class="van-f-red">*</span> -->
                   <div class="headline">
                     <span class="headlineIcon"></span>
-                    <span class="headlineTitle">{{ item.taskName }}</span>
+                    <span class="headlineTitle">{{ item.collectionName }}</span>
                   </div>
                   <!-- 操作说明图片和电话 -->
                   <taskTips
@@ -44,7 +44,6 @@
                 :collectionItemId="item.collectionId"
                 :putInCode="formData.putInCode"
                 :photoIdentifyType="formData.photoIdentifyType"
-                @upDataDetail="getDetaile"
                 :pictureSource="item.pictureSource"
                 :continuousShoot="item.continuousShoot"
                 :insert="insert"
@@ -58,28 +57,31 @@
       <div class="skuDeatil">
         <div class="headline" style="margin-top: 10px">
           <span class="headlineIcon"></span>
-          <span class="headlineTitle">SKU图像识别结果:个</span>
+          <span class="headlineTitle"
+            >SKU图像识别结果:{{ formData.taskPhotoRecognitionResult.length }} 个</span
+          >
         </div>
         <el-table
-          :data="taskPhotoRecognitionResult"
+          :data="formData.taskPhotoRecognitionResult"
           border
           class="table-headermd1"
           style="width: 100%">
-          <el-table-column label="" type="index" width="50px" align="center" />
-          <el-table-column label="产品" prop="skuProductName" align="center" />
-          <el-table-column label="要求" prop="conditionIdentifyNum" align="center" width="60px">
-          </el-table-column>
+          <el-table-column label="序号" type="index" align="center" width="40"> </el-table-column>
           <el-table-column
-            label="排面数"
-            prop="identifyTheNumberOfCards"
-            width="70px"
-            align="center">
+            label="品类"
+            prop="skuProductType"
+            align="center"
+            width="60"></el-table-column>
+          <el-table-column label="SKU名称" prop="skuProductName" align="center">
             <template slot-scope="scope">
-              <span :style="{ color: scope.row.meetTheStandard == 1 ? '#07c160' : 'red' }">
-                {{ scope.row.identifyTheNumberOfCards }}
-              </span>
+              <span class="tipTitle">{{ scope.row.skuProductName }}</span>
             </template>
           </el-table-column>
+          <el-table-column
+            label="排面数"
+            prop="identifyTheNumberOfCards"
+            align="center"
+            width="50"></el-table-column>
         </el-table>
       </div>
       <div class="dataList" v-if="dataList">
@@ -96,7 +98,7 @@
           </div>
           <div class="itemBottom" v-if="insert == '0'">
             <img
-              @click="openDialog(item)"
+              @click="openDialog"
               :src="
                 item.taskPhotoConditionPassed == 1
                   ? require('@/assets/taskPhotoSu.png')
@@ -115,10 +117,13 @@
       @close="vanPopup == false"
       custom-class="identifyResultdialog">
       <!-- 识别结果 -->
-      <div class="identifyResult" v-if="taskPhotoRecognitionResult" style="padding: 0 10px">
+      <div
+        class="identifyResult"
+        v-if="formData.taskPhotoRecognitionResult"
+        style="padding: 0 10px">
         <div class="resultContent">
           <el-table
-            :data="taskPhotoRecognitionResult"
+            :data="formData.taskPhotoRecognitionResult"
             :span-method="taskObjectSpanMethod"
             border
             class="table-headermd1"
@@ -145,7 +150,7 @@
   </div>
 </template>
 <script>
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
+import { addCollectionAnswerBatch, getVisitsDetailPerfectStore } from '@/api/index';
 import taskTips from '@/views/deviceWithin/taskTips';
 import deleteUploadImg from '@/components/deleteUploadImgTaskPhoto';
 export default {
@@ -163,6 +168,7 @@ export default {
       insert: '',
       vanPopup: false,
       taskPhotoRecognitionResult: null,
+      spanArr: [],
     };
   },
   activated() {
@@ -171,11 +177,8 @@ export default {
     this.storeGroupId = this.$route.query.storeGroupId || '';
     this.objectType = this.$route.query.photoType || '';
     this.insert = this.$route.query.insert;
-    if (this.$route.query.source == 'historicalDetails') {
-      this.getVisitsDetailFun();
-    } else {
-      this.getDetaile();
-    }
+    this.formData = null;
+    this.getVisitsDetailFun();
   },
   methods: {
     taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
@@ -189,29 +192,37 @@ export default {
         };
       }
     },
+    getSpanArr(data) {
+      if (!data) return;
+      this.spanArr = []; // tip: 后台获取完成数据后,一定要重置spanArr=[],避免出现合并混乱!!!!!
+      for (let i = 0; i < data.length; i++) {
+        // 当为第一行时
+        if (i === 0) {
+          this.spanArr.push(1);
+          this.pos = 0;
+        } else {
+          // 判断当前值是否与上一行的【名称】相等,相等则进行合并
+          if (data[i].conditionIdentifyNum === data[i - 1].conditionIdentifyNum) {
+            this.spanArr[this.pos] += 1; // 合并单元格:合并的行数 +1
+            this.spanArr.push(0); // 0代表单元格是不需要显示, 已经被合并的单元格
+          } else {
+            this.spanArr.push(1); // 1代表当前这行的数据需要被显示
+            this.pos = i;
+          }
+        }
+      }
+    },
     getVisitsDetailFun() {
       this.toastLoading(0, '加载中...', true);
-      getVisitsDetail({ visitsId: this.visitsId }).then((res) => {
+      getVisitsDetailPerfectStore({ visitsId: this.visitsId }).then((res) => {
         this.toastLoading().clear();
         if (res.data.sfaTaskList) {
-          this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
+          this.dataList = res.data.sfaTaskList.filter(
+            (val) => val.taskId == this.$route.query.taskId,
+          );
           this.formData = this.dataList[0];
-        } else {
-          this.formData = null;
-        }
-      });
-    },
-    getDetaile() {
-      console.log(this.$route.query);
-      getCollectionInfosBatch({
-        storeCode: this.$route.query.storeCode,
-        insert: this.insert == '1' ? true : false,
-        id: this.visitsId,
-        taskIds: this.taskIds.split(','),
-      }).then((res) => {
-        if (res.data && res.data.length) {
-          this.dataList = res.data;
-          this.formData = res.data[0];
+          this.getSpanArr(this.formData.taskPhotoRecognitionResult);
+          console.log(this.formData);
         } else {
           this.formData = null;
         }
@@ -219,7 +230,6 @@ export default {
     },
     openDialog(item) {
       this.vanPopup = true;
-      this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
     },
     onSubmit() {
       let formData = {