|
|
@ -14,7 +14,6 @@ |
|
|
<u-icon name="phone"></u-icon> |
|
|
<u-icon name="phone"></u-icon> |
|
|
</button> |
|
|
</button> |
|
|
</view> --> |
|
|
</view> --> |
|
|
|
|
|
|
|
|
<view class="padding-lr lf-m-b-40 lf-m-t-30" :class="item.type == 'text'?'lf-row-between':''" v-for="(item,index) of form_list" :key="index"> |
|
|
<view class="padding-lr lf-m-b-40 lf-m-t-30" :class="item.type == 'text'?'lf-row-between':''" v-for="(item,index) of form_list" :key="index"> |
|
|
<text class="lf-color-555 lf-font-28" v-once>{{item.field}}</text> |
|
|
<text class="lf-color-555 lf-font-28" v-once>{{item.field}}</text> |
|
|
<input type="text" v-if="item.type == 'text'" v-model="info[item.field]" @blur="computedAge()" class="lf-color-999 lf-font-28 lf-text-left" style="position:absolute;right:180rpx" :placeholder="`请输入`+item.field"/> |
|
|
<input type="text" v-if="item.type == 'text'" v-model="info[item.field]" @blur="computedAge()" class="lf-color-999 lf-font-28 lf-text-left" style="position:absolute;right:180rpx" :placeholder="`请输入`+item.field"/> |
|
|
@ -42,6 +41,11 @@ |
|
|
</u-checkbox-group> |
|
|
</u-checkbox-group> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view class="lf-m-t-20" v-if="item.type == 'datetime'" @click="showDateTime = true"> |
|
|
|
|
|
<text>{{ info[item.field] || '请选择日期' }}</text> |
|
|
|
|
|
<u-picker mode="time" v-model="showDateTime" :params="dateTimeParams" @confirm="dateTimeConfirm($event, item.field)"></u-picker> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view class="lf-m-t-20" v-if="item.type == 'textarea'"> |
|
|
<view class="lf-m-t-20" v-if="item.type == 'textarea'"> |
|
|
<view class="cu-self menu" style="margin-top: 30rpx; position: relative;"> |
|
|
<view class="cu-self menu" style="margin-top: 30rpx; position: relative;"> |
|
|
<textarea :cursor-spacing="120" maxlength="300" :adjust-position="true" type="text" v-model="info[item.field]" style="background-color: #F8F8F8;border-radius: 20rpx;" class="text-left lf-font-28 area-self lf-w-100 lf-p-20" placeholder="请输入内容" /> |
|
|
<textarea :cursor-spacing="120" maxlength="300" :adjust-position="true" type="text" v-model="info[item.field]" style="background-color: #F8F8F8;border-radius: 20rpx;" class="text-left lf-font-28 area-self lf-w-100 lf-p-20" placeholder="请输入内容" /> |
|
|
@ -61,9 +65,6 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
<self-line/> |
|
|
<self-line/> |
|
|
<view class="lf-bg-white lf-p-t-30 lf-p-b-30 lf-p-l-32 lf-p-r-32"> |
|
|
<view class="lf-bg-white lf-p-t-30 lf-p-b-30 lf-p-l-32 lf-p-r-32"> |
|
|
@ -235,7 +236,16 @@ |
|
|
image_name: '', |
|
|
image_name: '', |
|
|
if_image_complatet: false, |
|
|
if_image_complatet: false, |
|
|
check_box_name: '', |
|
|
check_box_name: '', |
|
|
buy_num: 0 |
|
|
|
|
|
|
|
|
buy_num: 0, |
|
|
|
|
|
showDateTime: false ,// 日期时间选择器是否显示 |
|
|
|
|
|
dateTimeParams: { |
|
|
|
|
|
year: true, |
|
|
|
|
|
month: true, |
|
|
|
|
|
day: true, |
|
|
|
|
|
hour: true, |
|
|
|
|
|
minute: true, |
|
|
|
|
|
second: false |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(e) { |
|
|
onLoad(e) { |
|
|
@ -246,8 +256,18 @@ |
|
|
this.buy_num = e.buy_num; |
|
|
this.buy_num = e.buy_num; |
|
|
console.log('出来的数量',this.buy_num) |
|
|
console.log('出来的数量',this.buy_num) |
|
|
this.order_id = e.order_id; |
|
|
this.order_id = e.order_id; |
|
|
this.form_type = JSON.parse(decodeURIComponent(e.form_type));; |
|
|
|
|
|
this.form_list = this.form_type.fields; |
|
|
|
|
|
|
|
|
this.form_type = JSON.parse(decodeURIComponent(e.form_type)); |
|
|
|
|
|
// 修复原先checkbox数组格式错误导致报错 |
|
|
|
|
|
let form_list = this.form_type.fields.map(item => { |
|
|
|
|
|
if(item.type == 'checkbox'){ |
|
|
|
|
|
item.options = item.options.map(o => { |
|
|
|
|
|
return {name: o, checked: false}; |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
return item; |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
this.form_list = form_list; |
|
|
console.log('表单格式',this.form_list) |
|
|
console.log('表单格式',this.form_list) |
|
|
var arr = e.spec_id.split(",") |
|
|
var arr = e.spec_id.split(",") |
|
|
console.log(arr) |
|
|
console.log(arr) |
|
|
@ -289,6 +309,11 @@ |
|
|
uni.$off('payState'); |
|
|
uni.$off('payState'); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// 日期时间选择完成 |
|
|
|
|
|
dateTimeConfirm(event, info_key){ |
|
|
|
|
|
let { year, month, day, hour, minute } = event; |
|
|
|
|
|
this.info[info_key] = `${year}-${month}-${day} ${hour}:${minute}`; |
|
|
|
|
|
}, |
|
|
valChange(e) { |
|
|
valChange(e) { |
|
|
this.buy_num = e.value; |
|
|
this.buy_num = e.value; |
|
|
this.getGoodsData(this.pay_type); |
|
|
this.getGoodsData(this.pay_type); |
|
|
|