|
@@ -12,16 +12,28 @@
|
|
</div>
|
|
</div>
|
|
<!--选择数量-->
|
|
<!--选择数量-->
|
|
<group>
|
|
<group>
|
|
- <x-number title="选择数量" v-model="xNumberValue" :value="0" :min="0" @on-change="xNumberValueChange" 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 @click="clearConfig">
|
|
|
|
- <cell class="address" title="选择地址" value="暂无服务地址" link="/addressList"></cell>
|
|
|
|
- </group>
|
|
|
|
|
|
+ <div class="weui-cells vux-no-group-title">
|
|
|
|
+ <div class="vux-datetime weui-cell weui-cell_access" @click="clearConfig">
|
|
|
|
+ <div>
|
|
|
|
+ <p>选择地址</p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="weui-cell__ft vux-cell-primary vux-datetime-value address-info">
|
|
|
|
+ <span>{{addressContent.name}}</span><span>{{addressContent.mobile}}</span>
|
|
|
|
+ <p>{{addressContent.address.city}} {{addressContent.address.area}} {{addressContent.address.detail}}</p>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<!--优惠券-->
|
|
<!--优惠券-->
|
|
<group>
|
|
<group>
|
|
<cell class="address" title="优惠券" value="暂无优惠券" isLink></cell>
|
|
<cell class="address" title="优惠券" value="暂无优惠券" isLink></cell>
|
|
@@ -54,6 +66,7 @@
|
|
import selectTime from '../config/selectTime'
|
|
import selectTime from '../config/selectTime'
|
|
import {Group, DatetimeRange, TransferDom, Datetime, XNumber, Cell, CellBox, XTextarea, Alert} from 'vux'
|
|
import {Group, DatetimeRange, TransferDom, Datetime, XNumber, Cell, CellBox, XTextarea, Alert} from 'vux'
|
|
import {mapState, mapActions} from 'vuex'
|
|
import {mapState, mapActions} from 'vuex'
|
|
|
|
+ // import axios from 'axios'
|
|
export default {
|
|
export default {
|
|
name: 'placeOrder',
|
|
name: 'placeOrder',
|
|
data () {
|
|
data () {
|
|
@@ -65,6 +78,7 @@
|
|
startDate: selectTime.startDate, // 限定最小日期
|
|
startDate: selectTime.startDate, // 限定最小日期
|
|
endDate: selectTime.endDate, // 限定最大日期
|
|
endDate: selectTime.endDate, // 限定最大日期
|
|
isActive: config.isActive,
|
|
isActive: config.isActive,
|
|
|
|
+ addressContent: config.addressContent, // 只做显示用户地址内容
|
|
xNumberValue: config.xNumberValue, // 选择数量
|
|
xNumberValue: config.xNumberValue, // 选择数量
|
|
remarks: '', // 备注
|
|
remarks: '', // 备注
|
|
showAlert: false, // 是否显示弹出框
|
|
showAlert: false, // 是否显示弹出框
|
|
@@ -91,6 +105,18 @@
|
|
selectTime.serviceHours = this.$store.state.order.time
|
|
selectTime.serviceHours = this.$store.state.order.time
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ created () {
|
|
|
|
+// console.log(config.addressContent.name)
|
|
|
|
+ if (config.addressContent.name === undefined) {
|
|
|
|
+ if (config.shopAddress.length === 0) {
|
|
|
|
+ this.addressContent.name = '暂无地址信息'
|
|
|
|
+ } else {
|
|
|
|
+ this.addressContent = config.shopAddress[0]
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.addressContent = config.addressContent
|
|
|
|
+ }
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
...mapState({
|
|
...mapState({
|
|
order: state => state.order,
|
|
order: state => state.order,
|
|
@@ -100,7 +126,8 @@
|
|
methods: {
|
|
methods: {
|
|
// 监听时间插件值得变化
|
|
// 监听时间插件值得变化
|
|
clearConfig () {
|
|
clearConfig () {
|
|
- console.log(config)
|
|
|
|
|
|
+ this.$router.push({path: '/addressList'})
|
|
|
|
+// console.log(config)
|
|
},
|
|
},
|
|
...mapActions([
|
|
...mapActions([
|
|
'PAYCHANGE'
|
|
'PAYCHANGE'
|
|
@@ -114,12 +141,15 @@
|
|
config.order.time = val
|
|
config.order.time = val
|
|
},
|
|
},
|
|
btnOrder: function (cb) {
|
|
btnOrder: function (cb) {
|
|
|
|
+ // 判断服务是否选择
|
|
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 = '抱歉'
|
|
this.alertContent = '你还没有选择服务类型'
|
|
this.alertContent = '你还没有选择服务类型'
|
|
this.showAlert = true
|
|
this.showAlert = true
|
|
}
|
|
}
|
|
|
|
+ // 判断时间
|
|
|
|
+ // 判断地址
|
|
// config.order.userId = config.userId
|
|
// config.order.userId = config.userId
|
|
// config.order.memo = this.remarks
|
|
// config.order.memo = this.remarks
|
|
// config.order.id = config.productInfo.id
|
|
// config.order.id = config.productInfo.id
|
|
@@ -215,6 +245,18 @@
|
|
text-align: left;
|
|
text-align: left;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ .address-info {
|
|
|
|
+ span {
|
|
|
|
+ font-size: 13px;
|
|
|
|
+ &:nth-child(1) {
|
|
|
|
+ margin-right: 5px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ p {
|
|
|
|
+ font-size: 13px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/*填写备注*/
|
|
/*填写备注*/
|
|
.remarks {
|
|
.remarks {
|
|
textarea {
|
|
textarea {
|