Forráskód Böngészése

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

zhujindu 2 hete
szülő
commit
699ac78594

+ 9 - 0
src/api/index.js

@@ -1142,3 +1142,12 @@ export function removePhotoBatch(data) {
     data: data,
   });
 }
+
+//
+export function addCollectionAnswerBatch(data) {
+  return request({
+    url: 'mobile/storeGroup/addCollectionAnswerBatch',
+    method: 'post',
+    data,
+  });
+}

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

@@ -635,6 +635,7 @@ export default {
             storeGroupId: this.storeGroupId,
             photoType: val.photoType,
             insert: 1,
+            storeId: this.storeId,
           },
         });
       } else {

+ 75 - 37
src/views/deviceWithin/taskPhotoTaking.vue

@@ -84,7 +84,6 @@
       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"
@@ -114,7 +113,7 @@
   </div>
 </template>
 <script>
-import { getCollectionInfosBatch } from '@/api/index';
+import { getCollectionInfosBatch, addCollectionAnswerBatch, getVisitsDetail } from '@/api/index';
 import taskTips from './taskTips';
 import deleteUploadImg from '@/components/deleteUploadImgTaskPhoto';
 export default {
@@ -140,9 +139,25 @@ export default {
     this.storeGroupId = this.$route.query.storeGroupId || '';
     this.objectType = this.$route.query.photoType || '';
     this.insert = this.$route.query.insert;
-    this.getDetaile();
+    if (this.$route.query.source == 'historicalDetails') {
+      this.getVisitsDetailFun();
+    } else {
+      this.getDetaile();
+    }
   },
   methods: {
+    getVisitsDetailFun() {
+      this.toastLoading(0, '加载中...', true);
+      getVisitsDetail({ visitsId: this.visitsId }).then((res) => {
+        this.toastLoading().clear();
+        if (res.data.sfaTaskList) {
+          this.dataList = res.data.sfaTaskList.filter((val) => val.taskType == '5');
+          this.formData = this.dataList[0];
+        } else {
+          this.formData = null;
+        }
+      });
+    },
     getDetaile() {
       console.log(this.$route.query);
       getCollectionInfosBatch({
@@ -164,7 +179,25 @@ export default {
       this.taskPhotoRecognitionResult = item.taskPhotoRecognitionResult;
     },
     onSubmit() {
-      this.$router.go(-1);
+      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: '',
+      };
+      addCollectionAnswerBatch(formData).then((res) => {
+        if (res.code == 200) {
+          localStorage.setItem('getRequestFlage', 'true');
+          this.$router.go(-1);
+        }
+      });
     },
     onClickLeft() {
       this.$router.go(-1);
@@ -258,40 +291,45 @@ export default {
 }
 </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;
-    }
+.identifyResultdialog {
+  width: vw(690) !important;
+  margin-top: 1vh !important;
+  border-radius: 8px !important;
+  font-size: vw(32) !important;
+  height: 70% !important;
+  display: flex;
+  flex-direction: column;
+  .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;
-      }
+  .el-dialog__body {
+    flex: 1;
+    overflow-y: auto;
+  }
+}
+.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;
     }
   }
 }

+ 2 - 0
src/views/historicalVisit/historicalDetails.vue

@@ -451,6 +451,7 @@ export default {
         let taskType5 = {
           ...list[taskType5Index],
           taskIds: taskIds,
+          taskPhotoConditionPassed: null,
         };
         taskType5.taskName = '生动化陈列任务拍照';
         taskTypeArr.splice(taskType5Index, 0, taskType5);
@@ -468,6 +469,7 @@ export default {
             taskIds: val.taskIds.join(','),
             storeGroupId: this.list.storeGroupId,
             insert: 0,
+            source: 'historicalDetails',
           },
         });
       } else {