Procházet zdrojové kódy

feature_20260115_直发类色卡销售发放时必须拍照

zhujindu před 1 týdnem
rodič
revize
bda0d83952

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

@@ -322,7 +322,7 @@ export default {
     formatter(value) {
       return value.replace(
         /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/gi,
-        ''
+        '',
       );
     },
     editorFn() {
@@ -441,7 +441,7 @@ export default {
     historiStoreVisit(val, index) {
       this.$router.push({
         path: '/historiStoreVisit',
-        query: { visitId: this.visitsId, ids: index, taskType: val.taskType },
+        query: { visitId: this.visitsId, ids: index, taskType: val.taskType, taskId: val.taskId },
       });
       sessionStorage.setItem('collectionItemList', JSON.stringify(val.collectionItemList));
     },

+ 13 - 10
src/views/historicalVisit/hisvistdeils.vue

@@ -360,6 +360,7 @@ export default {
       taskPhotoRecognitionResult: null,
       yfNumFlage: false,
       wuliaoPhotoImg: [], //任务包含的图片信息(只针对于物料任务)
+      activatedSfaTask: null,
     };
   },
   activated() {
@@ -431,21 +432,23 @@ export default {
       getVisitsDetail({ visitsId: this.visitId }).then((res) => {
         this.toastLoading().clear();
         this.infoData = res.data;
-        this.taskPhotoRecognitionResult =
-          res.data.sfaTaskList[this.$route.query.ids].taskPhotoRecognitionResult;
-        var collectionItemLists = res.data.sfaTaskList[this.$route.query.ids].collectionItemList;
-        if (res.data.sfaTaskList[this.$route.query.ids].checkUnManage == 'Y') {
+        let filterSfaTask = res.data.sfaTaskList.filter((val) => val.taskId == this.taskId);
+        this.activatedSfaTask = filterSfaTask.length ? filterSfaTask[0] : null;
+        if (!this.activatedSfaTask) return false;
+        this.taskPhotoRecognitionResult = this.activatedSfaTask.taskPhotoRecognitionResult;
+        var collectionItemLists = this.activatedSfaTask.collectionItemList;
+        if (this.activatedSfaTask.checkUnManage == 'Y') {
           this.checkShow = true;
         } else {
           this.checkShow = false;
         }
         // this.deviceCode=res.data.deviceCode;
         // this.putInCode=res.data.putInCode;
-        this.deviceCode = res.data.sfaTaskList[this.$route.query.ids].deviceCode || ''; // 设备编号
-        this.putInCode = res.data.sfaTaskList[this.$route.query.ids].putInCode || ''; // 投放编号
-        this.equipmentCode = res.data.sfaTaskList[this.$route.query.ids].equipmentCode || ''; // 机资产编号
-        this.inspectionType = res.data.sfaTaskList[this.$route.query.ids].inspectionType;
-        // if (res.data.sfaTaskList[this.$route.query.ids].inspectionType == 'buy') {
+        this.deviceCode = this.activatedSfaTask.deviceCode || ''; // 设备编号
+        this.putInCode = this.activatedSfaTask.putInCode || ''; // 投放编号
+        this.equipmentCode = this.activatedSfaTask.equipmentCode || ''; // 机资产编号
+        this.inspectionType = this.activatedSfaTask.inspectionType;
+        // if (this.activatedSfaTask.inspectionType == 'buy') {
         //   this.showCode = true;
         // } else {
         //   this.showCode = false;
@@ -526,7 +529,7 @@ export default {
               }
             }
           }
-          this.wuliaoPhotoImg = res.data.sfaTaskList[this.$route.query.ids].fileInfoList;
+          this.wuliaoPhotoImg = this.activatedSfaTask.fileInfoList;
           this.tableData1 = collectionItemLists;
           let yfNumArr = this.tableData1.filter((val) => val.yfNum);
           this.yfNumFlage = yfNumArr.length ? true : false;