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