43809d5c by 杨炀

no message

1 parent f327101b
......@@ -104,3 +104,35 @@ export function createPalPay(data) {
data:data
})
}
export function getInvoiceByActiveId(query) {
return request({
url: `/ota/invoice/list`,
method: 'get',
params: query
})
}
export function getCanInvoiceBills(query) {
return request({
url: `/ota/norder/list`,
method: 'get',
params: query
})
}
export function cancelOrder(orderId) {
return request({
// url: `/logex/norder/unSubscribeOrderBack/${orderId}`,
url: `/ota/norder/applyOrderBack/${orderId}`,
method: 'post',
params: orderId
})
}
// 取消
export function cancelOrder2(orderId) {
return request({
url: `/ota/norder/cancelOrderBack/${orderId}`,
method: 'post',
params: orderId
})
}
......
......@@ -420,6 +420,12 @@ export const constantRoutes = [
component: () => import('@/viewsPc/booking/payOk'),
name: 'bookingPayOk',
meta: { title: 'payOk' }
},
{
path: 'invoice',
component: () => import('@/viewsPc/booking/invoicing'),
name: 'invoice',
meta: { title: '我的发票' }
}
]
},
......
<template>
<div>
<div class="box">
<div class="indexTitle">
<h3 class="leftboderTT">{{ language==0?'我的发票':'My invoice' }}
<el-button @click="goAdd" type="primary" class="btn-lineG fr">开发票</el-button>
</h3>
</div>
<el-card class="mt30 mb60">
<div class="billItem" v-for="b in list" :key="b.id">
<!-- parentType -->
<div>
申请日期:
{{ b.createTime }}
</div>
<div style="display: flex;justify-content: space-between;">
<div> 发票形式 -
<span v-if="b.invoiceForm=='1'">电子发票</span>
<span v-if="b.invoiceForm=='2'">纸质普票</span>
<span v-if="b.invoiceForm=='3'">纸质专票</span>
</div>
<div>¥ <span>{{b.total}}</span></div>
</div>
<div style="margin: 20px 0 0;display: flex;justify-content: space-between;">
<div class="status">
<div class="success" v-if="b.isInvoice == '1'"> 已开票</div>
<div class="warning" v-if="b.isInvoice == '0'">未开票</div>
<div class="success" v-if="b.isInvoice == '3'"> 已寄出</div>
<div class="warning" v-if="b.isInvoice == '2'"> 已取消</div>
</div>
<div>
<button class="billbtn" v-if="b.isInvoice == '0'" @click.stop="editDetail(b)"> 修改发票</button>
<button class="billbtn rbtn-m-kx"
@click.stop="showDetail(b)">详情</button>
</div>
</div>
</div>
<el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/>
</el-card>
</div>
</div>
<chose-bills ref="dialogChoseBillsRef"/>
</template>
<script setup>
import ChoseBills from './component/choseBills'
import { ref } from 'vue'
import {getInvoiceByActiveId} from "@/apiPc/booking"
import {getCurrentInstance} from "@vue/runtime-core"
import {useStorage} from "@vueuse/core/index";
const language= useStorage('language',0)
const {proxy} = getCurrentInstance()
const list = ref([])
const query = ref({
activeId:'',
createById:'',
venueId:''
})
getList()
function getList() {
getInvoiceByActiveId(query.value).then(res=>{
list.value = res.rows
})
}
function goAdd() {
//选择开票订单
var obj = {
title: '选择开票订单',
show: true,
choosedList:[]
}
proxy.$refs['dialogChoseBillsRef'].open(obj)
}
</script>
<style scoped lang="scss">
.leftboderTT{
font-size: 20px;}
</style>
<template>
<el-dialog v-model="show" :title="title" width="1000px" append-to-body @close="close">
<el-table ref="allBills" :data="tableData" v-loading="loading" @selection-change="handleSelectionChange">
<el-table-column type="selection" :label="language==0?'选择':'Selection'" :selectable="selectable"/>
<el-table-column prop="id" label="订单号"></el-table-column>
<el-table-column prop="id" label="订单类型"></el-table-column>
<el-table-column prop="id" label="订单明细">
<template #default="scope">
<div v-if="scope.row.orderType == 0">
<p>{{scope.row.messageObj.roomName}}</p>
<p>{{scope.row.messageObj.roomInfo}}</p>
<p>{{scope.row.messageObj.roomType}}</p>
<p>{{scope.row.messageObj.roomStayDate}}</p>
</div>
<div v-if="scope.row.orderType == 1">
<div v-for="(car,index) in scope.row.messageObj.carsList" :key="index">
<p v-if="car.num>0">{{car.name}}{{car.num}}</p>
</div>
</div>
<div v-if="scope.row.orderType == 2">
<div v-for="(n,index) in scope.row.messageObj.foodsList" :key="index">
<p v-if="n.num > 0">
{{n.name}}({{n.categoryName}}) <text>{{n.num}}</text>
</p>
</div>
</div>
</template>
</el-table-column>
<el-table-column prop="total" label="金额"></el-table-column>
</el-table>
<paginationPc
v-show="total>0"
v-model:page="query.pageNum"
v-model:limit="query.pageSize"
:total="total"
@pagination="getList"
/>
<template #footer>
<div class="dialog-footer text-center">
<el-button type="primary" @click="submit">{{language==0?'确定':'Confirm'}}</el-button>
<el-button @click="cancel">{{language==0?'取消':'Cancel'}}</el-button>
</div>
</template>
</el-dialog>
</template>
<script setup>
import {reactive, ref, toRefs, watch} from 'vue'
import {getCurrentInstance} from "@vue/runtime-core";
import {useStorage} from "@vueuse/core/index";
import {getCanInvoiceBills} from "@/apiPc/booking";
const {proxy} = getCurrentInstance()
const emit = defineEmits([ 'transfer'])
const language= useStorage('language',0)
const data = reactive({
tableData: [],
show: false,
loading: false,
title: '选择开票订单',
query:{
activeId:'',
createById:'',
invoiced:'1',
// venueId:''
},
total:0
})
const { tableData,show,loading,title,query,total} = toRefs(data)
let choosedList = []
const choosedIds = []
const open = (params) => {
title.value = params.title
show.value = true
choosedList = params.choosedList
for (const p of choosedList) {
choosedIds.push(p.id)
}
getList()
}
defineExpose({
open
})
const getList = () => {
loading.value = true
getCanInvoiceBills(query.value).then(res=>{
loading.value = false
tableData.value = res.data.rows
total.value = res.data.total
for (var b of tableData.value) {
b.messageObj = JSON.parse(b.message)
}
})
}
const submit = () => {
}
const cancel = () => {
show.value = false
}
</script>
<style scoped lang="scss">
</style>
......@@ -119,6 +119,7 @@ const rules = ref({})
let usedays = 0
onMounted(() => {
food.value = JSON.parse(decodeURIComponent(route.query.food))
form.value = food.value
restaurant.value = JSON.parse(decodeURIComponent(route.query.restaurant))
if(language.value == 0){
form.value.total = food.value.foodPrice
......
......@@ -66,8 +66,9 @@
</div>
</div>
<div class="pd20"></div>
</el-card>
<div class="pd20"></div>
</div>
</template>
......@@ -100,7 +101,9 @@ function goDetail(b) {
})
}
function toInvoice(){
router.push({
name: 'invoice'
})
}
</script>
......
......@@ -82,7 +82,7 @@ export default defineConfig(({ mode, command }) => {
rewrite: (p) => p.replace(/^\/dev-api\/ztx-webSite/, '')
},
'/dev-api': {
target: 'http://192.168.1.131:8081/',
target: 'http://192.168.1.118:8081/',
// target: 'https://dance.itechtop.cn/stage-api',
// target: 'https://wdsfwuxicenter.com/stage-api',
changeOrigin: true,
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!