a8a815df by zhangmeng

票务

1 parent ce2e4083
...@@ -208,6 +208,7 @@ export function submitCptInvoice(form) { ...@@ -208,6 +208,7 @@ export function submitCptInvoice(form) {
208 data: form 208 data: form
209 }) 209 })
210 } 210 }
211
211 export function editInvoice(form) { 212 export function editInvoice(form) {
212 return request({ 213 return request({
213 url: `/ota/invoice`, 214 url: `/ota/invoice`,
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
14 <label class="purpleTag" v-if="b.orderType == 2"> {{ language==0?'餐饮订单':'DINING' }}</label> 14 <label class="purpleTag" v-if="b.orderType == 2"> {{ language==0?'餐饮订单':'DINING' }}</label>
15 <label class="pinkTag" v-if="b.orderType == 3"> {{ language==0?'化妆订单':'MakeUp' }}</label> 15 <label class="pinkTag" v-if="b.orderType == 3"> {{ language==0?'化妆订单':'MakeUp' }}</label>
16 <label class="yellowTag" v-if="b.orderType == 4"> {{ language==0?'拍摄订单':'Shooting'}}</label> 16 <label class="yellowTag" v-if="b.orderType == 4"> {{ language==0?'拍摄订单':'Shooting'}}</label>
17 <label class="yellowTag" v-if="orderType == 6"> {{ language==0?'票务':'Ticket'}}</label>
17 <label class="bg-primary" v-if="!b.orderType"> {{ language==0?'赛事报名':'REGISTRATION' }}</label> 18 <label class="bg-primary" v-if="!b.orderType"> {{ language==0?'赛事报名':'REGISTRATION' }}</label>
18 19
19 <h3 v-if="b.name">{{ b.name }}</h3> 20 <h3 v-if="b.name">{{ b.name }}</h3>
...@@ -61,7 +62,7 @@ ...@@ -61,7 +62,7 @@
61 <div class="border-rr mt20 pd20"> 62 <div class="border-rr mt20 pd20">
62 <el-form class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef"> 63 <el-form class="mw500" :model="form" :label-width="language == 0 ?'100':'150'" :rules="rules" ref="formRef">
63 <el-form-item :label="language == 0 ?'开票金额':'Amount'"> 64 <el-form-item :label="language == 0 ?'开票金额':'Amount'">
64 <span class="bigprice">¥{{totalMoney}}</span> 65 <span class="bigprice">{{paymentType==1?'¥':'€'}}{{totalMoney}}</span>
65 </el-form-item> 66 </el-form-item>
66 67
67 <el-form-item :label="language == 0 ?`发票形式`:'Invoice Form'" required prop="invoiceForm"> 68 <el-form-item :label="language == 0 ?`发票形式`:'Invoice Form'" required prop="invoiceForm">
...@@ -71,9 +72,7 @@ ...@@ -71,9 +72,7 @@
71 <!-- <el-radio value="3" v-if="kpType.indexOf('3')!=-1">{{ language == 0 ? '纸质专票' : 'Paper-special-invoice' }}</el-radio>--> 72 <!-- <el-radio value="3" v-if="kpType.indexOf('3')!=-1">{{ language == 0 ? '纸质专票' : 'Paper-special-invoice' }}</el-radio>-->
72 </el-radio-group> 73 </el-radio-group>
73 </el-form-item> 74 </el-form-item>
74 <!-- <el-form-item :label="`邮箱`" v-if="form.invoiceForm=='1'" required prop="address">--> 75
75 <!-- <el-input v-model="form.address"/>-->
76 <!-- </el-form-item>-->
77 <!-- <el-form-item :label="`邮寄地址`" v-else required>--> 76 <!-- <el-form-item :label="`邮寄地址`" v-else required>-->
78 <!-- <el-button plain type="primary" size="small" v-if="addrList.length==0" @click="goEditAddress">--> 77 <!-- <el-button plain type="primary" size="small" v-if="addrList.length==0" @click="goEditAddress">-->
79 <!-- +{{ language==0?'添加地址':'Add' }}--> 78 <!-- +{{ language==0?'添加地址':'Add' }}-->
...@@ -100,6 +99,9 @@ ...@@ -100,6 +99,9 @@
100 <el-form-item :label="language == 0 ?`税号`:'Duty Paragraph'" required v-if="form.invoiceType=='0'" prop="invoiceTfn"> 99 <el-form-item :label="language == 0 ?`税号`:'Duty Paragraph'" required v-if="form.invoiceType=='0'" prop="invoiceTfn">
101 <el-input v-model="form.invoiceTfn"/> 100 <el-input v-model="form.invoiceTfn"/>
102 </el-form-item> 101 </el-form-item>
102 <el-form-item :label="`邮箱`" v-if="form.invoiceForm=='1'" required prop="invoiceEmail">
103 <el-input v-model="form.invoiceEmail"/>
104 </el-form-item>
103 <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'"> 105 <div v-if="form.invoiceForm=='3'&&form.invoiceType=='0'">
104 <el-form-item :label="`地址`" required prop="invoiceAddress"> 106 <el-form-item :label="`地址`" required prop="invoiceAddress">
105 <el-input v-model="form.invoiceAddress"/> 107 <el-input v-model="form.invoiceAddress"/>
...@@ -151,6 +153,7 @@ import dayjs from 'dayjs' ...@@ -151,6 +153,7 @@ import dayjs from 'dayjs'
151 import {ElMessage,ElMessageBox} from "element-plus"; 153 import {ElMessage,ElMessageBox} from "element-plus";
152 import useUserStore from "@/store/modules/user"; 154 import useUserStore from "@/store/modules/user";
153 import {getCurrentInstance} from "@vue/runtime-core"; 155 import {getCurrentInstance} from "@vue/runtime-core";
156 import {submitTitckInvoice,invoice} from '@/viewsPc/seat/api/index'
154 import { 157 import {
155 addressList, 158 addressList,
156 editInvoice, 159 editInvoice,
...@@ -169,6 +172,8 @@ const form = ref({ ...@@ -169,6 +172,8 @@ const form = ref({
169 invoiceForm: '1', 172 invoiceForm: '1',
170 invoiceType: '0' 173 invoiceType: '0'
171 }) 174 })
175 const orderType=ref(1)
176 const paymentType=ref(1)
172 const list = ref([]) 177 const list = ref([])
173 const addrList = ref([]) 178 const addrList = ref([])
174 const nowAddress = ref({}) 179 const nowAddress = ref({})
...@@ -179,7 +184,7 @@ const rules = ref({ ...@@ -179,7 +184,7 @@ const rules = ref({
179 invoiceType: [ 184 invoiceType: [
180 {required: true, message: language.value==0?'请选择发票类型':'Please select invoice type', trigger: 'change'} 185 {required: true, message: language.value==0?'请选择发票类型':'Please select invoice type', trigger: 'change'}
181 ], 186 ],
182 address: [ 187 invoiceEmail: [
183 {required: true, message: language.value==0?'请输入邮箱':'Please enter email', trigger: 'blur'} 188 {required: true, message: language.value==0?'请输入邮箱':'Please enter email', trigger: 'blur'}
184 ], 189 ],
185 invoiceForm: [ 190 invoiceForm: [
...@@ -208,14 +213,20 @@ const isEdit = ref(false) ...@@ -208,14 +213,20 @@ const isEdit = ref(false)
208 let invoiceId 213 let invoiceId
209 let cptId 214 let cptId
210 onMounted(() => { 215 onMounted(() => {
216 console.log(route.query)
217 orderType.value=route.query.orderType
218 paymentType.value=route.query.paymentType
211 if(route.query.orders){ 219 if(route.query.orders){
212 let obj = JSON.parse(decodeURIComponent(route.query.orders)) || {} 220 let obj = JSON.parse(decodeURIComponent(route.query.orders)) || {}
213 if(obj.cptId){ 221 if(obj.cptId){
214 cptId = obj.cptId 222 cptId = obj.cptId
215 } 223 }else if(obj.activeId){
216 if(obj.activeId){
217 cptId = obj.activeId 224 cptId = obj.activeId
225 }else{
226 cptId = '1778253367748993026'
218 } 227 }
228
229 console.log(obj)
219 getRemark() 230 getRemark()
220 let arr = [] 231 let arr = []
221 list.value.push(obj) 232 list.value.push(obj)
...@@ -234,6 +245,7 @@ onMounted(() => { ...@@ -234,6 +245,7 @@ onMounted(() => {
234 totalMoney.value = route.query.totalMoney 245 totalMoney.value = route.query.totalMoney
235 form.value.total = totalMoney.value 246 form.value.total = totalMoney.value
236 } 247 }
248
237 // if(route.query.kpType){ 249 // if(route.query.kpType){
238 // kpType.value = route.query.kpType 250 // kpType.value = route.query.kpType
239 // if(kpType.value.indexOf('2')>-1 || kpType.value.indexOf('3')>-1){ 251 // if(kpType.value.indexOf('2')>-1 || kpType.value.indexOf('3')>-1){
...@@ -275,6 +287,14 @@ function getList() { ...@@ -275,6 +287,14 @@ function getList() {
275 }); 287 });
276 } 288 }
277 289
290 // 回显
291 if (orderType.value==6){
292 invoice(invoiceId).then(res=>{
293 console.log(res)
294 // form.value = res.data;
295 // totalMoney.value = form.value.total
296 })
297 }else{
278 getInvoiceDetail(invoiceId).then(res => { 298 getInvoiceDetail(invoiceId).then(res => {
279 form.value = res.data; 299 form.value = res.data;
280 totalMoney.value = form.value.total 300 totalMoney.value = form.value.total
...@@ -283,6 +303,8 @@ function getList() { ...@@ -283,6 +303,8 @@ function getList() {
283 // } 303 // }
284 // getAddrList() 304 // getAddrList()
285 }); 305 });
306 }
307
286 } 308 }
287 309
288 function goEditAddress(id) { 310 function goEditAddress(id) {
...@@ -324,6 +346,7 @@ function submit() { ...@@ -324,6 +346,7 @@ function submit() {
324 form.value.activeId = cptId 346 form.value.activeId = cptId
325 form.value.total = totalMoney.value 347 form.value.total = totalMoney.value
326 form.value.version = 2 348 form.value.version = 2
349 form.value.invoicePhone=paymentType.value
327 if (isEdit.value) { 350 if (isEdit.value) {
328 update() 351 update()
329 } else { 352 } else {
...@@ -341,13 +364,16 @@ function update() { ...@@ -341,13 +364,16 @@ function update() {
341 }) 364 })
342 } 365 }
343 function add() { 366 function add() {
344 if(list.value[0].orderType||list.value[0].orderType==0){ 367 if(orderType.value==6){
368 submitTitckInvoice(form.value).then((res)=>{
369 backList()
370 })
371 }else if(list.value[0].orderType||list.value[0].orderType==0){
345 submitInvoice(form.value).then(res=>{ 372 submitInvoice(form.value).then(res=>{
346 //返回列表 373 //返回列表
347 backList() 374 backList()
348 }) 375 })
349 } else { 376 } else {
350 console.log(list.value[0].orderType,'2')
351 submitCptInvoice(form.value).then(res=>{ 377 submitCptInvoice(form.value).then(res=>{
352 //返回列表 378 //返回列表
353 backList() 379 backList()
......
...@@ -156,13 +156,13 @@ const menus = ref([ ...@@ -156,13 +156,13 @@ const menus = ref([
156 picUrl2: '/img/nav_30_dwn.png', 156 picUrl2: '/img/nav_30_dwn.png',
157 isActive: false 157 isActive: false
158 }, 158 },
159 // { 159 {
160 // name: language.value==0?'发票申请':'Electronic invoice', 160 name: language.value==0?'发票申请':'Electronic invoice',
161 // routeName: 'myKP', 161 routeName: 'myKP',
162 // picUrl1: '/img/fp.svg', 162 picUrl1: '/img/fp.svg',
163 // picUrl2: '/img/fp_dwn.svg', 163 picUrl2: '/img/fp_dwn.svg',
164 // isActive: false 164 isActive: false
165 // } 165 }
166 ]) 166 ])
167 const menusEn = ref([ 167 const menusEn = ref([
168 { 168 {
...@@ -251,13 +251,13 @@ const menus3 = ref([ ...@@ -251,13 +251,13 @@ const menus3 = ref([
251 picUrl2: '/img/c7.png', 251 picUrl2: '/img/c7.png',
252 isActive: false 252 isActive: false
253 }, 253 },
254 // { 254 {
255 // name: language.value==0?'发票申请':'Electronic invoice', 255 name: language.value==0?'发票申请':'Electronic invoice',
256 // routeName: 'myKP', 256 routeName: 'myKP',
257 // picUrl1: '/img/fp.svg', 257 picUrl1: '/img/fp.svg',
258 // picUrl2: '/img/fp_dwn.svg', 258 picUrl2: '/img/fp_dwn.svg',
259 // isActive: false 259 isActive: false
260 // } 260 }
261 ]) 261 ])
262 const menus3En = ref([ 262 const menus3En = ref([
263 { 263 {
...@@ -332,13 +332,13 @@ const menusPersonal = ref([ ...@@ -332,13 +332,13 @@ const menusPersonal = ref([
332 picUrl2: '/img/nav_30_dwn.png', 332 picUrl2: '/img/nav_30_dwn.png',
333 isActive: false 333 isActive: false
334 }, 334 },
335 // { 335 {
336 // name: language.value==0?'发票申请':'Electronic invoice', 336 name: language.value==0?'发票申请':'Electronic invoice',
337 // routeName: 'myKP', 337 routeName: 'myKP',
338 // picUrl1: '/img/fp.svg', 338 picUrl1: '/img/fp.svg',
339 // picUrl2: '/img/fp_dwn.svg', 339 picUrl2: '/img/fp_dwn.svg',
340 // isActive: false 340 isActive: false
341 // } 341 }
342 ]) 342 ])
343 const menusPersonalEn = ref([ 343 const menusPersonalEn = ref([
344 { 344 {
...@@ -386,6 +386,7 @@ const menusPersonalEn = ref([ ...@@ -386,6 +386,7 @@ const menusPersonalEn = ref([
386 ]) 386 ])
387 let currMenu 387 let currMenu
388 onMounted(() => { 388 onMounted(() => {
389 console.log(route.query)
389 if(!user.utype){ 390 if(!user.utype){
390 router.push({name: 'home'}) 391 router.push({name: 'home'})
391 return 392 return
......
...@@ -14,12 +14,31 @@ ...@@ -14,12 +14,31 @@
14 <el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2"></el-tab-pane> 14 <el-tab-pane :label="language==0?'餐饮订单':'DINING'" name="2"></el-tab-pane>
15 <el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4"></el-tab-pane> 15 <el-tab-pane :label="language==0?'摄像订单':'Shooting'" name="4"></el-tab-pane>
16 </el-tabs> 16 </el-tabs>
17 <div>
18 <el-form label-width="90" size="small">
19 <el-form-item label="开票状态">
20 <el-select
21 v-model="query.invoiced"
22 clearable
23 placeholder="选择发票状态"
24 style="width: 200px"
25 @change="getList"
26 >
27 <el-option label="全部" value="0" />
28 <el-option label="未申请发票" value="1" />
29 <el-option label="已申请发票" value="2" />
30 <el-option label="已开发票" value="3" />
31 </el-select>
32 </el-form-item>
33 </el-form>
34 </div>
17 <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/> 35 <el-empty :image="`/img/order_no.png`" :image-size="228" v-if="list?.length == 0"/>
18 <div v-if="activeName=='6'" class="pd20"> 36 <div v-if="activeName=='6'" class="pd20">
19 <div v-for="b in list" class="item" v-loading="loading"> 37 <div v-for="b in list" class="item" v-loading="loading">
20 <div class="title"> 38 <div class="title">
21 <label class="orangeTag"> {{ language==0?'票务':'Ticket' }} </label> 39 <label class="orangeTag"> {{ language==0?'票务':'Ticket' }} </label>
22 <span>{{b.orderSn}}</span> 40 <span>{{b.orderSn}}</span>
41 <span class="fr text-warning status">{{b.invoiceStr}}</span>
23 </div> 42 </div>
24 43
25 <el-row class="pd20 mt10" justify="space-between" align="middle"> 44 <el-row class="pd20 mt10" justify="space-between" align="middle">
...@@ -213,7 +232,8 @@ const user = useUserStore().user || {} ...@@ -213,7 +232,8 @@ const user = useUserStore().user || {}
213 const userStore = useUserStore(); 232 const userStore = useUserStore();
214 const query = ref({ 233 const query = ref({
215 createById: user.userId, 234 createById: user.userId,
216 orderType:'5' 235 orderType:'5',
236 invoiced:'0'
217 }) 237 })
218 const {proxy} = getCurrentInstance() 238 const {proxy} = getCurrentInstance()
219 const list = ref([]) 239 const list = ref([])
...@@ -235,7 +255,6 @@ const getList = () => { ...@@ -235,7 +255,6 @@ const getList = () => {
235 }else if(query.value.orderType=='6'){ 255 }else if(query.value.orderType=='6'){
236 login() 256 login()
237 }else { 257 }else {
238 query.value.invoiced = 1
239 getCanInvoiceBills(query.value).then(res=>{ 258 getCanInvoiceBills(query.value).then(res=>{
240 list.value = res.rows 259 list.value = res.rows
241 for (let b of list.value) { 260 for (let b of list.value) {
...@@ -247,6 +266,7 @@ const getList = () => { ...@@ -247,6 +266,7 @@ const getList = () => {
247 266
248 } 267 }
249 const login = async () => { 268 const login = async () => {
269 // 票务
250 const userId = userStore.user?.userId; 270 const userId = userStore.user?.userId;
251 const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32); 271 const sign = md5(`uid=${userId}lgo1acfkw51jfo`, 32);
252 return loginFree({ 272 return loginFree({
...@@ -254,16 +274,18 @@ const login = async () => { ...@@ -254,16 +274,18 @@ const login = async () => {
254 sign, 274 sign,
255 }).then((res) => { 275 }).then((res) => {
256 setToken(res.data.token); 276 setToken(res.data.token);
257 getCanInvoiceTicket().then(res=>{ 277 getCanInvoiceTicket(query.value).then(res=>{
258 loading.value = false 278 loading.value = false
259 list.value = res.data.lists 279 list.value = res.data.lists
260 }) 280 })
261 }) 281 })
262 } 282 }
283
263 const handleClick = (e) => { 284 const handleClick = (e) => {
264 console.log(e.paneName) 285 console.log(e.paneName)
265 query.value.orderType = e.paneName 286 query.value.orderType = e.paneName
266 list.value = [] 287 list.value = []
288 query.value.invoiced='0'
267 getList() 289 getList()
268 } 290 }
269 const gokp = (item) => { 291 const gokp = (item) => {
...@@ -271,7 +293,9 @@ const gokp = (item) => { ...@@ -271,7 +293,9 @@ const gokp = (item) => {
271 path: '/booking/addInvoice', 293 path: '/booking/addInvoice',
272 query: { 294 query: {
273 orders: encodeURIComponent(JSON.stringify(item)), 295 orders: encodeURIComponent(JSON.stringify(item)),
274 totalMoney:item.total||item.totalPayAmount 296 totalMoney:item.total||item.totalPayAmount||item.payAmount,
297 paymentType:query.value.orderType==6?item.payType:item.paymentType,
298 orderType:query.value.orderType
275 } 299 }
276 }) 300 })
277 } 301 }
...@@ -281,7 +305,9 @@ const editkp = (item) => { ...@@ -281,7 +305,9 @@ const editkp = (item) => {
281 query:{ 305 query:{
282 invoiceId:item.invoiceId, 306 invoiceId:item.invoiceId,
283 type:activeName.value, 307 type:activeName.value,
284 isEdit:true 308 isEdit:true,
309 orderType:query.value.orderType,
310 paymentType:query.value.orderType==6?item.payType:item.paymentType,
285 } 311 }
286 }) 312 })
287 } 313 }
......
...@@ -54,4 +54,9 @@ export const payCallback = (data) => ...@@ -54,4 +54,9 @@ export const payCallback = (data) =>
54 request("POST", `/api/order/palPayTicket/callback/`, data); 54 request("POST", `/api/order/palPayTicket/callback/`, data);
55 export const getCanInvoiceTicket = (data) => 55 export const getCanInvoiceTicket = (data) =>
56 request("GET", `/api/order/getOrderInvoiceList`, data); 56 request("GET", `/api/order/getOrderInvoiceList`, data);
57 57 // 票务
58 export const submitTitckInvoice = (data) =>
59 request("POST", `/api/invoice/makeInvoice`,data);
60 // 重新开票回显
61 export const invoice = (data) =>
62 request("GET", `/api/invoice/${data}`);
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!