Commit b814f151 authored by youjie's avatar youjie

修复选项 bug

parent 2efc8099
......@@ -510,30 +510,33 @@
index: e.detail.value[index]
})
}
}
}
},
// 用户点击确定按钮
getResult(event = null) {
let result = {};
// 只返回用户在this.params中配置了为true的字段
if (this.mode == 'time') {
if (this.params.year) result.year = this.formatNumber(this.year || 0);;
if (this.params.month) result.month = this.formatNumber(this.month || 0);
if (this.params.day) result.day = this.formatNumber(this.day || 0);
if (this.params.hour) result.hour = this.formatNumber(this.hour || 0);
if (this.params.minute) result.minute = this.formatNumber(this.minute || 0);
if (this.params.second) result.second = this.formatNumber(this.second || 0);
} else if (this.mode == 'region') {
if (this.params.province) result.province = provinces[this.province];
if (this.params.city) result.city = citys[this.province][this.city];
if (this.params.area) result.area = areas[this.province][this.city][this.area];
} else if (this.mode == 'selector') {
result = this.valueArr;
} else if (this.mode == 'multiSelector') {
result = this.valueArr;
}
if (event) this.$emit(event, result);
this.close();
setTimeout(() => {
let result = {};
// 只返回用户在this.params中配置了为true的字段
if (this.mode == 'time') {
if (this.params.year) result.year = this.formatNumber(this.year || 0);;
if (this.params.month) result.month = this.formatNumber(this.month || 0);
if (this.params.day) result.day = this.formatNumber(this.day || 0);
if (this.params.hour) result.hour = this.formatNumber(this.hour || 0);
if (this.params.minute) result.minute = this.formatNumber(this.minute || 0);
if (this.params.second) result.second = this.formatNumber(this.second || 0);
} else if (this.mode == 'region') {
if (this.params.province) result.province = provinces[this.province];
if (this.params.city) result.city = citys[this.province][this.city];
if (this.params.area) result.area = areas[this.province][this.city][this.area];
} else if (this.mode == 'selector') {
result = this.valueArr;
} else if (this.mode == 'multiSelector') {
result = this.valueArr;
}
if (event) this.$emit(event, result);
this.close();
}, 1000);
}
}
}
......
......@@ -158,7 +158,7 @@
</view>
<view style="display: flex; align-items: center">
<!-- #ifdef MP-WEIXIN -->
<button @click="showDownload=true" class="jz_ConButton" v-if="dataList.VisaProductInfo&&dataList.VisaProductInfo.DownloadMaterialsFileList.length>0">
<button @click="dataList.VisaProductInfo.DownloadMaterialsFileList.length>1?showDownload=true:downloadTripPlanHandler(dataList.VisaProductInfo.DownloadMaterialsFileList[0])" class="jz_ConButton" v-if="dataList.VisaProductInfo&&dataList.VisaProductInfo.DownloadMaterialsFileList.length>0">
<img style="width: 36rpx; height: 38rpx" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1695376860000_131.png"
alt="" />
<view style="color: #111111; font-size: 22rpx">下载文件</view>
......
......@@ -633,17 +633,14 @@
</view>
<u-picker mode="selector" v-model="showCountry" :default-selector="[0]"
:range="countrys" @confirm='(e)=>{changeDown(e,CountryType)}'
@change="(e)=>{columnChange(e,CountryType)}"
range-key="label" @input="showCountry=false"></u-picker>
<u-picker mode="selector" v-model="showProvince" :default-selector="[0]"
:range="provinceList" @confirm='(e)=>{changeDown(e,3)}'
@change="(e)=>{columnChange(e,3)}"
range-key="label" @input="showProvince=false"></u-picker>
<u-picker mode="selector" v-model="showCity" :default-selector="[0]"
:range="cityList" @confirm='(e)=>{changeDown(e,4)}'
@change="(e)=>{columnChange(e,4)}"
range-key="label" @input="showProvince=false"></u-picker>
<template v-if="couponList.length>0">
......@@ -872,28 +869,6 @@
}
}, err => {})
},
columnChange(e,type){
let i = e
if(type == 1){
this.customer.count = this.countrys[i].ID
this.optionsTitle[0] = this.countrys[i].Name
this.customer.PhoneCountryStr = '+'+this.countrys[i].PhoneCode
}
if(type == 2){
this.orderMsg.RelationPhoneType = '+'+this.countrys[i].PhoneCode
this.optionsTitle[1] = this.countrys[i].Name
}
if(type == 3){
this.orderMsg.ReceiverProvince = this.provinceList[i].Name
this.orderMsg.ReceiverProvinceId = this.provinceList[i].ID
this.optionsTitle[2] = this.provinceList[i].Name
this.getCity()
}
if(type == 4){
this.orderMsg.ReceiverCity = this.cityList[i].Name
this.optionsTitle[3] = this.cityList[i].Name
}
},
changeDown(e,type){
let i = [e]
if(type == 1){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment