|
@@ -44,6 +44,15 @@
|
|
|
</div>
|
|
|
<div class="weui-cell__ft"><i class="weui-icon-warn"></i></div>
|
|
|
</div>
|
|
|
+ <!--所属门店-->
|
|
|
+ <div class="weui-cell">
|
|
|
+ <div class="weui-cell__hd"><label class="weui-label">门店选择</label></div>
|
|
|
+ <div class="weui-cell__bd" @click='btnStore'>
|
|
|
+ <input class="weui-input select-time" type="button" required=""
|
|
|
+ :value="store">
|
|
|
+ </div>
|
|
|
+ <div class="weui-cell__ft"><i class="weui-icon-warn"></i></div>
|
|
|
+ </div>
|
|
|
<!--服务形式-->
|
|
|
<div class="weui-cell" v-if="serviceType == 0">
|
|
|
<div class="weui-cell__hd"><label class="weui-label">服务形式</label></div>
|
|
@@ -115,6 +124,9 @@
|
|
|
number: '', // 客户手机
|
|
|
oldNumber: '', // 客户手机已验证
|
|
|
userAddress: '', // 服务地址
|
|
|
+ store: '请选择门店', // 门店
|
|
|
+ storeId: '', // 门店ID
|
|
|
+ storeArr: [], // 门店
|
|
|
userAge: '', // 孩子年龄
|
|
|
dec: '', // 备注
|
|
|
time: '选择您的预产期', // 预产期
|
|
@@ -178,13 +190,14 @@
|
|
|
// }
|
|
|
},
|
|
|
created() {
|
|
|
-
|
|
|
- console.log(time('15:00')); // 字符串转时间戳
|
|
|
this.createCode = createCode();
|
|
|
this.serviceType = config.serviceType;
|
|
|
for (let i = 9; i < 20; i++) {
|
|
|
this.serviceTimeArr.push(i + ':00');
|
|
|
}
|
|
|
+ axios.post(config.apiPath + 'j/HouseKeeping/GetStore').then(res => {
|
|
|
+ this.storeArr = res.data;
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
// 服务技能
|
|
@@ -202,6 +215,31 @@
|
|
|
id: 'serviceSkillsArr'
|
|
|
});
|
|
|
},
|
|
|
+ // 门店选择
|
|
|
+ btnStore() {
|
|
|
+ let that = this;
|
|
|
+ console.log(that.storeArr[0]);
|
|
|
+ let newStoreArr = [];
|
|
|
+ for (let i = 0; i < that.storeArr.length; i++) {
|
|
|
+ newStoreArr.push({
|
|
|
+ label:that.storeArr[i].store_name,
|
|
|
+ value:that.storeArr[i].store_id
|
|
|
+ })
|
|
|
+ }
|
|
|
+ // store
|
|
|
+ weui.picker(newStoreArr, {
|
|
|
+ className: 'custom-classname',
|
|
|
+ container: 'body',
|
|
|
+ defaultValue: [0],
|
|
|
+ onChange: function (result) {
|
|
|
+ },
|
|
|
+ onConfirm: function (result) {
|
|
|
+ that.store = result[0].label;
|
|
|
+ that.storeId = result[0].value;
|
|
|
+ },
|
|
|
+ id: 'singleLinePickerStore'
|
|
|
+ });
|
|
|
+ },
|
|
|
// 时间选择
|
|
|
btnServiceAM() {
|
|
|
let that = this;
|
|
@@ -285,7 +323,7 @@
|
|
|
weui.alert('短信已发送,请留意查收!');
|
|
|
// 绑定短信验证码
|
|
|
this.code = res.data.data.code;
|
|
|
- this.iCode = this.code // 系统调试时开启
|
|
|
+ this.iCode = this.code // 系统调试时开启
|
|
|
this.iCreateCode = '';// 清空已输入验证码
|
|
|
this.createCode = createCode(); // 重置验证码
|
|
|
} else {
|
|
@@ -319,6 +357,11 @@
|
|
|
weui.alert('请输入您的服务地址');
|
|
|
return
|
|
|
}
|
|
|
+ // 门店验证
|
|
|
+ if(that.store == '请选择门店'){
|
|
|
+ weui.alert('请选择您的小区附近的门店');
|
|
|
+ return
|
|
|
+ }
|
|
|
// 服务形式
|
|
|
if (that.serviceType === 0) {
|
|
|
if (that.serviceForm === '请选择') {
|
|
@@ -326,7 +369,7 @@
|
|
|
return
|
|
|
}
|
|
|
} else {
|
|
|
- that.serviceForm = 0
|
|
|
+ that.resServiceArr = 1
|
|
|
}
|
|
|
// 服务时间
|
|
|
if (that.serviceType === 0) {
|
|
@@ -359,7 +402,7 @@
|
|
|
that.userAge = 1
|
|
|
}
|
|
|
// 字符串拼接
|
|
|
- let stitching = `&user_id=${config.user_id}&mobile=${that.number}&user_name=${that.userName}&type=${that.serviceType + 1}&skill=${that.serviceSkills}&cart=${that.resServiceArr}&age=${that.userAge}&address=${that.userAddress}&desc=${that.dec}&yc_time=${that.resTime}&server_start_time=${time(that.serviceTimeAM)}&server_end_time=${time(that.serviceTimePM)}`;
|
|
|
+ let stitching = `&user_id=${config.user_id}&mobile=${that.number}&user_name=${that.userName}&type=${that.serviceType + 1}&skill=${that.serviceSkills}&cart=${that.resServiceArr}&age=${that.userAge}&address=${that.userAddress}&store_id=${that.storeId}&desc=${that.dec}&yc_time=${that.resTime}&server_start_time=${time(that.serviceTimeAM)}&server_end_time=${time(that.serviceTimePM)}`;
|
|
|
if (that)
|
|
|
axios.post(config.apiPath + 'j/HouseKeeping/Add' + stitching).then(res => {
|
|
|
console.log(res);
|