Browse Source

Merge branch 'master' into release

zhujindu 22 hours ago
parent
commit
4f852bea95

+ 27 - 0
src/api/index.js

@@ -1160,3 +1160,30 @@ export function getVisitsDetailPerfectStore(query) {
     params: query,
   });
 }
+
+// 获取陈列奖励案入库标识接口
+export function getCljlaToDBLabel(query) {
+  return request({
+    url: 'mobile/storeGroup/getCljlaToDBLabel',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 完美门店-陈列任务详情
+export function getVisitsDetailPerfectStoreByTaskId(query) {
+  return request({
+    url: 'mobile/storeGroup/getVisitsDetailPerfectStoreByTaskId',
+    method: 'get',
+    params: query,
+  });
+}
+
+// 查询用户距离拜访门店得距离
+export function selectUserDistanceTheStore(query) {
+  return request({
+    url: 'mobile/storeGroup/selectUserDistanceTheStore',
+    method: 'get',
+    params: query,
+  });
+}

+ 32 - 50
src/components/deleteUploadImgTaskPhoto.vue

@@ -1,9 +1,13 @@
 <template>
   <div class="deleteUploadImgTaskPhoto">
     <van-row gutter="10">
-      <van-col span="6" style="" v-if="insert == 'true' && formData.processStatus != 1">
+      <van-col
+        span="6"
+        style=""
+        v-if="formData.processStatus != 1 || formData.displayRewardTaskEditable">
         <div class="addImg">
           <uploadVNormalTaskPhoto
+            :formData="formData"
             :shouws="true"
             :storeGroupId="storeGroupId"
             :taskList="taskIds.split(',')"
@@ -22,9 +26,9 @@
       <van-col span="6" v-for="(urls, index) in imgArr" :key="index">
         <div class="imgview">
           <van-icon
-            v-if="insert == 'true' && formData.processStatus != 1"
+            v-if="formData.processStatus != 1 || formData.displayRewardTaskEditable"
             name="close"
-            size="16"
+            size="20"
             v-on:click="deleteImg(index, urls)" />
           <img
             :src="urls.fileUrl || urls.mediaFileUrl"
@@ -224,55 +228,33 @@ export default {
             };
           }),
         );
-        this.$nextTick(() => {
-          this.syncUpload(localIds, startIndex);
-        });
+        // this.$nextTick(() => {
+        //   this.syncUpload(localIds, startIndex);
+        // });
       } else {
         this.$emit('upDataDetail');
       }
-      // if (this.isIOS()) {
-      //   this.imgArr = this.imgArr.concat([...localIds]);
-      //   // 解决ios微信localId无法直接使用的问题,获取base64后再上传
-      //   // this.setIosImg(localIds);
-      // } else {
-      //   this.imgArr = this.imgArr.concat([...localIds]);
-      // }
-      // this.$emit('upDataDetail');
-    },
-    syncUpload(localIds, baseIndex = 0, callback) {
-      if (!localIds.length) {
-        this.isUploadImg = true;
-        callback && callback();
-        return;
-      } else {
-        var localId = localIds.pop();
-        wx.uploadImage({
-          localId: localId,
-          isShowProgressTips: 0, // 默认为1,显示进度提示
-          success: (res) => {
-            const index = baseIndex + localIds.length;
-            if (this.imgArr[index]) {
-              this.imgArr[index].mediaId = res.serverId;
-            }
-            this.syncUpload(localIds, baseIndex, callback);
-          },
-        });
-      }
-    },
-    isIOS() {
-      return /iPhone|iPad|iPod/i.test(navigator.userAgent);
-    },
-    setIosImg(localIds) {
-      localIds.forEach((localId) => {
-        this.wx.getLocalImgData({
-          localId: localId, // 图片的localID
-          success: (res) => {
-            console.log(res.localData);
-            // this.imgArr.push(res.localData);
-          },
-        });
-      });
     },
