|
@@ -1,5 +1,7 @@
|
|
|
<template>
|
|
<template>
|
|
|
<view style="width:100%;height: 100%">
|
|
<view style="width:100%;height: 100%">
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
<view class="shopping-wrapper">
|
|
<view class="shopping-wrapper">
|
|
|
<view class="list-item display-flex-content-center mt10">
|
|
<view class="list-item display-flex-content-center mt10">
|
|
|
<image
|
|
<image
|
|
@@ -84,6 +86,13 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<u-divider ></u-divider>
|
|
<u-divider ></u-divider>
|
|
|
|
|
+ <view class="display-flex-between" @click="openWorkerShow()">
|
|
|
|
|
+ <text class="left-title">技师</text>
|
|
|
|
|
+ <view class="h-view" :style="[workerName ?{color:'#333333',fontSize: '15px'}:{color:'#c0c4cc',fontSize: '15px'}]">
|
|
|
|
|
+ {{workerName || "请选择技师"}}
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <u-divider ></u-divider>
|
|
|
<view class="display-flex-between" >
|
|
<view class="display-flex-between" >
|
|
|
<text class="left-title">联系方式</text>
|
|
<text class="left-title">联系方式</text>
|
|
|
<view class="h-view" >
|
|
<view class="h-view" >
|
|
@@ -143,9 +152,18 @@
|
|
|
<view v-if="type=='set'" class="activity-button" :style="{background:'#F9F2E6',color:'#C29556',border: '1rpx solid #F9F2E6' ,width: '336rpx',margin:'0rpx 9rpx'}" @click="yvyueOrderCancel()">取消预约订单</view>
|
|
<view v-if="type=='set'" class="activity-button" :style="{background:'#F9F2E6',color:'#C29556',border: '1rpx solid #F9F2E6' ,width: '336rpx',margin:'0rpx 9rpx'}" @click="yvyueOrderCancel()">取消预约订单</view>
|
|
|
<view v-if="type=='set'" class="activity-button" :style="{width: '336rpx' ,margin:'0rpx 9rpx'}" @click="setyvyueOrder()">修改预约信息</view>
|
|
<view v-if="type=='set'" class="activity-button" :style="{width: '336rpx' ,margin:'0rpx 9rpx'}" @click="setyvyueOrder()">修改预约信息</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <!-- picker 内容 -->
|
|
|
|
|
+ <u-picker
|
|
|
|
|
+ :show="workerShow"
|
|
|
|
|
+ :columns="[workers]"
|
|
|
|
|
+ mode="region"
|
|
|
|
|
+ key-name="realname"
|
|
|
|
|
+ @confirm="workerConfirm"
|
|
|
|
|
+ @cancel="workerCancel"
|
|
|
|
|
+ :default-index="0"
|
|
|
|
|
+ >
|
|
|
|
|
+ </u-picker>
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
@@ -155,17 +173,23 @@ import {
|
|
|
getYvyueOrderList,
|
|
getYvyueOrderList,
|
|
|
itemTimes,
|
|
itemTimes,
|
|
|
yvyueOrderCancel,
|
|
yvyueOrderCancel,
|
|
|
- getYvyueOrderInfo, updateItem
|
|
|
|
|
|
|
+ getYvyueOrderInfo, updateItem, getWorkers
|
|
|
} from "../../common/api/yvyeService"
|
|
} from "../../common/api/yvyeService"
|
|
|
|
|
+import {toWechatPayActivitySave, toWechatPayPaymentSave} from "../../common/utils/tools";
|
|
|
var yvyueOrderList={}
|
|
var yvyueOrderList={}
|
|
|
export default {
|
|
export default {
|
|
|
- components: {},
|
|
|
|
|
|
|
+ components: { },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ columns: [
|
|
|
|
|
+ ['中国', '美国', '日本']
|
|
|
|
|
+ ],
|
|
|
page: 1,
|
|
page: 1,
|
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
|
goods_code: 0,
|
|
goods_code: 0,
|
|
|
courseInfo: {},
|
|
courseInfo: {},
|
|
|
|
|
+ workers: [],
|
|
|
|
|
+ workerName: "",
|
|
|
orderTimeFalg:false,
|
|
orderTimeFalg:false,
|
|
|
futureDates: [],
|
|
futureDates: [],
|
|
|
yvyueData: [],
|
|
yvyueData: [],
|
|
@@ -174,8 +198,10 @@ export default {
|
|
|
order_num:1
|
|
order_num:1
|
|
|
},
|
|
},
|
|
|
orderId:0,
|
|
orderId:0,
|
|
|
|
|
+ order_no:"",
|
|
|
setid:null,
|
|
setid:null,
|
|
|
show:false,
|
|
show:false,
|
|
|
|
|
+ workerShow:false,
|
|
|
status:"",
|
|
status:"",
|
|
|
order_date: "",
|
|
order_date: "",
|
|
|
dateTimeSelect: "",
|
|
dateTimeSelect: "",
|
|
@@ -195,10 +221,12 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
|
this.getCourseDetail()
|
|
this.getCourseDetail()
|
|
|
|
|
+ this.getWorkers()
|
|
|
if (this.setid ){
|
|
if (this.setid ){
|
|
|
this.orderId=this.setid
|
|
this.orderId=this.setid
|
|
|
getYvyueOrderInfo({id: this.orderId}). then(({data}) => {
|
|
getYvyueOrderInfo({id: this.orderId}). then(({data}) => {
|
|
|
this.orderInfo = data
|
|
this.orderInfo = data
|
|
|
|
|
+ this.order_no=data.order_no
|
|
|
// 获取今天的日期
|
|
// 获取今天的日期
|
|
|
const today = new Date(); // 当前日期时间
|
|
const today = new Date(); // 当前日期时间
|
|
|
today.setHours(0, 0, 0, 0); // 清除时间部分,只保留日期
|
|
today.setHours(0, 0, 0, 0); // 清除时间部分,只保留日期
|
|
@@ -208,7 +236,6 @@ export default {
|
|
|
this.getitemTimes()
|
|
this.getitemTimes()
|
|
|
this.getYvyueOrderList()
|
|
this.getYvyueOrderList()
|
|
|
} else {
|
|
} else {
|
|
|
-
|
|
|
|
|
this.orderTimeFalg = false;
|
|
this.orderTimeFalg = false;
|
|
|
}
|
|
}
|
|
|
this.status = data.status
|
|
this.status = data.status
|
|
@@ -217,6 +244,7 @@ export default {
|
|
|
this.form.order_time = data.order_time
|
|
this.form.order_time = data.order_time
|
|
|
this.form.order_date = data.order_date
|
|
this.form.order_date = data.order_date
|
|
|
this.form.user_name = data.user_name
|
|
this.form.user_name = data.user_name
|
|
|
|
|
+ this.workerName= data.tech_name
|
|
|
this.form.user_phone = data.user_phone
|
|
this.form.user_phone = data.user_phone
|
|
|
this.form.order_num = data.order_num
|
|
this.form.order_num = data.order_num
|
|
|
this.form.order_remark = data.order_remark
|
|
this.form.order_remark = data.order_remark
|
|
@@ -227,6 +255,7 @@ export default {
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
}else{
|
|
}else{
|
|
|
|
|
+ this.orderTimeFalg = true;
|
|
|
this.getFutureDates()
|
|
this.getFutureDates()
|
|
|
this.getitemTimes()
|
|
this.getitemTimes()
|
|
|
this.getYvyueOrderList()
|
|
this.getYvyueOrderList()
|
|
@@ -276,12 +305,20 @@ export default {
|
|
|
},
|
|
},
|
|
|
watch: {},
|
|
watch: {},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ // 回调参数为包含columnIndex、value、values
|
|
|
|
|
+ workerConfirm(e) {
|
|
|
|
|
+ console.log('confirm', e)
|
|
|
|
|
+ this.workerName=e.value[0].realname
|
|
|
|
|
+ this.form.tech_uid=e.value[0].id
|
|
|
|
|
+ this.workerShow = false
|
|
|
|
|
+ },
|
|
|
|
|
+ workerCancel() {
|
|
|
|
|
+ this.workerShow = false
|
|
|
|
|
+ },
|
|
|
|
|
+ openWorkerShow(){
|
|
|
|
|
+ console.log("222222222222222")
|
|
|
|
|
+ this.workerShow=true},
|
|
|
numChange(item) {
|
|
numChange(item) {
|
|
|
- const {
|
|
|
|
|
- name,
|
|
|
|
|
- value
|
|
|
|
|
- } = item
|
|
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
verifyData(){
|
|
verifyData(){
|
|
|
if (!this.form.order_time){
|
|
if (!this.form.order_time){
|
|
@@ -290,6 +327,9 @@ export default {
|
|
|
if (!this.form.user_name){
|
|
if (!this.form.user_name){
|
|
|
return {msg:"请输入预约人名称",status:true}
|
|
return {msg:"请输入预约人名称",status:true}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (!this.form.tech_uid){
|
|
|
|
|
+ return {msg:"请选择技师",status:true}
|
|
|
|
|
+ }
|
|
|
if (!this.form.user_phone){
|
|
if (!this.form.user_phone){
|
|
|
return {msg:"请输入联系方式",status:true}
|
|
return {msg:"请输入联系方式",status:true}
|
|
|
}
|
|
}
|
|
@@ -349,7 +389,7 @@ export default {
|
|
|
return day;
|
|
return day;
|
|
|
},
|
|
},
|
|
|
yvyueOrderCancel() {
|
|
yvyueOrderCancel() {
|
|
|
- yvyueOrderCancel({id: this.orderId}).then(({data}) => {
|
|
|
|
|
|
|
+ yvyueOrderCancel({order_no: this.order_no}).then(({data}) => {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title:"取消成功",
|
|
title:"取消成功",
|
|
|
icon: 'none'
|
|
icon: 'none'
|
|
@@ -362,6 +402,7 @@ export default {
|
|
|
//
|
|
//
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
+
|
|
|
getDateTimeSelectClass(date){
|
|
getDateTimeSelectClass(date){
|
|
|
if (date.date+' '+date.time==this.dateTimeSelect || yvyueOrderList[date.date] &&yvyueOrderList[date.date][date.period_start]){
|
|
if (date.date+' '+date.time==this.dateTimeSelect || yvyueOrderList[date.date] &&yvyueOrderList[date.date][date.period_start]){
|
|
|
return 'list-item-date-Selected';
|
|
return 'list-item-date-Selected';
|
|
@@ -380,9 +421,7 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
CreateItem(this.form).then(({data})=>{
|
|
CreateItem(this.form).then(({data})=>{
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/subPages/service/settlement?code=${this.goods_code}&orderId=${data.id}`
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ toWechatPayPaymentSave(data.order_no, data.order_remark)
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
SetDateTimeSelect(item) {
|
|
SetDateTimeSelect(item) {
|
|
@@ -411,10 +450,12 @@ export default {
|
|
|
this.form={order_num:1};
|
|
this.form={order_num:1};
|
|
|
}
|
|
}
|
|
|
this.orderId=0
|
|
this.orderId=0
|
|
|
|
|
+ this.order_no=''
|
|
|
this.type="add"
|
|
this.type="add"
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
getYvyueOrderInfo(item) {
|
|
getYvyueOrderInfo(item) {
|
|
|
|
|
+ this.order_no=item.order_no
|
|
|
this.orderId=item.id
|
|
this.orderId=item.id
|
|
|
this.form.order_time = item.order_time
|
|
this.form.order_time = item.order_time
|
|
|
this.form.user_name = item.user_name
|
|
this.form.user_name = item.user_name
|
|
@@ -424,6 +465,8 @@ export default {
|
|
|
this.form.customer_id = item.customer_id
|
|
this.form.customer_id = item.customer_id
|
|
|
this.form.id = item.id
|
|
this.form.id = item.id
|
|
|
this.form.tech_uid = item.tech_uid
|
|
this.form.tech_uid = item.tech_uid
|
|
|
|
|
+ this.workerName= item.tech_name
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
getitemTimes(){
|
|
getitemTimes(){
|
|
|
this.yvyueData=[]
|
|
this.yvyueData=[]
|
|
@@ -445,7 +488,7 @@ export default {
|
|
|
getYvyueOrderList({order_date: this.now_date}).then(({data}) => {
|
|
getYvyueOrderList({order_date: this.now_date}).then(({data}) => {
|
|
|
if (data&&data.list) {
|
|
if (data&&data.list) {
|
|
|
data.list.forEach(item => {
|
|
data.list.forEach(item => {
|
|
|
- if (item.status ==1||item.status ==2||item.status ==9 ){
|
|
|
|
|
|
|
+ if (item.status ==1||item.status ==2||item.status ==9 ||item.status ==3 ){
|
|
|
if (!yvyueOrderList[item.order_date]){
|
|
if (!yvyueOrderList[item.order_date]){
|
|
|
yvyueOrderList[item.order_date]={}
|
|
yvyueOrderList[item.order_date]={}
|
|
|
}
|
|
}
|
|
@@ -480,6 +523,14 @@ export default {
|
|
|
this.courseInfo = data.goods
|
|
this.courseInfo = data.goods
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
|
|
+ getWorkers() {
|
|
|
|
|
+ getWorkers().then(({data}) => {
|
|
|
|
|
+ this.workers = data
|
|
|
|
|
+ console.log(data,"good=============")
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 获取未来五天的日期
|
|
// 获取未来五天的日期
|
|
|
getFutureDates(startDateStr = null) {
|
|
getFutureDates(startDateStr = null) {
|
|
|
const today = startDateStr ? new Date(startDateStr) : new Date();
|
|
const today = startDateStr ? new Date(startDateStr) : new Date();
|
|
@@ -531,6 +582,7 @@ export default {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
|
|
+/* 确保引入了 Vant Weapp 的样式 */
|
|
|
.shopping-wrapper {
|
|
.shopping-wrapper {
|
|
|
width: 690rpx;
|
|
width: 690rpx;
|
|
|
margin: 20rpx auto 0rpx;
|
|
margin: 20rpx auto 0rpx;
|