Merge commit '844ad69a' into dev
# Conflicts: # src/viewsPc/center/myCanKP.vue
Showing
1 changed file
with
617 additions
and
0 deletions
src/viewsPc/center/myCanKP.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <el-card :body-style="{'padding':'10px 0 0'}" class="mb60"> | ||
| 4 | <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick"> | ||
| 5 | <el-tab-pane :label="language==0?'赛事报名':'REGISTRATION'" name="5"></el-tab-pane> | ||
| 6 | <el-tab-pane :label="language==0?'酒店订单':'HOTEL'" name="0"></el-tab-pane> | ||
| 7 | <el-tab-pane :label="language==0?'票务订单':'Ticket'" name="6"></el-tab-pane> | ||
| 8 | <el-tab-pane :label="language==0?'化妆订单':'MakeUp'" name="3"></el-tab-pane> | ||
| 9 | <el-tab-pane :label="language==0?'车辆订单':'TRANSPORTATION'" name="1"></el-tab-pane> | ||
| 10 | <el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2"></el-tab-pane> | ||
| 11 | <el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4"></el-tab-pane> | ||
| 12 | </el-tabs> | ||
| 13 | <div> | ||
| 14 | <el-form label-width="90" size="small"> | ||
| 15 | <el-form-item label="开票状态"> | ||
| 16 | <el-select | ||
| 17 | v-model="query.invoiced" | ||
| 18 | clearable | ||
| 19 | placeholder="选择发票状态" | ||
| 20 | style="width: 200px" | ||
| 21 | @change="getList" | ||
| 22 | > | ||
| 23 | <el-option label="全部" value="0"/> | ||
| 24 | <el-option label="未申请" value="1"/> | ||
| 25 | <el-option label="申请中" value="2"/> | ||
| 26 | <el-option label="已开票" value="3"/> | ||
| 27 | </el-select> | ||
| 28 | </el-form-item> | ||
| 29 | </el-form> | ||
| 30 | <div v-show="list&&list.length>0" style="padding-left: 28px;color: red;font-size: 15px"> | ||
| 31 | 温馨提示:发票申请成功后,将以电子发票的形式发送至您邮箱,请注意查收! | ||
| 32 | </div> | ||
| 33 | </div> | ||
| 34 | <el-empty v-if="list?.length == 0" :image="`/img/order_no.png`" :image-size="228"/> | ||
| 35 | <div v-if="activeName=='6'" class="pd20"> | ||
| 36 | <div v-for="b in list" v-loading="loading" class="item"> | ||
| 37 | <div class="title"> | ||
| 38 | <label class="orangeTag"> {{ language == 0 ? '票务' : 'Ticket' }} </label> | ||
| 39 | <span>{{ b.id }}</span> | ||
| 40 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> | ||
| 41 | </div> | ||
| 42 | |||
| 43 | <el-row align="middle" class="pd20 mt10" justify="space-between"> | ||
| 44 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | ||
| 45 | <h3 class="m0">{{ b.name }}</h3> | ||
| 46 | <p> {{ language == 0 ? "时间" : "Event Date & Time" }}:{{ | ||
| 47 | b.messageObj.ticketDate.name | ||
| 48 | }}</p> | ||
| 49 | <p class="common"> | ||
| 50 | {{ language == 0 ? "张数" : "Location" }}:{{ b.messageObj.num }}{{ language == 0 ? "张" : "tickets" }} | ||
| 51 | </p> | ||
| 52 | </el-col> | ||
| 53 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | ||
| 54 | <span class="text-warning"> {{ b.paymentType == '3' ? '€' : '¥' }} | ||
| 55 | <span class="bigMoney">{{ b.totalStr }}</span> | ||
| 56 | </span> | ||
| 57 | </el-col> | ||
| 58 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | ||
| 59 | <div class="text-right"> | ||
| 60 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> | ||
| 61 | {{ language == 0 ? '申请开票' : 'Invoice' }} | ||
| 62 | </el-button> | ||
| 63 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | ||
| 64 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | ||
| 65 | </el-button> | ||
| 66 | <el-button v-if="b.invoiceId" plain round type="primary" | ||
| 67 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 68 | </el-button> | ||
| 69 | </div> | ||
| 70 | </el-col> | ||
| 71 | </el-row> | ||
| 72 | </div> | ||
| 73 | </div> | ||
| 74 | <div v-else-if="activeName=='5'" class="pd20"> | ||
| 75 | <div v-for="b in list" v-loading="loading" class="item"> | ||
| 76 | <div class="title"> | ||
| 77 | <label class="bg-lineg"> {{ language == 0 ? '大赛报名' : 'REGISTRATION' }} </label> | ||
| 78 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> | ||
| 79 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> | ||
| 80 | </div> | ||
| 81 | <el-row align="middle" class="pd20" justify="space-between"> | ||
| 82 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | ||
| 83 | <div> | ||
| 84 | <h4 class="m0">{{ b.cptName }}</h4> | ||
| 85 | <p v-if="b.groupName">{{ language == 0 ? '团队名称' : 'Team name' }}:{{ b.groupName }}</p> | ||
| 86 | <p v-if="b.payTime">{{ language == 0 ? '支付时间' : 'Pay time' }}:{{ b.payTime }}</p> | ||
| 87 | </div> | ||
| 88 | </el-col> | ||
| 89 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | ||
| 90 | <span class="text-warning"> {{ b.payType != '2' || !b.totalPayAmount ? '¥' : '€' }} | ||
| 91 | <span class="bigMoney">{{ b.totalPayAmount || b.totalAmount }}</span> | ||
| 92 | </span> | ||
| 93 | </el-col> | ||
| 94 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | ||
| 95 | <div class="text-right"> | ||
| 96 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" :disabled="!b.totalPayAmount||b.totalAmount==0" plain | ||
| 97 | round type="primary" | ||
| 98 | @click.stop="gokp(b)"> | ||
| 99 | {{ language == 0 ? '申请开票' : 'Invoice' }} | ||
| 100 | </el-button> | ||
| 101 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | ||
| 102 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | ||
| 103 | </el-button> | ||
| 104 | <el-button v-if="b.invoiceId" plain round type="primary" | ||
| 105 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 106 | </el-button> | ||
| 107 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.languageSource!='100'" plain round @click.stop="goSj(b)">--> | ||
| 108 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | ||
| 109 | <!-- </el-button>--> | ||
| 110 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.languageSource!='100'"--> | ||
| 111 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> | ||
| 112 | <!-- </el-button>--> | ||
| 113 | </div> | ||
| 114 | </el-col> | ||
| 115 | </el-row> | ||
| 116 | </div> | ||
| 117 | </div> | ||
| 118 | <div v-else class="pd20"> | ||
| 119 | <div v-for="b in list" v-loading="loading" class="item"> | ||
| 120 | <div class="title"> | ||
| 121 | <label v-if="b.orderType == 0" class="blueTag"> {{ language == 0 ? '酒店' : 'HOTEL' }} </label> | ||
| 122 | <label v-if="b.orderType == 1" class="purpleTag"> {{ language == 0 ? '车辆' : 'TRANSPORTATION' }} </label> | ||
| 123 | <label v-if="b.orderType == 2" class="orangeTag"> {{ language == 0 ? '餐饮' : 'DINING' }} </label> | ||
| 124 | <label v-if="b.orderType == 3" class="orangeTag"> {{ language == 0 ? '化妆' : 'MakeUp' }} </label> | ||
| 125 | <label v-if="b.orderType == 4" class="orangeTag"> {{ language == 0 ? '拍摄' : 'Shooting ' }} </label> | ||
| 126 | <span>{{ language == 0 ? '订单编号:' : 'No.' }} {{ b.id }}</span> | ||
| 127 | <span class="fr text-warning status">{{ b.invoiceStr }}</span> | ||
| 128 | </div> | ||
| 129 | |||
| 130 | <el-row align="middle" class="pd20 mt10" justify="space-between"> | ||
| 131 | <el-col :lg="9" :md="12" :sm="12" :xs="24"> | ||
| 132 | <div v-if="b.orderType == 0"> | ||
| 133 | <h3 class="m0">{{ b.name }}</h3> | ||
| 134 | <p>{{ b.messageObj.roomName }}</p> | ||
| 135 | <p>{{ b.messageObj.roomInfo }}</p> | ||
| 136 | <p>{{ b.messageObj.roomType }}</p> | ||
| 137 | <p>{{ b.messageObj.roomStayDate }}</p> | ||
| 138 | </div> | ||
| 139 | <div v-if="b.orderType == 1"> | ||
| 140 | <h3 class="m0">{{ b.name }}</h3> | ||
| 141 | <div v-for="(car,index) in b.messageObj.carsList" :key="index"> | ||
| 142 | <p v-if="car.num>0">{{ car.name }}:{{ car.num }} 辆</p> | ||
| 143 | </div> | ||
| 144 | </div> | ||
| 145 | <div v-if="b.orderType == 2"> | ||
| 146 | <h3 class="m0">{{ b.name }}</h3> | ||
| 147 | <div v-for="(n,index) in b.messageObj.foodsList" :key="index"> | ||
| 148 | <p v-if="n.num > 0"> | ||
| 149 | {{ n.name }}({{ n.categoryName }}) | ||
| 150 | <text>{{ n.num }} 份</text> | ||
| 151 | </p> | ||
| 152 | </div> | ||
| 153 | </div> | ||
| 154 | <div v-if="b.orderType == 3 || b.orderType == 4"> | ||
| 155 | <h3 class="m0">{{ b.name }}</h3> | ||
| 156 | <p> | ||
| 157 | {{ language == 0 ? '套餐名称:' : '' }}{{ b.messageObj.packageName }} | ||
| 158 | </p> | ||
| 159 | <p> | ||
| 160 | {{ language == 0 ? '预约时间:' : '' }}{{ b.deliveryTime.slice(0, 10) }} {{ b.messageObj.timePeriod }} | ||
| 161 | </p> | ||
| 162 | </div> | ||
| 163 | </el-col> | ||
| 164 | <el-col :lg="3" :md="6" :sm="6" :xs="6" class="text-center"> | ||
| 165 | <span class="text-warning"> {{ b.paymentType == 3 ? '€' : '¥' }} | ||
| 166 | <span class="bigMoney">{{ b.totalStr }}</span> | ||
| 167 | </span> | ||
| 168 | </el-col> | ||
| 169 | <el-col :lg="6" :md="16" :sm="16" :xs="16"> | ||
| 170 | <div class="text-right"> | ||
| 171 | <el-button v-if="b.isInvoice == '0'&&!b.invoiceId" plain round type="primary" @click.stop="gokp(b)"> | ||
| 172 | {{ language == 0 ? '申请开票' : 'Invoice' }} | ||
| 173 | </el-button> | ||
| 174 | <el-button v-if="b.isInvoice == '0'&&b.invoiceId" plain round type="primary" @click.stop="editkp(b)"> | ||
| 175 | {{ language == 0 ? '重新申请' : 'Rebilling' }} | ||
| 176 | </el-button> | ||
| 177 | <el-button v-if="b.invoiceId" plain round type="primary" | ||
| 178 | @click.stop="showDetail(b)">{{ language == 0 ? '发票信息' : 'Detail' }} | ||
| 179 | </el-button> | ||
| 180 | <!-- <el-button type="primary" v-if="b.isInvoice == '0'&&!b.invoiceId&&b.paymentType=='3'" plain round @click.stop="goSj(b)">--> | ||
| 181 | <!-- {{ language == 0 ? '开收据' : 'Receipt' }}--> | ||
| 182 | <!-- </el-button>--> | ||
| 183 | <!-- <el-button type="primary" plain round v-if="b.invoiceId&&b.paymentType=='3'"--> | ||
| 184 | <!-- @click.stop="showSJ(b)">{{ language == 0 ? '查看收据' : 'Detail' }}--> | ||
| 185 | <!-- </el-button>--> | ||
| 186 | </div> | ||
| 187 | </el-col> | ||
| 188 | </el-row> | ||
| 189 | </div> | ||
| 190 | </div> | ||
| 191 | </el-card> | ||
| 192 | |||
| 193 | <el-dialog v-model="showSJDialog" :close-on-click-modal="false" :close-on-press-escape="false" | ||
| 194 | :title="language==0?'开收据':'Issue a receipt'" width="460px"> | ||
| 195 | <div class="flex"> | ||
| 196 | <el-form-item :label="language==0?'开票人':'Name'"> | ||
| 197 | <div class="flex"> | ||
| 198 | <el-input v-model="lpName" :placeholder="language==0?'请输入开票人':'Please enter your name'"></el-input> | ||
| 199 | <el-button type="primary" @click="submitSJ">{{ language == 0 ? '提交并预览' : 'Submit' }}</el-button> | ||
| 200 | </div> | ||
| 201 | </el-form-item> | ||
| 202 | </div> | ||
| 203 | <div class="tip mt20"> | ||
| 204 | <label>{{ language == 0 ? '开电子收据须知' : 'Receipt notice' }}:</label> | ||
| 205 | <div class="pd10"> | ||
| 206 | {{ remark }} | ||
| 207 | </div> | ||
| 208 | </div> | ||
| 209 | |||
| 210 | </el-dialog> | ||
| 211 | </div> | ||
| 212 | </template> | ||
| 213 | |||
| 214 | <script setup> | ||
| 215 | import {useStorage} from "@vueuse/core/index"; | ||
| 216 | import useUserStore from "@/store/modules/user"; | ||
| 217 | import { | ||
| 218 | getCanInvoiceBills, | ||
| 219 | getCanInvoiceBm, | ||
| 220 | getInvoiceByActiveId, | ||
| 221 | ppOtaReceipt, | ||
| 222 | getReceipt, | ||
| 223 | getBaseInfoByActiveId | ||
| 224 | } from "@/apiPc/booking"; | ||
| 225 | import {getCurrentInstance, onMounted, ref} from "vue"; | ||
| 226 | import {ElMessage, ElMessageBox} from "element-plus"; | ||
| 227 | import {md5} from "md5js"; | ||
| 228 | import {loginFree, getCanInvoiceTicket} from "@/viewsPc/seat/api"; | ||
| 229 | import {setToken} from "@/viewsPc/seat/utils/local-store"; | ||
| 230 | |||
| 231 | const router = useRouter() | ||
| 232 | const route = useRoute() | ||
| 233 | const language = useStorage('language', 0) | ||
| 234 | const lpName = ref('') | ||
| 235 | const remark = ref('') | ||
| 236 | const showSJDialog = ref(false) | ||
| 237 | const userStore = useUserStore(); | ||
| 238 | const user = useUserStore().user || {} | ||
| 239 | const activeName = ref(userStore.activeName || '5') | ||
| 240 | |||
| 241 | const query = ref({ | ||
| 242 | createById: user.userId, | ||
| 243 | orderType: '5', | ||
| 244 | invoiced: '0', | ||
| 245 | pageNo: 1, | ||
| 246 | pageSize: 999 | ||
| 247 | }) | ||
| 248 | const {proxy} = getCurrentInstance() | ||
| 249 | const list = ref([]) | ||
| 250 | const loading = ref(false) | ||
| 251 | onMounted(() => { | ||
| 252 | if (!user.utype) { | ||
| 253 | router.push({name: 'home'}) | ||
| 254 | return | ||
| 255 | } | ||
| 256 | if (language.value == 1) { | ||
| 257 | router.push({name: 'myInfo'}) | ||
| 258 | return | ||
| 259 | } | ||
| 260 | query.value.orderType = activeName.value = userStore.activeName || '5' | ||
| 261 | getList() | ||
| 262 | route.query.orderSn && getDataInfo() | ||
| 263 | }) | ||
| 264 | const getList = () => { | ||
| 265 | loading.value = true | ||
| 266 | if (query.value.orderType == '5') { | ||
| 267 | getCanInvoiceBm(query.value).then(res => { | ||
| 268 | list.value = res.rows | ||
| 269 | loading.value = false | ||
| 270 | }) | ||
| 271 | } else if (query.value.orderType == '6') { | ||
| 272 | // login() | ||
| 273 | getCanInvoiceBills({ | ||
| 274 | createById: user.userId, | ||
| 275 | orderType: '5', | ||
| 276 | invoiced: '0', | ||
| 277 | pageNo: 1, | ||
| 278 | pageSize: 999 | ||
| 279 | }).then(res => { | ||
| 280 | list.value = res.rows | ||
| 281 | for (let b of list.value) { | ||
| 282 | b.messageObj = JSON.parse(b.extJson) | ||
| 283 | b.messageObj.ticketDate = JSON.parse(b.messageObj.ticketDate) | ||
| 284 | b.messageObj.ticketType = JSON.parse(b.messageObj.ticketType) | ||
| 285 | } | ||
| 286 | loading.value = false | ||
| 287 | console.log(list.value) | ||
| 288 | |||
| 289 | }) | ||
| 290 | } else { | ||
| 291 | getCanInvoiceBills(query.value).then(res => { | ||
| 292 | list.value = res.rows | ||
| 293 | for (let b of list.value) { | ||
| 294 | b.messageObj = JSON.parse(b.message) | ||
| 295 | } | ||
| 296 | loading.value = false | ||
| 297 | }) | ||
| 298 | } | ||
| 299 | |||
| 300 | } | ||
| 301 | const login = async () => { | ||
| 302 | // 票务 | ||
| 303 | const userId = userStore.user?.userId; | ||
| 304 | const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32); | ||
| 305 | return loginFree({ | ||
| 306 | userId: userId, | ||
| 307 | sign, | ||
| 308 | }).then((res) => { | ||
| 309 | setToken(res.data.token); | ||
| 310 | getCanInvoiceTicket(query.value).then(res => { | ||
| 311 | loading.value = false | ||
| 312 | list.value = res.data.lists | ||
| 313 | }) | ||
| 314 | }) | ||
| 315 | } | ||
| 316 | |||
| 317 | const handleClick = (e) => { | ||
| 318 | console.log(e.paneName) | ||
| 319 | query.value.orderType = e.paneName | ||
| 320 | list.value = [] | ||
| 321 | query.value.invoiced = '0' | ||
| 322 | userStore.updataActiveName(e.paneName) | ||
| 323 | getList() | ||
| 324 | |||
| 325 | } | ||
| 326 | const gokp = (item) => { | ||
| 327 | if (query.value.orderType == 6) { | ||
| 328 | router.push({ | ||
| 329 | name: 'ticketAddInvoice', | ||
| 330 | query: { | ||
| 331 | orders: encodeURIComponent(JSON.stringify(item)), | ||
| 332 | totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount, | ||
| 333 | orderId: item.id, | ||
| 334 | paymentType: item.paymentType, | ||
| 335 | orderType: query.value.orderType, | ||
| 336 | } | ||
| 337 | }) | ||
| 338 | } else { | ||
| 339 | router.push({ | ||
| 340 | path: '/booking/addInvoice', | ||
| 341 | query: { | ||
| 342 | orders: encodeURIComponent(JSON.stringify(item)), | ||
| 343 | totalMoney: item.totalStr || item.totalPayAmount || item.payAmount || item.totalAmount, | ||
| 344 | orderId: item.id, | ||
| 345 | paymentType: query.value.orderType == 5 ? item.payType : item.paymentType, | ||
| 346 | orderType: query.value.orderType, | ||
| 347 | orderSn: query.value.orderType == 6 ? item.orderSn : null | ||
| 348 | } | ||
| 349 | }) | ||
| 350 | } | ||
| 351 | |||
| 352 | } | ||
| 353 | const editkp = (item) => { | ||
| 354 | if (query.value.orderType == 6) { | ||
| 355 | router.push({ | ||
| 356 | name: 'ticketAddInvoice', | ||
| 357 | query: { | ||
| 358 | invoiceId: item.invoiceId, | ||
| 359 | orderId: item.id, | ||
| 360 | isEdit: true, | ||
| 361 | } | ||
| 362 | }) | ||
| 363 | } else { | ||
| 364 | router.push({ | ||
| 365 | name: 'addInvoice', | ||
| 366 | query: { | ||
| 367 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, | ||
| 368 | orderId: item.id, | ||
| 369 | type: activeName.value, | ||
| 370 | isEdit: true, | ||
| 371 | orderType: query.value.orderType, | ||
| 372 | paymentType: query.value.orderType == 5 ? item.payType : item.paymentType, | ||
| 373 | // orderSn: query.value.orderType == 6 ? item.orderSn : null | ||
| 374 | } | ||
| 375 | }) | ||
| 376 | } | ||
| 377 | |||
| 378 | } | ||
| 379 | const showDetail = (item) => { | ||
| 380 | if (query.value.orderType == 6) { | ||
| 381 | router.push({ | ||
| 382 | name: 'ticketInvoiceDetail', | ||
| 383 | query: { | ||
| 384 | invoiceId: item.invoiceId, | ||
| 385 | orderId: item.id, | ||
| 386 | } | ||
| 387 | }) | ||
| 388 | |||
| 389 | } else { | ||
| 390 | router.push({ | ||
| 391 | name: 'invoiceDetail', | ||
| 392 | query: { | ||
| 393 | invoiceId: query.value.orderType == 6 ? item.invoiceIdStr : item.invoiceId, | ||
| 394 | type: activeName.value, | ||
| 395 | orderType: query.value.orderType, | ||
| 396 | paymentType: query.value.orderType == 6 || query.value.orderType == 5 ? item.payType : item.paymentType, | ||
| 397 | // orderSn: query.value.orderType == 6 ? item.orderSn : null | ||
| 398 | } | ||
| 399 | }) | ||
| 400 | |||
| 401 | } | ||
| 402 | } | ||
| 403 | let nowSj = {} | ||
| 404 | const goSj = (item) => { | ||
| 405 | // 电子收据须知 开票人 | ||
| 406 | getremark(item) | ||
| 407 | showSJDialog.value = true | ||
| 408 | nowSj = item | ||
| 409 | } | ||
| 410 | |||
| 411 | function getremark(item) { | ||
| 412 | getBaseInfoByActiveId(item.cptId).then(res => { | ||
| 413 | if (res.data) { | ||
| 414 | remark.value = res.data.remarks | ||
| 415 | } | ||
| 416 | }) | ||
| 417 | } | ||
| 418 | |||
| 419 | const showSJ = (item) => { | ||
| 420 | // 查看电子收据预览信息 | ||
| 421 | var obj = { | ||
| 422 | orderId: item.id, | ||
| 423 | type: 1 | ||
| 424 | } | ||
| 425 | if (nowSj.orderType) { | ||
| 426 | //预约 | ||
| 427 | proxy.download(`/ota/norder/getReceipt/${obj.orderId}`, { | ||
| 428 | ...obj | ||
| 429 | }, `Receipt_${new Date().getTime()}.pdf`) | ||
| 430 | } else { | ||
| 431 | // 报名 | ||
| 432 | proxy.download(`/ota/signOrder/getReceipt/${obj.orderId}`, { | ||
| 433 | ...obj | ||
| 434 | }, `Receipt_${new Date().getTime()}.pdf`) | ||
| 435 | } | ||
| 436 | |||
| 437 | } | ||
| 438 | const submitSJ = () => { | ||
| 439 | loading.value = true | ||
| 440 | ElMessageBox.confirm(language.value == 0 ? '确认提交吗?' : 'Confirm to submit ?', { | ||
| 441 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 442 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 443 | type: 'warning' | ||
| 444 | }).then(() => { | ||
| 445 | downloadAndSend() | ||
| 446 | }) | ||
| 447 | } | ||
| 448 | |||
| 449 | const downloadAndSend = () => { | ||
| 450 | if (nowSj.orderType) { | ||
| 451 | ppOtaReceipt({ | ||
| 452 | orderId: nowSj.id, | ||
| 453 | receiptInfo: lpName.value, | ||
| 454 | type: 2 | ||
| 455 | }).then(res => { | ||
| 456 | loading.value = false | ||
| 457 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { | ||
| 458 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 459 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 460 | type: 'warning' | ||
| 461 | }).then(() => { | ||
| 462 | showSJDialog.value = false | ||
| 463 | showSJ(nowSj) | ||
| 464 | }) | ||
| 465 | }).catch(err => { | ||
| 466 | loading.value = false | ||
| 467 | if (!err) { | ||
| 468 | ElMessage.warning(language.value == 0 ? '出错了,请稍后重试' : 'Error, please try again later') | ||
| 469 | } | ||
| 470 | }) | ||
| 471 | } else { | ||
| 472 | getReceipt({ | ||
| 473 | orderId: nowSj.id, | ||
| 474 | lpName: lpName.value, | ||
| 475 | type: 1 | ||
| 476 | }).then(res => { | ||
| 477 | loading.value = false | ||
| 478 | ElMessageBox.confirm(language.value == 0 ? `已发送至您的邮箱 ${user.userName},请注意查收` : `A receipt has been sent to your email ${user.userName}, please check it`, { | ||
| 479 | confirmButtonText: language.value == 0 ? '确定' : 'Confirm', | ||
| 480 | cancelButtonText: language.value == 0 ? '取消' : 'Cancel', | ||
| 481 | type: 'warning' | ||
| 482 | }).then(() => { | ||
| 483 | showSJDialog.value = false | ||
| 484 | showSJ(nowSj) | ||
| 485 | }) | ||
| 486 | }).catch(err => { | ||
| 487 | loading.value = false | ||
| 488 | }) | ||
| 489 | } | ||
| 490 | } | ||
| 491 | |||
| 492 | </script> | ||
| 493 | |||
| 494 | <style lang="scss" scoped> | ||
| 495 | .indexTitle { | ||
| 496 | margin: 20px 0 12px; | ||
| 497 | overflow: visible; | ||
| 498 | padding: 0 20px 15px; | ||
| 499 | border-bottom: 1px solid #e5e5e5; | ||
| 500 | |||
| 501 | .fr { | ||
| 502 | margin: -8px 0 0 | ||
| 503 | } | ||
| 504 | |||
| 505 | h3 { | ||
| 506 | display: inline-block; | ||
| 507 | font-size: 16px; | ||
| 508 | color: var(--el-color-primary); | ||
| 509 | } | ||
| 510 | } | ||
| 511 | |||
| 512 | .bigMoney { | ||
| 513 | font-size: 24px; | ||
| 514 | font-family: "DIN Alternate"; | ||
| 515 | } | ||
| 516 | |||
| 517 | .name { | ||
| 518 | font-size: 18px; | ||
| 519 | margin: 0; | ||
| 520 | } | ||
| 521 | |||
| 522 | .status-po { | ||
| 523 | position: absolute; | ||
| 524 | right: 0; | ||
| 525 | top: 0; | ||
| 526 | font-size: 12px; | ||
| 527 | color: #FFFFFF; | ||
| 528 | |||
| 529 | span { | ||
| 530 | border-radius: 0px 10px 0px 10px; | ||
| 531 | padding: 4px 10px; | ||
| 532 | } | ||
| 533 | |||
| 534 | .bg-danger { | ||
| 535 | background: #E60012; | ||
| 536 | } | ||
| 537 | |||
| 538 | .bg-warning { | ||
| 539 | background: #e89f39; | ||
| 540 | } | ||
| 541 | |||
| 542 | .bg-pink { | ||
| 543 | background: #F740A6; | ||
| 544 | } | ||
| 545 | |||
| 546 | .bg-primary { | ||
| 547 | background: var(--el-color-primary) | ||
| 548 | } | ||
| 549 | |||
| 550 | .bg-blue { | ||
| 551 | background: #00a0e9 | ||
| 552 | } | ||
| 553 | } | ||
| 554 | |||
| 555 | .item { | ||
| 556 | .name { | ||
| 557 | font-size: 18px; | ||
| 558 | color: #000000; | ||
| 559 | margin: 0 0 10px; | ||
| 560 | } | ||
| 561 | |||
| 562 | p { | ||
| 563 | margin: 8px 0 0; | ||
| 564 | color: #707070; | ||
| 565 | font-size: 14px; | ||
| 566 | } | ||
| 567 | |||
| 568 | margin: 0 0 20px; | ||
| 569 | border: 1px solid #E5E5E5; | ||
| 570 | border-radius: 10px; | ||
| 571 | position: relative; | ||
| 572 | |||
| 573 | .bbody { | ||
| 574 | padding: 0 15px 20px; | ||
| 575 | } | ||
| 576 | |||
| 577 | .title { | ||
| 578 | background: #F7F7F7; | ||
| 579 | border-bottom: 1px solid #E5E5E5; | ||
| 580 | |||
| 581 | span { | ||
| 582 | font-size: 14px; | ||
| 583 | color: #4C5359; | ||
| 584 | } | ||
| 585 | |||
| 586 | .status { | ||
| 587 | font-size: 12px; | ||
| 588 | font-weight: bold; | ||
| 589 | padding: 2px 10px; | ||
| 590 | } | ||
| 591 | } | ||
| 592 | |||
| 593 | .title label { | ||
| 594 | border-radius: 5px 0 5px 0; | ||
| 595 | font-size: 12px; | ||
| 596 | color: #fff; | ||
| 597 | padding: 4px 10px; | ||
| 598 | margin-right: 10px; | ||
| 599 | } | ||
| 600 | |||
| 601 | .blueTag { | ||
| 602 | background-color: #1EC886; | ||
| 603 | } | ||
| 604 | |||
| 605 | .purpleTag { | ||
| 606 | background-color: #717bef; | ||
| 607 | } | ||
| 608 | |||
| 609 | .orangeTag { | ||
| 610 | background-color: #ff8124; | ||
| 611 | } | ||
| 612 | } | ||
| 613 | |||
| 614 | :deep(.el-tabs__item) { | ||
| 615 | text-transform: uppercase | ||
| 616 | } | ||
| 617 | </style> |
-
Please register or sign in to post a comment