0ac2721e by zhangmeng

化妆

1 parent 0beb5d2d
...@@ -224,6 +224,14 @@ export function makeUpDetail(data) { ...@@ -224,6 +224,14 @@ export function makeUpDetail(data) {
224 }) 224 })
225 } 225 }
226 226
227 export function getActivityMealVoListByStudioId(data) {
228 return request({
229 url: `/ota/activityMeal/getActivityMealVoListByStudioId`,
230 method: 'get',
231 params:data
232 })
233 }
234
227 export function getMealConfList(data) { 235 export function getMealConfList(data) {
228 return request({ 236 return request({
229 url: `/ota/mealConfig/getMealConfList`, 237 url: `/ota/mealConfig/getMealConfList`,
...@@ -231,3 +239,28 @@ export function getMealConfList(data) { ...@@ -231,3 +239,28 @@ export function getMealConfList(data) {
231 params:data 239 params:data
232 }) 240 })
233 } 241 }
242
243 export function submitOrderMeal(data) {
244 return request({
245 url: `/ota/norder/submitOrderMeal`,
246 method: 'post',
247 data
248 })
249 }
250
251 export function getMealOrderInfo(data) {
252 return request({
253 url: `/ota/orderMeal/getMealOrderInfo`,
254 method: 'get',
255 params:data
256 })
257 }
258
259
260 export function getMealOrderInfoByLogex(data) {
261 return request({
262 url: `/ota/orderMeal/getMealOrderInfoByLogex`,
263 method: 'get',
264 params:data
265 })
266 }
......
...@@ -410,7 +410,7 @@ export const constantRoutes = [ ...@@ -410,7 +410,7 @@ export const constantRoutes = [
410 meta: { title: 'Makeup Appointment' } 410 meta: { title: 'Makeup Appointment' }
411 }, 411 },
412 { 412 {
413 path: 'makeUp/:cptId/:id/:orderId', 413 path: 'makeUp/:cptId/:id/:lasId',
414 component: () => import('@/viewsPc/booking/makeUpOrder.vue'), 414 component: () => import('@/viewsPc/booking/makeUpOrder.vue'),
415 name: 'makeUpOrder', 415 name: 'makeUpOrder',
416 meta: { title: 'Makeup Reservation' } 416 meta: { title: 'Makeup Reservation' }
......
...@@ -10,14 +10,18 @@ ...@@ -10,14 +10,18 @@
10 <el-row justify="center" align='middle' > 10 <el-row justify="center" align='middle' >
11 <div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div> 11 <div class="canBtn"><el-icon><ArrowLeftBold /></el-icon></div>
12 <div> 12 <div>
13 <el-date-picker 13 <!-- <el-date-picker-->
14 v-model="value2" 14 <!-- v-model="value2"-->
15 type="datetimerange" 15 <!-- type="daterange"-->
16 range-separator="-" 16 <!-- range-separator="-"-->
17 start-placeholder="Start date" 17 <!-- start-placeholder="Start date"-->
18 end-placeholder="End date" 18 <!-- end-placeholder="End date"-->
19 size="small" 19 <!-- format="YYYY-MM-DD"-->
20 /> 20 <!-- value-format="YYYY-MM-DD"-->
21 <!-- size="small"-->
22 <!-- @change="changee"-->
23 <!-- />-->
24 <el-input readonly v-model="value2" type="text" size="small" style="width: 280px"></el-input>
21 </div> 25 </div>
22 <div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div> 26 <div class="canBtn"><el-icon><ArrowRightBold /></el-icon></div>
23 </el-row> 27 </el-row>
...@@ -25,9 +29,10 @@ ...@@ -25,9 +29,10 @@
25 <el-col :span="7"> 29 <el-col :span="7">
26 <div style="text-align: right;padding-right: 10px"> 30 <div style="text-align: right;padding-right: 10px">
27 <el-date-picker 31 <el-date-picker
28 v-model="currentDate" 32 v-model="currentDate1"
29 type="datetime" 33 type="date"
30 placeholder="YYYY-MM-DD" 34 placeholder="YYYY-MM-DD"
35 format="YYYY-MM-DD"
31 size="small" 36 size="small"
32 @change="dateChange" 37 @change="dateChange"
33 /> 38 />
...@@ -47,20 +52,27 @@ ...@@ -47,20 +52,27 @@
47 <li v-for="n in schList" :key="n.id" @click="goMatch(n)"> 52 <li v-for="n in schList" :key="n.id" @click="goMatch(n)">
48 <el-row style="width: 100%"> 53 <el-row style="width: 100%">
49 <div style="margin-right: 25px"> 54 <div style="margin-right: 25px">
50 <el-image style="width: 90px;height: 115px" src="@/assets/dance/banner.png" fit="cover" /> 55 <el-image style="width: 90px;height: 115px" :src="fillImgUrl(n.photos?.split(',')[0]) " fit="cover" />
51 </div> 56 </div>
52 <div style="flex: 1" > 57 <div style="flex: 1" >
53 <div class="hz-title">A套餐</div> 58 <div class="hz-title">{{ n.name }}</div>
54 <div> 59 <div>
55 <el-row justify="space-between"> 60 <el-row justify="space-between">
56 <el-row class="hz-p"> 61 <el-row class="hz-p" style="flex: 1">
57 <div style="margin-right: 80px">项目: <span style="margin-right: 20px">发型x1</span> <span>化妆x1</span> </div> 62 <el-col :span="8">
58 <div style="margin-right: 80px">服务: 化妆x1 </div> 63 <div >{{ language==0?'套餐说明':'Package Description' }}: <span style="margin-right: 20px">{{n.introduction}}</span></div>
59 <div>剩余 <span class="sign">6</span>名额 </div> 64 </el-col>
65
66 <el-col :span="8">
67 <div>{{ language==0?'剩余':'' }}<span class="sign">{{ n.num-n.counts }}</span>{{language==0?'名额':'Places Remaining' }} </div>
68 </el-col>
69 <el-col :span="8">
70 <div >{{n.goHome==1?language==0?'上门化妆':'Door-to-door makeup':''}}</div>
71 </el-col>
60 </el-row> 72 </el-row>
61 <el-row> 73 <el-row>
62 <div class="zh-margin" style="font-size: 36px;color: #ff8124"><span style="font-size: 24px"></span> 120</div> 74 <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>
63 <el-button class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button> 75 <el-button :disabled="n.num-n.counts<=0" class="btn-lineG w200px" round type="primary" size="large">{{ language==0?'立即预约':'Select' }} ⇀</el-button>
64 </el-row> 76 </el-row>
65 </el-row> 77 </el-row>
66 </div> 78 </div>
...@@ -82,16 +94,19 @@ import {dayjs} from "element-plus"; ...@@ -82,16 +94,19 @@ import {dayjs} from "element-plus";
82 import {useRoute,useRouter} from 'vue-router' 94 import {useRoute,useRouter} from 'vue-router'
83 import * as booking from "@/apiPc/booking" 95 import * as booking from "@/apiPc/booking"
84 import {useStorage} from "@vueuse/core/index"; 96 import {useStorage} from "@vueuse/core/index";
97 import useUserStore from "/@/store/modules/user";
98
99 const user = useUserStore().user
85 const language = useStorage('language', 0) 100 const language = useStorage('language', 0)
86 const router = useRouter() 101 const router = useRouter()
87 const route=useRoute() 102 const route=useRoute()
88 const currentDate = ref(new Date()) 103 const currentDate = ref(new Date())
89 const calendarRange = ref([dayjs('2024-07-17').toDate(), dayjs('2024-07-17').toDate()]) 104 const currentDate1 = ref(new Date())
105 const calendarRange = ref([dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())])
90 const schList = ref([]) 106 const schList = ref([])
91 const loading = ref(false) 107 const loading = ref(false)
92 const query = ref({ 108 const query = ref({
93 currentDate: dayjs(new Date()).format('YYYY-MM-DD') , 109 lasId:route.params.id,
94 // id:route.params.id
95 }) 110 })
96 const value1=ref('') 111 const value1=ref('')
97 const value2=ref('') 112 const value2=ref('')
...@@ -100,34 +115,46 @@ const value2=ref('') ...@@ -100,34 +115,46 @@ const value2=ref('')
100 getScheduleList() 115 getScheduleList()
101 function getScheduleList() { 116 function getScheduleList() {
102 loading.value = true 117 loading.value = true
103 // query.value.currentDate = dayjs(query.value.currentDate).format('YYYY-MM-DD') 118 query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD')
104 booking.getMealConfList(query.value).then(res=>{ 119 booking.getActivityMealVoListByStudioId(query.value).then(res=>{
105 loading.value = false 120 loading.value = false
106 schList.value = res.data 121 schList.value = res.data
107 }) 122 })
108 } 123 }
109 function selectDate(date) { 124 function selectDate(date) {
110 console.log(dayjs(date).format('YYYY-MM-DD')) 125 currentDate1.value= currentDate.value=dayjs(date).toDate()
111 query.value.currentDate = dayjs(date).format('YYYY-MM-DD') 126 console.log(date)
112 console.log(currentDate.value)
113 getScheduleList() 127 getScheduleList()
114 } 128 }
115 129
116 function dateChange(){ 130 function dateChange(){
117 query.value.currentDate = dayjs(currentDate.value).format('YYYY-MM-DD') 131 currentDate.value=currentDate1.value
132 calendarRange.value=[dayjs(currentDate.value).toDate(),(dayjs(currentDate.value).toDate())]
118 getScheduleList() 133 getScheduleList()
134 console.log(currentDate.value)
135 console.log(currentDate1.value)
119 } 136 }
137
120 function goMatch(n) { 138 function goMatch(n) {
139 if (!user) {
140 useUserStore().setVisitor()
141 return
142 }
143
121 router.push({ 144 router.push({
122 name: 'makeUpOrder', 145 name: 'makeUpOrder',
123 params: { 146 params: {
124 orderId: n.cptId 147 lasId: n.id
125 }, 148 },
126 query: { 149 // query: {
127 matchId: n.cptId 150 // matchId: n.cptId
128 } 151 // }
129 }) 152 })
130 } 153 }
154
155 function changee(){
156 console.log(value2.value)
157 }
131 </script> 158 </script>
132 159
133 <style scoped lang="scss"> 160 <style scoped lang="scss">
...@@ -283,7 +310,7 @@ function goMatch(n) { ...@@ -283,7 +310,7 @@ function goMatch(n) {
283 line-height: 26px; 310 line-height: 26px;
284 text-align: center; 311 text-align: center;
285 background-color: #fff; 312 background-color: #fff;
286 margin: 0 16px 5px 16px; 313 margin: 0 16px -2px 16px;
287 cursor:pointer 314 cursor:pointer
288 } 315 }
289 </style> 316 </style>
......
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
27 </el-row> 27 </el-row>
28 </div> 28 </div>
29 </div> 29 </div>
30
31 <div v-if="type == 'car'"> 30 <div v-if="type == 'car'">
32 <div class="leftboderTT">{{ language == 0 ? '路线信息' : 'Car Information' }}</div> 31 <div class="leftboderTT">{{ language == 0 ? '路线信息' : 'Car Information' }}</div>
33 <div class="border-info mt20"> 32 <div class="border-info mt20">
...@@ -53,7 +52,25 @@ ...@@ -53,7 +52,25 @@
53 </el-row> 52 </el-row>
54 </div> 53 </div>
55 </div> 54 </div>
56 55 <div v-if="type == 'makeUp'">
56 <div class="leftboderTT">{{ language == 0 ? '化妆信息' : 'Hotel Information' }}</div>
57 <div class="border-info mt20">
58 <h3>{{ formInfo.studioName }}</h3>
59 <el-row>
60 <el-col>
61 {{ language == 0 ?'地址':'Address' }}
62 <span v-if="language == 0">{{ formInfo.remarks }} {{ form.cityName }} {{ form.areaName }} </span>
63 {{ form.address }}
64 </el-col>
65 <el-col>
66 {{ language == 0 ?'套餐':'Package' }}{{ formInfo.mealName }} <span style="margin-left: 40px">{{ language==0?'价格':'Price' }}</span><span class="price">{{language==0? '¥'+formInfo.mealPrice:'€'+ formInfo.mealPriceEn}}</span>
67 </el-col>
68 <el-col>
69 {{ language == 0 ?'套餐说明':'Package Description' }}{{ formInfo.introduction}}
70 </el-col>
71 </el-row>
72 </div>
73 </div>
57 74
58 <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div> 75 <div class="leftboderTT">{{ language == 0 ? '预订信息' : 'Booking information' }}</div>
59 76
...@@ -127,6 +144,22 @@ ...@@ -127,6 +144,22 @@
127 <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ language==0?'联系方式':'Contact Phone' }}{{ form.phone }}</el-col> 144 <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ language==0?'联系方式':'Contact Phone' }}{{ form.phone }}</el-col>
128 <el-col :span="24" >{{ language==0?'备注':'Remarks' }}{{ form.remarks || '-' }}</el-col> 145 <el-col :span="24" >{{ language==0?'备注':'Remarks' }}{{ form.remarks || '-' }}</el-col>
129 </el-row> 146 </el-row>
147 <el-row v-if="type == 'makeUp'">
148 <el-col :lg="8" :md="12" :sm="12" :xs="24">
149 <div class="mb10">{{ language==0?'化妆时间':'Makeup time' }}
150 <!-- {{ dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;' }} ~ {{dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'}}-->
151 {{ dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'+ form.nameStart }} ~ {{dayjs(form.dcStart).format('YYYY-MM-DD') +'&nbsp;'+form.nameEnd}}
152 </div>
153 </el-col>
154 <el-col :lg="12" :md="12" :sm="12" :xs="24">
155 <div class="mb10">{{ language==0?'预约数':'Number of appointments' }}{{ form.num }} </div>
156 </el-col>
157 <el-col :lg="8" :md="12" :sm="12" :xs="24">
158 <div class="mb10">{{ language==0?'联系人':'Contact Person' }}{{ form.contacts }}</div>
159 </el-col>
160 <el-col :lg="8" :md="12" :sm="12" :xs="24">{{ language==0?'联系方式':'Contact Phone' }}{{ form.phone }}</el-col>
161 <el-col :span="24" >{{ language==0?'备注':'Remarks' }}{{ form.remarks }}</el-col>
162 </el-row>
130 </div> 163 </div>
131 164
132 <el-row justify="space-between" align="middle"> 165 <el-row justify="space-between" align="middle">
...@@ -169,7 +202,7 @@ ...@@ -169,7 +202,7 @@
169 202
170 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div> 203 <div class="leftboderTT">{{ language == 0 ? '选择支付方式' : 'Choose payment method' }}</div>
171 <div class="mt20"> 204 <div class="mt20">
172 <el-radio-group v-model="payType"> 205 <el-radio-group v-model="payType" >
173 <el-radio value="2" v-if="language==0" border> 206 <el-radio value="2" v-if="language==0" border>
174 <!-- 微信--> 207 <!-- 微信-->
175 <svg t="1709002960407" class="icon" viewBox="0 0 3152 1024" version="1.1" 208 <svg t="1709002960407" class="icon" viewBox="0 0 3152 1024" version="1.1"
...@@ -298,7 +331,14 @@ import useUserStore from "@/store/modules/user"; ...@@ -298,7 +331,14 @@ import useUserStore from "@/store/modules/user";
298 import FileUpload from "@/components/FileUpload"; 331 import FileUpload from "@/components/FileUpload";
299 import {useStorage} from "@vueuse/core/index"; 332 import {useStorage} from "@vueuse/core/index";
300 import {ElMessage} from "element-plus"; 333 import {ElMessage} from "element-plus";
301 import {cancelOrder, cancelOrder2, getCarBilldetailbyId, getFoodBilldetailbyId} from "@/apiPc/booking"; 334 import {
335 cancelOrder,
336 cancelOrder2,
337 getCarBilldetailbyId,
338 getFoodBilldetailbyId,
339 getMealOrderInfoByLogex
340 } from "@/apiPc/booking";
341 import dayjs from 'dayjs'
302 import {delPerson} from "@/api/exam/person"; 342 import {delPerson} from "@/api/exam/person";
303 343
304 const isLogin = ref(false) 344 const isLogin = ref(false)
...@@ -306,12 +346,12 @@ const language = useStorage('language', 0) ...@@ -306,12 +346,12 @@ const language = useStorage('language', 0)
306 const totalFee = ref('') 346 const totalFee = ref('')
307 const wePayCodeUrl = ref('') 347 const wePayCodeUrl = ref('')
308 const form = ref({}) 348 const form = ref({})
349 const formInfo=ref({})
309 const type = ref('') 350 const type = ref('')
310 const errorBox = ref(false) 351 const errorBox = ref(false)
311 const hideconfirmbtn = ref(false) 352 const hideconfirmbtn = ref(false)
312 353
313 const user = useUserStore().user 354 const user = useUserStore().user
314 console.log(route.query.orderId)
315 // 1763462073870237698 355 // 1763462073870237698
316 if (useUserStore().user) { 356 if (useUserStore().user) {
317 isLogin.value = true 357 isLogin.value = true
...@@ -336,8 +376,12 @@ onMounted(() => { ...@@ -336,8 +376,12 @@ onMounted(() => {
336 case '2': 376 case '2':
337 type.value = 'food' 377 type.value = 'food'
338 break 378 break
379 case '3':
380 type.value = 'makeUp'
381 break
339 } 382 }
340 } 383 }
384
341 getData() 385 getData()
342 }) 386 })
343 387
...@@ -384,6 +428,12 @@ function getData() { ...@@ -384,6 +428,12 @@ function getData() {
384 errorBox.value = true 428 errorBox.value = true
385 }) 429 })
386 } 430 }
431 if(type.value=='makeUp') {
432 MakeUpOrder()
433 MakeUpIno()
434 }
435
436 console.log(payType.value)
387 } 437 }
388 438
389 function goHome() { 439 function goHome() {
...@@ -391,6 +441,7 @@ function goHome() { ...@@ -391,6 +441,7 @@ function goHome() {
391 } 441 }
392 442
393 function goPay() { 443 function goPay() {
444 debugger
394 if (payType.value == '2') { 445 if (payType.value == '2') {
395 booking.createWePay({orderId: orderId.value}).then(res => { 446 booking.createWePay({orderId: orderId.value}).then(res => {
396 wePayCodeUrl.value = res.data 447 wePayCodeUrl.value = res.data
...@@ -428,6 +479,26 @@ function showLogin() { ...@@ -428,6 +479,26 @@ function showLogin() {
428 useUserStore().setReLogin() 479 useUserStore().setReLogin()
429 } 480 }
430 481
482
483 function MakeUpOrder(){
484 booking.getMealOrderInfo({orderId: orderId.value}).then(res => {
485 form.value=res.data
486 totalFee.value=language.value==0?form.value.total:form.value.totalEn
487 }).catch(err => {
488 console.log(err)
489 errorBox.value = true
490 })
491 }
492
493 function MakeUpIno(){
494 booking.getMealOrderInfoByLogex({orderId: orderId.value}).then(res=>{
495 formInfo.value=res.data
496 })
497 .catch((e) => {
498 console.log(e)
499 errorBox.value = true
500 })
501 }
431 const cancel = () => { 502 const cancel = () => {
432 //取消订单 503 //取消订单
433 proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' :`Are you sure to cancel the order?`).then(() => { 504 proxy.$modal.confirm(language.value == 0 ? '确定取消订单吗 ?' :`Are you sure to cancel the order?`).then(() => {
...@@ -451,6 +522,8 @@ const unsubscribe = () => { ...@@ -451,6 +522,8 @@ const unsubscribe = () => {
451 }) 522 })
452 }) 523 })
453 } 524 }
525
526
454 </script> 527 </script>
455 528
456 <style scoped lang="scss"> 529 <style scoped lang="scss">
...@@ -606,4 +679,8 @@ const unsubscribe = () => { ...@@ -606,4 +679,8 @@ const unsubscribe = () => {
606 font-size: 16px; 679 font-size: 16px;
607 margin-top: 10px 680 margin-top: 10px
608 } 681 }
682
683 .price{
684 color:orange;
685 }
609 </style> 686 </style>
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
15 <label class="blueTag" v-if="b.orderType == 0"> {{ language==0?'酒店':'HOTEL' }} </label> 15 <label class="blueTag" v-if="b.orderType == 0"> {{ language==0?'酒店':'HOTEL' }} </label>
16 <label class="purpleTag" v-if="b.orderType == 1"> {{ language==0?'车辆':'TRANSPORTATION' }} </label> 16 <label class="purpleTag" v-if="b.orderType == 1"> {{ language==0?'车辆':'TRANSPORTATION' }} </label>
17 <label class="orangeTag" v-if="b.orderType == 2"> {{ language==0?'餐饮':'DINING' }} </label> 17 <label class="orangeTag" v-if="b.orderType == 2"> {{ language==0?'餐饮':'DINING' }} </label>
18 <label class="orangeTag" v-if="b.orderType == 3"> {{ language==0?'化妆':'MakeUp' }} </label>
19
18 <span>{{ language==0?'订单编号:':'No.' }} {{ b.id }}</span> 20 <span>{{ language==0?'订单编号:':'No.' }} {{ b.id }}</span>
19 </div> 21 </div>
20 22
...@@ -57,6 +59,12 @@ ...@@ -57,6 +59,12 @@
57 <p>{{language==0?'配送日期':'Delivery Date'}}{{b.extJsonObj.dcEnd }} ~ {{b.extJsonObj.dcEnd}}</p> 59 <p>{{language==0?'配送日期':'Delivery Date'}}{{b.extJsonObj.dcEnd }} ~ {{b.extJsonObj.dcEnd}}</p>
58 60
59 </div> 61 </div>
62 <div v-if="b.orderType==3">
63 <h3 class="name">{{b.name}}</h3>
64 <p v-if="language==0">
65 {{dayjs(b.deliveryTime).format('YYYY-MM-DD')+' '+b.extJsonObj.timePeriod?.split('-')[0]+'-'+dayjs(b.deliveryTime).format('YYYY-MM-DD')+' '+b.extJsonObj.timePeriod?.split('-')[1] }}
66 </p>
67 </div>
60 </el-col> 68 </el-col>
61 <el-col :lg="6"> 69 <el-col :lg="6">
62 <div v-if="b.orderType == 0"> 70 <div v-if="b.orderType == 0">
...@@ -67,6 +75,9 @@ ...@@ -67,6 +75,9 @@
67 </div> 75 </div>
68 <div v-if="b.orderType == 2"> 76 <div v-if="b.orderType == 2">
69 </div> 77 </div>
78 <div v-if="b.orderType == 3">
79 <p>{{ b.extJsonObj.packageName }}</p>
80 </div>
70 </el-col> 81 </el-col>
71 <el-col :lg="4" class="text-center"> 82 <el-col :lg="4" class="text-center">
72 <span class="text-warning"> {{ language==0?'¥':'€' }} 83 <span class="text-warning"> {{ language==0?'¥':'€' }}
...@@ -76,8 +87,7 @@ ...@@ -76,8 +87,7 @@
76 87
77 <el-col :lg="4" > 88 <el-col :lg="4" >
78 <div class="text-right mb20 text-danger"> 89 <div class="text-right mb20 text-danger">
79 <el-countdown value-style="color:#E60012;font-size:16px;" v-if="b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')" format="mm:ss" 90 <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)"/>
80 :value="b.countdown" @finish="finish(b)"/>
81 </div> 91 </div>
82 92
83 <div class="text-right"> 93 <div class="text-right">
...@@ -102,6 +112,7 @@ import {onMounted} from "@vue/runtime-core"; ...@@ -102,6 +112,7 @@ import {onMounted} from "@vue/runtime-core";
102 import {useStorage} from "@vueuse/core/index"; 112 import {useStorage} from "@vueuse/core/index";
103 import {newbilllist} from "@/apiPc/common"; 113 import {newbilllist} from "@/apiPc/common";
104 import useUserStore from "@/store/modules/user"; 114 import useUserStore from "@/store/modules/user";
115 import dayjs from 'dayjs'
105 const router = useRouter() 116 const router = useRouter()
106 const language= useStorage('language',0) 117 const language= useStorage('language',0)
107 const list = ref([]) 118 const list = ref([])
...@@ -118,11 +129,12 @@ function getList() { ...@@ -118,11 +129,12 @@ function getList() {
118 newbilllist({createById:user.userId}).then(res=>{ 129 newbilllist({createById:user.userId}).then(res=>{
119 list.value = res.rows 130 list.value = res.rows
120 for (var b of list.value) { 131 for (var b of list.value) {
121 b.messageObj = JSON.parse(b.message) 132 b.messageObj = JSON.parse(b.message) || {}
122 b.extJsonObj = JSON.parse(b.extJson) || {} 133 b.extJsonObj = JSON.parse(b.extJson) || {}
123 if(b.surplus&&b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')){ 134 if(b.surplus&&b.status == '0'&&(b.surplus!='0,0'&&b.surplus!='0')){
124 b.countdown = Date.now() + Number((b.surplus.split(',')[0]*60 + b.surplus.split(',')[1])*10) 135 const a=Number(b.surplus.split(',')[0]*60)
125 console.log(b.countdown) 136 const c=Number(b.surplus.split(',')[1]*10)
137 b.countdown = Date.now() + a+c
126 } 138 }
127 } 139 }
128 }) 140 })
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!