no message
Showing
11 changed files
with
453 additions
and
22 deletions
public/img/code.jpg
0 → 100644
27.9 KB
| ... | @@ -320,3 +320,18 @@ export function getPhotoOrderInfoByLogex(data) { | ... | @@ -320,3 +320,18 @@ export function getPhotoOrderInfoByLogex(data) { |
| 320 | params:data | 320 | params:data |
| 321 | }) | 321 | }) |
| 322 | } | 322 | } |
| 323 | export function getInvoiceDetailBills(invoiceId) { | ||
| 324 | return request({ | ||
| 325 | url: `/ota/norder/list`, | ||
| 326 | method: 'get', | ||
| 327 | params:{ | ||
| 328 | invoiceId:invoiceId | ||
| 329 | } | ||
| 330 | }) | ||
| 331 | } | ||
| 332 | export function getInvoiceDetail(invoiceId) { | ||
| 333 | return request({ | ||
| 334 | url: `/ota/invoice/${invoiceId}`, | ||
| 335 | method: 'get' | ||
| 336 | }) | ||
| 337 | } | ... | ... |
src/assets/img/kp.svg
0 → 100644
| 1 | <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1719890698869" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4567" xmlns:xlink="http://www.w3.org/1999/xlink" width="60" height="60"><path d="M919.771429 85.942857h-804.571429c-20.114286 0-36.571429 16.457143-36.571429 36.571429v256c0 20.114286 16.457143 36.571429 36.571429 36.571428h73.142857v475.428572c0 10.971429 5.485714 21.942857 14.628572 29.257143 7.314286 5.485714 14.628571 7.314286 21.942857 7.314285 3.657143 0 7.314286 0 10.971428-1.828571l128-38.4 144.457143 40.228571c5.485714 1.828571 12.8 1.828571 20.114286 0l144.457143-40.228571 126.171428 38.4c10.971429 3.657143 23.771429 1.828571 32.914286-5.485714s14.628571-18.285714 14.628571-29.257143v-475.428572h73.142858c20.114286 0 36.571429-16.457143 36.571428-36.571428v-256c0-20.114286-16.457143-36.571429-36.571428-36.571429z m-256 585.142857h-292.571429v-73.142857h292.571429v73.142857z m0-109.714285h-292.571429v-73.142858h292.571429v73.142858z m219.428571-219.428572h-36.571429v-73.142857c0-20.114286-16.457143-36.571429-36.571428-36.571429h-585.142857c-20.114286 0-36.571429 16.457143-36.571429 36.571429v73.142857h-36.571428v-182.857143h731.428571v182.857143z" fill="#ffffff" p-id="4568"></path></svg> | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| ... | @@ -462,6 +462,18 @@ export const constantRoutes = [ | ... | @@ -462,6 +462,18 @@ export const constantRoutes = [ |
| 462 | component: () => import('@/viewsPc/booking/invoicing'), | 462 | component: () => import('@/viewsPc/booking/invoicing'), |
| 463 | name: 'invoice', | 463 | name: 'invoice', |
| 464 | meta: { title: '我的发票' } | 464 | meta: { title: '我的发票' } |
| 465 | }, | ||
| 466 | { | ||
| 467 | path: 'invoiceDetail', | ||
| 468 | component: () => import('@/viewsPc/booking/invoiceDetail'), | ||
| 469 | name: 'invoiceDetail', | ||
| 470 | meta: { title: '发票详情' } | ||
| 471 | }, | ||
| 472 | { | ||
| 473 | path: 'addInvoice', | ||
| 474 | component: () => import('@/viewsPc/booking/addInvoice'), | ||
| 475 | name: 'addInvoice', | ||
| 476 | meta: { title: '开发票' } | ||
| 465 | } | 477 | } |
| 466 | ] | 478 | ] |
| 467 | }, | 479 | }, | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <div class="box"> | 3 | <div class="box" style="min-height: 50vh"> |
| 4 | <div class="indexTitle"> | 4 | <div class="indexTitle"> |
| 5 | <h3 class="leftboderTT">{{ language == 0 ? '我的发票' : 'My invoice' }} | 5 | <h3 class="leftboderTT">{{ language == 0 ? '我的发票' : 'My invoice' }} |
| 6 | <el-button @click="goAdd" type="primary" class="btn-lineG fr"> | 6 | <el-button @click="goAdd" v-if="activeId!=0" type="primary" class="btn-lineG fr"> |
| 7 | {{language == 0 ? '开发票' : 'Invoicing' }} | 7 | {{language == 0 ? '开发票' : 'Invoicing' }} |
| 8 | </el-button> | 8 | </el-button> |
| 9 | </h3> | 9 | </h3> |
| ... | @@ -42,9 +42,10 @@ | ... | @@ -42,9 +42,10 @@ |
| 42 | </div> | 42 | </div> |
| 43 | 43 | ||
| 44 | </div> | 44 | </div> |
| 45 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | ||
| 46 | 45 | ||
| 47 | </el-card> | 46 | </el-card> |
| 47 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | ||
| 48 | |||
| 48 | <div class="mb60"></div> | 49 | <div class="mb60"></div> |
| 49 | </div> | 50 | </div> |
| 50 | </div> | 51 | </div> |
| ... | @@ -54,21 +55,38 @@ | ... | @@ -54,21 +55,38 @@ |
| 54 | 55 | ||
| 55 | <script setup> | 56 | <script setup> |
| 56 | import ChoseBills from './component/choseBills' | 57 | import ChoseBills from './component/choseBills' |
| 57 | import {ref} from 'vue' | 58 | import {onMounted, ref} from 'vue' |
| 58 | import {getInvoiceByActiveId} from "@/apiPc/booking" | 59 | import {getBaseInfoByActiveId, getInvoiceByActiveId} from "@/apiPc/booking" |
| 59 | import {getCurrentInstance} from "@vue/runtime-core" | 60 | import {getCurrentInstance} from "@vue/runtime-core" |
| 60 | import {useStorage} from "@vueuse/core/index"; | 61 | import {useStorage} from "@vueuse/core/index"; |
| 61 | import useUserStore from "@/store/modules/user"; | 62 | import useUserStore from "@/store/modules/user"; |
| 63 | const router = useRouter() | ||
| 64 | const route = useRoute() | ||
| 62 | 65 | ||
| 63 | const language = useStorage('language', 0) | 66 | const language = useStorage('language', 0) |
| 64 | const {proxy} = getCurrentInstance() | 67 | const {proxy} = getCurrentInstance() |
| 65 | const list = ref([]) | 68 | const list = ref([]) |
| 69 | const form = ref({}) | ||
| 70 | const activeId = ref('0') | ||
| 66 | const user = useUserStore().user | 71 | const user = useUserStore().user |
| 67 | const query = ref({ | 72 | const query = ref({ |
| 68 | createById: user.userId | 73 | createById: user.userId |
| 69 | }) | 74 | }) |
| 70 | getList() | 75 | onMounted(()=>{ |
| 71 | 76 | if(route.query.activeId){ | |
| 77 | activeId.value = route.query.activeId | ||
| 78 | query.value.activeId = activeId.value | ||
| 79 | getBase() | ||
| 80 | } | ||
| 81 | getList() | ||
| 82 | }) | ||
| 83 | function getBase() { | ||
| 84 | getBaseInfoByActiveId(activeId.value).then(res => { | ||
| 85 | form.value = res.data || null | ||
| 86 | }).catch(err => { | ||
| 87 | form.value = null | ||
| 88 | }) | ||
| 89 | } | ||
| 72 | function getList() { | 90 | function getList() { |
| 73 | if (!user) { | 91 | if (!user) { |
| 74 | useUserStore().setReLogin() | 92 | useUserStore().setReLogin() |
| ... | @@ -89,14 +107,46 @@ function goAdd() { | ... | @@ -89,14 +107,46 @@ function goAdd() { |
| 89 | proxy.$refs['dialogChoseBillsRef'].open(obj) | 107 | proxy.$refs['dialogChoseBillsRef'].open(obj) |
| 90 | } | 108 | } |
| 91 | 109 | ||
| 92 | function editDetail(item) { | 110 | function showDetail(item) { |
| 111 | router.push({ | ||
| 112 | name:'invoiceDetail', | ||
| 113 | query:{ | ||
| 114 | invoiceId:item.id | ||
| 115 | } | ||
| 116 | }) | ||
| 117 | } | ||
| 93 | 118 | ||
| 119 | function editDetail(item) { | ||
| 120 | router.push({ | ||
| 121 | name:'addInvoice', | ||
| 122 | query:{ | ||
| 123 | invoiceId:item.id, | ||
| 124 | isEdit:true, | ||
| 125 | activeId: activeId.value, | ||
| 126 | kpType: form.value.kpType | ||
| 127 | } | ||
| 128 | }) | ||
| 94 | } | 129 | } |
| 95 | 130 | ||
| 96 | function getChoosed(list) { | 131 | function getChoosed(list) { |
| 97 | console.log(list) | 132 | console.log(list) |
| 98 | if (list.length > 0) { | 133 | if (list.length > 0) { |
| 99 | // 去开票 | 134 | let ids = [] |
| 135 | let totalMoney = 0 | ||
| 136 | for(let c of list){ | ||
| 137 | ids.push(c.id); | ||
| 138 | totalMoney = (totalMoney + c.total) | ||
| 139 | } | ||
| 140 | // 去开票 必须有activeId 才能获取开票类型 | ||
| 141 | router.push({ | ||
| 142 | path: '/booking/addInvoice', | ||
| 143 | query: { | ||
| 144 | orders: encodeURIComponent(JSON.stringify(list)), | ||
| 145 | activeId: activeId.value, | ||
| 146 | kpType: form.value.kpType, | ||
| 147 | totalMoney:totalMoney | ||
| 148 | } | ||
| 149 | }) | ||
| 100 | } | 150 | } |
| 101 | } | 151 | } |
| 102 | 152 | ... | ... |
This diff is collapsed.
Click to expand it.
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close"> | 2 | <el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close"> |
| 3 | <el-table height="50vh" ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange"> | 3 | <el-table height="50vh" ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange"> |
| 4 | <el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/> | 4 | <el-table-column type="selection" :label="language==0?'选择':'Selection'"/> |
| 5 | <el-table-column prop="id" :label="language==0?'订单号':'No.'"></el-table-column> | 5 | <el-table-column prop="id" :label="language==0?'订单号':'No.'"></el-table-column> |
| 6 | <el-table-column prop="id" :label="language==0?'订单类型':'Order Type'"> | 6 | <el-table-column prop="orderTypeStr" width="100" :label="language==0?'订单类型':'Order Type'"> |
| 7 | <template #default="scope"> | ||
| 8 | <span v-if="scope.row.orderType == '0'">{{language==0?'酒店订单':'Hotel Order'}}</span> | ||
| 9 | <span v-if="scope.row.orderType == '1'">{{language==0?'接送订单':'Car Order'}}</span> | ||
| 10 | <span v-if="scope.row.orderType == '2'">{{language==0?'餐饮订单':'Food Order'}}</span> | ||
| 11 | </template> | ||
| 12 | </el-table-column> | 7 | </el-table-column> |
| 13 | <el-table-column prop="id" :label="language==0?'订单明细':'Detail'"> | 8 | <el-table-column :label="language==0?'订单明细':'Detail'" min-width="200"> |
| 14 | <template #default="scope"> | 9 | <template #default="scope"> |
| 15 | <div v-if="scope.row.orderType == 0"> | 10 | <div v-if="scope.row.orderType == 0"> |
| 16 | <p>{{scope.row.messageObj.roomName}}</p> | 11 | <p>{{scope.row.messageObj.roomName}}</p> |
| ... | @@ -30,6 +25,14 @@ | ... | @@ -30,6 +25,14 @@ |
| 30 | </p> | 25 | </p> |
| 31 | </div> | 26 | </div> |
| 32 | </div> | 27 | </div> |
| 28 | <div v-if="scope.row.orderType == 3 || scope.row.orderType == 4"> | ||
| 29 | <div> | ||
| 30 | {{language==0?'套餐名称:':''}}{{scope.row.messageObj.packageName}} | ||
| 31 | </div> | ||
| 32 | <div> | ||
| 33 | {{language==0?'预约时间:':''}}{{scope.row.deliveryTime.slice(0,10)}} {{scope.row.messageObj.timePeriod}} | ||
| 34 | </div> | ||
| 35 | </div> | ||
| 33 | </template> | 36 | </template> |
| 34 | </el-table-column> | 37 | </el-table-column> |
| 35 | <el-table-column prop="total" :label="language==0?'金额':'Amount'"></el-table-column> | 38 | <el-table-column prop="total" :label="language==0?'金额':'Amount'"></el-table-column> |
| ... | @@ -56,9 +59,11 @@ import {getCurrentInstance} from "@vue/runtime-core"; | ... | @@ -56,9 +59,11 @@ import {getCurrentInstance} from "@vue/runtime-core"; |
| 56 | import {useStorage} from "@vueuse/core/index"; | 59 | import {useStorage} from "@vueuse/core/index"; |
| 57 | import {getCanInvoiceBills} from "@/apiPc/booking"; | 60 | import {getCanInvoiceBills} from "@/apiPc/booking"; |
| 58 | import {ElMessage} from "element-plus"; | 61 | import {ElMessage} from "element-plus"; |
| 62 | import useUserStore from "@/store/modules/user"; | ||
| 59 | const {proxy} = getCurrentInstance() | 63 | const {proxy} = getCurrentInstance() |
| 60 | const emit = defineEmits([ 'transfer']) | 64 | const emit = defineEmits([ 'transfer']) |
| 61 | const language= useStorage('language',0) | 65 | const language= useStorage('language',0) |
| 66 | const user = useUserStore().user || {} | ||
| 62 | const data = reactive({ | 67 | const data = reactive({ |
| 63 | tableData: [], | 68 | tableData: [], |
| 64 | show: false, | 69 | show: false, |
| ... | @@ -66,8 +71,8 @@ const data = reactive({ | ... | @@ -66,8 +71,8 @@ const data = reactive({ |
| 66 | title: '选择开票订单', | 71 | title: '选择开票订单', |
| 67 | query:{ | 72 | query:{ |
| 68 | // activeId:'', | 73 | // activeId:'', |
| 69 | // createById:'', | 74 | createById:user.userId, |
| 70 | // invoiced:'1', | 75 | invoiced:'1', |
| 71 | status:1 | 76 | status:1 |
| 72 | }, | 77 | }, |
| 73 | total:0 | 78 | total:0 |
| ... | @@ -94,7 +99,7 @@ const getList = () => { | ... | @@ -94,7 +99,7 @@ const getList = () => { |
| 94 | tableData.value = res.rows | 99 | tableData.value = res.rows |
| 95 | total.value = res.total | 100 | total.value = res.total |
| 96 | 101 | ||
| 97 | for (var b of tableData.value) { | 102 | for (let b of tableData.value) { |
| 98 | b.messageObj = JSON.parse(b.message) | 103 | b.messageObj = JSON.parse(b.message) |
| 99 | } | 104 | } |
| 100 | }) | 105 | }) | ... | ... |
src/viewsPc/booking/invoiceDetail.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box"> | ||
| 4 | <el-card :body-style="{ padding: '0px' }" class="mt20"> | ||
| 5 | <div slot="header"> | ||
| 6 | <div class="bg-lineg">{{ language == 0 ? '发票开具' : 'Invoice application' }}</div> | ||
| 7 | </div> | ||
| 8 | <el-row class="pd20" :gutter="20"> | ||
| 9 | <el-col :span="24"> | ||
| 10 | <!--已选订单--> | ||
| 11 | <div class="border-info" v-for="b in list" :key="b.id"> | ||
| 12 | <label class="blueTag" v-if="b.orderType == 0"> 酒店订单</label> | ||
| 13 | <label class="orangeTag" v-if="b.orderType == 1"> 接送订单</label> | ||
| 14 | <label class="purpleTag" v-if="b.orderType == 2"> 餐饮订单</label> | ||
| 15 | <label class="pinkTag" v-if="b.orderType == 3">化妆订单</label> | ||
| 16 | <label class="yellowTag" v-if="b.orderType == 4">拍照订单</label> | ||
| 17 | |||
| 18 | <h3>{{ b.name }}</h3> | ||
| 19 | <!-- 酒店订单--> | ||
| 20 | <div v-if="b.orderType == 0"> | ||
| 21 | <p>{{b.messageObj.roomInfo}}</p> | ||
| 22 | <p>{{b.messageObj.roomStayDate}}</p> | ||
| 23 | <p class="poPrice">¥{{b.total}}</p> | ||
| 24 | </div> | ||
| 25 | <!-- 接送订单--> | ||
| 26 | <div v-if="b.orderType == 1"> | ||
| 27 | <p v-for="(car,index) in b.messageObj.carsList" :key="index" v-show="car.num>0"> | ||
| 28 | <span>{{car.name}}:{{car.num}} 辆</span> | ||
| 29 | </p> | ||
| 30 | <p class="poPrice">¥{{b.total}}</p> | ||
| 31 | </div> | ||
| 32 | <!-- 餐饮订单--> | ||
| 33 | <div v-if="b.orderType == 2"> | ||
| 34 | <p v-for="(n,index) in b.messageObj.foodsList" :key="index"> | ||
| 35 | <span v-if="n.num > 0"> | ||
| 36 | {{n.name}}({{n.categoryName}}) <span>{{n.num}} 份</span> | ||
| 37 | </span> | ||
| 38 | </p> | ||
| 39 | <p class="poPrice">¥{{b.total}}</p> | ||
| 40 | </div> | ||
| 41 | <div v-if="b.orderType == 3 || b.orderType == 4"> | ||
| 42 | <div> | ||
| 43 | {{language==0?'套餐名称:':''}}{{b.messageObj.packageName}} | ||
| 44 | </div> | ||
| 45 | <div> | ||
| 46 | {{language==0?'预约时间:':''}}{{b.deliveryTime.slice(0,10)}} {{b.messageObj.timePeriod}} | ||
| 47 | </div> | ||
| 48 | <p class="poPrice">¥{{b.total}}</p> | ||
| 49 | </div> | ||
| 50 | </div> | ||
| 51 | |||
| 52 | <div class="leftboderTT">{{ language == 0 ? '开票信息' : 'Invoice information' }}</div> | ||
| 53 | <div class="border-rr mt20 pd20"> | ||
| 54 | <el-form class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef"> | ||
| 55 | <el-form-item :label="'开票金额'"> | ||
| 56 | <span class="bigprice">¥{{totalMoney}}</span> | ||
| 57 | </el-form-item> | ||
| 58 | |||
| 59 | <el-form-item :label="`发票形式`" required prop="invoiceForm"> | ||
| 60 | <span v-if="form.invoiceForm=='1'">电子发票</span> | ||
| 61 | <span v-if="form.invoiceForm=='2'">纸质普票</span> | ||
| 62 | <span v-if="form.invoiceForm=='3'">纸质专票</span> | ||
| 63 | </el-form-item> | ||
| 64 | <el-form-item :label="`邮箱`" v-if="form.invoiceForm=='1'" required prop="address"> | ||
| 65 | {{form.address}} | ||
| 66 | </el-form-item> | ||
| 67 | <el-form-item :label="`邮寄地址`" v-else required> | ||
| 68 | <div class="flexCenter"> | ||
| 69 | <div> | ||
| 70 | <div class="bigSize">{{nowAddress.contact}} {{nowAddress.phone}}</div> | ||
| 71 | <div class="smallSize">{{nowAddress.addName}}</div> | ||
| 72 | </div> | ||
| 73 | </div> | ||
| 74 | </el-form-item> | ||
| 75 | <el-form-item :label="`发票类型`" required prop="invoiceType"> | ||
| 76 | <span v-show="form.invoiceType=='0'"> 企业</span> | ||
| 77 | <span v-show="form.invoiceType=='1'"> 个人非企业</span> | ||
| 78 | </el-form-item> | ||
| 79 | <el-form-item :label="`发票抬头`" required prop="invoiceTitle"> | ||
| 80 | {{form.invoiceTitle}} | ||
| 81 | </el-form-item> | ||
| 82 | <el-form-item :label="`税号`" required v-if="form.invoiceType=='0'" prop="invoiceTfn"> | ||
| 83 | {{form.invoiceTfn}} | ||
| 84 | </el-form-item> | ||
| 85 | <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'"> | ||
| 86 | <el-form-item :label="`地址`" required prop="invoiceAddress"> | ||
| 87 | {{form.invoiceAddress}} | ||
| 88 | </el-form-item> | ||
| 89 | <el-form-item :label="`电话`" required prop="invoicePhone"> | ||
| 90 | {{form.invoicePhone}} | ||
| 91 | </el-form-item> | ||
| 92 | <el-form-item :label="`开户行`" required prop="invoiceBank"> | ||
| 93 | {{form.invoiceBank}} | ||
| 94 | </el-form-item> | ||
| 95 | <el-form-item :label="`账户`" required prop="invoiceAccount"> | ||
| 96 | {{form.invoiceAccount}} | ||
| 97 | </el-form-item> | ||
| 98 | </div> | ||
| 99 | </el-form> | ||
| 100 | </div> | ||
| 101 | </el-col> | ||
| 102 | </el-row> | ||
| 103 | <div class="text-center mb20"> | ||
| 104 | <el-button type="primary" @click="backList" round plain>返回</el-button> | ||
| 105 | </div> | ||
| 106 | </el-card> | ||
| 107 | <div style="height: 60px;"></div> | ||
| 108 | </div> | ||
| 109 | </div> | ||
| 110 | <address-list-dialog ref="dialogAddressListRef" @submit="getAddress"/> | ||
| 111 | </template> | ||
| 112 | |||
| 113 | <script setup> | ||
| 114 | import {useRouter, useRoute} from "vue-router"; | ||
| 115 | import {ref, reactive, onMounted} from "vue"; | ||
| 116 | import {useStorage} from "@vueuse/core/index"; | ||
| 117 | import AddressListDialog from "./component/addressList" | ||
| 118 | import dayjs from 'dayjs' | ||
| 119 | import {ElMessage,ElMessageBox} from "element-plus"; | ||
| 120 | import useUserStore from "@/store/modules/user"; | ||
| 121 | import {getCurrentInstance} from "@vue/runtime-core"; | ||
| 122 | import {addressList, editInvoice, submitInvoice,getInvoiceDetailBills,getInvoiceDetail} from "@/apiPc/booking"; | ||
| 123 | const {proxy} = getCurrentInstance() | ||
| 124 | |||
| 125 | const user = useUserStore().user | ||
| 126 | const language = useStorage('language', 0) | ||
| 127 | const router = useRouter() | ||
| 128 | const route = useRoute() | ||
| 129 | const list = ref([]) | ||
| 130 | const addrList = ref([]) | ||
| 131 | const nowAddress = ref({}) | ||
| 132 | const totalMoney = ref(0) | ||
| 133 | const form = ref({}) | ||
| 134 | const rules = ref({ | ||
| 135 | invoiceType: [ | ||
| 136 | {required: true, message: language.value==0?'请选择发票类型':'Please select invoice type', trigger: 'change'} | ||
| 137 | ], | ||
| 138 | address: [ | ||
| 139 | {required: true, message: language.value==0?'请输入邮箱':'Please enter email', trigger: 'blur'} | ||
| 140 | ], | ||
| 141 | invoiceForm: [ | ||
| 142 | {required: true, message: language.value==0?'请选择发票形式':'Please select invoice form', trigger: 'change'} | ||
| 143 | ], | ||
| 144 | invoiceTitle: [ | ||
| 145 | {required: true, message: language.value==0?'请输入发票抬头':'Please enter invoice title', trigger: 'blur'} | ||
| 146 | ], | ||
| 147 | invoiceTfn: [ | ||
| 148 | {required: true, message: language.value==0?'请输入税号':'Please enter TFN', trigger: 'blur'} | ||
| 149 | ], | ||
| 150 | invoiceAddress: [ | ||
| 151 | {required: true, message: language.value==0?'请输入地址':'Please enter address', trigger: 'blur'} | ||
| 152 | ], | ||
| 153 | invoicePhone: [ | ||
| 154 | {required: true, message: language.value==0?'请输入电话':'Please enter phone', trigger: 'blur'} | ||
| 155 | ], | ||
| 156 | invoiceBank: [ | ||
| 157 | {required: true, message: language.value==0?'请输入开户行':'Please enter bank', trigger: 'blur'} | ||
| 158 | ], | ||
| 159 | invoiceAccount: [ | ||
| 160 | {required: true, message: language.value==0?'请输入账户':'Please enter account', trigger: 'blur'} | ||
| 161 | ], | ||
| 162 | }) | ||
| 163 | const isEdit = ref(false) | ||
| 164 | let invoiceId | ||
| 165 | onMounted(() => { | ||
| 166 | if(route.query.activeId){ | ||
| 167 | form.value.activeId = route.query.activeId | ||
| 168 | } | ||
| 169 | invoiceId = route.query.invoiceId | ||
| 170 | getList() | ||
| 171 | |||
| 172 | }) | ||
| 173 | function getList() { | ||
| 174 | getInvoiceDetailBills(invoiceId).then(res => { | ||
| 175 | // 订单 | ||
| 176 | list.value = res.rows; | ||
| 177 | for (var bill of list.value) { | ||
| 178 | bill.messageObj = JSON.parse(bill.message) | ||
| 179 | } | ||
| 180 | }); | ||
| 181 | getInvoiceDetail(invoiceId).then(res => { | ||
| 182 | form.value = res.data; | ||
| 183 | totalMoney.value = form.value.total | ||
| 184 | if (form.value.invoiceForm == '1') { | ||
| 185 | email.value = form.value.address | ||
| 186 | } | ||
| 187 | getAddrList() | ||
| 188 | }); | ||
| 189 | } | ||
| 190 | function getAddrList() { | ||
| 191 | addressList(user.userId).then(res=>{ | ||
| 192 | addrList.value = res.rows | ||
| 193 | if(addrList.value.length>0){ | ||
| 194 | nowAddress.value = addrList.value[0] | ||
| 195 | } | ||
| 196 | }) | ||
| 197 | } | ||
| 198 | function backList() { | ||
| 199 | router.push({ | ||
| 200 | name: 'invoice' | ||
| 201 | }) | ||
| 202 | } | ||
| 203 | </script> | ||
| 204 | |||
| 205 | <style scoped lang="scss"> | ||
| 206 | .bigMoney { | ||
| 207 | font-size: 36px !important; | ||
| 208 | font-family: 'DIN Alternate'; | ||
| 209 | font-weight: bold; | ||
| 210 | } | ||
| 211 | .btn-lineG{font-size: 16px} | ||
| 212 | .bg-lineg { | ||
| 213 | height: 40px; | ||
| 214 | line-height: 40px; | ||
| 215 | font-size: 18px; | ||
| 216 | text-align: center; | ||
| 217 | } | ||
| 218 | .border-info{position: relative; | ||
| 219 | &>label{position: absolute;right: 0;top: 0;margin: 0;border-radius: 0 0 0px 15px; | ||
| 220 | padding: 5px 15px;font-size: 14px; | ||
| 221 | } | ||
| 222 | .poPrice{position: absolute;bottom: 0px;right: 10px;font-size: 24px; | ||
| 223 | line-height: 1;font-family: "DIN Alternate"} | ||
| 224 | } | ||
| 225 | .blueTag { | ||
| 226 | color: #fff; | ||
| 227 | background-color: #1EC886; | ||
| 228 | } | ||
| 229 | |||
| 230 | .purpleTag { | ||
| 231 | color: #fff; | ||
| 232 | background-color: #717bef; | ||
| 233 | } | ||
| 234 | |||
| 235 | .orangeTag { | ||
| 236 | color: #fff; | ||
| 237 | background-color: #ff8124; | ||
| 238 | } | ||
| 239 | .pinkTag { | ||
| 240 | color: #fff; | ||
| 241 | background-color: #f55497; | ||
| 242 | } | ||
| 243 | |||
| 244 | .yellowTag { | ||
| 245 | color: #fff; | ||
| 246 | background-color: #bad814; | ||
| 247 | } | ||
| 248 | .leftboderTT { | ||
| 249 | font-weight: 600; | ||
| 250 | font-size: 16px; | ||
| 251 | color: #453DEA; | ||
| 252 | } | ||
| 253 | |||
| 254 | .border-rr { | ||
| 255 | border-radius: 5px; | ||
| 256 | border: 1px solid #DCDFE6; | ||
| 257 | } | ||
| 258 | |||
| 259 | .room { | ||
| 260 | font-weight: 400; | ||
| 261 | font-size: 14px; | ||
| 262 | color: #929AA0; | ||
| 263 | } | ||
| 264 | |||
| 265 | .ccitemBox { | ||
| 266 | overflow: auto; | ||
| 267 | |||
| 268 | label { | ||
| 269 | margin: 10px 0; | ||
| 270 | display: block; | ||
| 271 | min-height: 30px; | ||
| 272 | |||
| 273 | span { | ||
| 274 | color: #FF8124; | ||
| 275 | font-family: DIN Alternate; | ||
| 276 | font-size: 24px; | ||
| 277 | } | ||
| 278 | } | ||
| 279 | } | ||
| 280 | |||
| 281 | .ccitem { | ||
| 282 | display: flex; | ||
| 283 | justify-content: space-between; | ||
| 284 | font-size: 15px; | ||
| 285 | color: #666; | ||
| 286 | margin: 5px 0 10px; | ||
| 287 | |||
| 288 | label { | ||
| 289 | font-size: 16px; | ||
| 290 | color: #000; | ||
| 291 | } | ||
| 292 | |||
| 293 | span { | ||
| 294 | font-size: 13px; | ||
| 295 | } | ||
| 296 | } | ||
| 297 | |||
| 298 | .red { | ||
| 299 | color: #FF8124; | ||
| 300 | } | ||
| 301 | .tip{font-size: 14px;color: #666;padding: 0 10px;} | ||
| 302 | .mw500{max-width: 500px;margin: auto} | ||
| 303 | .bigSize { | ||
| 304 | font-size: 16px; | ||
| 305 | margin-bottom: 5px; | ||
| 306 | } | ||
| 307 | |||
| 308 | .smallSize { | ||
| 309 | font-size: 14px; | ||
| 310 | color: #999; | ||
| 311 | } | ||
| 312 | |||
| 313 | .flexCenter { | ||
| 314 | display: flex; | ||
| 315 | width: 100%; | ||
| 316 | align-items: center; | ||
| 317 | justify-content: space-between; | ||
| 318 | background: #f4f4f4; | ||
| 319 | padding: 10px; | ||
| 320 | box-sizing: border-box; | ||
| 321 | } | ||
| 322 | .bigprice { | ||
| 323 | font-size: 26px; | ||
| 324 | line-height: 1;font-family: "DIN Alternate"; | ||
| 325 | } | ||
| 326 | </style> |
| ... | @@ -6,6 +6,7 @@ | ... | @@ -6,6 +6,7 @@ |
| 6 | </h3> | 6 | </h3> |
| 7 | 7 | ||
| 8 | <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button>--> | 8 | <!-- <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'发票开具':'Invoice' }}</el-button>--> |
| 9 | <el-button class="fr" type="primary" plain @click="toInvoice">{{ language==0?'我的发票':'My Invoice' }}</el-button> | ||
| 9 | </div> | 10 | </div> |
| 10 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | 11 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> |
| 11 | 12 | ... | ... |
| ... | @@ -78,6 +78,11 @@ | ... | @@ -78,6 +78,11 @@ |
| 78 | </el-row> | 78 | </el-row> |
| 79 | </div> | 79 | </div> |
| 80 | <order-remark ref="orderRemarkRef" @submit="goBooking"/> | 80 | <order-remark ref="orderRemarkRef" @submit="goBooking"/> |
| 81 | |||
| 82 | <div class="fixedKP" @click="addInvoice"> | ||
| 83 | <img src="@/assets/img/kp.svg"/> | ||
| 84 | 开票 | ||
| 85 | </div> | ||
| 81 | </template> | 86 | </template> |
| 82 | 87 | ||
| 83 | <script setup> | 88 | <script setup> |
| ... | @@ -181,10 +186,26 @@ function goBooking(n) { | ... | @@ -181,10 +186,26 @@ function goBooking(n) { |
| 181 | break; | 186 | break; |
| 182 | } | 187 | } |
| 183 | } | 188 | } |
| 189 | |||
| 190 | function addInvoice(){ | ||
| 191 | router.push({ | ||
| 192 | name: 'invoice', | ||
| 193 | query: { | ||
| 194 | activeId: props.matchId | ||
| 195 | } | ||
| 196 | }) | ||
| 197 | } | ||
| 184 | </script> | 198 | </script> |
| 185 | 199 | ||
| 186 | <style scoped lang="scss"> | 200 | <style scoped lang="scss"> |
| 187 | h4 { | 201 | h4 { |
| 188 | padding: 0 10px; | 202 | padding: 0 10px; |
| 189 | } | 203 | } |
| 204 | .fixedKP{position: fixed;background: linear-gradient(-90deg, #8623FC, #453DEA);left: 0; | ||
| 205 | top:450px;cursor: pointer; | ||
| 206 | color: #fff;border-radius: 50%;width: 60px;height: 60px;text-align: center; | ||
| 207 | img{width: 26px;height: 26px;display: block;margin:10px auto 0px;} | ||
| 208 | font-size: 13px; | ||
| 209 | box-shadow: 0 0 10px rgba(0,0,0,0.6); | ||
| 210 | } | ||
| 190 | </style> | 211 | </style> | ... | ... |
| ... | @@ -84,8 +84,8 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -84,8 +84,8 @@ export default defineConfig(({ mode, command }) => { |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | // target: 'http://192.168.1.118:8081/', | 85 | // target: 'http://192.168.1.118:8081/', |
| 86 | // target: 'http://192.168.1.131:8081/', | 86 | // target: 'http://192.168.1.131:8081/', |
| 87 | // target: 'https://jijin.wtwuxicenter.com/stage-api', | 87 | target: 'https://jijin.wtwuxicenter.com/stage-api', |
| 88 | target: 'https://wdsfwuxicenter.com/stage-api/', | 88 | // target: 'https://wdsfwuxicenter.com/stage-api/', |
| 89 | changeOrigin: true, | 89 | changeOrigin: true, |
| 90 | rewrite: (p) => p.replace(/^\/dev-api/, '') | 90 | rewrite: (p) => p.replace(/^\/dev-api/, '') |
| 91 | }, | 91 | }, | ... | ... |
-
Please register or sign in to post a comment