0ac2721e by zhangmeng

化妆

1 parent 0beb5d2d
......@@ -224,6 +224,14 @@ export function makeUpDetail(data) {
})
}
export function getActivityMealVoListByStudioId(data) {
return request({
url: `/ota/activityMeal/getActivityMealVoListByStudioId`,
method: 'get',
params:data
})
}
export function getMealConfList(data) {
return request({
url: `/ota/mealConfig/getMealConfList`,
......@@ -231,3 +239,28 @@ export function getMealConfList(data) {
params:data
})
}
export function submitOrderMeal(data) {
return request({
url: `/ota/norder/submitOrderMeal`,
method: 'post',
data
})
}
export function getMealOrderInfo(data) {
return request({
url: `/ota/orderMeal/getMealOrderInfo`,
method: 'get',
params:data
})
}
export function getMealOrderInfoByLogex(data) {
return request({
url: `/ota/orderMeal/getMealOrderInfoByLogex`,
method: 'get',
params:data
})
}
......
......@@ -410,7 +410,7 @@ export const constantRoutes = [
meta: { title: 'Makeup Appointment' }
},
{
path: 'makeUp/:cptId/:id/:orderId',
path: 'makeUp/:cptId/:id/:lasId',
component: () => import('@/viewsPc/booking/makeUpOrder.vue'),
name: 'makeUpOrder',
meta: { title: 'Makeup Reservation' }
......
......@@ -10,14 +10,18 @@
<el-row justify="center" align='middle' >
<div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>
<div>
<el-date-picker
v-model="value2"
type="datetimerange"
range-separator="-"
start-placeholder="Start date"
end-placeholder="End date"
size="small"
/>
<!-- <el-date-picker-->
<!-- v-model="value2"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- start-placeholder="Start date"-->
<!-- end-placeholder="End date"-->
<!-- format="YYYY-MM-DD"-->
<!-- value-format="YYYY-MM-DD"-->
<!-- size="small"-->
<!-- @change="changee"-->
<!-- />-->
<el-input readonly v-model="value2" type="text" size="small" style="width: 280px"></el-input>
</div>
<div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>
</el-row>
......@@ -25,9 +29,10 @@
<el-col :span="7">
<div style="text-align: right;padding-right: 10px">
<el-date-picker
v-model="currentDate"
type="datetime"
v-model="currentDate1"
type="date"
placeholder="YYYY-MM-DD"
format="YYYY-MM-DD"
size="small"
@change="dateChange"
/>
......@@ -47,20 +52,27 @@
<li v-for="n in schList" :key="n.id" @click="goMatch(n)">
<el-row style="width: 100%">
<div style="margin-right: 25px">
<el-image style="width: 90px;height: 115px" src="@/assets/dance/banner.png" fit="cover" />
<el-image style="width: 90px;height: 115px" :src="fillImgUrl(n.photos?.split(',')[0]) " fit="cover" />
</div>
<div style="flex: 1" >
<div class="hz-title">A套餐</div>
<div class="hz-title">{{ n.name }}</div>
<div>
<el-row justify="space-between">
<el-row class="hz-p">
<div style="margin-right: 80px">项目: <span style="margin-right: 20px">发型x1</span> <span>化妆x1</span> </div>
<div style="margin-right: 80px">服务: 化妆x1 </div>
<div>剩余 <span class="sign">6</span>名额 </div>
<el-row class="hz-p" style="flex: 1">
<el-col :span="8">
<div >{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div>
</el-col>
<el-col :span="8">
<div>{{ language==0?'剩余':'' }}<span class="sign">{{ n.num-n.counts }}</span>{{language==0?'名额':'Places Remaining' }} </div>
</el-col>
<el-col :span="8">
<div >{{n.goHome==1?language==0?'上门化妆':'Door-to-door makeup':''}}</div>
</el-col>
</el-row>
<el-row>
<div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px"></span> 120</div>
<el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
<div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px">{{ language==0?'¥':'€'}} </span> {{language==0?n.mealPrice:n.mealPriceEn}}</div>
<el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
</el-row>
</el-row>
</div>
......@@ -82,16 +94,19 @@ import {dayjs} from "element-plus";
import {useRoute,useRouter} from 'vue-router'
import * as booking from "@/apiPc/booking"
import {useStorage} from "@vueuse/core/index";
import useUserStore from "/@/store/modules/user";
const user = useUserStore().user
const language = useStorage('language', 0)
const router = useRouter()
const route=useRoute()
const currentDate = ref(new Date())
const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()])
const currentDate1 = ref(new Date())
const calendarRange = ref([dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())])
const schList = ref([])
const loading = ref(false)
const query = ref({
currentDate: dayjs(new Date()).format('YYYY-MM-DD') ,
// id:route.params.id
lasId:route.params.id,
})
const value1=ref('')
const value2=ref('')
......@@ -100,34 +115,46 @@ const value2=ref('')
getScheduleList()
function getScheduleList() {
loading.value = true
// query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD')
booking.getMealConfList(query.value).then(res=>{
query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
booking.getActivityMealVoListByStudioId(query.value).then(res=>{
loading.value = false
schList.value = res.data
})
}
function selectDate(date) {
console.log(dayjs(date).format('YYYY-MM-DD'))
query.value.currentDate = dayjs(date).format('YYYY-MM-DD')
console.log(currentDate.value)
currentDate1.value= currentDate.value=dayjs(date).toDate()
console.log(date)
getScheduleList()
}
function dateChange(){
query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
currentDate.value=currentDate1.value
calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())]
getScheduleList()
console.log(currentDate.value)
console.log(currentDate1.value)
}
function goMatch(n) {
if (!user) {
useUserStore().setVisitor()
return
}
router.push({
name: 'makeUpOrder',
params: {
orderId: n.cptId
lasId: n.id
},
query: {
matchId: n.cptId
}
// query: {
// matchId: n.cptId
// }
})
}
function changee(){
console.log(value2.value)
}
</script>
<style scoped lang="scss">
......@@ -283,7 +310,7 @@ function goMatch(n) {
line-height: 26px;
text-align: center;
background-color: #fff;
margin: 0 16px 5px 16px;
margin: 0 16px -2px 16px;
cursor:pointer
}
</style>
......
......@@ -27,7 +27,6 @@
</el-row>
</div>
</div>
<div v-if="type == 'car'">
<div class="leftboderTT">{{ language == 0 ? '路线信息' : 'Car Information' }}</div>
<div class="border-info mt20">
......@@ -53,7 +52,25 @@
</el-row>
</div>
</div>
<div v-if="type == 'makeUp'">
<div class="leftboderTT">{{ language == 0 ? '化妆信息' : 'Hotel Information' }}</div>
<div class="border-info mt20">
<h3>{{ formInfo.studioName }}</h3>
<el-row>
<el-col>
{{ language == 0 ?'地址':'Address' }}
<span v-if="language == 0">{{ formInfo.remarks }} {{ form.cityName }} {{ form.areaName }} </span>
{{ form.address }}
</el-col>
<el-col>
{{ language == 0 ?'套餐':'Package' }}{{ formInfo.mealName }} <span style="margin-left: 40px">{{ language==0?'价格':'Price' }}</span><span class="price">{{language==0? '¥'+formInfo.mealPrice:'€'+ formInfo.mealPriceEn}}</span>
</el-col>
<el-col>
{{ language == 0 ?'套餐说明':'Package Description' }}{{ formInfo.introduction}}
</el-col>
</el-row>
</div>
</div>
<div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div>
......@@ -127,6 +144,22 @@
<el-col :lg="8" :md="12" :sm="12" :xs="24">{{ language==0?'联系方式':'Contact Phone' }}{{ form.phone }}</el-col>
<el-col :span="24" >{{ language==0?'备注':'Remarks' }}{{ form.remarks || '-' }}</el-col>
</el-row>
<el-row v-if="type == 'makeUp'">
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div class="mb10">{{ language==0?'化妆时间':'Makeup time' }}
<!-- {{ dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;' }} ~ {{dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'}}-->
{{ dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'+ form.nameStart }} ~ {{dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'+form.nameEnd}}
</div>
</el-col>
<el-col :lg="12" :md="12" :sm="12" :xs="24">
<div class="mb10">{{ language==0?'预约数':'Number of appointments' }}{{ form.num }} </div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">
<div class="mb10">{{ language==0?'联系人':'Contact Person' }}{{ form.contacts }}</div>
</el-col>
<el-col :lg="8" :md="12" :sm="12" :xs="24">{{ language==0?'联系方式':'Contact Phone' }}{{ form.phone }}</el-col>
<el-col :span="24" >{{ language==0?'备注':'Remarks' }}{{ form.remarks }}</el-col>
</el-row>
</div>
<el-row justify="space-between" align="middle">
......@@ -169,7 +202,7 @@
<div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div>
<div class="mt20">
<el-radio-group v-model="payType">
<el-radio-group v-model="payType" >
<el-radio value="2" v-if="language==0" border>
<!-- 微信-->
<svg t="1709002960407" class="icon" viewBox="0 0 3152 1024" version="1.1"
......@@ -298,7 +331,14 @@ import useUserStore from "@/store/modules/user";
import FileUpload from "@/components/FileUpload";
import {useStorage} from "@vueuse/core/index";
import {ElMessage} from "element-plus";
import {cancelOrder, cancelOrder2, getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking";
import {
cancelOrder,
cancelOrder2,
getCarBilldetailbyId,
getFoodBilldetailbyId,
getMealOrderInfoByLogex
} from "@/apiPc/booking";
import dayjs from 'dayjs'
import {delPerson} from "@/api/exam/person";
const isLogin = ref(false)
......@@ -306,12 +346,12 @@ const language = useStorage('language', 0)
const totalFee = ref('')
const wePayCodeUrl = ref('')
const form = ref({})
const formInfo=ref({})
const type = ref('')
const errorBox = ref(false)
const hideconfirmbtn = ref(false)
const user = useUserStore().user
console.log(route.query.orderId)
// 1763462073870237698
if (useUserStore().user) {
isLogin.value = true
......@@ -336,8 +376,12 @@ onMounted(() => {
case '2':
type.value = 'food'
break
case '3':
type.value = 'makeUp'
break
}
}
getData()
})
......@@ -384,6 +428,12 @@ function getData() {
errorBox.value = true
})
}
if(type.value=='makeUp') {
MakeUpOrder()
MakeUpIno()
}
console.log(payType.value)
}
function goHome() {
......@@ -391,6 +441,7 @@ function goHome() {
}
function goPay() {
debugger
if (payType.value == '2') {
booking.createWePay({orderId: orderId.value}).then(res => {
wePayCodeUrl.value = res.data
......@@ -428,6 +479,26 @@ function showLogin() {
useUserStore().setReLogin()
}
function MakeUpOrder(){
booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
form.value=res.data
totalFee.value=language.value==0?form.value.total:form.value.totalEn
}).catch(err => {
console.log(err)
errorBox.value = true
})
}
function MakeUpIno(){
booking.getMealOrderInfoByLogex({orderId: orderId.value}).then(res=>{
formInfo.value=res.data
})
.catch((e) => {
console.log(e)
errorBox.value = true
})
}
const cancel = () => {
//取消订单
proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' :`Are you sure to cancel the order?`).then(() => {
......@@ -451,6 +522,8 @@ const unsubscribe = () => {
})
})
}
</script>
<style scoped lang="scss">
......@@ -606,4 +679,8 @@ const unsubscribe = () => {
font-size: 16px;
margin-top: 10px
}
.price{
color:orange;
}
</style>
......
......@@ -15,6 +15,8 @@
<label class="blueTag" v-if="b.orderType == 0"> {{ language==0?'酒店':'HOTEL' }} </label>
<label class="purpleTag" v-if="b.orderType == 1"> {{ language==0?'车辆':'TRANSPORTATION' }} </label>
<label class="orangeTag" v-if="b.orderType == 2"> {{ language==0?'餐饮':'DINING' }} </label>
<label class="orangeTag" v-if="b.orderType == 3"> {{ language==0?'化妆':'MakeUp' }} </label>
<span>{{ language==0?'订单编号:':'No.' }} {{ b.id }}</span>
</div>
......@@ -57,6 +59,12 @@
<p>{{language==0?'配送日期':'Delivery Date'}}{{b.extJsonObj.dcEnd }} ~ {{b.extJsonObj.dcEnd}}</p>
</div>
<div v-if="b.orderType==3">
<h3 class="name">{{b.name}}</h3>
<p v-if="language==0">
{{dayjs(b.deliveryTime).format('YYYY-MM-DD')+' '+b.extJsonObj.timePeriod?.split('-')[0]+'-'+dayjs(b.deliveryTime).format('YYYY-MM-DD')+' '+b.extJsonObj.timePeriod?.split('-')[1] }}
</p>
</div>
</el-col>
<el-col :lg="6">
<div v-if="b.orderType == 0">
......@@ -67,6 +75,9 @@
</div>
<div v-if="b.orderType == 2">
</div>
<div v-if="b.orderType == 3">
<p>{{ b.extJsonObj.packageName }}</p>
</div>
</el-col>
<el-col :lg="4" class="text-center">
<span class="text-warning"> {{ language==0?'¥':'€' }}
......@@ -76,8 +87,7 @@
<el-col :lg="4" >
<div class="text-right mb20 text-danger">
<el-countdown value-style="color:#E60012;font-size:16px;" v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" format="mm:ss"
:value="b.countdown" @finish="finish(b)"/>
<el-countdown value-style="color:#E60012;font-size:16px;" v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" format="mm:ss" :value="b.countdown" @finish="finish(b)"/>
</div>
<div class="text-right">
......@@ -102,6 +112,7 @@ import {onMounted} from "@vue/runtime-core";
import {useStorage} from "@vueuse/core/index";
import {newbilllist} from "@/apiPc/common";
import useUserStore from "@/store/modules/user";
import dayjs from 'dayjs'
const router = useRouter()
const language= useStorage('language',0)
const list = ref([])
......@@ -118,11 +129,12 @@ function getList() {
newbilllist({createById:user.userId}).then(res=>{
list.value = res.rows
for (var b of list.value) {
b.messageObj = JSON.parse(b.message)
b.messageObj = JSON.parse(b.message) || {}
b.extJsonObj = JSON.parse(b.extJson) || {}
if(b.surplus&&b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')){
b.countdown = Date.now() + Number((b.surplus.split(',')[0]*60 + b.surplus.split(',')[1])*10)
console.log(b.countdown)
const a=Number(b.surplus.split(',')[0]*60)
const c=Number(b.surplus.split(',')[1]*10)
b.countdown = Date.now() + a+c
}
}
})
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!