|
@@ -12,7 +12,7 @@
|
|
|
<div class="lineGrey" style="height: 6px"></div>
|
|
<div class="lineGrey" style="height: 6px"></div>
|
|
|
<div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
|
|
<div class="container" style="width: 94%; margin: 0px auto; border-radius: 6px">
|
|
|
<!-- 活动扫码 -->
|
|
<!-- 活动扫码 -->
|
|
|
- <ActivityQRCode @onSubmit="onSubmit"></ActivityQRCode>
|
|
|
|
|
|
|
+ <ActivityQRCode @onSubmit="onStorage" ref="ActivityQRCode"></ActivityQRCode>
|
|
|
<van-form ref="tabstoreVal">
|
|
<van-form ref="tabstoreVal">
|
|
|
<div v-for="(item, index) in collectionItemList" :key="index">
|
|
<div v-for="(item, index) in collectionItemList" :key="index">
|
|
|
<div v-if="item.answerType == 'sz'" class="formLabel z-cell">
|
|
<div v-if="item.answerType == 'sz'" class="formLabel z-cell">
|
|
@@ -214,7 +214,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
<br />
|
|
<br />
|
|
|
<div class="tc" style="padding: 0 16px">
|
|
<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 class="submitBtn" block type="info" color="#0057ba" @click="onSubmit">
|
|
|
提交汇报
|
|
提交汇报
|
|
|
</van-button>
|
|
</van-button>
|
|
@@ -485,7 +487,35 @@ export default {
|
|
|
return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
|
|
return val.slice(0, 4) + '-' + val.slice(4, 6) + '-' + val.slice(6, 8);
|
|
|
},
|
|
},
|
|
|
onLoad() {},
|
|
onLoad() {},
|
|
|
- onSubmit(ActivityQRCodeData = {}, callback) {
|
|
|
|
|
|
|
+ // 暂存 不校验答案是否必填
|
|
|
|
|
+ onStorage(callback) {
|
|
|
|
|
+ let ActivityQRCodeData = this.$refs.ActivityQRCode.activityForm || {};
|
|
|
|
|
+ debugger;
|
|
|
|
|
+ this.setParams(() => {
|
|
|
|
|
+ temporarilyCustomAnswer({
|
|
|
|
|
+ userSummaryId: '', // Long 用户总结id,如果为新增则不填,编辑则必填
|
|
|
|
|
+ summaryId: this.$route.query.summaryId, //Long 主管任务id
|
|
|
|
|
+ customItemList: this.collectionItemList, //List<Object> 答案列表
|
|
|
|
|
+ ...ActivityQRCodeData, //任务名称、活动日期、签到时间
|
|
|
|
|
+ getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
|
|
|
|
|
+ })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
|
+ if (callback) {
|
|
|
|
|
+ callback();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$router.go(-1);
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$toast(res.msg);
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch((err) => {
|
|
|
|
|
+ this.$toast(err.msg);
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ onSubmit(callback) {
|
|
|
this.setParams(() => {
|
|
this.setParams(() => {
|
|
|
if (this.flagclick) {
|
|
if (this.flagclick) {
|
|
|
this.flagclick = false;
|
|
this.flagclick = false;
|
|
@@ -497,16 +527,10 @@ export default {
|
|
|
userSummaryId: '', // Long 用户总结id,如果为新增则不填,编辑则必填
|
|
userSummaryId: '', // Long 用户总结id,如果为新增则不填,编辑则必填
|
|
|
summaryId: this.$route.query.summaryId, //Long 主管任务id
|
|
summaryId: this.$route.query.summaryId, //Long 主管任务id
|
|
|
customItemList: this.collectionItemList, //List<Object> 答案列表
|
|
customItemList: this.collectionItemList, //List<Object> 答案列表
|
|
|
- ...ActivityQRCodeData, //任务名称、活动日期、签到时间
|
|
|
|
|
- getQrCode: callback ? true : false, //是否需要反馈二维码(是:任务名称、活动日期、签到时间必填)
|
|
|
|
|
})
|
|
})
|
|
|
.then((res) => {
|
|
.then((res) => {
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
|
- if (callback) {
|
|
|
|
|
- callback();
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$router.go(-1);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ this.$router.go(-1);
|
|
|
} else {
|
|
} else {
|
|
|
this.$toast(res.msg);
|
|
this.$toast(res.msg);
|
|
|
}
|
|
}
|
|
@@ -964,26 +988,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- // 暂存 不校验答案是否必填
|
|
|
|
|
- onStorage() {
|
|
|
|
|
- this.setParams(() => {
|
|
|
|
|
- temporarilyCustomAnswer({
|
|
|
|
|
- userSummaryId: '', // Long 用户总结id,如果为新增则不填,编辑则必填
|
|
|
|
|
- summaryId: this.$route.query.summaryId, //Long 主管任务id
|
|
|
|
|
- customItemList: this.collectionItemList, //List<Object> 答案列表
|
|
|
|
|
- })
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- this.$router.go(-1);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$toast(res.msg);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch((err) => {
|
|
|
|
|
- this.$toast(err.msg);
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
- },
|
|
|
|
|
},
|
|
},
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|