5f6fdd28 by 华明祺

no message

1 parent f638433a
...@@ -13,95 +13,95 @@ ...@@ -13,95 +13,95 @@
13 <el-row class="pd20" :gutter="20"> 13 <el-row class="pd20" :gutter="20">
14 <el-col :span="24"> 14 <el-col :span="24">
15 <!--已选订单--> 15 <!--已选订单-->
16 <div v-if="orderType!=6" class="border-info" v-for="b in list" :key="b.id"> 16 <div v-for="b in list" v-if="orderType!=6" :key="b.id" class="border-info">
17 <label class="blueTag" v-if="orderType == 0"> {{ language==0?'酒店订单':'HOTEL' }}</label> 17 <label v-if="orderType == 0" class="blueTag"> {{ language==0?'酒店订单':'HOTEL' }}</label>
18 <label class="orangeTag" v-if="b.orderType == 1"> {{ language==0?'车辆订单':'TRANSPORTATION' }}</label> 18 <label v-if="b.orderType == 1" class="orangeTag"> {{ language==0?'车辆订单':'TRANSPORTATION' }}</label>
19 <label class="purpleTag" v-if="b.orderType == 2"> {{ language==0?'餐饮订单':'DINING' }}</label> 19 <label v-if="b.orderType == 2" class="purpleTag"> {{ language==0?'餐饮订单':'DINING' }}</label>
20 <label class="pinkTag" v-if="b.orderType == 3"> {{ language==0?'化妆订单':'MakeUp' }}</label> 20 <label v-if="b.orderType == 3" class="pinkTag"> {{ language==0?'化妆订单':'MakeUp' }}</label>
21 <label class="yellowTag" v-if="b.orderType == 4"> {{ language==0?'拍摄订单':'Shooting'}}</label> 21 <label v-if="b.orderType == 4" class="yellowTag"> {{ language==0?'拍摄订单':'Shooting' }}</label>
22 <label class="yellowTag" v-if="!b.orderType&&orderType==5">{{ language==0?'赛事报名':'REGISTRATION' }}</label> 22 <label v-if="!b.orderType&&orderType==5" class="yellowTag">{{ language==0?'赛事报名':'REGISTRATION' }}</label>
23 <h3 v-if="b.name">{{ b.name }}</h3> 23 <h3 v-if="b.name">{{ b.name }}</h3>
24 <h3 v-if="b.cptName">{{ b.cptName }}</h3> 24 <h3 v-if="b.cptName">{{ b.cptName }}</h3>
25 25
26 <div v-if="!b.orderType&&orderType==5"> 26 <div v-if="!b.orderType&&orderType==5">
27 <p v-if="b.groupName">{{ language==0?'团队名称':'Team name' }}{{b.groupName}}</p> 27 <p v-if="b.groupName">{{ language==0?'团队名称':'Team name' }}{{ b.groupName }}</p>
28 <p v-if="b.payTime">{{ language==0?'支付时间':'Payment time' }}{{b.payTime}}</p> 28 <p v-if="b.payTime">{{ language==0?'支付时间':'Payment time' }}{{ b.payTime }}</p>
29 <p class="poPrice" v-if="b.totalPayAmount">{{paymentType!=2?'¥':'€'}} {{b.totalPayAmount}}</p> 29 <p v-if="b.totalPayAmount" class="poPrice">{{ paymentType!=2?'¥':'€' }} {{ b.totalPayAmount }}</p>
30 </div> 30 </div>
31 <!-- 酒店订单--> 31 <!-- 酒店订单-->
32 <div v-if="b.orderType == 0"> 32 <div v-if="b.orderType == 0">
33 <p>{{b.messageObj.roomInfo}}</p> 33 <p>{{ b.messageObj.roomInfo }}</p>
34 <p>{{b.messageObj.roomStayDate}}</p> 34 <p>{{ b.messageObj.roomStayDate }}</p>
35 <p class="poPrice" v-if="b.totalStr">{{ b.paymentType==3?'€' :'¥' }}{{b.totalStr}}</p> 35 <p v-if="b.totalStr" class="poPrice">{{ b.paymentType==3?'€' :'¥' }}{{ b.totalStr }}</p>
36 </div> 36 </div>
37 <!-- 接送订单--> 37 <!-- 接送订单-->
38 <div v-if="b.orderType == 1"> 38 <div v-if="b.orderType == 1">
39 <p v-for="(car,index) in b.messageObj.carsList" :key="index" v-show="car.num>0"> 39 <p v-for="(car,index) in b.messageObj.carsList" v-show="car.num>0" :key="index">
40 <span>{{car.name}}{{car.num}}</span> 40 <span>{{ car.name }}{{ car.num }}</span>
41 </p> 41 </p>
42 <p class="poPrice" v-if="b.total">{{ b.paymentType==3?'€' :'¥' }}{{b.totalStr}}</p> 42 <p v-if="b.total" class="poPrice">{{ b.paymentType==3?'€' :'¥' }}{{ b.totalStr }}</p>
43 </div> 43 </div>
44 <!-- 餐饮订单--> 44 <!-- 餐饮订单-->
45 <div v-if="b.orderType == 2"> 45 <div v-if="b.orderType == 2">
46 <p v-for="(n,index) in b.messageObj.foodsList" :key="index"> 46 <p v-for="(n,index) in b.messageObj.foodsList" :key="index">
47 <span v-if="n.num > 0"> 47 <span v-if="n.num > 0">
48 {{n.name}}({{n.categoryName}}) <span>{{n.num}}</span> 48 {{ n.name }}({{ n.categoryName }}) <span>{{ n.num }}</span>
49 </span> 49 </span>
50 </p> 50 </p>
51 <p class="poPrice" v-if="b.total">{{ b.paymentType==3?'€' :'¥' }}{{b.total}}</p> 51 <p v-if="b.total" class="poPrice">{{ b.paymentType==3?'€' :'¥' }}{{ b.total }}</p>
52 </div> 52 </div>
53 <div v-if="b.orderType == 3 || b.orderType == 4"> 53 <div v-if="b.orderType == 3 || b.orderType == 4">
54 <div> 54 <div>
55 {{language==0?'套餐名称:':''}}{{b.messageObj.packageName}} 55 {{ language==0?'套餐名称:':'' }}{{ b.messageObj.packageName }}
56 </div> 56 </div>
57 <div> 57 <div>
58 {{language==0?'预约时间:':''}}{{b.deliveryTime.slice(0,10)}} {{b.messageObj.timePeriod}} 58 {{ language==0?'预约时间:':'' }}{{ b.deliveryTime.slice(0,10) }} {{ b.messageObj.timePeriod }}
59 </div> 59 </div>
60 <p class="poPrice" v-if="b.total">{{ b.paymentType==3?'€' :'¥' }}{{b.totalStr}}</p> 60 <p v-if="b.total" class="poPrice">{{ b.paymentType==3?'€' :'¥' }}{{ b.totalStr }}</p>
61 </div> 61 </div>
62 </div> 62 </div>
63 63
64 <div class="border-info" v-if="orderType==6"> 64 <div v-if="orderType==6" class="border-info">
65 <label class="blueTag" >{{language==0?'票务订单':'Ticket'}}</label> 65 <label class="blueTag">{{ language==0?'票务订单':'Ticket' }}</label>
66 <h3>{{ formDate.name }}</h3> 66 <h3>{{ formDate.name }}</h3>
67 <div> 67 <div>
68 <p>地点:{{formDate.placeName}}</p> 68 <p>地点:{{ formDate.placeName }}</p>
69 <p>单价:{{paymentType!=2?'¥':'€'}}{{formDate.singlePrice}}</p> 69 <p>单价:{{ paymentType!=2?'¥':'€' }}{{ formDate.singlePrice }}</p>
70 <p>数量:{{formDate.seatList?.length}}</p> 70 <p>数量:{{ formDate.seatList?.length }}</p>
71 <p class="poPrice">{{paymentType!=2?'¥':'€'}}{{formDate.payAmount}}</p> 71 <p class="poPrice">{{ paymentType!=2?'¥':'€' }}{{ formDate.payAmount }}</p>
72 </div> 72 </div>
73 </div> 73 </div>
74 74
75 <div class="leftboderTT">{{ language == 0 ? '开票信息' : 'Invoice information' }}</div> 75 <div class="leftboderTT">{{ language == 0 ? '开票信息' : 'Invoice information' }}</div>
76 <div class="border-rr mt20 pd20"> 76 <div class="border-rr mt20 pd20">
77 <el-form class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef"> 77 <el-form ref="formRef" class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules">
78 <el-form-item :label="language == 0 ?'开票金额':'Amount'"> 78 <el-form-item :label="language == 0 ?'开票金额':'Amount'">
79 <span v-if="orderType==5||orderType==6" class="bigprice">{{paymentType!=2?'¥':'€'}}{{totalMoney}}</span> 79 <span v-if="orderType==5||orderType==6" class="bigprice">{{ paymentType!=2?'¥':'€' }}{{ totalMoney }}</span>
80 <span v-else class="bigprice">{{paymentType!=3?'¥':'€'}}{{totalMoney}}</span> 80 <span v-else class="bigprice">{{ paymentType!=3?'¥':'€' }}{{ totalMoney }}</span>
81 </el-form-item> 81 </el-form-item>
82 82
83 <el-form-item :label="language == 0 ?`发票形式`:'Invoice Form'" required prop="invoiceForm"> 83 <el-form-item :label="language == 0 ?`发票形式`:'Invoice Form'" required prop="invoiceForm">
84 <el-radio-group v-model="form.invoiceForm"> 84 <el-radio-group v-model="form.invoiceForm">
85 <el-radio value="1">{{ language == 0 ? '电子发票' : 'E-invoice' }}</el-radio> 85 <el-radio value="1">{{ language == 0 ? '电子发票' : 'E-invoice' }}</el-radio>
86 <!-- <el-radio value="2" v-if="kpType.indexOf('2')!=-1">{{ language == 0 ? '纸质普票' : 'Paper-invoice' }}</el-radio>--> 86 <!-- <el-radio value="2" v-if="kpType.indexOf('2')!=-1">{{ language == 0 ? '纸质普票' : 'Paper-invoice' }}</el-radio>-->
87 <!-- <el-radio value="3" v-if="kpType.indexOf('3')!=-1">{{ language == 0 ? '纸质专票' : 'Paper-special-invoice' }}</el-radio>--> 87 <!-- <el-radio value="3" v-if="kpType.indexOf('3')!=-1">{{ language == 0 ? '纸质专票' : 'Paper-special-invoice' }}</el-radio>-->
88 </el-radio-group> 88 </el-radio-group>
89 </el-form-item> 89 </el-form-item>
90 90
91 <!-- <el-form-item :label="`邮寄地址`" v-else required>--> 91 <!-- <el-form-item :label="`邮寄地址`" v-else required>-->
92 <!-- <el-button plain type="primary" size="small" v-if="addrList.length==0" @click="goEditAddress">--> 92 <!-- <el-button plain type="primary" size="small" v-if="addrList.length==0" @click="goEditAddress">-->
93 <!-- +{{ language==0?'添加地址':'Add' }}--> 93 <!-- +{{ language==0?'添加地址':'Add' }}-->
94 <!-- </el-button>--> 94 <!-- </el-button>-->
95 <!-- <div v-else class="flexCenter">--> 95 <!-- <div v-else class="flexCenter">-->
96 <!-- <div>--> 96 <!-- <div>-->
97 <!-- <div class="bigSize">{{nowAddress.contact}} {{nowAddress.phone}}</div>--> 97 <!-- <div class="bigSize">{{nowAddress.contact}} {{nowAddress.phone}}</div>-->
98 <!-- <div class="smallSize">{{nowAddress.addName}}</div>--> 98 <!-- <div class="smallSize">{{nowAddress.addName}}</div>-->
99 <!-- </div>--> 99 <!-- </div>-->
100 <!-- <a @click="goEditAddress" class="text-primary">--> 100 <!-- <a @click="goEditAddress" class="text-primary">-->
101 <!-- <el-icon><Switch /></el-icon>切换--> 101 <!-- <el-icon><Switch /></el-icon>切换-->
102 <!-- </a>--> 102 <!-- </a>-->
103 <!-- </div>--> 103 <!-- </div>-->
104 <!-- </el-form-item>--> 104 <!-- </el-form-item>-->
105 <el-form-item :label="language == 0 ?`发票类型`:'Invoice Type'" required prop="invoiceType"> 105 <el-form-item :label="language == 0 ?`发票类型`:'Invoice Type'" required prop="invoiceType">
106 <el-radio-group v-model="form.invoiceType"> 106 <el-radio-group v-model="form.invoiceType">
107 <el-radio value="0">{{ language == 0 ? '企业' : 'Company' }}</el-radio> 107 <el-radio value="0">{{ language == 0 ? '企业' : 'Company' }}</el-radio>
...@@ -109,37 +109,38 @@ ...@@ -109,37 +109,38 @@
109 </el-radio-group> 109 </el-radio-group>
110 </el-form-item> 110 </el-form-item>
111 <el-form-item v-if="form.invoiceType=='0'" :label="language == 0 ?`发票抬头`:'Invoice Title'" required prop="invoiceTitle"> 111 <el-form-item v-if="form.invoiceType=='0'" :label="language == 0 ?`发票抬头`:'Invoice Title'" required prop="invoiceTitle">
112 <el-input v-model="form.invoiceTitle"/> 112 <el-input v-model="form.invoiceTitle" />
113 </el-form-item> 113 </el-form-item>
114 <el-form-item :label="language == 0 ?`税号`:'Duty Paragraph'" required v-if="form.invoiceType=='0'" prop="invoiceTfn"> 114 <el-form-item v-if="form.invoiceType=='0'" :label="language == 0 ?`税号`:'Duty Paragraph'" required prop="invoiceTfn">
115 <el-input v-model="form.invoiceTfn"/> 115 <el-input v-model="form.invoiceTfn" />
116 </el-form-item> 116 </el-form-item>
117 <el-form-item :label="`邮箱`" v-if="form.invoiceForm=='1'" required> 117 <el-form-item v-if="form.invoiceForm=='1'" :label="`邮箱`" required>
118 <el-input v-if="orderType==6" v-model="form.invoiceEmail"/> 118 <el-input v-model="form.invoiceEmail" />
119 <el-input v-else v-model="form.address"/> 119 <!-- <el-input v-if="orderType==6" v-model="form.invoiceEmail"/>-->
120 <!-- <el-input v-else v-model="form.address"/>-->
120 </el-form-item> 121 </el-form-item>
121 <el-form-item label="备注" prop="remarks"> 122 <el-form-item label="备注" prop="remarks">
122 <el-input type="textarea" v-model="form.remarks"/> 123 <el-input v-model="form.remarks" type="textarea" />
123 </el-form-item> 124 </el-form-item>
124 <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'"> 125 <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'">
125 <el-form-item :label="`地址`" required prop="invoiceAddress"> 126 <el-form-item :label="`地址`" required prop="invoiceAddress">
126 <el-input v-model="form.invoiceAddress"/> 127 <el-input v-model="form.invoiceAddress" />
127 </el-form-item> 128 </el-form-item>
128 <el-form-item :label="`电话`" required prop="invoicePhone"> 129 <el-form-item :label="`电话`" required prop="invoicePhone">
129 <el-input v-model="form.invoicePhone"/> 130 <el-input v-model="form.invoicePhone" />
130 </el-form-item> 131 </el-form-item>
131 <el-form-item :label="`开户行`" required prop="invoiceBank"> 132 <el-form-item :label="`开户行`" required prop="invoiceBank">
132 <el-input v-model="form.invoiceBank"/> 133 <el-input v-model="form.invoiceBank" />
133 </el-form-item> 134 </el-form-item>
134 <el-form-item :label="`账户`" required prop="invoiceAccount"> 135 <el-form-item :label="`账户`" required prop="invoiceAccount">
135 <el-input v-model="form.invoiceAccount"/> 136 <el-input v-model="form.invoiceAccount" />
136 </el-form-item> 137 </el-form-item>
137 </div> 138 </div>
138 </el-form> 139 </el-form>
139 140
140 <div class="tip" v-if="remark"> 141 <div v-if="remark" class="tip">
141 <label>{{ language == 0 ?'开票须知':'Invoice Notice' }}:</label> 142 <label>{{ language == 0 ?'开票须知':'Invoice Notice' }}:</label>
142 <div v-html="remark"></div> 143 <div v-html="remark" />
143 </div> 144 </div>
144 </div> 145 </div>
145 </el-col> 146 </el-col>
...@@ -153,24 +154,24 @@ ...@@ -153,24 +154,24 @@
153 </el-col> 154 </el-col>
154 </el-row> 155 </el-row>
155 </el-card> 156 </el-card>
156 <div style="height: 60px;"></div> 157 <div style="height: 60px;" />
157 158
158 </div> 159 </div>
159 </div> 160 </div>
160 <address-list-dialog ref="dialogAddressListRef" @submit="getAddress"/> 161 <address-list-dialog ref="dialogAddressListRef" @submit="getAddress" />
161 <!-- 开票须知 --> 162 <!-- 开票须知 -->
162 </template> 163 </template>
163 164
164 <script setup> 165 <script setup>
165 import {useRouter, useRoute} from "vue-router"; 166 import { useRouter, useRoute } from 'vue-router'
166 import {ref, reactive, onMounted} from "vue"; 167 import { ref, reactive, onMounted } from 'vue'
167 import {useStorage} from "@vueuse/core/index"; 168 import { useStorage } from '@vueuse/core/index'
168 import AddressListDialog from "./component/addressList" 169 import AddressListDialog from './component/addressList'
169 import dayjs from 'dayjs' 170 import dayjs from 'dayjs'
170 import {ElMessage,ElMessageBox} from "element-plus"; 171 import { ElMessage, ElMessageBox } from 'element-plus'
171 import useUserStore from "@/store/modules/user"; 172 import useUserStore from '@/store/modules/user'
172 import {getCurrentInstance} from "@vue/runtime-core"; 173 import { getCurrentInstance } from '@vue/runtime-core'
173 import {submitTitckInvoice, invoice, TitckUpdateInvoice} from '@/viewsPc/seat/api/index' 174 import { submitTitckInvoice, invoice, TitckUpdateInvoice } from '@/viewsPc/seat/api/index'
174 import { 175 import {
175 addressList, 176 addressList,
176 editInvoice, 177 editInvoice,
...@@ -178,12 +179,12 @@ import { ...@@ -178,12 +179,12 @@ import {
178 submitInvoice, 179 submitInvoice,
179 getInvoiceDetailBills, 180 getInvoiceDetailBills,
180 getInvoiceDetail, 181 getInvoiceDetail,
181 submitCptInvoice, getBaseInfoByActiveId, getLeagueInvoiceDetail, getLeagueInvoiceDetailPC,getInvoiceDetailMatch 182 submitCptInvoice, getBaseInfoByActiveId, getLeagueInvoiceDetail, getLeagueInvoiceDetailPC, getInvoiceDetailMatch
182 } from "@/apiPc/booking"; 183 } from '@/apiPc/booking'
183 import {getOrderDetail} from "@/viewsPc/seat/api/index"; 184 import { getOrderDetail } from '@/viewsPc/seat/api/index'
184 185
185 186
186 const {proxy} = getCurrentInstance() 187 const { proxy } = getCurrentInstance()
187 188
188 const user = useUserStore().user 189 const user = useUserStore().user
189 const language = useStorage('language', 0) 190 const language = useStorage('language', 0)
...@@ -194,8 +195,8 @@ const form = ref({ ...@@ -194,8 +195,8 @@ const form = ref({
194 invoiceType: '0' 195 invoiceType: '0'
195 }) 196 })
196 const formDate = ref({}) 197 const formDate = ref({})
197 const orderType=ref(1) 198 const orderType = ref(1)
198 const paymentType=ref(1) 199 const paymentType = ref(1)
199 const list = ref([]) 200 const list = ref([])
200 const addrList = ref([]) 201 const addrList = ref([])
201 const nowAddress = ref({}) 202 const nowAddress = ref({})
...@@ -204,29 +205,29 @@ const kpType = ref('1') ...@@ -204,29 +205,29 @@ const kpType = ref('1')
204 const remark = ref('') 205 const remark = ref('')
205 const rules = ref({ 206 const rules = ref({
206 invoiceType: [ 207 invoiceType: [
207 {required: true, message: language.value==0?'请选择发票类型':'Please select invoice type', trigger: 'change'} 208 { required: true, message: language.value == 0 ? '请选择发票类型' : 'Please select invoice type', trigger: 'change' }
208 ], 209 ],
209 invoiceForm: [ 210 invoiceForm: [
210 {required: true, message: language.value==0?'请选择发票形式':'Please select invoice form', trigger: 'change'} 211 { required: true, message: language.value == 0 ? '请选择发票形式' : 'Please select invoice form', trigger: 'change' }
211 ], 212 ],
212 invoiceTitle: [ 213 invoiceTitle: [
213 {required: true, message: language.value==0?'请输入发票抬头':'Please enter invoice title', trigger: 'blur'} 214 { required: true, message: language.value == 0 ? '请输入发票抬头' : 'Please enter invoice title', trigger: 'blur' }
214 ], 215 ],
215 invoiceTfn: [ 216 invoiceTfn: [
216 {required: true, message: language.value==0?'请输入税号':'Please enter TFN', trigger: 'blur'} 217 { required: true, message: language.value == 0 ? '请输入税号' : 'Please enter TFN', trigger: 'blur' }
217 ], 218 ],
218 invoiceAddress: [ 219 invoiceAddress: [
219 {required: true, message: language.value==0?'请输入地址':'Please enter address', trigger: 'blur'} 220 { required: true, message: language.value == 0 ? '请输入地址' : 'Please enter address', trigger: 'blur' }
220 ], 221 ],
221 invoicePhone: [ 222 invoicePhone: [
222 {required: true, message: language.value==0?'请输入电话':'Please enter phone', trigger: 'blur'} 223 { required: true, message: language.value == 0 ? '请输入电话' : 'Please enter phone', trigger: 'blur' }
223 ], 224 ],
224 invoiceBank: [ 225 invoiceBank: [
225 {required: true, message: language.value==0?'请输入开户行':'Please enter bank', trigger: 'blur'} 226 { required: true, message: language.value == 0 ? '请输入开户行' : 'Please enter bank', trigger: 'blur' }
226 ], 227 ],
227 invoiceAccount: [ 228 invoiceAccount: [
228 {required: true, message: language.value==0?'请输入账户':'Please enter account', trigger: 'blur'} 229 { required: true, message: language.value == 0 ? '请输入账户' : 'Please enter account', trigger: 'blur' }
229 ], 230 ]
230 }) 231 })
231 const isEdit = ref(false) 232 const isEdit = ref(false)
232 let invoiceId 233 let invoiceId
...@@ -234,24 +235,24 @@ let cptId ...@@ -234,24 +235,24 @@ let cptId
234 235
235 236
236 onMounted(() => { 237 onMounted(() => {
237 orderType.value=route.query.orderType 238 orderType.value = route.query.orderType
238 paymentType.value=route.query.paymentType 239 paymentType.value = route.query.paymentType
239 if(route.query.orders){ 240 if (route.query.orders) {
240 let obj = JSON.parse(decodeURIComponent(route.query.orders)) || {} 241 const obj = JSON.parse(decodeURIComponent(route.query.orders)) || {}
241 if(obj.cptId){ 242 if (obj.cptId) {
242 cptId = obj.cptId 243 cptId = obj.cptId
243 }else if(obj.activeId){ 244 } else if (obj.activeId) {
244 cptId = obj.activeId 245 cptId = obj.activeId
245 }else{ 246 } else {
246 cptId = '1778253367748993026' 247 cptId = '1778253367748993026'
247 } 248 }
248 249
249 console.log(obj) 250 console.log(obj)
250 getRemark() 251 getRemark()
251 let arr = [] 252 const arr = []
252 list.value.push(obj) 253 list.value.push(obj)
253 for (let bill of list.value) { 254 for (const bill of list.value) {
254 if(bill?.message){ 255 if (bill?.message) {
255 bill.messageObj = JSON.parse(bill.message) 256 bill.messageObj = JSON.parse(bill.message)
256 } 257 }
257 arr.push(bill.id) 258 arr.push(bill.id)
...@@ -259,7 +260,7 @@ onMounted(() => { ...@@ -259,7 +260,7 @@ onMounted(() => {
259 form.value.orders = arr.toString() 260 form.value.orders = arr.toString()
260 console.log(list.value) 261 console.log(list.value)
261 } 262 }
262 if(route.query.activeId){ 263 if (route.query.activeId) {
263 cptId = route.query.activeId 264 cptId = route.query.activeId
264 } 265 }
265 if (route.query.totalMoney) { 266 if (route.query.totalMoney) {
...@@ -281,91 +282,90 @@ onMounted(() => { ...@@ -281,91 +282,90 @@ onMounted(() => {
281 getList() 282 getList()
282 } 283 }
283 284
284 if(user.userName.indexOf('@')>-1){ 285 if (user.userName.indexOf('@') > -1) {
285 form.value.address = user.userName 286 form.value.address = user.userName
286 } 287 }
287 route.query.orderSn&&getDataInfo() 288 route.query.orderSn && getDataInfo()
288 }) 289 })
289 290
290 async function getDataInfo(){ 291 async function getDataInfo() {
291 const res =await getOrderDetail({orderSn:route.query.orderSn}) 292 const res = await getOrderDetail({ orderSn: route.query.orderSn })
292 formDate.value=res.data 293 formDate.value = res.data
293 } 294 }
294 295
295 function getList() { 296 function getList() {
296 if(route.query.type=='5'){ 297 if (route.query.type == '5') {
297 getLeagueInvoiceDetailPC(invoiceId).then(res => { 298 getLeagueInvoiceDetailPC(invoiceId).then(res => {
298 // 订单 299 // 订单
299 list.value = res.rows 300 list.value = res.rows
300 console.log(list.value) 301 console.log(list.value)
301 cptId = res.rows[0].activeId||res.rows[0].cptId 302 cptId = res.rows[0].activeId || res.rows[0].cptId
302 getRemark() 303 getRemark()
303 for (var bill of list.value) { 304 for (var bill of list.value) {
304 if (bill.messageObj)bill.messageObj = JSON.parse(bill.message) 305 if (bill.messageObj)bill.messageObj = JSON.parse(bill.message)
305 } 306 }
306 }); 307 })
307 } else { 308 } else {
308 getInvoiceDetailBills(invoiceId).then(res => { 309 getInvoiceDetailBills(invoiceId).then(res => {
309 // 订单 310 // 订单
310 list.value = res.rows; 311 list.value = res.rows
311 cptId = res.rows[0].activeId||res.rows[0].cptId 312 cptId = res.rows[0].activeId || res.rows[0].cptId
312 getRemark() 313 getRemark()
313 for (var bill of list.value) { 314 for (var bill of list.value) {
314 bill.messageObj = JSON.parse(bill.message) 315 bill.messageObj = JSON.parse(bill.message)
315 } 316 }
316 }); 317 })
317 } 318 }
318 319
319 // 回显 320 // 回显
320 if (orderType.value==6){ 321 if (orderType.value == 6) {
321 invoice(invoiceId).then(res=>{ 322 invoice(invoiceId).then(res => {
322 // console.log(res) 323 // console.log(res)
323 form.value = res.data; 324 form.value = res.data
324 form.value.invoiceForm='1' 325 form.value.invoiceForm = '1'
325 totalMoney.value = form.value.total 326 totalMoney.value = form.value.total
326 }) 327 })
327 }else if(orderType.value==5){ 328 } else if (orderType.value == 5) {
328 getInvoiceDetailMatch(invoiceId).then(res => { 329 getInvoiceDetailMatch(invoiceId).then(res => {
329 form.value = res.data; 330 form.value = res.data
330 totalMoney.value = form.value.total 331 totalMoney.value = form.value.total
331 // if (form.value.invoiceForm == '1') { 332 // if (form.value.invoiceForm == '1') {
332 // email.value = form.value.address 333 // email.value = form.value.address
333 // } 334 // }
334 // getAddrList() 335 // getAddrList()
335 }); 336 })
336 }else{ 337 } else {
337 getInvoiceDetail(invoiceId).then(res => { 338 getInvoiceDetail(invoiceId).then(res => {
338 form.value = res.data; 339 form.value = res.data
339 totalMoney.value = form.value.total 340 totalMoney.value = form.value.total
340 // if (form.value.invoiceForm == '1') { 341 // if (form.value.invoiceForm == '1') {
341 // email.value = form.value.address 342 // email.value = form.value.address
342 // } 343 // }
343 // getAddrList() 344 // getAddrList()
344 }); 345 })
345 } 346 }
346
347 } 347 }
348 348
349 function goEditAddress(id) { 349 function goEditAddress(id) {
350 var obj = { 350 var obj = {
351 title: language.value==0?'地址列表':'Address list', 351 title: language.value == 0 ? '地址列表' : 'Address list',
352 show: true, 352 show: true,
353 id: id 353 id: id
354 } 354 }
355 proxy.$refs['dialogAddressListRef'].open(obj) 355 proxy.$refs['dialogAddressListRef'].open(obj)
356 } 356 }
357 function getRemark() { 357 function getRemark() {
358 getBaseInfoByActiveId(cptId).then(res=>{ 358 getBaseInfoByActiveId(cptId).then(res => {
359 if(res.data){ 359 if (res.data) {
360 // remark.value = res.data.remarks 360 // remark.value = res.data.remarks
361 remark.value = res.data.remarks.replace(/\n/g, '<br>') 361 remark.value = res.data.remarks.replace(/\n/g, '<br>')
362 } 362 }
363 }) 363 })
364 } 364 }
365 function getAddrList() { 365 function getAddrList() {
366 addressList(user.userId).then(res=>{ 366 addressList(user.userId).then(res => {
367 addrList.value = res.rows 367 addrList.value = res.rows
368 if(addrList.value.length>0){ 368 if (addrList.value.length > 0) {
369 nowAddress.value = addrList.value[0] 369 nowAddress.value = addrList.value[0]
370 } 370 }
371 }) 371 })
...@@ -375,16 +375,16 @@ function getAddress(obj) { ...@@ -375,16 +375,16 @@ function getAddress(obj) {
375 nowAddress.value = obj 375 nowAddress.value = obj
376 } 376 }
377 function submit() { 377 function submit() {
378 if(orderType.value==6 && !form.value.invoiceEmail){ 378 if (orderType.value == 6 && !form.value.invoiceEmail) {
379 ElMessage.warning(language.value == 0 ?'请输入邮箱':'Please enter email') 379 ElMessage.warning(language.value == 0 ? '请输入邮箱' : 'Please enter email')
380 return 380 return
381 } 381 }
382 if(orderType.value!=6 && !form.value.address){ 382 if (orderType.value != 6 && !form.value.address) {
383 ElMessage.warning(language.value == 0 ?'请输入邮箱':'Please enter email') 383 ElMessage.warning(language.value == 0 ? '请输入邮箱' : 'Please enter email')
384 return 384 return
385 } 385 }
386 proxy.$refs['formRef'].validate((valid) => { 386 proxy.$refs['formRef'].validate((valid) => {
387 if(valid){ 387 if (valid) {
388 // 提交确认 388 // 提交确认
389 ElMessageBox.confirm(language.value == 0 ? '确认提交吗?' : 'Confirm to submit ?', { 389 ElMessageBox.confirm(language.value == 0 ? '确认提交吗?' : 'Confirm to submit ?', {
390 confirmButtonText: language.value == 0 ? '确定' : 'Confirm', 390 confirmButtonText: language.value == 0 ? '确定' : 'Confirm',
...@@ -394,8 +394,8 @@ function submit() { ...@@ -394,8 +394,8 @@ function submit() {
394 form.value.activeId = cptId 394 form.value.activeId = cptId
395 form.value.total = totalMoney.value 395 form.value.total = totalMoney.value
396 form.value.version = 2 396 form.value.version = 2
397 form.value.invoicePhone=paymentType.value 397 form.value.invoicePhone = paymentType.value
398 if (orderType.value==6) form.value.orders=route.query.orderSn 398 if (orderType.value == 6) form.value.orders = route.query.orderSn
399 if (isEdit.value) { 399 if (isEdit.value) {
400 update() 400 update()
401 } else { 401 } else {
...@@ -407,42 +407,39 @@ function submit() { ...@@ -407,42 +407,39 @@ function submit() {
407 } 407 }
408 408
409 function update() { 409 function update() {
410 if (orderType.value==6){ 410 if (orderType.value == 6) {
411 TitckUpdateInvoice(form.value).then(res=>{ 411 TitckUpdateInvoice(form.value).then(res => {
412 //返回列表 412 // 返回列表
413 backList() 413 backList()
414 }) 414 })
415 }else if(orderType.value==5){ 415 } else if (orderType.value == 5) {
416 editInvoiceMatch(form.value).then(res=>{ 416 editInvoiceMatch(form.value).then(res => {
417 //返回列表 417 // 返回列表
418 backList() 418 backList()
419 }) 419 })
420 }else{ 420 } else {
421 editInvoice(form.value).then(res=>{ 421 editInvoice(form.value).then(res => {
422 //返回列表 422 // 返回列表
423 backList() 423 backList()
424 }) 424 })
425 } 425 }
426
427 } 426 }
428 function add() { 427 function add() {
429 if(orderType.value==6){ 428 if (orderType.value == 6) {
430 submitTitckInvoice(form.value).then((res)=>{ 429 submitTitckInvoice(form.value).then((res) => {
431 backList() 430 backList()
432 }) 431 })
433 }else if(list.value[0].orderType||list.value[0].orderType==0){ 432 } else if (list.value[0].orderType || list.value[0].orderType == 0) {
434 submitInvoice(form.value).then(res=>{ 433 submitInvoice(form.value).then(res => {
435 //返回列表 434 // 返回列表
436 backList() 435 backList()
437 }) 436 })
438 } else { 437 } else {
439 submitCptInvoice(form.value).then(res=>{ 438 submitCptInvoice(form.value).then(res => {
440 //返回列表 439 // 返回列表
441 backList() 440 backList()
442 }) 441 })
443 } 442 }
444
445
446 } 443 }
447 function backList() { 444 function backList() {
448 router.push({ 445 router.push({
......
1 <template> 1 <template>
2 <div> 2 <div>
3 <div class="box"> 3 <div class="box">
4 <el-card class="mt30" v-loading="loading"> 4 <el-card v-loading="loading" class="mt30">
5 <el-row v-if="form" class="hotel" align="middle" :gutter="20"> 5 <el-row v-if="form" class="hotel" align="middle" :gutter="20">
6 <!-- <el-col :span="6">--> 6 <!-- <el-col :span="6">-->
7 <!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>--> 7 <!-- <img class="w100" :src="fillImgUrl(form.photos?.split(',')[0])"/>-->
...@@ -19,43 +19,45 @@ ...@@ -19,43 +19,45 @@
19 </div> 19 </div>
20 <div class="info"> 20 <div class="info">
21 <el-icon> 21 <el-icon>
22 <Clock/> 22 <Clock />
23 </el-icon> 23 </el-icon>
24 <span class="mr10">{{ language == 0 ? '入住时间' : 'Check-in' }}{{ form?.checkInTime }}</span> 24 <span class="mr10">{{ language == 0 ? '入住时间' : 'Check-in' }}{{ form?.checkInTime }}</span>
25 <span>{{ language == 0 ? '离店时间' : 'Check-out' }}{{ form?.checkOutTime }}</span> 25 <span>{{ language == 0 ? '离店时间' : 'Check-out' }}{{ form?.checkOutTime }}</span>
26 </div> 26 </div>
27 <div class="info esp"> 27 <div class="info esp">
28 <el-icon> 28 <el-icon>
29 <MapLocation/> 29 <MapLocation />
30 </el-icon> 30 </el-icon>
31 <span>{{ form?.addName }}</span> 31 <span>{{ form?.addName }}</span>
32 </div> 32 </div>
33 <div v-if="form?.introduction" class="info pointer"> 33 <div v-if="form?.introduction" class="info pointer">
34 <div :class="showAll?'':'esp_2'" @click="showAll=!showAll" v-html="form.introduction.toString()"></div> 34 <div :class="showAll?'':'esp_2'" @click="showAll=!showAll" v-html="form.introduction.toString()" />
35 </div> 35 </div>
36 </el-col> 36 </el-col>
37 <el-col :span="8" class="text-right" v-if="language == 0"> 37 <el-col v-if="language == 0" :span="8" class="text-right">
38 <div class="mapBox" @click="goMap"> 38 <div class="mapBox" @click="goMap">
39 <div id="map"></div> 39 <div id="map" />
40 </div> 40 </div>
41 </el-col> 41 </el-col>
42 </el-row> 42 </el-row>
43 <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description=""/> 43 <el-empty v-else :image="`/img/order_no.png`" :image-size="228" description="" />
44 </el-card> 44 </el-card>
45 45
46 <div class="mt30"> 46 <div class="mt30">
47 <el-row :gutter="20"> 47 <el-row :gutter="20">
48 <el-col :span="10"> 48 <el-col :span="10">
49 <div class="imgbox hotelImg"> 49 <div class="imgbox hotelImg">
50 <el-image :src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover" 50 <el-image
51 :preview-src-list="form?.photos?.split(',')"/> 51 :src="fillImgUrl(form?.photos?.split(',')[0])" fit="cover"
52 :preview-src-list="form?.photos?.split(',')"
53 />
52 </div> 54 </div>
53 </el-col> 55 </el-col>
54 <el-col :span="14"> 56 <el-col :span="14">
55 <el-row class="h100" :gutter="20"> 57 <el-row class="h100" :gutter="20">
56 <el-col :span="8" class="oddmb" v-for="(p,index) in form?.photos?.split(',').slice(1,7)"> 58 <el-col v-for="(p,index) in form?.photos?.split(',').slice(1,7)" :span="8" class="oddmb">
57 <div class="imgbox hotelImg"> 59 <div class="imgbox hotelImg">
58 <el-image :src="fillImgUrl(p)" fit="cover"/> 60 <el-image :src="fillImgUrl(p)" fit="cover" />
59 </div> 61 </div>
60 </el-col> 62 </el-col>
61 </el-row> 63 </el-row>
...@@ -70,7 +72,6 @@ ...@@ -70,7 +72,6 @@
70 {{ language == 0 ? '房型选择' : 'Available Rooms' }} 72 {{ language == 0 ? '房型选择' : 'Available Rooms' }}
71 <span style="margin-left: 100px" @click="initTime"> 73 <span style="margin-left: 100px" @click="initTime">
72 <el-date-picker 74 <el-date-picker
73 @change="getDaysBetween"
74 v-model="hotTime" 75 v-model="hotTime"
75 type="daterange" 76 type="daterange"
76 :disabled-date="disabledDateRZ" 77 :disabled-date="disabledDateRZ"
...@@ -78,14 +79,17 @@ ...@@ -78,14 +79,17 @@
78 format="YYYY-MM-DD" 79 format="YYYY-MM-DD"
79 :clearable="false" 80 :clearable="false"
80 value-format="YYYY-MM-DD" 81 value-format="YYYY-MM-DD"
82 @change="getDaysBetween"
81 /> 83 />
82 </span> 84 </span>
83 </li> 85 </li>
84 </ul> 86 </ul>
85 </div> 87 </div>
86 <div> 88 <div>
87 <div v-for="(r,index) in roomList" :key="index" class="room" 89 <div
88 v-show="language==0?r.roomPrice>0:r.roomPriceEn>0"> 90 v-for="(r,index) in roomList" v-show="language==0?r.roomPrice>0:r.roomPriceEn>0" :key="index"
91 class="room"
92 >
89 <el-row :gutter="30" align="middle"> 93 <el-row :gutter="30" align="middle">
90 <el-col :span="4"> 94 <el-col :span="4">
91 <div class="roomImg"> 95 <div class="roomImg">
...@@ -96,18 +100,18 @@ ...@@ -96,18 +100,18 @@
96 <h3 class="name">{{ r.roomType }}</h3> 100 <h3 class="name">{{ r.roomType }}</h3>
97 <el-row :gutter="10"> 101 <el-row :gutter="10">
98 <el-col :span="8">{{ r.area }}</el-col> 102 <el-col :span="8">{{ r.area }}</el-col>
99 <el-col :span="8" v-show="r.windowFlag==1"> {{ language == 0 ? '有窗' : 'With windows' }}</el-col> 103 <el-col v-show="r.windowFlag==1" :span="8"> {{ language == 0 ? '有窗' : 'With windows' }}</el-col>
100 <el-col :span="8" v-show="r.windowFlag==0"> {{ language == 0 ? '无窗' : 'Windowless' }}</el-col> 104 <el-col v-show="r.windowFlag==0" :span="8"> {{ language == 0 ? '无窗' : 'Windowless' }}</el-col>
101 <el-col :span="8" v-show="r.bathroomFlag==1"> {{ language == 0 ? '热水洗浴' : 'Shower' }}</el-col> 105 <el-col v-show="r.bathroomFlag==1" :span="8"> {{ language == 0 ? '热水洗浴' : 'Shower' }}</el-col>
102 <!-- <text v-show="r.bathroomFlag==0"> </text> --> 106 <!-- <text v-show="r.bathroomFlag==0"> </text> -->
103 <el-col :span="8" v-show="r.addBedFlag==1"> {{ language == 0 ? '允许加床' : 'Extra bed' }}</el-col> 107 <el-col v-show="r.addBedFlag==1" :span="8"> {{ language == 0 ? '允许加床' : 'Extra bed' }}</el-col>
104 <el-col :span="8" v-if="r.breakfastNum&&r.breakfastNum > '0'"> 108 <el-col v-if="r.breakfastNum&&r.breakfastNum > '0'" :span="8">
105 {{ r.breakfastNum }}{{ language == 0 ? '份早餐' : ' breakfasts' }} 109 {{ r.breakfastNum }}{{ language == 0 ? '份早餐' : ' breakfasts' }}
106 </el-col> 110 </el-col>
107 <el-col :span="8" v-else>{{ language == 0 ? '无早餐' : 'No breakfast' }}</el-col> 111 <el-col v-else :span="8">{{ language == 0 ? '无早餐' : 'No breakfast' }}</el-col>
108 </el-row> 112 </el-row>
109 <div class="tagbox esp"> 113 <div class="tagbox esp">
110 <span v-for="(t,index) in r.label?.split(',')" v-show="index<4">{{t}}</span> 114 <span v-for="(t,index) in r.label?.split(',')" v-show="index<4">{{ t }}</span>
111 <a v-show="r.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a> 115 <a v-show="r.label?.split(',').length>4">{{ language==0?'更多':'MORE' }} ></a>
112 </div> 116 </div>
113 </el-col> 117 </el-col>
...@@ -117,24 +121,28 @@ ...@@ -117,24 +121,28 @@
117 }}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div> 121 }}<span>{{ language == 0 ? r.roomPrice : r.roomPriceEn }}</span></div>
118 </el-col> 122 </el-col>
119 <el-col :span="3"> 123 <el-col :span="3">
120 <!-- :disabled="!r.useCount && !hotTime"--> 124 <!-- :disabled="!r.useCount && !hotTime"-->
121 <el-button v-if="language==0" :class="{'forbid':!(!hotTime[0] || r.useCount>0)}" 125 <el-button
122 @click="goOrder(r)" class="bg-lineg button"> 126 v-if="language==0" :class="{'forbid':!(!hotTime[0] || r.useCount>0)}"
127 class="bg-lineg button" @click="goOrder(r)"
128 >
123 129
124 <div>{{ language == 0 ? '在线付' : 'Online' }}</div> 130 <div>{{ language == 0 ? '在线付' : 'Online' }}</div>
125 </el-button> 131 </el-button>
126 <el-button v-else style="color: #fff" :disabled="!r.useCount && !hotTime" 132 <el-button
133 v-else style="color: #fff" :disabled="!r.useCount && !hotTime"
127 :class="{'forbid':!(!hotTime[0] || r.useCount>0)}" 134 :class="{'forbid':!(!hotTime[0] || r.useCount>0)}"
128 class="btn-lineG w100" round 135 class="btn-lineG w100" round
129 type="primary" @click="goOrder(r)"> 136 type="primary" @click="goOrder(r)"
137 >
130 Select 138 Select
131 </el-button> 139 </el-button>
132 <div v-if="r.useCount>0"> 140 <div v-if="r.useCount>0">
133 <div class="text-center text-primary mt10 fontsize14 pointer" v-if="language == 0"> 141 <div v-if="language == 0" class="text-center text-primary mt10 fontsize14 pointer">
134 剩余 {{r.useCount}} 142 剩余 {{ r.useCount }}
135 </div> 143 </div>
136 <div class="text-center text-primary mt10 fontsize14" v-else> 144 <div v-else class="text-center text-primary mt10 fontsize14">
137 {{r.useCount}} Remaining rooms 145 {{ r.useCount }} Remaining rooms
138 </div> 146 </div>
139 </div> 147 </div>
140 148
...@@ -142,7 +150,7 @@ ...@@ -142,7 +150,7 @@
142 </el-row> 150 </el-row>
143 </div> 151 </div>
144 152
145 <el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description=""/> 153 <el-empty v-if="roomList.length == 0" :image="`/img/order_no.png`" :image-size="228" description="" />
146 </div> 154 </div>
147 </el-card> 155 </el-card>
148 </div> 156 </div>
...@@ -150,18 +158,18 @@ ...@@ -150,18 +158,18 @@
150 </template> 158 </template>
151 159
152 <script setup> 160 <script setup>
153 import {useRouter} from "vue-router"; 161 import { useRouter } from 'vue-router'
154 import {ref, reactive, onMounted, getCurrentInstance} from "vue"; 162 import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
155 import {useRoute} from "vue-router"; 163 import { useRoute } from 'vue-router'
156 import {dayjs} from 'element-plus' 164 import { dayjs } from 'element-plus'
157 import {getHotelById, getHotelRooms, checkRoomPayByUserId} from "@/apiPc/booking" 165 import { getHotelById, getHotelRooms, checkRoomPayByUserId } from '@/apiPc/booking'
158 import {getBaseInfoByActiveId} from "@/apiPc/booking"; 166 import { getBaseInfoByActiveId } from '@/apiPc/booking'
159 167
160 const {proxy} = getCurrentInstance() 168 const { proxy } = getCurrentInstance()
161 169
162 import {useStorage} from "@vueuse/core/index"; 170 import { useStorage } from '@vueuse/core/index'
163 import useUserStore from "@/store/modules/user"; 171 import useUserStore from '@/store/modules/user'
164 import {ElMessageBox} from "element-plus"; 172 import { ElMessageBox } from 'element-plus'
165 173
166 const user = useUserStore().user 174 const user = useUserStore().user
167 const useStore = useUserStore 175 const useStore = useUserStore
...@@ -179,7 +187,7 @@ const roomList = ref([]) ...@@ -179,7 +187,7 @@ const roomList = ref([])
179 const map = ref(null) 187 const map = ref(null)
180 const formTime = ref({}) 188 const formTime = ref({})
181 189
182 let baseHotTime; 190 let baseHotTime
183 191
184 onMounted(() => { 192 onMounted(() => {
185 console.log(route.params) 193 console.log(route.params)
...@@ -194,7 +202,6 @@ onMounted(() => { ...@@ -194,7 +202,6 @@ onMounted(() => {
194 202
195 getData() 203 getData()
196 }) 204 })
197
198 }) 205 })
199 206
200 function initTime() { 207 function initTime() {
...@@ -229,7 +236,7 @@ function getData() { ...@@ -229,7 +236,7 @@ function getData() {
229 }) 236 })
230 getRoomList() 237 getRoomList()
231 } 238 }
232 function getRoomList(){ 239 function getRoomList() {
233 query.value.hotelId = route.query.id 240 query.value.hotelId = route.query.id
234 query.value.rzStart = hotTime.value ? hotTime.value[0] : null 241 query.value.rzStart = hotTime.value ? hotTime.value[0] : null
235 query.value.rzEnd = hotTime.value ? hotTime.value[1] : null 242 query.value.rzEnd = hotTime.value ? hotTime.value[1] : null
...@@ -240,59 +247,59 @@ function getRoomList(){ ...@@ -240,59 +247,59 @@ function getRoomList(){
240 } 247 }
241 function initMap() { 248 function initMap() {
242 // const TMap = (window as any).TMap 249 // const TMap = (window as any).TMap
243 var center = new TMap.LatLng(form.value.latitude, form.value.longitude);//设置中心点坐标' 250 var center = new TMap.LatLng(form.value.latitude, form.value.longitude)// 设置中心点坐标'
244 var map = new TMap.Map("map", { 251 var map = new TMap.Map('map', {
245 center: center,//设置地图中心点坐标 252 center: center, // 设置地图中心点坐标
246 zoom: 17, //设置地图缩放级别 253 zoom: 17 // 设置地图缩放级别
247 }); 254 })
248 var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude);//创建一个坐标 255 var infoWindowLocation = new TMap.LatLng(form.value.latitude, form.value.longitude)// 创建一个坐标
249 //创建InfoWindow实例,并进行初始化 256 // 创建InfoWindow实例,并进行初始化
250 var infowindow = new TMap.InfoWindow({ 257 var infowindow = new TMap.InfoWindow({
251 content: form.value.address, //信息窗口内容 258 content: form.value.address, // 信息窗口内容
252 position: infoWindowLocation,//显示信息窗口的坐标 259 position: infoWindowLocation, // 显示信息窗口的坐标
253 map: map, 260 map: map,
254 offset: {x: 0, y: -32} 261 offset: { x: 0, y: -32 }
255 }); 262 })
256 infowindow.close(); 263 infowindow.close()
257 var marker = new TMap.MultiMarker({ 264 var marker = new TMap.MultiMarker({
258 map: map, 265 map: map,
259 //样式定义 266 // 样式定义
260 styles: { 267 styles: {
261 "myStyle": new TMap.MarkerStyle({ 268 'myStyle': new TMap.MarkerStyle({
262 "anchor": {x: 16, y: 32} 269 'anchor': { x: 16, y: 32 }
263 }) 270 })
264 }, 271 },
265 //点标记数据数组 272 // 点标记数据数组
266 geometries: [{ 273 geometries: [{
267 "id": "1", //点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id 274 'id': '1', // 点标记唯一标识,后续如果有删除、修改位置等操作,都需要此id
268 // "styleId": 'myStyle', //指定样式id 275 // "styleId": 'myStyle', //指定样式id
269 "position": new TMap.LatLng(form.value.latitude, form.value.longitude), //点标记坐标位置 276 'position': new TMap.LatLng(form.value.latitude, form.value.longitude), // 点标记坐标位置
270 "properties": {//自定义属性 277 'properties': { // 自定义属性
271 "title": form.value.name 278 'title': form.value.name
272 } 279 }
273 } 280 }
274 ] 281 ]
275 }) 282 })
276 marker.on("click", function (evt) { 283 marker.on('click', function(evt) {
277 //设置infoWindow 284 // 设置infoWindow
278 infowindow.open(); //打开信息窗 285 infowindow.open() // 打开信息窗
279 infowindow.setPosition(evt.geometry.position);//设置信息窗位置 286 infowindow.setPosition(evt.geometry.position)// 设置信息窗位置
280 }) 287 })
281 } 288 }
282 289
283 function goOrder(room) { 290 function goOrder(room) {
284 if(!hotTime.value[0]){ 291 if (!hotTime.value[0]) {
285 proxy.$modal.msgError(language.value == 0 ?'请先选择入住日期':'Please choose the date of check-in first') 292 proxy.$modal.msgError(language.value == 0 ? '请先选择入住日期' : 'Please choose the date of check-in first')
286 return 293 return
287 } 294 }
288 if(room.useCount<=0){ 295 if (room.useCount <= 0) {
289 ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期` : 296 ElMessageBox.confirm(language.value == 0 ? `您当前选择的日期是${hotTime.value[0]}${hotTime.value[1]},该时间段暂无可预订房间,请选择其他日期`
290 `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, {type: 'warning'}).then({ 297 : `You currently select the check-in date of ${hotTime.value[0]} to ${hotTime.value[1]}, there is no room available for booking at this time period, please choose another date`, { type: 'warning' }).then({
291 298
292 }) 299 })
293 return 300 return
294 } 301 }
295 ElMessageBox.confirm(language.value == 0 ? '你当前选择的入住时间为' + hotTime.value[0] + '至' + hotTime.value[1] + ',是否确定?' : 'Your current check-in time is' + hotTime.value[0] + '~' + hotTime.value[1] + 'Are you sure?', {type: 'warning'}).then({}).then(() => { 302 ElMessageBox.confirm(language.value == 0 ? '你当前选择的入住时间为' + hotTime.value[0] + '至' + hotTime.value[1] + ',是否确定?' : 'Your current check-in time is' + hotTime.value[0] + '~' + hotTime.value[1] + 'Are you sure?', { type: 'warning' }).then({}).then(() => {
296 checkRoomPayByUserId(room.hotelId).then(res => { 303 checkRoomPayByUserId(room.hotelId).then(res => {
297 if (res.data == -100) { 304 if (res.data == -100) {
298 ElMessageBox.confirm( 305 ElMessageBox.confirm(
...@@ -301,12 +308,12 @@ function goOrder(room) { ...@@ -301,12 +308,12 @@ function goOrder(room) {
301 { 308 {
302 confirmButtonText: language.value == 1 ? 'Go My Reservation ' : '前往我的预订', 309 confirmButtonText: language.value == 1 ? 'Go My Reservation ' : '前往我的预订',
303 // cancelButtonText: language.value==1?'Continue to book':'继续预订', 310 // cancelButtonText: language.value==1?'Continue to book':'继续预订',
304 type: 'warning', 311 type: 'warning'
305 } 312 }
306 ).then((res) => { 313 ).then((res) => {
307 console.log(res) 314 console.log(res)
308 router.push({ 315 router.push({
309 name: 'myReservation', 316 name: 'myReservation'
310 }) 317 })
311 }) 318 })
312 // .catch((res) => { 319 // .catch((res) => {
...@@ -318,8 +325,6 @@ function goOrder(room) { ...@@ -318,8 +325,6 @@ function goOrder(room) {
318 goNext(room) 325 goNext(room)
319 }) 326 })
320 }) 327 })
321
322
323 } 328 }
324 329
325 function goNext(room) { 330 function goNext(room) {
...@@ -333,7 +338,7 @@ function goNext(room) { ...@@ -333,7 +338,7 @@ function goNext(room) {
333 hotelName: form.value.name, 338 hotelName: form.value.name,
334 checkInTime: form.value.checkInTime, 339 checkInTime: form.value.checkInTime,
335 start: hotTime.value[0], 340 start: hotTime.value[0],
336 end: hotTime.value[1], 341 end: hotTime.value[1]
337 } 342 }
338 }) 343 })
339 } 344 }
...@@ -352,7 +357,7 @@ function getDaysBetween() { ...@@ -352,7 +357,7 @@ function getDaysBetween() {
352 } 357 }
353 358
354 function disabledDateRZ(date) { 359 function disabledDateRZ(date) {
355 //判读今天大与form.value.hqStart 360 // 判读今天大与form.value.hqStart
356 if (formTime.value.hqStart) { 361 if (formTime.value.hqStart) {
357 const today = dayjs().format('YYYY-MM-DD') 362 const today = dayjs().format('YYYY-MM-DD')
358 if (formTime.value.hqStart < today) { 363 if (formTime.value.hqStart < today) {
...@@ -369,8 +374,8 @@ function goMap() { ...@@ -369,8 +374,8 @@ function goMap() {
369 // var tencentMapUrl = "https://map.qq.com/"; 374 // var tencentMapUrl = "https://map.qq.com/";
370 // window.location.href = tencentMapUrl; 375 // window.location.href = tencentMapUrl;
371 var url = `https://map.qq.com/?type=gcj02&lat=${form.value.latitude}&lng=${form.value.longitude}` 376 var url = `https://map.qq.com/?type=gcj02&lat=${form.value.latitude}&lng=${form.value.longitude}`
372 var mapUrl_tx = "http://apis.map.qq.com/uri/v1/marker?marker=coord:" + form.value.latitude + "," + form.value.longitude + "&referer=yellowpage"; 377 var mapUrl_tx = 'http://apis.map.qq.com/uri/v1/marker?marker=coord:' + form.value.latitude + ',' + form.value.longitude + '&referer=yellowpage'
373 window.open(url, "_blank") 378 window.open(url, '_blank')
374 } 379 }
375 380
376 </script> 381 </script>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!