+    // syncUpload(localIds, baseIndex = 0, callback) {
+    //   if (!localIds.length) {
+    //     this.isUploadImg = true;
+    //     callback && callback();
+    //     return;
+    //   } else {
+    //     var localId = localIds.pop();
+    //     wx.uploadImage({
+    //       localId: localId,
+    //       isShowProgressTips: 0, // 默认为1,显示进度提示
+    //       success: (res) => {
+    //         const index = baseIndex + localIds.length;
+    //         if (this.imgArr[index]) {
+    //           this.imgArr[index].mediaId = res.serverId;
+    //         }
+    //         this.syncUpload(localIds, baseIndex, callback);
+    //       },
+    //     });
+    //   }
+    // },
   },
 };
 </script>
@@ -298,8 +280,8 @@ export default {
   display: inline-block;
   i {
     position: absolute;
-    right: -2px;
-    top: -3px;
+    right: -7px;
+    top: -7px;
     color: white;
     background: red;
     overflow: hidden;

+ 7 - 1
src/components/uploadVNormalTaskPhoto.vue

@@ -89,6 +89,12 @@ export default {
       type: [String, Number],
       default: '',
     },
+    formData: {
+      type: Object,
+      default() {
+        return {};
+      },
+    },
   },
   computed: {
     ...mapState({
@@ -207,7 +213,7 @@ export default {
               let count = 1;
               // 1:店招内容识别(不能连拍和多选),3:调色机识别(不能连拍和多选) 需要实时识别的不支持连拍和多选
               if (that.photoIdentifyType != 1 && that.photoIdentifyType != 3) {
-                count = that.continuousShoot == '1' ? 5 : 1; //是否允许连拍/相册多选 最多5张
+                count = that.continuousShoot == '1' ? 20 : 1; //是否允许连拍/相册多选 最多5张
               }
               wx.chooseImage({
                 count: count,

+ 25 - 5
src/utils/index.js

@@ -327,10 +327,30 @@ export function shareVedioLinks() {
 }
 
 export function convertToChinese(num) {
+  if (num === 0) return '零';
   const digitMap = ['零', '一', '二', '三', '四', '五', '六', '七', '八', '九'];
-  return num
-    .toString()
-    .split('')
-    .map((digit) => digitMap[parseInt(digit)])
-    .join('');
+  const units = ['', '十', '百', '千'];
+  const bigUnits = ['', '万', '亿'];
+  let str = num.toString();
+  let result = '';
+  let len = str.length;
+  for (let i = 0; i < len; i++) {
+    let digit = parseInt(str[i]);
+    let pos = len - 1 - i;
+    if (digit !== 0) {
+      result += digitMap[digit] + units[pos % 4];
+    } else if (result && result[result.length - 1] !== '零') {
+      result += '零';
+    }
+    if (pos % 4 === 0 && pos > 0) {
+      result += bigUnits[Math.floor(pos / 4)];
+    }
+  }
+  // 清理多余的零
+  result = result.replace(/零+/g, '零').replace(/^零|零$/g, '');
+  // 特殊处理:如果以"一十"开头,去掉"一"
+  if (result.startsWith('一十')) {
+    result = result.substring(1);
+  }
+  return result;
 }

+ 24 - 8
src/views/deviceOutside/index.vue

@@ -2263,14 +2263,26 @@ export default {
       });
     },
     Visit(val) {
-      this.$router.push({
-        path: '/historicalDetails',
-        query: {
-          visitId: val.visitId,
-          storeId: val.storeId,
-          storeCode: val.storeCode,
-        },
-      });
+      if ((val.jinpaiStore || val.fenxiaoStore || val.kekongStore) && val.visitSource == 1) {
+        // 金牌店+同城分销店+可控店 -完美门店
+        this.$router.push({
+          path: '/perfectStore',
+          query: {
+            visitId: val.visitId,
+            storeId: val.storeId,
+            storeCode: val.storeCode,
+          },
+        });
+      } else {
+        this.$router.push({
+          path: '/historicalDetails',
+          query: {
+            visitId: val.visitId,
+            storeId: val.storeId,
+            storeCode: val.storeCode,
+          },
+        });
+      }
     },
     onClickLeft() {
       this.$router.go(-1);
@@ -2600,6 +2612,10 @@ export default {
   z-index: 2;
   top: 0;
 }
+.cellcontent {
+  user-select: text;
+  -webkit-user-select: text;
+}
 .cellcontent .centerBtn {
   margin: 0 auto 10px;
   display: block;

+ 18 - 11
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -160,6 +160,7 @@ import {
   buryingPoint,
   getMaterialHistory,
   getVisitTasks,
+  getCljlaToDBLabel,
 } from '@/api/index';
 import axios from 'axios';
 import { saveVisitsParams, getOrderUrlByStoreId } from '@/api/inventory';
@@ -629,17 +630,23 @@ export default {
       localStorage.setItem('getRequestFlage', 'false');
       console.log(this.visitId);
       if (val.taskType == '5') {
-        this.$router.push({
-          path: '/taskPhotoTaking',
-          query: {
-            storeCode: this.urlParameter.storeCode,
-            visitsId: this.visitId,
-            taskIds: val.taskIds.join(','),
-            storeGroupId: this.storeGroupId,
-            photoType: val.photoType,
-            insert: true,
-            storeId: this.storeId,
-          },
+        getCljlaToDBLabel({ visitsId: this.visitId }).then((res) => {
+          if (res.code == 200) {
+            this.$router.push({
+              path: '/taskPhotoTaking',
+              query: {
+                storeCode: this.urlParameter.storeCode,
+                visitsId: this.visitId,
+                taskIds: val.taskIds.join(','),
+                storeGroupId: this.storeGroupId,
+                photoType: val.photoType,
+                insert: true,
+                storeId: this.storeId,
+              },
+            });
+          } else {
+            this.$toast(res.msg);
+          }
         });
       } else {
         this.$router.push({

+ 24 - 8
src/views/deviceWithin/index.vue

@@ -836,14 +836,26 @@ export default {
       }
     },
     Visit(val) {
-      this.$router.push({
-        path: '/historicalDetails',
-        query: {
-          visitId: val.visitId,
-          storeId: val.storeId,
-          storeCode: val.storeCode,
-        },
-      });
+      if ((val.jinpaiStore || val.fenxiaoStore || val.kekongStore) && val.visitSource == 1) {
+        // 金牌店+同城分销店+可控店 -完美门店
+        this.$router.push({
+          path: '/perfectStore',
+          query: {
+            visitId: val.visitId,
+            storeId: val.storeId,
+            storeCode: val.storeCode,
+          },
+        });
+      } else {
+        this.$router.push({
+          path: '/historicalDetails',
+          query: {
+            visitId: val.visitId,
+            storeId: val.storeId,
+            storeCode: val.storeCode,
+          },
+        });
+      }
     },
     dateeconfirm() {
       this.show = false;
@@ -1798,6 +1810,10 @@ export default {
   z-index: 2;
   top: 0;
 }
+.cellcontent {
+  user-select: text;
+  -webkit-user-select: text;
+}
 .cellcontent .centerBtn {
   margin: 0 auto 10px;
   display: block;

+ 18 - 11
src/views/deviceWithin/storeVisit.vue

@@ -174,6 +174,7 @@ import {
   buryingPoint,
   getMaterialHistory,
   getVisitTasks,
+  getCljlaToDBLabel,
 } from '@/api/index';
 import axios from 'axios';
 import sp from './../../assets/sp.png';
@@ -790,17 +791,23 @@ export default {
         }, 2000);
         localStorage.setItem('getRequestFlage', 'false');
         if (val.taskType == '5') {
-          this.$router.push({
-            path: '/taskPhotoTaking',
-            query: {
-              storeCode: this.urlParameter.storeCode,
-              visitsId: this.visitId,
-              taskIds: val.taskIds.join(','),
-              storeGroupId: this.storeGroupId,
-              photoType: val.photoType,
-              insert: this.insert,
-              storeId: this.storeId,
-            },
+          getCljlaToDBLabel({ visitsId: this.visitId }).then((res) => {
+            if (res.code == 200) {
+              this.$router.push({
+                path: '/taskPhotoTaking',
+                query: {
+                  storeCode: this.urlParameter.storeCode,
+                  visitsId: this.visitId,
+                  taskIds: val.taskIds.join(','),
+                  storeGroupId: this.storeGroupId,
+                  photoType: val.photoType,
+                  insert: true,
+                  storeId: this.storeId,
+                },
+              });
+            } else {
+              this.$toast(res.msg);
+            }
           });
         } else {
           this.$router.push({

+ 105 - 48
src/views/deviceWithin/taskPhotoTaking.vue

@@ -3,7 +3,7 @@
     <van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
       <template #right v-if="formData">
         <span
-          v-if="isEdit && insert == 'true' && formData.processStatus != 1"
+          v-if="formData.processStatus != 1"
           @click="onSubmit"
           style="
             color: white;
@@ -126,9 +126,15 @@
   </div>
 </template>
 <script>
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
+import {
+  getCollectionInfosBatch,
+  addCollectionAnswerBatch,
+  getVisitsDetail,
+  selectUserDistanceTheStore,
+} from '@/api/index';
 import taskTips from './taskTips';
 import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import { mapState } from 'vuex';
 export default {
   name: 'abnortaskPhotoTakingmalVisit',
@@ -140,7 +146,6 @@ export default {
   },
   data() {
     return {
-      isEdit: true,
       formData: null,
       dataList: null,
       taskIds: [],
@@ -153,6 +158,8 @@ export default {
       spanArr: [],
       pos: 0,
       mediaIds: [],
+      mediaInfos: [],
+      editFlag: true,
     };
   },
   activated() {
@@ -161,6 +168,8 @@ export default {
     this.storeGroupId = this.$route.query.storeGroupId || '';
     this.objectType = this.$route.query.photoType || '';
     this.insert = this.$route.query.insert;
+    // 授权
+    // getTicketFun(['uploadImage']).then(() => {});
     if (this.$route.query.source == 'historicalDetails') {
       this.getVisitsDetailFun();
     } else {
@@ -175,6 +184,39 @@ export default {
   },
   watch: {},
   methods: {
+    // 授权
+    getTicketFunfun() {
+      getTicketFun()
+        .then(() => {
+          getPosition()
+            .then((res) => {
+              let { TXisBD } = res;
+              // this.lat = TXisBD.lat;
+              // this.lon = TXisBD.lon;
+              this.selectUserDistanceTheStoreFun(TXisBD);
+            })
+            .catch((error) => {
+              this.$dialog.alert({
+                message: error,
+              });
+            });
+        })
+        .catch(() => {});
+    },
+    selectUserDistanceTheStoreFun(TXisBD) {
+      selectUserDistanceTheStore({
+        visitsId: this.visitsId, //	Long	拜访id
+        lon: TXisBD.lon, //	String	经度
+        lat: TXisBD.lat, //	String	纬度
+      }).then((res) => {
+        if (res.code == 200) {
+          this.editFlag = true;
+        } else {
+          this.editFlag = true;
+          this.$toast(res.msg);
+        }
+      });
+    },
     taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
       const cellValue = row[column.property];
       if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
@@ -213,6 +255,7 @@ export default {
         if (res.data.sfaTaskList) {
           this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
           this.formData = this.dataList[0];
+          this.isEditFun();
         } else {
           this.formData = null;
         }
@@ -229,11 +272,15 @@ export default {
         if (res.data && res.data.length) {
           this.dataList = res.data;
           this.formData = res.data[0];
+          this.isEditFun();
         } else {
           this.formData = null;
         }
       });
     },
+    isEditFun() {
+      this.getTicketFunfun();
+    },
     openDialog(item) {
       this.vanPopup = true;
       console.log(item);
@@ -243,53 +290,62 @@ export default {
         this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
       });
     },
-    waitUploadReady(interval = 1000) {
-      return new Promise((resolve) => {
-        const intervalId = setInterval(() => {
-          const taskPhoto = this.$refs.taskPhoto && this.$refs.taskPhoto[0];
-          if (taskPhoto && taskPhoto.isUploadImg) {
-            clearInterval(intervalId);
-            resolve();
-          }
-        }, interval);
-      });
-    },
-    async onSubmit() {
+    onSubmit() {
       this.toastLoading(0, '提交中,请稍候...', true);
-      try {
-        const taskPhoto = this.$refs.taskPhoto && this.$refs.taskPhoto[0];
-        if (taskPhoto && !taskPhoto.isUploadImg) {
-          await this.waitUploadReady(1000);
-        }
-
-        let formData = {
-          storeId: this.$route.query.storeId,
-          storeCode: this.$route.query.storeCode,
-          storeGroupId: this.$route.query.storeGroupId,
-          visitsId: this.visitsId,
-          taskList: this.taskIds.split(',').map((val) => Number(val)),
-          insert: true,
-          collectionAnswers: [],
-          checkUnManage: 'N',
-          deviceCode: '',
-          putInCode: '',
-          equipmentCode: '',
-          collectionItemId: taskPhoto ? taskPhoto.collectionItemId : '',
-          objectType: this.$route.query.photoType,
-          locationRemark: taskPhoto ? taskPhoto.locationRemark : '',
-          mediaInfos: [],
-          isH5: this.userInfo.photoMethod == '1',
-        };
-        if (this.userInfo.photoMethod == '1') {
-          formData.mediaInfos = [];
-        } else if (taskPhoto) {
-          formData.mediaInfos = taskPhoto.imgArr;
+      const taskPhoto = this.$refs.taskPhoto && this.$refs.taskPhoto[0];
+      let formData = {
+        storeId: this.$route.query.storeId,
+        storeCode: this.$route.query.storeCode,
+        storeGroupId: this.$route.query.storeGroupId,
+        visitsId: this.visitsId,
+        taskList: this.taskIds.split(',').map((val) => Number(val)),
+        insert: true,
+        collectionAnswers: [],
+        checkUnManage: 'N',
+        deviceCode: '',
+        putInCode: '',
+        equipmentCode: '',
+        collectionItemId: taskPhoto ? taskPhoto.collectionItemId : '',
+        objectType: this.$route.query.photoType,
+        locationRemark: taskPhoto ? taskPhoto.locationRemark : '',
+        mediaInfos: [],
+        isH5: this.userInfo.photoMethod == '1',
+      };
+      if (this.userInfo.photoMethod == '1') {
+        formData.mediaInfos = [];
+        this.addCollection(formData);
+      } else {
+        this.mediaInfos = [];
+        let imgArr = JSON.parse(JSON.stringify(taskPhoto.imgArr));
+        this.syncUpload(imgArr, () => {
+          this.toastLoading().clear();
+          formData.mediaInfos = this.mediaInfos;
+          this.addCollection(formData);
+        });
+      }
+    },
+    syncUpload(imgArr, callback) {
+      if (!imgArr.length) {
+        callback && callback();
+        return;
+      } else {
+        var item = imgArr.pop();
+        if (!item.mediaId) {
+          wx.uploadImage({
+            localId: item.mediaFileUrl,
+            isShowProgressTips: 0, // 默认为1,显示进度提示
+            success: (res) => {
+              this.mediaInfos.push({
+                mediaId: res.serverId,
+                mediaFileUrl: item.mediaFileUrl,
+              });
+              this.syncUpload(imgArr, callback);
+            },
+          });
+        } else {
+          this.mediaInfos.push(item);
+          this.syncUpload(imgArr, callback);
         }
-        await this.addCollection(formData);
-      } catch (err) {
-        this.$toast(err.message || '提交失败,请稍后再试');
-      } finally {
-        this.toastLoading().clear();
       }
     },
     addCollection(formData) {
@@ -323,6 +379,7 @@ export default {
     display: flex;
     flex-direction: column;
     padding-bottom: 46px;
+    // overflow-y: auto;
     .container {
       background: #fff;
       width: 100%;

+ 0 - 116
src/views/historicalVisit/perfectStore.vue

@@ -53,46 +53,6 @@
         </template>
         <div class="subtitle" v-if="updateTimeShow">更新时间:{{ list.updateTime }}</div>
       </div>
-      <!-- <p
-        style="padding: 0 10px; font-size: 14px; color: #222; font-weight: bold"
-        v-if="list.visitSource != 2 && ListHistoryList.length > 0">
-        审批历史
-      </p> -->
-      <!-- <div
-        v-for="(item1, index1) in ListHistoryList"
-        :key="index1"
-        style="background-color: white; padding-top: 14px">
-        <p style="padding: 0 16px; font-size: 14px; color: #222; margin: 0">
-          流程名称:{{ item1.modelName }}
-        </p>
-        <van-steps direction="vertical" :active="item1.processList.length">
-          <van-step v-for="(item, index) in item1.processList" :key="index">
-            <h3 style="font-size: 14px">{{ item.activityName }} &nbsp;{{ item.assigneeName }}</h3>
-            <p>{{ item.comment }}</p>
-          </van-step>
-        </van-steps>
-        <div style="border-bottom: 2px solid #f5f5f5; margin: 0 16px 16px"></div>
-      </div> -->
-      <!-- <van-collapse
-        v-model="active"
-        class="fontWeit"
-        v-if="managerRemarkContents != null && managerRemarkContents.length > 0">
-        <van-collapse-item name="1" title="点评">
-          <p>
-            {{ managerRemarkContents[0].deptName }} - {{ managerRemarkContents[0].postName }} -
-            {{ managerRemarkContents[0].nickName }}的点评
-          </p>
-          <p class="contern">
-            <van-field
-              v-model="managerRemarkContents[0].remarkContent"
-              rows="4"
-              autosize
-              readonly
-              type="textarea" />
-          </p>
-          <p style="text-align: right">点评时间:{{ managerRemarkContents[0].createTime }}</p>
-        </van-collapse-item>
-      </van-collapse> -->
       <!-- 特殊任务展示 -->
       <!-- 店招 -->
       <div class="shopSign specialTask" v-if="shopSignDetail && shopSignDetail.qualifiedState">
@@ -168,8 +128,6 @@
               <van-button round type="danger" v-if="value.taskPhotoConditionPassed == 0"
                 >不通过</van-button
               >
-              <!-- <van-icon name="success" color="#07c160" v-if="value.taskPhotoConditionPassed == 1" />
-              <van-icon name="cross" color="#ee0a24" v-else /> -->
               <div class="jiantou">
                 <van-icon name="arrow" />
               </div>
@@ -227,80 +185,6 @@
           </p>
         </div>
       </div>
-      <!-- <div v-if="list.visitSource == 2" style="background-color: #fff">
-        <van-cell title="异常事由" :value="selectDictLabel(typeList, list.abnormalReason)" />
-        <van-cell title="异常信息照" />
-        <div style="padding: 10px 16px 0">
-          <delete-upload-img :imgs="imgs"></delete-upload-img>
-        </div>
-        <van-cell title="异常信息" :value="list.remark" />
-      </div> -->
-
-      <!-- <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">更多记录</div>
-      <van-cell-group>
-        <van-cell v-for="(item1, index1) in list.visitsMore" :key="index1">
-          <template #title>
-            <van-row>
-              <van-col span="6">拜访人:</van-col>
-              <van-col span="18" class="custom-titles">{{ item1.userName }}</van-col>
-            </van-row>
-          </template>
-          <template #right-icon>
-            <span>{{ item1.visitTime }}</span>
-          </template>
-        </van-cell>
-      </van-cell-group> -->
-      <!-- 业务员拜访记录回显部主管反馈内容 -->
-      <!-- <template v-if="list.sfaPhotoApproveList && list.sfaPhotoApproveList.length">
-        <div
-          class="sfaPhotoApproveList"
-          v-for="(item, index) in list.sfaPhotoApproveList"
-          :key="item.identifyType">
-          <template v-if="item.identifyType == 1 || item.identifyType == 3">
-            <div style="padding: 10px 16px; font-size: 16px; font-weight: bold">
-              {{ filterTitle(item.identifyType) }}
-            </div>
-            <template v-if="item.historyFeedback == '0'">
-              <van-cell-group>
-                <van-cell> AI识别结果: {{ item.resultCorrect == 1 ? '正确' : '不正确' }} </van-cell>
-                <van-cell>
-                  拜访照异常原因及解决方案: {{ item.feedbackError || item.reasonsSolutions }}
-                </van-cell>
-              </van-cell-group>
-            </template>
-            <template v-if="item.historyFeedback == '1'">
-              <van-cell-group>
-                <van-cell v-if="item.identifyType == 1">
-                  店招异常原因: {{ resultCorrect(item.resultCorrect) }}
-                </van-cell>
-                <van-cell> 反馈: {{ item.feedbackError || item.reasonsSolutions }} </van-cell>
-              </van-cell-group>
-            </template>
-          </template>
-        </div>
-      </template>
-      <div
-        style="padding: 10px 16px; font-size: 16px; font-weight: bold"
-        v-if="managerRemarkContents == null && remarkShow">
-        点评
-      </div>
-      <div class="comment" v-if="managerRemarkContents == null && remarkShow">
-        <van-field
-          v-model="dataform.remarkContent"
-          rows="4"
-          autosize
-          maxlength="800"
-          show-word-limit
-          type="textarea"
-          :formatter="formatter" />
-        <br />
-        <br />
-        <div class="contentborder">
-          <van-button type="info" size="small" plain class="Btn1" @click="submint"
-            >提交点评</van-button
-          >
-        </div>
-      </div> -->
     </div>
   </div>
 </template>

+ 18 - 14
src/views/historicalVisit/perfectStoreTask.vue

@@ -62,7 +62,7 @@
                 :insert="insert"
                 :objectType="objectType"
                 v-if="item.fileInfoList.length"></deleteUploadImg> -->
-              <span v-else>暂未识别到产品照片</span>
+              <span style="font-size: 16px" v-else>暂未识别到产品照片</span>
             </div>
           </div>
         </van-form>
@@ -106,23 +106,23 @@
           </el-table-column>
         </el-table>
       </div>
-      <div class="dataList" v-if="dataList">
+      <div class="dataList" v-if="formData">
         <div class="headline" style="margin-top: 10px">
           <span class="headlineIcon"></span>
           <span class="headlineTitle">陈列任务要求</span>
         </div>
-        <div class="dataItem" v-for="(item, index) in dataList">
+        <div class="dataItem">
           <div class="itemTop">
             <div class="itemIndex">
-              <p>{{ index + 1 }}、</p>
+              <p>1、</p>
             </div>
-            <div class="itemHtml" v-html="item.displayInstructions"></div>
+            <div class="itemHtml" v-html="formData.displayInstructions"></div>
           </div>
           <div class="itemBottom" v-if="insert == '0'">
-            <van-button round type="primary" v-if="item.taskPhotoConditionPassed == 1"
+            <van-button round type="primary" v-if="formData.taskPhotoConditionPassed == 1"
               >通过</van-button
             >
-            <van-button round type="danger" v-if="item.taskPhotoConditionPassed == 0"
+            <van-button round type="danger" v-if="formData.taskPhotoConditionPassed == 0"
               >不通过</van-button
             >
           </div>
@@ -171,7 +171,11 @@
   </div>
 </template>
 <script>
-import { addCollectionAnswerBatch, getVisitsDetailPerfectStore } from '@/api/index';
+import {
+  addCollectionAnswerBatch,
+  getVisitsDetailPerfectStore,
+  getVisitsDetailPerfectStoreByTaskId,
+} from '@/api/index';
 import taskTips from '@/views/deviceWithin/taskTips';
 import deleteUploadImg from '@/components/deleteUploadImgTaskPhoto';
 import { ImagePreview } from 'vant';
@@ -236,13 +240,13 @@ export default {
     },
     getVisitsDetailFun() {
       this.toastLoading(0, '加载中...', true);
-      getVisitsDetailPerfectStore({ visitsId: this.visitsId }).then((res) => {
+      getVisitsDetailPerfectStoreByTaskId({
+        visitsId: this.visitsId,
+        taskId: this.$route.query.taskId,
+      }).then((res) => {
         this.toastLoading().clear();
-        if (res.data.sfaTaskList) {
-          this.dataList = res.data.sfaTaskList.filter(
-            (val) => val.taskId == this.$route.query.taskId,
-          );
-          this.formData = this.dataList[0];
+        if (res.code == 200 && res.data) {
+          this.formData = res.data;
           console.log(this.formData.taskPhotoRecognitionResult);
           this.getSpanArr(this.formData.taskPhotoRecognitionResult);
           console.log(this.formData);