瀏覽代碼

Merge branch 'feature_20260413_陈列照片提交后修改' into feature_20260421_完美门店详情接口速度优化

# Conflicts:
#	src/api/index.js
zhujindu 11 小時之前
父節點
當前提交
628c96fdce

+ 9 - 0
src/api/index.js

@@ -1169,3 +1169,12 @@ export function getVisitsDetailPerfectStoreByTaskId(query) {
     params: query,
     params: query,
   });
   });
 }
 }
+
+// 查询用户距离拜访门店得距离
+export function selectUserDistanceTheStore(query) {
+  return request({
+    url: 'mobile/storeGroup/selectUserDistanceTheStore',
+    method: 'get',
+    params: query,
+  });
+}

+ 9 - 5
src/components/deleteUploadImgTaskPhoto.vue

@@ -1,9 +1,13 @@
 <template>
 <template>
   <div class="deleteUploadImgTaskPhoto">
   <div class="deleteUploadImgTaskPhoto">
     <van-row gutter="10">
     <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">
         <div class="addImg">
           <uploadVNormalTaskPhoto
           <uploadVNormalTaskPhoto
+            :formData="formData"
             :shouws="true"
             :shouws="true"
             :storeGroupId="storeGroupId"
             :storeGroupId="storeGroupId"
             :taskList="taskIds.split(',')"
             :taskList="taskIds.split(',')"
@@ -22,9 +26,9 @@
       <van-col span="6" v-for="(urls, index) in imgArr" :key="index">
       <van-col span="6" v-for="(urls, index) in imgArr" :key="index">
         <div class="imgview">
         <div class="imgview">
           <van-icon
           <van-icon
-            v-if="insert == 'true' && formData.processStatus != 1"
+            v-if="formData.processStatus != 1 || formData.displayRewardTaskEditable"
             name="close"
             name="close"
-            size="16"
+            size="20"
             v-on:click="deleteImg(index, urls)" />
             v-on:click="deleteImg(index, urls)" />
           <img
           <img
             :src="urls.fileUrl || urls.mediaFileUrl"
             :src="urls.fileUrl || urls.mediaFileUrl"
@@ -297,8 +301,8 @@ export default {
   display: inline-block;
   display: inline-block;
   i {
   i {
     position: absolute;
     position: absolute;
-    right: -2px;
-    top: -3px;
+    right: -7px;
+    top: -7px;
     color: white;
     color: white;
     background: red;
     background: red;
     overflow: hidden;
     overflow: hidden;

+ 7 - 1
src/components/uploadVNormalTaskPhoto.vue

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

+ 55 - 4
src/views/deviceWithin/taskPhotoTaking.vue

@@ -3,7 +3,7 @@
     <van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
     <van-nav-bar class="navBar" left-arrow title="生动化陈列" @click-left="onClickLeft">
       <template #right v-if="formData">
       <template #right v-if="formData">
         <span
         <span
-          v-if="isEdit && insert == 'true' && formData.processStatus != 1"
+          v-if="formData.processStatus != 1 || formData.displayRewardTaskEditable"
           @click="onSubmit"
           @click="onSubmit"
           style="
           style="
             color: white;
             color: white;
@@ -126,9 +126,15 @@
   </div>
   </div>
 </template>
 </template>
 <script>
 <script>
-import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
+import {
+  getCollectionInfosBatch,
+  addCollectionAnswerBatch,
+  getVisitsDetail,
+  selectUserDistanceTheStore,
+} from '@/api/index';
 import taskTips from './taskTips';
 import taskTips from './taskTips';
 import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
 import deleteUploadImgTaskPhoto from '@/components/deleteUploadImgTaskPhoto';
+import { getPosition, getTicketFun } from '@/utils/TXApiFun';
 import { mapState } from 'vuex';
 import { mapState } from 'vuex';
 export default {
 export default {
   name: 'abnortaskPhotoTakingmalVisit',
   name: 'abnortaskPhotoTakingmalVisit',
@@ -140,7 +146,6 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
-      isEdit: true,
       formData: null,
       formData: null,
       dataList: null,
       dataList: null,
       taskIds: [],
       taskIds: [],
@@ -153,6 +158,7 @@ export default {
       spanArr: [],
       spanArr: [],
       pos: 0,
       pos: 0,
       mediaIds: [],
       mediaIds: [],
+      editFlag: true,
     };
     };
   },
   },
   activated() {
   activated() {
@@ -175,6 +181,39 @@ export default {
   },
   },
   watch: {},
   watch: {},
   methods: {
   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 }) {
     taskObjectSpanMethod({ row, column, rowIndex, columnIndex }) {
       const cellValue = row[column.property];
       const cellValue = row[column.property];
       if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
       if (cellValue && ['conditionIdentifyNum'].includes(column.property)) {
@@ -213,6 +252,7 @@ export default {
         if (res.data.sfaTaskList) {
         if (res.data.sfaTaskList) {
           this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
           this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
           this.formData = this.dataList[0];
           this.formData = this.dataList[0];
+          this.isEditFun();
         } else {
         } else {
           this.formData = null;
           this.formData = null;
         }
         }
@@ -229,11 +269,21 @@ export default {
         if (res.data && res.data.length) {
         if (res.data && res.data.length) {
           this.dataList = res.data;
           this.dataList = res.data;
           this.formData = res.data[0];
           this.formData = res.data[0];
+          this.isEditFun();
         } else {
         } else {
           this.formData = null;
           this.formData = null;
         }
         }
       });
       });
     },
     },
+    isEditFun() {
+      // processStatus 是否有权限编辑,displayRewardTaskEditable 只能编辑一次,
+      if (
+        (this.insert == 'false' && this.formData.processStatus != 1) ||
+        this.formData.displayRewardTaskEditable
+      ) {
+        this.getTicketFunfun();
+      }
+    },
     openDialog(item) {
     openDialog(item) {
       this.vanPopup = true;
       this.vanPopup = true;
       console.log(item);
       console.log(item);
@@ -268,7 +318,7 @@ export default {
           storeGroupId: this.$route.query.storeGroupId,
           storeGroupId: this.$route.query.storeGroupId,
           visitsId: this.visitsId,
           visitsId: this.visitsId,
           taskList: this.taskIds.split(',').map((val) => Number(val)),
           taskList: this.taskIds.split(',').map((val) => Number(val)),
-          insert: true,
+          insert: this.insert,
           collectionAnswers: [],
           collectionAnswers: [],
           checkUnManage: 'N',
           checkUnManage: 'N',
           deviceCode: '',
           deviceCode: '',
@@ -323,6 +373,7 @@ export default {
     display: flex;
     display: flex;
     flex-direction: column;
     flex-direction: column;
     padding-bottom: 46px;
     padding-bottom: 46px;
+    // overflow-y: auto;
     .container {
     .container {
       background: #fff;
       background: #fff;
       width: 100%;
       width: 100%;

+ 1 - 1
src/views/historicalVisit/perfectStoreTask.vue

@@ -62,7 +62,7 @@
                 :insert="insert"
                 :insert="insert"
                 :objectType="objectType"
                 :objectType="objectType"
                 v-if="item.fileInfoList.length"></deleteUploadImg> -->
                 v-if="item.fileInfoList.length"></deleteUploadImg> -->
-              <span v-else>暂未识别到产品照片</span>
+              <span style="font-size: 16px" v-else>暂未识别到产品照片</span>
             </div>
             </div>
           </div>
           </div>
         </van-form>
         </van-form>