|
@@ -3,7 +3,7 @@
|
|
<view class="page" v-if="previewData">
|
|
<view class="page" v-if="previewData">
|
|
<template v-if="previewData.show_address !== false">
|
|
<template v-if="previewData.show_address !== false">
|
|
<view v-if="previewData.allZiti" class="address">
|
|
<view v-if="previewData.allZiti" class="address">
|
|
-<!-- <app-order-submit-row :show-nav="false" :no-padding="true">
|
|
|
|
|
|
+ <!-- <app-order-submit-row :show-nav="false" :no-padding="true">
|
|
<view class="dir-left-nowrap px-12">
|
|
<view class="dir-left-nowrap px-12">
|
|
<view class="box-grow-1">
|
|
<view class="box-grow-1">
|
|
<app-input placeholder="请填写联系人" height="100"
|
|
<app-input placeholder="请填写联系人" height="100"
|
|
@@ -20,70 +20,72 @@
|
|
</app-order-submit-row> -->
|
|
</app-order-submit-row> -->
|
|
</view>
|
|
</view>
|
|
<view v-else @click="navigateAddress" class="address">
|
|
<view v-else @click="navigateAddress" class="address">
|
|
- <app-order-submit-row>
|
|
|
|
- <view v-if="previewData.address">
|
|
|
|
- <!-- <view class="dir-left-nowrap mb-12">
|
|
|
|
- <view class="box-grow-1">参训人: {{previewData.address.name}}</view>
|
|
|
|
- <view class="box-grow-0">电话: {{previewData.address.mobile}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="mb-12">
|
|
|
|
- 收货地址:
|
|
|
|
- {{previewData.address.province}}
|
|
|
|
- {{previewData.address.city}}
|
|
|
|
- {{previewData.address.district}}
|
|
|
|
- {{previewData.address.detail}}
|
|
|
|
- </view> -->
|
|
|
|
- <!-- <view class="dir-left-nowrap mb-12">
|
|
|
|
- <view class="box-grow-1">性别: {{previewData.address.name}}</view>
|
|
|
|
- <view class="box-grow-0">年龄: {{previewData.address.mobile}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="dir-left-nowrap mb-12">
|
|
|
|
- <view class="box-grow-1">体重: {{previewData.address.name}}</view>
|
|
|
|
- <view class="box-grow-0">年龄: {{previewData.address.mobile}}</view>
|
|
|
|
- </view>
|
|
|
|
- <view class="dir-left-nowrap mb-12">
|
|
|
|
- <view class="box-grow-1">身高: {{previewData.address.name}}</view>
|
|
|
|
- <view class="box-grow-0">身份证号码: {{previewData.address.mobile}}</view>
|
|
|
|
- </view> -->
|
|
|
|
- <view class="felx-three">
|
|
|
|
- <view class="box-grow-2">
|
|
|
|
- 参训人: {{verifyUndefined(previewData.address.name)}}
|
|
|
|
- </view>
|
|
|
|
- <view class="box-grow-3">
|
|
|
|
- 性别: {{verifyUndefined(previewData.address.sex) == '暂无数据'? '暂无数据':previewData.address.sex == 0 ?'未知':previewData.address.sex == 1? '男':'女'}}
|
|
|
|
- </view>
|
|
|
|
- <view class="box-grow-4">
|
|
|
|
- 联系电话: {{verifyUndefined(previewData.address.mobile)}}
|
|
|
|
|
|
+ <template v-if="!previewData.is_match">
|
|
|
|
+ <app-order-submit-row>
|
|
|
|
+ <view v-if="previewData.address">
|
|
|
|
+ <!-- <view class="dir-left-nowrap mb-12">
|
|
|
|
+ <view class="box-grow-1">参训人: {{previewData.address.name}}</view>
|
|
|
|
+ <view class="box-grow-0">电话: {{previewData.address.mobile}}</view>
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <view class="felx-three">
|
|
|
|
- <view class="box-grow-2">
|
|
|
|
- 年龄: {{verifyUndefined(previewData.address.age)}}
|
|
|
|
- </view>
|
|
|
|
- <view class="box-grow-3">
|
|
|
|
- 体重: {{verifyUndefined(previewData.address.weight)}}
|
|
|
|
- </view>
|
|
|
|
- <view class="box-grow-4">
|
|
|
|
- 身高: {{verifyUndefined(previewData.address.height)}}
|
|
|
|
|
|
+ <view class="mb-12">
|
|
|
|
+ 收货地址:
|
|
|
|
+ {{previewData.address.province}}
|
|
|
|
+ {{previewData.address.city}}
|
|
|
|
+ {{previewData.address.district}}
|
|
|
|
+ {{previewData.address.detail}}
|
|
|
|
+ </view> -->
|
|
|
|
+ <!-- <view class="dir-left-nowrap mb-12">
|
|
|
|
+ <view class="box-grow-1">性别: {{previewData.address.name}}</view>
|
|
|
|
+ <view class="box-grow-0">年龄: {{previewData.address.mobile}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="dir-left-nowrap mb-12">
|
|
|
|
+ <view class="box-grow-1">体重: {{previewData.address.name}}</view>
|
|
|
|
+ <view class="box-grow-0">年龄: {{previewData.address.mobile}}</view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="dir-left-nowrap mb-12">
|
|
|
|
+ <view class="box-grow-1">身高: {{previewData.address.name}}</view>
|
|
|
|
+ <view class="box-grow-0">身份证号码: {{previewData.address.mobile}}</view>
|
|
|
|
+ </view> -->
|
|
|
|
+ <view class="felx-three">
|
|
|
|
+ <view class="box-grow-2">
|
|
|
|
+ 参训人: {{verifyUndefined(previewData.address.name)}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box-grow-3">
|
|
|
|
+ 性别: {{verifyUndefined(previewData.address.sex) == '暂无数据'? '暂无数据':previewData.address.sex == 0 ?'未知':previewData.address.sex == 1? '男':'女'}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box-grow-4">
|
|
|
|
+ 联系电话: {{verifyUndefined(previewData.address.mobile)}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="felx-three">
|
|
|
|
+ <view class="box-grow-2">
|
|
|
|
+ 年龄: {{verifyUndefined(previewData.address.age)}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box-grow-3">
|
|
|
|
+ 体重: {{verifyUndefined(previewData.address.weight)}}
|
|
|
|
+ </view>
|
|
|
|
+ <view class="box-grow-4">
|
|
|
|
+ 身高: {{verifyUndefined(previewData.address.height)}}
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="felx-three">
|
|
|
|
+ <view class="box-grow-5">
|
|
|
|
+ 身份证号码:{{verifyUndefined(previewData.address.idcard)}}
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
- <view class="felx-three">
|
|
|
|
- <view class="box-grow-5">
|
|
|
|
- 身份证号码:{{verifyUndefined(previewData.address.idcard)}}
|
|
|
|
- </view>
|
|
|
|
|
|
+ <!-- <view v-else>请选择收货地</view> -->
|
|
|
|
+ <view v-else>请选择报名信息</view>
|
|
|
|
+ <view v-if="previewData.has_ziti" class="ziti-tip" :class="[`${theme}-color`]">
|
|
|
|
+ <!-- (收货地址中的手机号码将用于自提信息) -->
|
|
|
|
+ (报名信息中的手机号码将用于联系信息)
|
|
</view>
|
|
</view>
|
|
- </view>
|
|
|
|
- <!-- <view v-else>请选择收货地</view> -->
|
|
|
|
- <view v-else>请选择报名信息</view>
|
|
|
|
- <view v-if="previewData.has_ziti" class="ziti-tip" :class="[`${theme}-color`]">
|
|
|
|
- <!-- (收货地址中的手机号码将用于自提信息) -->
|
|
|
|
- (报名信息中的手机号码将用于联系信息)
|
|
|
|
- </view>
|
|
|
|
- <!-- <view slot="footer">
|
|
|
|
- <image class="bottom-image" :src="appImg.common.address_bottom"></image>
|
|
|
|
- </view> -->
|
|
|
|
- </app-order-submit-row>
|
|
|
|
- </view>
|
|
|
|
|
|
+ <!-- <view slot="footer">
|
|
|
|
+ <image class="bottom-image" :src="appImg.common.address_bottom"></image>
|
|
|
|
+ </view> -->
|
|
|
|
+ </app-order-submit-row>
|
|
|
|
+ </template>
|
|
|
|
+ </view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<view class="mch-list">
|
|
<view class="mch-list">
|
|
@@ -431,25 +433,22 @@
|
|
this.totalTitle = options.total_title;
|
|
this.totalTitle = options.total_title;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 输入时数据
|
|
handleOrderFormInput(data, sign) {
|
|
handleOrderFormInput(data, sign) {
|
|
- let that = this
|
|
|
|
- uni.getStorage({
|
|
|
|
- key: 'date',
|
|
|
|
- success: function(res){
|
|
|
|
- console.log(res.data)
|
|
|
|
- that.date = res.data
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- console.log(this.date)
|
|
|
|
const result = [];
|
|
const result = [];
|
|
for (let i in data) {
|
|
for (let i in data) {
|
|
- result[i] = {
|
|
|
|
- key: data[i].key,
|
|
|
|
- label: data[i].name,
|
|
|
|
- // value: data[i].value,
|
|
|
|
- value: (data[i].label === '日期')||(data[i].label === '预约日期') ? `${this.date.date},${this.date.week}` :data[i].value,
|
|
|
|
- required: data[i].is_required,
|
|
|
|
- };
|
|
|
|
|
|
+ if(data[i].name == "预约人"){
|
|
|
|
+ this.previewData.address.name = data[i].value
|
|
|
|
+ }else if(data[i].name == "联系方式"){
|
|
|
|
+ this.previewData.address.mobile = data[i].value
|
|
|
|
+ }else{
|
|
|
|
+ result[i] = {
|
|
|
|
+ key: data[i].key,
|
|
|
|
+ label: data[i].name,
|
|
|
|
+ value: data[i].value,
|
|
|
|
+ required: data[i].is_required,
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
const formData = this.$store.state.orderSubmit.formData;
|
|
const formData = this.$store.state.orderSubmit.formData;
|
|
formData.list[sign].order_form = result;
|
|
formData.list[sign].order_form = result;
|
|
@@ -489,11 +488,20 @@
|
|
address_id: 0,
|
|
address_id: 0,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ // 初始化数据
|
|
loadPreviewData() {
|
|
loadPreviewData() {
|
|
|
|
+ let that = this
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
mask: true,
|
|
mask: true,
|
|
title: '加载中',
|
|
title: '加载中',
|
|
});
|
|
});
|
|
|
|
+ uni.getStorage({
|
|
|
|
+ key: 'date',
|
|
|
|
+ success: function(res){
|
|
|
|
+ console.log(res.data)
|
|
|
|
+ that.date = res.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
this.$request({
|
|
this.$request({
|
|
url: this.previewUrl,
|
|
url: this.previewUrl,
|
|
method: 'post',
|
|
method: 'post',
|
|
@@ -510,6 +518,18 @@
|
|
};
|
|
};
|
|
}
|
|
}
|
|
this.previewData = response.data;
|
|
this.previewData = response.data;
|
|
|
|
+ this.previewData.mch_list[0].order_form.value.forEach((item, index)=>{
|
|
|
|
+ console.log(item,'diy数据')
|
|
|
|
+ if(item.name == "预约人"){
|
|
|
|
+ item.value = this.previewData.address.name
|
|
|
|
+ }else if(item.name == "联系方式"){
|
|
|
|
+ item.value = this.previewData.address.mobile
|
|
|
|
+ }else if(item.name == "预约日期"){
|
|
|
|
+ console.log(this.date,'进入了里面')
|
|
|
|
+ item.value = `${this.date.date},${this.date.week}`
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
this.setDiyFormScrollStatus();
|
|
this.setDiyFormScrollStatus();
|
|
this.checkCouponError();
|
|
this.checkCouponError();
|
|
this.updateStoreDistance();
|
|
this.updateStoreDistance();
|
|
@@ -632,42 +652,38 @@
|
|
mask: true,
|
|
mask: true,
|
|
title: '提交中',
|
|
title: '提交中',
|
|
});
|
|
});
|
|
|
|
+
|
|
let formData = this.$store.state.orderSubmit.formData
|
|
let formData = this.$store.state.orderSubmit.formData
|
|
let order_form = formData.list[0].order_form
|
|
let order_form = formData.list[0].order_form
|
|
- for(let i=0; i<order_form.length; i++){
|
|
|
|
- if(order_form[i].label === '预约日期' || order_form[i].label === '日期'){
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
|
|
- console.log(formData)
|
|
|
|
- this.$request({
|
|
|
|
- url: this.submitUrl,
|
|
|
|
- method: 'post',
|
|
|
|
- data: {
|
|
|
|
- form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
|
|
|
|
- },
|
|
|
|
- }).then(response => {
|
|
|
|
- if (response.code === 0) {
|
|
|
|
- this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
|
|
- } else {
|
|
|
|
- this.submitLock = false;
|
|
|
|
- uni.hideLoading();
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: response.msg,
|
|
|
|
- showCancel: false,
|
|
|
|
- });
|
|
|
|
- }
|
|
|
|
- }).catch(e => {
|
|
|
|
- this.submitLock = false;
|
|
|
|
- uni.hideLoading();
|
|
|
|
- uni.showModal({
|
|
|
|
- title: '提示',
|
|
|
|
- content: e.errMsg,
|
|
|
|
- showCancel: false,
|
|
|
|
- });
|
|
|
|
- });
|
|
|
|
|
|
+ console.log(formData)
|
|
|
|
+ this.$request({
|
|
|
|
+ url: this.submitUrl,
|
|
|
|
+ method: 'post',
|
|
|
|
+ data: {
|
|
|
|
+ form_data: JSON.stringify(this.$store.state.orderSubmit.formData),
|
|
|
|
+ },
|
|
|
|
+ }).then(response => {
|
|
|
|
+ if (response.code === 0) {
|
|
|
|
+ this.getPayOrderId(response.data.queue_id, response.data.token);
|
|
|
|
+ } else {
|
|
|
|
+ this.submitLock = false;
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: response.msg,
|
|
|
|
+ showCancel: false,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }).catch(e => {
|
|
|
|
+ this.submitLock = false;
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: e.errMsg,
|
|
|
|
+ showCancel: false,
|
|
|
|
+ });
|
|
|
|
+ });
|
|
},
|
|
},
|
|
getPayOrderId(queue_id, token) {
|
|
getPayOrderId(queue_id, token) {
|
|
this.$request({
|
|
this.$request({
|
|
@@ -922,7 +938,7 @@
|
|
padding-bottom: $submitBarHeight;
|
|
padding-bottom: $submitBarHeight;
|
|
|
|
|
|
.address {
|
|
.address {
|
|
- margin-bottom: $yWidth;
|
|
|
|
|
|
+ // margin-bottom: $yWidth;
|
|
|
|
|
|
.bottom-image {
|
|
.bottom-image {
|
|
width: 100%;
|
|
width: 100%;
|