Просмотр исходного кода

Merge branch 'feature_20260108_陈列奖励案任务合并' into uat(dev)

zhujindu недель назад: 2
Родитель
Сommit
696bdb5a60

+ 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 {

+ 108 - 4
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>
@@ -58,10 +59,58 @@
             </div>
             <div v-html="item.displayInstructions"></div>
           </div>
-          <div class="itemBottom"></div>
+          <div class="itemBottom" v-if="insert == '0'">
+            <img
+              @click="openDialog(item)"
+              :src="
+                item.taskPhotoConditionPassed == 1
+                  ? require('@/assets/taskPhotoSu.png')
+                  : require('@/assets/taskPhotoErr.png')
+              " />
+            <!-- <img
+              v-if="item.taskPhotoConditionPassed == 0"
+              :src="require('@/assets/taskPhotoErr.png')" /> -->
+          </div>
         </div>
       </div>
     </div>
+    <el-dialog
+      title="识别结果"
+      :visible.sync="vanPopup"
+      width="80%"
+      :append-to-body="true"
+      :close-on-click-modal="false"
+      @close="vanPopup == false"
+      custom-class="identifyResultdialog">
+      <!-- 识别结果 -->
+      <div class="identifyResult" v-if="taskPhotoRecognitionResult" style="padding: 0 10px">
+        <div style="font-weight: bold; padding: 10px; font-size: 16px">识别结果:</div>
+        <div class="resultContent">
+          <el-table
+            :data="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="识别排面数"
+              prop="identifyTheNumberOfCards"
+              width="70px"
+              align="center"
+              >meetTheStandard
+              <template slot-scope="scope">
+                <span :style="{ color: scope.row.meetTheStandard == 1 ? '#07c160' : 'red' }">
+                  {{ scope.row.identifyTheNumberOfCards }}
+                </span>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 <script>
@@ -80,6 +129,9 @@ export default {
       visitsId: null,
       storeGroupId: '',
       objectType: '',
+      insert: '',
+      vanPopup: false,
+      taskPhotoRecognitionResult: null,
     };
   },
   activated() {
@@ -87,6 +139,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 +147,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) => {
@@ -106,7 +159,13 @@ export default {
         }
       });
     },
-    onSubmit() {},
+    openDialog(item) {
+      this.vanPopup = true;
+      this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
+    },
+    onSubmit() {
+      this.$router.go(-1);
+    },
     onClickLeft() {
       this.$router.go(-1);
     },
@@ -119,6 +178,7 @@ export default {
   flex-direction: column;
   width: 100%;
   height: 100%;
+  overflow: hidden;
   .content {
     padding: 10px;
     flex: 1;
@@ -126,6 +186,7 @@ export default {
     height: 100%;
     display: flex;
     flex-direction: column;
+    padding-bottom: 46px;
     .container {
       background: #fff;
       width: 100%;
@@ -169,6 +230,7 @@ export default {
   .dataList {
     width: 100%;
     margin-top: 10px;
+    overflow-y: auto;
     .dataItem {
       display: flex;
       background: #fff;
@@ -188,6 +250,48 @@ export default {
         display: flex;
         flex-direction: row;
       }
+      .itemBottom {
+        justify-content: end;
+      }
+    }
+  }
+}
+</style>
+<style lang="scss">
+.taskPhotoTaking {
+  .identifyResultdialog {
+    width: vw(690) !important;
+    margin-top: 1vh !important;
+    border-radius: 8px !important;
+    font-size: vw(32) !important;
+    .el-dialog__headerbtn {
+      width: vw(44);
+      height: vw(44);
+      background-color: #e1e1e1;
+      border-radius: 50%;
+      margin-top: -3px;
+    }
+  }
+  .table-headermd1 {
+    font-size: 14px;
+    text-align: center;
+    position: initial;
+    width: 98% !important;
+    margin: 0 auto;
+    border-right: 0;
+    border-radius: 8px;
+    th {
+      color: #000;
+      font-weight: bold;
+    }
+    td {
+      color: #000;
+    }
+    .el-table__cell {
+      padding: 6px 0 !important;
+      .cell {
+        padding: 0;
+      }
     }
   }
 }

+ 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() {