|
@@ -12,24 +12,18 @@
|
|
</div>
|
|
</div>
|
|
<!--选择数量-->
|
|
<!--选择数量-->
|
|
<group>
|
|
<group>
|
|
- <x-number title="选择数量" v-model="xNumberValue" :value="0" :min="0" @on-change="change" fillable></x-number>
|
|
|
|
|
|
+ <x-number title="选择数量" v-model="xNumberValue" :value="0" :min="0" @on-change="xNumberValueChange" fillable></x-number>
|
|
</group>
|
|
</group>
|
|
<!--选择时间-->
|
|
<!--选择时间-->
|
|
<group>
|
|
<group>
|
|
- <datetime v-model="bookingTime" :placeholder="(bookingTime)" :max-year=2017 format="YYYY-MM-DD HH:00"
|
|
|
|
- @on-change="change"
|
|
|
|
- :title="('服务时间')" year-row="{value}年" month-row="{value}月" day-row="{value}日" hour-row="{value}点"
|
|
|
|
- minute-row="{value}分" confirm-text="完成" cancel-text="取消" :start-date='startDate' :end-date='endDate'
|
|
|
|
- :min-hour=9 :max-hour=18></datetime>
|
|
|
|
|
|
+ <datetime v-model="bookingTime" :placeholder="(bookingTime)" :max-year=2017 format="YYYY-MM-DD HH:00" @on-change="change" :title="('服务时间')" year-row="{value}年" month-row="{value}月" day-row="{value}日" hour-row="{value}点" minute-row="{value}分" confirm-text="完成" cancel-text="取消" :start-date='startDate' :end-date='endDate' :min-hour=9 :max-hour=18></datetime>
|
|
</group>
|
|
</group>
|
|
<!--选择地址-->
|
|
<!--选择地址-->
|
|
<group>
|
|
<group>
|
|
- <!--<cell class="address" title="选择地址" value="暂无服务地址" link="/order"></cell>-->
|
|
|
|
- <cell class="address" title="选择地址" value="暂无服务地址" isLink></cell>
|
|
|
|
|
|
+ <cell class="address" title="选择地址" value="暂无服务地址" link="/addressList"></cell>
|
|
</group>
|
|
</group>
|
|
<!--优惠券-->
|
|
<!--优惠券-->
|
|
<group>
|
|
<group>
|
|
- <!--<cell class="address" title="选择地址" value="暂无服务地址" link="/order"></cell>-->
|
|
|
|
<cell class="address" title="优惠券" value="暂无优惠券" isLink></cell>
|
|
<cell class="address" title="优惠券" value="暂无优惠券" isLink></cell>
|
|
</group>
|
|
</group>
|
|
<!--备注-->
|
|
<!--备注-->
|
|
@@ -66,12 +60,12 @@
|
|
return {
|
|
return {
|
|
productBox: config.productInfo, // 当前服务内容
|
|
productBox: config.productInfo, // 当前服务内容
|
|
extraB: config.productInfo.extra, // 当前服务类型
|
|
extraB: config.productInfo.extra, // 当前服务类型
|
|
- isActive: -1, // extra样式切换
|
|
|
|
- bookingTime: selectTime.startDate + ' 9:00', // 服务时间
|
|
|
|
|
|
+ bookingTime: selectTime.serviceHours, // 服务时间
|
|
value: ['2017-06-24', '03', '05'], // 设定日期格式
|
|
value: ['2017-06-24', '03', '05'], // 设定日期格式
|
|
startDate: selectTime.startDate, // 限定最小日期
|
|
startDate: selectTime.startDate, // 限定最小日期
|
|
endDate: selectTime.endDate, // 限定最大日期
|
|
endDate: selectTime.endDate, // 限定最大日期
|
|
- xNumberValue: 0, // 选择数量
|
|
|
|
|
|
+ isActive: config.isActive,
|
|
|
|
+ xNumberValue: config.xNumberValue, // 选择数量
|
|
remarks: '', // 备注
|
|
remarks: '', // 备注
|
|
showAlert: false, // 是否显示弹出框
|
|
showAlert: false, // 是否显示弹出框
|
|
alertTitle: '', // 弹窗标题
|
|
alertTitle: '', // 弹窗标题
|
|
@@ -87,7 +81,10 @@
|
|
Group, DatetimeRange, TransferDom, Datetime, XNumber, Cell, CellBox, XTextarea, Alert
|
|
Group, DatetimeRange, TransferDom, Datetime, XNumber, Cell, CellBox, XTextarea, Alert
|
|
},
|
|
},
|
|
beforeCreate () {
|
|
beforeCreate () {
|
|
- console.log(localStorage.removeItem('extra'))
|
|
|
|
|
|
+ if (this.$store.state.order.time !== undefined) {
|
|
|
|
+ selectTime.serviceHours = this.$store.state.order.time
|
|
|
|
+ }
|
|
|
|
+ console.log(config.order.time)
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState({
|
|
...mapState({
|
|
@@ -99,12 +96,16 @@
|
|
...mapActions([
|
|
...mapActions([
|
|
'PAYCHANGE'
|
|
'PAYCHANGE'
|
|
]),
|
|
]),
|
|
|
|
+ // 商品数量
|
|
|
|
+ xNumberValueChange (val) {
|
|
|
|
+ config.xNumberValue = val
|
|
|
|
+ },
|
|
change (val) {
|
|
change (val) {
|
|
|
|
+ this.$store.state.order.time = val
|
|
config.order.time = val
|
|
config.order.time = val
|
|
|
|
+ console.log(this.$store.state.order.time)
|
|
},
|
|
},
|
|
btnOrder: function (cb) {
|
|
btnOrder: function (cb) {
|
|
- console.log(this.bookingTime)
|
|
|
|
- console.log(config.productInfo.extra.length)
|
|
|
|
if (localStorage.getItem('extra') === null && config.productInfo.extra.length !== 0) {
|
|
if (localStorage.getItem('extra') === null && config.productInfo.extra.length !== 0) {
|
|
// config.order.extra = ''
|
|
// config.order.extra = ''
|
|
this.alertTitle = '抱歉'
|
|
this.alertTitle = '抱歉'
|
|
@@ -159,11 +160,12 @@
|
|
// }
|
|
// }
|
|
// config.orderInfo = tmp
|
|
// config.orderInfo = tmp
|
|
},
|
|
},
|
|
- btnAction: function (index) {
|
|
|
|
|
|
+ btnAction: function (index, event) {
|
|
localStorage.setItem('extra', index)
|
|
localStorage.setItem('extra', index)
|
|
-// console.log(config.productInfo.extra[index])
|
|
|
|
config.order.extra = JSON.stringify(config.productInfo.extra[index])
|
|
config.order.extra = JSON.stringify(config.productInfo.extra[index])
|
|
this.isActive = index
|
|
this.isActive = index
|
|
|
|
+ config.isActive = index
|
|
|
|
+ console.log(config.isActive)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|