Authored by hongyong.zhao

求购ui bug fix

... ... @@ -60,7 +60,15 @@
<div class="line"></div>
<div class="space"></div>
<day-choose :value="chooseDay" :options="dayOptions" :choose="BUYER_ASK_SET_CHOOSEDAY"></day-choose>
<!--<day-choose :chooseDay="chooseDay" :options="dayOptions" :choose="BUYER_ASK_SET_CHOOSEDAY"></day-choose>-->
<div class="dayChoose" @click="showPicker">
<span class="leftText" >求购期限:</span>
<div class="rightWrapper">
<span class="rightText">{{chooseDay || '7天'}}</span>
<i class="cubeic-arrow" ></i>
</div>
</div>
<div class="space"></div>
<div class="line"></div>
... ... @@ -90,10 +98,7 @@ const {mapState, mapActions, mapMutations, mapGetters} = createNamespacedHelpers
export default {
name: 'BuyerAskOrder',
components: {Button, Input, DayChoose, OrderAddress, OrderAgree},
props: {
lazy: Boolean,
storageId: Number,
},
props:['lazy', 'storageId'],
component: {
Input,
OrderAddress,
... ... @@ -331,13 +336,39 @@ export default {
// vm.onClose(orderResult.data.orderCode);
}
}).show();
}
},
showPicker() {
console.log(this.options);
this.$createPicker({
title: '选择求购时限',
data: [this.dayOptions],
onSelect: (value) => {
this.BUYER_ASK_SET_CHOOSEDAY(value[0])
},
selectedIndex: [2],
onCancel: () => {
}
}).show();
},
}
};
</script>
<style lang="scss" scoped>
.dayChoose {
height: 60px;
font-family: PingFang-SC-Regular;
font-size: 14*2px;
color: #000000;
display: flex;
justify-content: space-between;
flex-direction: row;
}
.body {
height: 100%;
/*position: relative;*/
... ...
... ... @@ -2,11 +2,11 @@
<template>
<div class="customSelectWrapper">
<div class="customSelectTextWrapper" @click="showPicker">
<div class="customSelectWrapper" @click="showPicker">
<div class="customSelectTextWrapper" >
<span class="leftText">求购期限:</span>
<div class="rightWrapper">
<span class="rightText">{{value}}</span>
<span class="rightText">{{currentOption || '7天'}}</span>
<i class="cubeic-arrow" ></i>
</div>
</div>
... ... @@ -25,9 +25,9 @@ export default {
type: Array,
default: [],
},
value: {
chooseDay: {
type: String,
default: '',
default: '7天',
},
choose: {
type: Function,
... ... @@ -37,33 +37,35 @@ export default {
components: {Select},
computed: {
chooseday: {
currentOption: {
get() {
return this.value;
return this.current || this.chooseDay;
},
set(val) {
set(val) {
this.current = val;
}
}
},
data() {
return {
// options: ['1天', '3天', '7天', '15天', '30天'],
// value: '7天',
title: '选择求购时限',
current: '',
};
},
methods: {
change(value, index, text) {
console.log('change', value, index, text);
// console.log('change', value, index, text);
this.choose && this.choose(value[0]);
this.current = value[0];
},
showPicker() {
console.log(this.options)
console.log(this.options);
this.$createPicker({
title: '选择求购时限',
data: [this.options],
... ...