no message
Showing
8 changed files
with
236 additions
and
3 deletions
| ... | @@ -104,3 +104,35 @@ export function createPalPay(data) { | ... | @@ -104,3 +104,35 @@ export function createPalPay(data) { |
| 104 | data:data | 104 | data:data |
| 105 | }) | 105 | }) |
| 106 | } | 106 | } |
| 107 | export function getInvoiceByActiveId(query) { | ||
| 108 | return request({ | ||
| 109 | url: `/ota/invoice/list`, | ||
| 110 | method: 'get', | ||
| 111 | params: query | ||
| 112 | }) | ||
| 113 | } | ||
| 114 | export function getCanInvoiceBills(query) { | ||
| 115 | return request({ | ||
| 116 | url: `/ota/norder/list`, | ||
| 117 | method: 'get', | ||
| 118 | params: query | ||
| 119 | }) | ||
| 120 | } | ||
| 121 | export function cancelOrder(orderId) { | ||
| 122 | return request({ | ||
| 123 | // url: `/logex/norder/unSubscribeOrderBack/${orderId}`, | ||
| 124 | url: `/ota/norder/applyOrderBack/${orderId}`, | ||
| 125 | method: 'post', | ||
| 126 | params: orderId | ||
| 127 | }) | ||
| 128 | } | ||
| 129 | // 取消 | ||
| 130 | export function cancelOrder2(orderId) { | ||
| 131 | return request({ | ||
| 132 | url: `/ota/norder/cancelOrderBack/${orderId}`, | ||
| 133 | method: 'post', | ||
| 134 | params: orderId | ||
| 135 | }) | ||
| 136 | } | ||
| 137 | |||
| 138 | ... | ... |
| ... | @@ -420,6 +420,12 @@ export const constantRoutes = [ | ... | @@ -420,6 +420,12 @@ export const constantRoutes = [ |
| 420 | component: () => import('@/viewsPc/booking/payOk'), | 420 | component: () => import('@/viewsPc/booking/payOk'), |
| 421 | name: 'bookingPayOk', | 421 | name: 'bookingPayOk', |
| 422 | meta: { title: 'payOk' } | 422 | meta: { title: 'payOk' } |
| 423 | }, | ||
| 424 | { | ||
| 425 | path: 'invoice', | ||
| 426 | component: () => import('@/viewsPc/booking/invoicing'), | ||
| 427 | name: 'invoice', | ||
| 428 | meta: { title: '我的发票' } | ||
| 423 | } | 429 | } |
| 424 | ] | 430 | ] |
| 425 | }, | 431 | }, | ... | ... |
src/viewsPc/booking/Invoicing.vue
0 → 100644
| 1 | <template> | ||
| 2 | <div> | ||
| 3 | <div class="box"> | ||
| 4 | <div class="indexTitle"> | ||
| 5 | <h3 class="leftboderTT">{{ language==0?'我的发票':'My invoice' }} | ||
| 6 | <el-button @click="goAdd" type="primary" class="btn-lineG fr">开发票</el-button> | ||
| 7 | </h3> | ||
| 8 | </div> | ||
| 9 | <el-card class="mt30 mb60"> | ||
| 10 | <div class="billItem" v-for="b in list" :key="b.id"> | ||
| 11 | <!-- parentType --> | ||
| 12 | <div> | ||
| 13 | 申请日期: | ||
| 14 | {{ b.createTime }} | ||
| 15 | </div> | ||
| 16 | <div style="display: flex;justify-content: space-between;"> | ||
| 17 | <div> 发票形式 - | ||
| 18 | <span v-if="b.invoiceForm=='1'">电子发票</span> | ||
| 19 | <span v-if="b.invoiceForm=='2'">纸质普票</span> | ||
| 20 | <span v-if="b.invoiceForm=='3'">纸质专票</span> | ||
| 21 | </div> | ||
| 22 | <div>¥ <span>{{b.total}}</span></div> | ||
| 23 | </div> | ||
| 24 | <div style="margin: 20px 0 0;display: flex;justify-content: space-between;"> | ||
| 25 | <div class="status"> | ||
| 26 | <div class="success" v-if="b.isInvoice == '1'"> 已开票</div> | ||
| 27 | <div class="warning" v-if="b.isInvoice == '0'">未开票</div> | ||
| 28 | <div class="success" v-if="b.isInvoice == '3'"> 已寄出</div> | ||
| 29 | <div class="warning" v-if="b.isInvoice == '2'"> 已取消</div> | ||
| 30 | </div> | ||
| 31 | <div> | ||
| 32 | <button class="billbtn" v-if="b.isInvoice == '0'" @click.stop="editDetail(b)"> 修改发票</button> | ||
| 33 | <button class="billbtn rbtn-m-kx" | ||
| 34 | @click.stop="showDetail(b)">详情</button> | ||
| 35 | |||
| 36 | </div> | ||
| 37 | </div> | ||
| 38 | |||
| 39 | </div> | ||
| 40 | <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> | ||
| 41 | |||
| 42 | </el-card> | ||
| 43 | |||
| 44 | </div> | ||
| 45 | </div> | ||
| 46 | |||
| 47 | <chose-bills ref="dialogChoseBillsRef"/> | ||
| 48 | </template> | ||
| 49 | |||
| 50 | <script setup> | ||
| 51 | import ChoseBills from './component/choseBills' | ||
| 52 | import { ref } from 'vue' | ||
| 53 | import {getInvoiceByActiveId} from "@/apiPc/booking" | ||
| 54 | import {getCurrentInstance} from "@vue/runtime-core" | ||
| 55 | import {useStorage} from "@vueuse/core/index"; | ||
| 56 | const language= useStorage('language',0) | ||
| 57 | const {proxy} = getCurrentInstance() | ||
| 58 | const list = ref([]) | ||
| 59 | const query = ref({ | ||
| 60 | activeId:'', | ||
| 61 | createById:'', | ||
| 62 | venueId:'' | ||
| 63 | }) | ||
| 64 | getList() | ||
| 65 | function getList() { | ||
| 66 | getInvoiceByActiveId(query.value).then(res=>{ | ||
| 67 | list.value = res.rows | ||
| 68 | }) | ||
| 69 | } | ||
| 70 | function goAdd() { | ||
| 71 | //选择开票订单 | ||
| 72 | var obj = { | ||
| 73 | title: '选择开票订单', | ||
| 74 | show: true, | ||
| 75 | choosedList:[] | ||
| 76 | } | ||
| 77 | proxy.$refs['dialogChoseBillsRef'].open(obj) | ||
| 78 | } | ||
| 79 | </script> | ||
| 80 | |||
| 81 | <style scoped lang="scss"> | ||
| 82 | .leftboderTT{ | ||
| 83 | font-size: 20px;} | ||
| 84 | </style> |
src/viewsPc/booking/component/choseBills.vue
0 → 100644
| 1 | <template> | ||
| 2 | <el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close"> | ||
| 3 | <el-table ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange"> | ||
| 4 | <el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/> | ||
| 5 | <el-table-column prop="id" label="订单号"></el-table-column> | ||
| 6 | <el-table-column prop="id" label="订单类型"></el-table-column> | ||
| 7 | <el-table-column prop="id" label="订单明细"> | ||
| 8 | <template #default="scope"> | ||
| 9 | <div v-if="scope.row.orderType == 0"> | ||
| 10 | <p>{{scope.row.messageObj.roomName}}</p> | ||
| 11 | <p>{{scope.row.messageObj.roomInfo}}</p> | ||
| 12 | <p>{{scope.row.messageObj.roomType}}</p> | ||
| 13 | <p>{{scope.row.messageObj.roomStayDate}}</p> | ||
| 14 | </div> | ||
| 15 | <div v-if="scope.row.orderType == 1"> | ||
| 16 | <div v-for="(car,index) in scope.row.messageObj.carsList" :key="index"> | ||
| 17 | <p v-if="car.num>0">{{car.name}}:{{car.num}} 辆</p> | ||
| 18 | </div> | ||
| 19 | </div> | ||
| 20 | <div v-if="scope.row.orderType == 2"> | ||
| 21 | <div v-for="(n,index) in scope.row.messageObj.foodsList" :key="index"> | ||
| 22 | <p v-if="n.num > 0"> | ||
| 23 | {{n.name}}({{n.categoryName}}) <text>{{n.num}} 份</text> | ||
| 24 | </p> | ||
| 25 | </div> | ||
| 26 | </div> | ||
| 27 | </template> | ||
| 28 | </el-table-column> | ||
| 29 | <el-table-column prop="total" label="金额"></el-table-column> | ||
| 30 | </el-table> | ||
| 31 | <paginationPc | ||
| 32 | v-show="total>0" | ||
| 33 | v-model:page="query.pageNum" | ||
| 34 | v-model:limit="query.pageSize" | ||
| 35 | :total="total" | ||
| 36 | @pagination="getList" | ||
| 37 | /> | ||
| 38 | <template #footer> | ||
| 39 | <div class="dialog-footer text-center"> | ||
| 40 | <el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button> | ||
| 41 | <el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button> | ||
| 42 | </div> | ||
| 43 | </template> | ||
| 44 | </el-dialog> | ||
| 45 | </template> | ||
| 46 | |||
| 47 | <script setup> | ||
| 48 | import {reactive, ref, toRefs, watch} from 'vue' | ||
| 49 | import {getCurrentInstance} from "@vue/runtime-core"; | ||
| 50 | import {useStorage} from "@vueuse/core/index"; | ||
| 51 | import {getCanInvoiceBills} from "@/apiPc/booking"; | ||
| 52 | const {proxy} = getCurrentInstance() | ||
| 53 | const emit = defineEmits([ 'transfer']) | ||
| 54 | const language= useStorage('language',0) | ||
| 55 | const data = reactive({ | ||
| 56 | tableData: [], | ||
| 57 | show: false, | ||
| 58 | loading: false, | ||
| 59 | title: '选择开票订单', | ||
| 60 | query:{ | ||
| 61 | activeId:'', | ||
| 62 | createById:'', | ||
| 63 | invoiced:'1', | ||
| 64 | // venueId:'' | ||
| 65 | }, | ||
| 66 | total:0 | ||
| 67 | }) | ||
| 68 | const { tableData,show,loading,title,query,total} = toRefs(data) | ||
| 69 | let choosedList = [] | ||
| 70 | const choosedIds = [] | ||
| 71 | const open = (params) => { | ||
| 72 | title.value = params.title | ||
| 73 | show.value = true | ||
| 74 | choosedList = params.choosedList | ||
| 75 | for (const p of choosedList) { | ||
| 76 | choosedIds.push(p.id) | ||
| 77 | } | ||
| 78 | getList() | ||
| 79 | } | ||
| 80 | defineExpose({ | ||
| 81 | open | ||
| 82 | }) | ||
| 83 | const getList = () => { | ||
| 84 | loading.value = true | ||
| 85 | getCanInvoiceBills(query.value).then(res=>{ | ||
| 86 | loading.value = false | ||
| 87 | tableData.value = res.data.rows | ||
| 88 | total.value = res.data.total | ||
| 89 | |||
| 90 | for (var b of tableData.value) { | ||
| 91 | b.messageObj = JSON.parse(b.message) | ||
| 92 | } | ||
| 93 | }) | ||
| 94 | } | ||
| 95 | const submit = () => { | ||
| 96 | |||
| 97 | } | ||
| 98 | const cancel = () => { | ||
| 99 | show.value = false | ||
| 100 | } | ||
| 101 | |||
| 102 | |||
| 103 | </script> | ||
| 104 | |||
| 105 | <style scoped lang="scss"> | ||
| 106 | |||
| 107 | </style> |
| ... | @@ -119,6 +119,7 @@ const rules = ref({}) | ... | @@ -119,6 +119,7 @@ const rules = ref({}) |
| 119 | let usedays = 0 | 119 | let usedays = 0 |
| 120 | onMounted(() => { | 120 | onMounted(() => { |
| 121 | food.value = JSON.parse(decodeURIComponent(route.query.food)) | 121 | food.value = JSON.parse(decodeURIComponent(route.query.food)) |
| 122 | form.value = food.value | ||
| 122 | restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant)) | 123 | restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant)) |
| 123 | if(language.value == 0){ | 124 | if(language.value == 0){ |
| 124 | form.value.total = food.value.foodPrice | 125 | form.value.total = food.value.foodPrice | ... | ... |
This diff is collapsed.
Click to expand it.
| ... | @@ -66,8 +66,9 @@ | ... | @@ -66,8 +66,9 @@ |
| 66 | </div> | 66 | </div> |
| 67 | 67 | ||
| 68 | </div> | 68 | </div> |
| 69 | <div class="pd20"></div> | ||
| 70 | </el-card> | 69 | </el-card> |
| 70 | <div class="pd20"></div> | ||
| 71 | |||
| 71 | </div> | 72 | </div> |
| 72 | </template> | 73 | </template> |
| 73 | 74 | ||
| ... | @@ -100,7 +101,9 @@ function goDetail(b) { | ... | @@ -100,7 +101,9 @@ function goDetail(b) { |
| 100 | }) | 101 | }) |
| 101 | } | 102 | } |
| 102 | function toInvoice(){ | 103 | function toInvoice(){ |
| 103 | 104 | router.push({ | |
| 105 | name: 'invoice' | ||
| 106 | }) | ||
| 104 | } | 107 | } |
| 105 | 108 | ||
| 106 | </script> | 109 | </script> | ... | ... |
| ... | @@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => { | ... | @@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => { |
| 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') | 82 | rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '') |
| 83 | }, | 83 | }, |
| 84 | '/dev-api': { | 84 | '/dev-api': { |
| 85 | target: 'http://192.168.1.131:8081/', | 85 | target: 'http://192.168.1.118:8081/', |
| 86 | // target: 'https://dance.itechtop.cn/stage-api', | 86 | // target: 'https://dance.itechtop.cn/stage-api', |
| 87 | // target: 'https://wdsfwuxicenter.com/stage-api', | 87 | // target: 'https://wdsfwuxicenter.com/stage-api', |
| 88 | changeOrigin: true, | 88 | changeOrigin: true, | ... | ... |
-
Please register or sign in to post a comment