Przeglądaj źródła

feature_20251015_主管任务门店扫码签到

zhujindu 1 miesiąc temu
rodzic
commit
7729cfe7a8

+ 15 - 7
src/views/week/ActivityQRCode.vue

@@ -170,12 +170,19 @@ export default {
       qrUuids: null,
     };
   },
-  created() {
-    if (this.ActivityQRCodeData) this.activityForm = this.ActivityQRCodeData;
-    if (this.qrUuid) {
-      this.qrUuids = this.qrUuid;
-      this.getQRChainList();
-    }
+  watch: {
+    ActivityQRCodeData: {
+      handler(val) {
+        if (val) this.activityForm = val;
+        if (this.qrUuid) {
+          this.qrUuids = this.qrUuid;
+          this.getQRChainList();
+        }
+        console.log(val);
+      },
+      deep: true,
+      immediate: true,
+    },
   },
   methods: {
     activityOnConfirm(date) {
@@ -190,7 +197,8 @@ export default {
         this.approvalStatus == '1' ||
         this.approvalStatus == '2' ||
         this.approvalStatus == '3' ||
-        (this.approvalStatus == null && this.userSummaryId)
+        (this.approvalStatus == null && this.userSummaryId) ||
+        (this.qrUuid && this.userSummaryId)
       ) {
         getSummaryQrCodeUUID({ qrUuid: this.qrUuid, userSummaryId: this.userSummaryId }).then(
           (res) => {

+ 1 - 0
src/views/week/SUPTaskApproval/SUPTaskApprovalDetail.vue

@@ -139,6 +139,7 @@ export default {
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.powerGrade = localStorage.getItem('powerGrade');
     this.tabVal = this.$route.query.tabVal;
     this.getDetailById();

+ 5 - 0
src/views/week/VisitSummaryAdd.vue

@@ -386,10 +386,12 @@ export default {
       chainCode: '',
       jxsList: [],
       userSummaryId: null,
+      qrUuid: null,
     };
   },
   activated() {
     this.userSummaryId = null;
+    this.qrUuid = null;
   },
   created() {
     this.activaFlag = true;
@@ -503,11 +505,13 @@ export default {
           customItemList: this.collectionItemList, //List<Object>	答案列表
           ...ActivityQRCodeData, //任务名称、活动日期、签到时间
           getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
+          qrUuid: this.qrUuid || null,
         })
           .then((res) => {
             if (res.code == 200) {
               if (callback) {
                 this.userSummaryId = res.data.userSummaryId ? res.data.userSummaryId : null;
+                this.qrUuid = res.data.qrUuid ? res.data.qrUuid : null;
                 // 回传二维码
                 callback(res);
               } else {
@@ -554,6 +558,7 @@ export default {
             summaryId: this.$route.query.summaryId, //Long	主管任务id
             customItemList: this.collectionItemList, //List<Object>	答案列表
             ...ActivityQRCodeData,
+            qrUuid: this.qrUuid || null,
           })
             .then((res) => {
               if (res.code == 200) {

+ 1 - 0
src/views/week/VisitSummaryDetail.vue

@@ -158,6 +158,7 @@ export default {
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();

+ 2 - 0
src/views/week/VisitSummaryStorageDetail.vue

@@ -122,6 +122,7 @@ export default {
     };
   },
   activated() {
+    this.ActivityQRCodeData = {};
     this.source = this.$route.query.source || '';
     this.powerGrade = localStorage.getItem('powerGrade');
     this.getDetailById();
@@ -224,6 +225,7 @@ export default {
           customItemList: collectionItemList, //List<Object>	答案列表
           ...ActivityQRCodeData, //任务名称、活动日期、签到时间
           getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
+          qrUuid: this.qrUuid || null,
         })
           .then((res) => {
             if (res.code == 200) {