Bladeren bron

feature_20251015_主管任务门店扫码签到

zhujindu 1 maand geleden
bovenliggende
commit
d99940a615

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

@@ -74,9 +74,9 @@
               <el-popover
                 placement="bottom"
                 trigger="click"
-                :content="val.chainName + '(' + val.chainCode + ')'">
+                :content="val.storeName + '(' + val.storeCode + ')'">
                 <template slot="reference">
-                  <div class="selectItem">{{ val.chainName }} &nbsp; ({{ val.chainCode }})</div>
+                  <div class="selectItem">{{ val.storeName }} &nbsp; ({{ val.storeCode }})</div>
                 </template>
               </el-popover>
             </div>
@@ -120,6 +120,9 @@
 import { getSummaryQrCheckList } from '@/api/index';
 export default {
   props: {
+    ActivityQRCodeData: {
+      type: Object,
+    },
     qrUuid: {
       type: String,
     },
@@ -147,7 +150,8 @@ export default {
       QRChainList: [],
     };
   },
-  activated() {
+  created() {
+    this.activityForm = this.ActivityQRCodeData;
     if (this.qrUuid) {
       this.getQRChainList();
     }
@@ -215,79 +219,14 @@ export default {
     },
     getQRChainList() {
       if (!this.qrUuid) return;
-      this.QRChainList = [
-        {
-          searchValue: null,
-          createBy: null,
-          createTime: null,
-          updateBy: null,
-          updateTime: null,
-          remark: null,
-          params: {},
-          pageSize: null,
-          pageNum: null,
-          chainId: null,
-          chainCode: '0110046938',
-          chainName: '洛阳融颜装饰工程有限公司',
-          delFlag: null,
-          orgCode: null,
-          orgCodes: null,
-          orgIds: null,
-          orgName: '12城-洛阳销售部',
-          provinceName: null,
-          cityName: null,
-          cityLevel: null,
-          districtName: null,
-          freeze: null,
-          salesOrg: null,
-          productLineCode: null,
-          orgId: '1162',
-          close: null,
-          typeCode1: null,
-          typeName1: null,
-          typeCode2: null,
-          typeName2: null,
-          typeName2List: null,
-          typeCode2List: null,
-          typeCode3: null,
-          typeName3: null,
-          type: null,
-          customerTypeCode2: null,
-          customerTypeName2: null,
-          valid: null,
-          workCode: null,
-          nickName: null,
-          storeCategory: null,
-          categoryDescribe: null,
-          visitId: null,
-          lat: null,
-          lon: null,
-          startTime: null,
-          endTime: null,
-          stateString: null,
-          mainCustomerCode: null,
-          mainCustomerName: null,
-          openDate: null,
-          customerManager: null,
-          monthVisited: null,
-          chainsName: null,
-          hisTime: null,
-          myChainsVisit: null,
-          chainLabelTypes: null,
-          chainLabels: null,
-          skuNum: null,
-          fhCustomer: null,
-          shipped: null,
-          chainSonName: null,
-          beOverdueOne: null,
-          beOverdueTwo: null,
-          beOverdueThree: null,
-          limit: null,
-        },
-      ];
-      // this.getSummaryQrCheckList({qrUuid:this.qrUuid}).then((res) => {
-
-      // });
+      this.QRChainList = [];
+      this.toastLoading(0, '加载中...', true);
+      getSummaryQrCheckList({ qrUuid: this.qrUuid }).then((res) => {
+        this.toastLoading().clear();
+        if (res.code == 200) {
+          this.QRChainList = res.data;
+        }
+      });
     },
   },
 };

+ 4 - 2
src/views/week/VisitSummaryAdd.vue

@@ -12,7 +12,10 @@
     <div class="lineGrey" style="height: 6px"></div>
     <div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
       <!-- 活动扫码 -->
-      <ActivityQRCode @onSubmit="onStorage" ref="ActivityQRCode"></ActivityQRCode>
+      <ActivityQRCode
+        v-if="$route.query.qrCodeCheck == '1'"
+        @onSubmit="onStorage"
+        ref="ActivityQRCode"></ActivityQRCode>
       <van-form ref="tabstoreVal">
         <div v-for="(item, index) in collectionItemList" :key="index">
           <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -490,7 +493,6 @@ export default {
     // 暂存 不校验答案是否必填
     onStorage(callback) {
       let ActivityQRCodeData = this.$refs.ActivityQRCode.activityForm || {};
-      debugger;
       this.setParams(() => {
         temporarilyCustomAnswer({
           userSummaryId: '', //	Long	用户总结id,如果为新增则不填,编辑则必填

+ 36 - 12
src/views/week/VisitSummaryStorageDetail.vue

@@ -41,18 +41,26 @@
       </div>
     </div>
     <div class="lineGrey"></div>
-    <div
-      class="container linep"
-      style="background-color: #fff; width: 94%; margin: 0px auto; border-radius: 6px">
+    <div class="container linep" style="width: 94%; margin: 0px auto; border-radius: 6px">
       <!-- 编辑 -->
       <componVisitSummary
         :collectionItemLists="collectionItemLists"
         :approvalStatus="info.approvalStatus"
-        ref="componVisitSummary"></componVisitSummary>
+        ref="componVisitSummary">
+        <!-- 活动扫码 -->
+        <ActivityQRCode
+          v-if="info.qrCodeCheck == '1'"
+          @onSubmit="onStorage"
+          ref="ActivityQRCode"
+          :ActivityQRCodeData="ActivityQRCodeData"
+          :qrUuid="qrUuid"></ActivityQRCode>
+      </componVisitSummary>
     </div>
     <br />
     <div class="tc" style="padding: 0 16px">
-      <van-button class="submitBtn" block type="primary" @click="onStorage"> 暂存 </van-button>
+      <van-button class="submitBtn" block type="primary" @click="onStorage(null)">
+        暂存
+      </van-button>
       <van-button class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
         提交汇报
       </van-button>
@@ -77,9 +85,10 @@ import {
 import { ImagePreview } from 'vant';
 import deleteUploadImg from '@/components/deleteUploadImg';
 import componVisitSummary from '@/views/week/componVisitSummary';
+import ActivityQRCode from './ActivityQRCode';
 export default {
   name: 'daily',
-  components: { deleteUploadImg, componVisitSummary },
+  components: { deleteUploadImg, componVisitSummary, ActivityQRCode },
   data() {
     return {
       info: null,
@@ -108,7 +117,8 @@ export default {
       writeAgain: false,
       approvalMessage: '',
       source: '',
-      //
+      ActivityQRCodeData: {},
+      qrUuid: null,
     };
   },
   activated() {
@@ -148,6 +158,13 @@ export default {
       });
       getSummaryMobilo({ userSummaryId: this.$route.query.userSummaryId }).then((res) => {
         loading1.clear();
+        this.ActivityQRCodeData = {
+          summaryEventName: res.data.summaryEventName || '',
+          summaryEventDate: res.data.summaryEventDate || '',
+          qrStartTime: res.data.qrStartTime || '',
+          qrEndTime: res.data.qrEndTime || '',
+        };
+        this.qrUuid = res.data.qrUuid;
         this.reportTargetAll = res.data.reportTargetAll;
         this.info = res.data;
         this.type = res.data.userType;
@@ -198,19 +215,26 @@ export default {
       this.$router.go(-1);
     },
     // 暂存 不校验答案是否必填
-    onStorage() {
+    onStorage(callback) {
+      let ActivityQRCodeData = this.$refs.ActivityQRCode.activityForm || {};
       this.setParams((collectionItemList) => {
         temporarilyCustomAnswer({
           userSummaryId: this.info.userSummaryId,
           summaryId: this.info.summaryId, //Long	主管任务id
           customItemList: collectionItemList, //List<Object>	答案列表
+          ...ActivityQRCodeData, //任务名称、活动日期、签到时间
+          getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
         })
           .then((res) => {
             if (res.code == 200) {
               this.$toast('操作成功!');
-              this.$router.replace({
-                path: this.source,
-              });
+              if (callback) {
+                callback();
+              } else {
+                this.$router.replace({
+                  path: this.source,
+                });
+              }
             } else {
               this.$toast(res.msg);
             }
@@ -294,7 +318,7 @@ export default {
 </script>
 <style scoped lang="scss">
 .container {
-  background-color: white;
+  // background-color: white;
 }
 
 .van-f-red {

+ 4 - 0
src/views/week/componVisitSummary.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="componVisitSummary">
+    <slot></slot>
     <van-form ref="tabstoreVal" v-if="collectionItemList">
       <div v-for="(item, index) in collectionItemList" :key="index">
         <div v-if="item.answerType == 'sz'" class="formLabel z-cell">
@@ -905,6 +906,9 @@ export default {
   .z-cell .van-cell__title {
     font-size: 16px;
   }
+  .van-form {
+    background-color: white;
+  }
 }
 </style>
 <style lang="scss">

+ 6 - 1
src/views/week/index.vue

@@ -187,7 +187,12 @@
               v-for="(item, index) in list"
               :key="index"
               :to="
-                '/VisitSummaryAdd?summaryId=' + item.summaryId + '&title=' + item.summaryTaskName
+                '/VisitSummaryAdd?summaryId=' +
+                item.summaryId +
+                '&title=' +
+                item.summaryTaskName +
+                '&qrCodeCheck=' +
+                item.qrCodeCheck
               ">
               <template #title>
                 <span class="custom-title">{{ item.summaryTaskName }}</span>