Przeglądaj źródła

feature_20260108_陈列奖励案任务合并

zhujindu 1 tydzień temu
rodzic
commit
591e4af6e4

+ 6 - 6
src/components/deleteUploadImgTaskPhoto.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="deleteUploadImgTaskPhoto">
     <van-row gutter="10">
-      <van-col span="6" style="background: #f5f5f5">
+      <van-col span="6" style="background: #f5f5f5" v-if="insert == '1'">
         <div class="addImg">
           <uploadVNormalTaskPhoto
             :imgArr="imgs"
@@ -23,7 +23,7 @@
       <van-col span="6" v-for="(urls, index) in imgs" :key="urls.id">
         <div class="imgview">
           <van-icon
-            v-if="(photoIdentifyType != 6 || photoIdentifyType != 7) && types != 'edit'"
+            v-if="(photoIdentifyType != 6 || photoIdentifyType != 7) && insert == '1'"
             name="close"
             size="16"
             v-on:click="deleteImg(index, urls.fileIdSplicing)" />
@@ -71,10 +71,6 @@ export default {
       type: String,
       default: '',
     },
-    types: {
-      // edit 编辑
-      type: String,
-    },
     storeGroupId: {
       type: String,
     },
@@ -109,6 +105,10 @@ export default {
       type: String,
       default: '',
     },
+    insert: {
+      type: String,
+      default: '0',
+    },
   },
   watch: {
     imgs: {

+ 0 - 3
src/components/uploadVNormalTaskPhoto.vue

@@ -161,9 +161,6 @@ export default {
       localIdsArr: [],
     };
   },
-  created() {
-    console.log(this.photoIdentifyType + 'ssss');
-  },
   methods: {
     // 原生H5拍照图片
     // url: base64

+ 1 - 0
src/views/deviceOutside/suishenbangOutstoreVisit.vue

@@ -634,6 +634,7 @@ export default {
             taskIds: val.taskIds.join(','),
             storeGroupId: this.storeGroupId,
             photoType: val.photoType,
+            insert: 1,
           },
         });
       } else {

+ 8 - 2
src/views/deviceWithin/taskPhotoTaking.vue

@@ -3,7 +3,7 @@
     <van-nav-bar class="navBar" left-arrow title="拜访任务" @click-left="onClickLeft">
       <template #right>
         <span
-          v-if="isEdit"
+          v-if="isEdit && insert == '1'"
           @click="onSubmit"
           style="
             color: white;
@@ -45,6 +45,7 @@
                 @upDataDetail="getDetaile"
                 :pictureSource="item.pictureSource"
                 :continuousShoot="item.continuousShoot"
+                :insert="insert"
                 :objectType="objectType"></delete-upload-img>
             </div>
           </div>
@@ -80,6 +81,7 @@ export default {
       visitsId: null,
       storeGroupId: '',
       objectType: '',
+      insert: '',
     };
   },
   activated() {
@@ -87,6 +89,7 @@ export default {
     this.visitsId = this.$route.query.visitsId || '';
     this.storeGroupId = this.$route.query.storeGroupId || '';
     this.objectType = this.$route.query.photoType || '';
+    this.insert = this.$route.query.insert;
     this.getDetaile();
   },
   methods: {
@@ -94,7 +97,7 @@ export default {
       console.log(this.$route.query);
       getCollectionInfosBatch({
         storeCode: this.$route.query.storeCode,
-        insert: true,
+        insert: this.insert == '1' ? true : false,
         id: this.visitsId,
         taskIds: this.taskIds.split(','),
       }).then((res) => {
@@ -119,6 +122,7 @@ export default {
   flex-direction: column;
   width: 100%;
   height: 100%;
+  overflow: hidden;
   .content {
     padding: 10px;
     flex: 1;
@@ -126,6 +130,7 @@ export default {
     height: 100%;
     display: flex;
     flex-direction: column;
+    padding-bottom: 46px;
     .container {
       background: #fff;
       width: 100%;
@@ -169,6 +174,7 @@ export default {
   .dataList {
     width: 100%;
     margin-top: 10px;
+    overflow-y: auto;
     .dataItem {
       display: flex;
       background: #fff;

+ 37 - 4
src/views/historicalVisit/historicalDetails.vue

@@ -398,6 +398,7 @@ export default {
         this.toastLoading().clear();
         if (res.code == 200) {
           this.list = res.data;
+          this.list.sfaTaskList = this.filterSfaTaskList(this.list.sfaTaskList);
           if (res.data.visitSource != 2) {
             this.getListHistoryList(res.data.instanceId);
           }
@@ -438,11 +439,43 @@ export default {
         }
       });
     },
+    filterSfaTaskList(list) {
+      let taskTypeArr = list.filter((val) => val.taskType !== '5');
+      let taskType5Index = list.findIndex((val) => val.taskType == '5');
+      if (taskType5Index != -1) {
+        let taskType5Arr = list.filter((val) => val.taskType == '5');
+        let taskIds = [];
+        taskType5Arr.forEach((val) => {
+          taskIds.push(val.taskId);
+        });
+        let taskType5 = {
+          ...list[taskType5Index],
+          taskIds: taskIds,
+        };
+        taskType5.taskName = '生动化陈列任务拍照';
+        taskTypeArr.splice(taskType5Index, 0, taskType5);
+      }
+      console.log(taskTypeArr);
+      return taskTypeArr;
+    },
     historiStoreVisit(val, index) {
-      this.$router.push({
-        path: '/historiStoreVisit',
-        query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
-      });
+      if (val.taskType == '5') {
+        this.$router.push({
+          path: '/taskPhotoTaking',
+          query: {
+            storeCode: this.$route.query.storeCode || this.list.storeCode,
+            visitsId: this.visitsId,
+            taskIds: val.taskIds.join(','),
+            storeGroupId: this.list.storeGroupId,
+            insert: 0,
+          },
+        });
+      } else {
+        this.$router.push({
+          path: '/historiStoreVisit',
+          query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
+        });
+      }
       sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
     },
     toSkuRecognize() {