Compare commits

..

No commits in common. '012ccfffaf49e956379bd3708e47d9425b313ff5' and 'e35c980cd443878f4fd1ba893c4a8dd2dcc51f24' have entirely different histories.

@ -1,16 +0,0 @@
# 开发环境
# 页面 title 前缀
VUE_APP_TITLE='链友融财务数字一体化信息系统'
VUE_APP_ENVIRONMENT_TITLE='开发服'
# 页面根路径
BASE_URL='/'
# 网络请求公用地址
VUE_APP_API= '/'
# 请求环境
# 方楠
VUE_APP_BASE_API = 'https://2537287x0n.imdo.co'

@ -1,16 +0,0 @@
# 开发环境
# 页面 title 前缀
VUE_APP_TITLE='链友融财务数字一体化信息系统'
VUE_APP_ENVIRONMENT_TITLE='正式服'
# 页面根路径
BASE_URL='/'
# 网络请求公用地址
VUE_APP_API= '/'
# 请求环境
# 方楠
VUE_APP_BASE_API = 'https://2537287x0n.imdo.co'

@ -5,10 +5,7 @@ ENV = 'development'
VUE_APP_TITLE = 链友融财务数字一体化信息系统 VUE_APP_TITLE = 链友融财务数字一体化信息系统
# 链友融财务数字一体化信息系统/开发环境 # 链友融财务数字一体化信息系统/开发环境
# 测试 VUE_APP_BASE_API = 'http://60.204.223.58:8080'
#VUE_APP_BASE_API = 'http://60.204.223.58:8080'
# 方楠
VUE_APP_BASE_API = 'https://2537287x0n.imdo.co'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

@ -5,7 +5,7 @@ ENV = 'development'
VUE_APP_TITLE = 链友融财务数字一体化信息系统 VUE_APP_TITLE = 链友融财务数字一体化信息系统
# 链友融财务数字一体化信息系统/开发环境 # 链友融财务数字一体化信息系统/开发环境
VUE_APP_BASE_API = 'https://2537287x0n.imdo.co' VUE_APP_BASE_API = 'http://60.204.223.58:8080'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true

4
.gitignore vendored

@ -7,8 +7,8 @@ package-lock.json
# local env files # local env files
.env.local .env.local
.env.*.local .env.*.local
# .env.production .env.production
# .env.development .env.development
# Log files # Log files
npm-debug.log* npm-debug.log*

@ -69,357 +69,3 @@ export function invoiceCheckApi(data) {
data: data data: data
}) })
} }
export function createInvoice01(data) {
return request({
url: '/bs/invoice01/create',
method: 'post',
data: data
})
}
// 更新我的发票
export function updateInvoice01(data) {
return request({
url: '/bs/invoice01/update',
method: 'put',
data: data
})
}
// 删除我的发票
export function deleteInvoice01(id) {
return request({
url: '/bs/invoice01/delete?id=' + id,
method: 'delete'
})
}
// 获得我的发票
export function getInvoice01(id) {
return request({
url: '/bs/invoice01/myget?id=' + id,
method: 'get'
})
}
// 获得我的发票分页
export function getInvoicePage01(query) {
return request({
url: '/bs/invoice01/mypage',
method: 'get',
params: query
})
}
// 导出我的发票 Excel
export function exportInvoiceExcel01(query) {
return request({
url: '/bs/invoice01/myexport-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 发票识别
export function invoiceScanApi01(data) {
return request({
url: '/bs/invoice01/identify',
method: 'post',
data: data
})
}
// 发票验真
export function invoiceCheckApi01(data) {
return request({
url: '/bs/invoice01/isreal ',
method: 'post',
data: data
})
}
//02
// 创建我的发票
export function createInvoice02(data) {
return request({
url: '/bs/invoice02/create',
method: 'post',
data: data
})
}
// 更新我的发票
export function updateInvoice02(data) {
return request({
url: '/bs/invoice02/update',
method: 'put',
data: data
})
}
// 删除我的发票
export function deleteInvoice02(id) {
return request({
url: '/bs/invoice02/delete?id=' + id,
method: 'delete'
})
}
// 获得我的发票
export function getInvoice02(id) {
return request({
url: '/bs/invoice02/myget?id=' + id,
method: 'get'
})
}
// 获得我的发票分页
export function getInvoicePage02(query) {
return request({
url: '/bs/invoice02/mypage',
method: 'get',
params: query
})
}
// 导出我的发票 Excel
export function exportInvoiceExcel02(query) {
return request({
url: '/bs/invoice02/myexport-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 发票识别
export function invoiceScanApi02(data) {
return request({
url: '/bs/invoice02/identify',
method: 'post',
data: data
})
}
// 发票验真
export function invoiceCheckApi02(data) {
return request({
url: '/bs/invoice02/isreal ',
method: 'post',
data: data
})
}
//03
// 创建我的发票
export function createInvoice03(data) {
return request({
url: '/bs/invoice03/create',
method: 'post',
data: data
})
}
// 更新我的发票
export function updateInvoice03(data) {
return request({
url: '/bs/invoice03/update',
method: 'put',
data: data
})
}
// 删除我的发票
export function deleteInvoice03(id) {
return request({
url: '/bs/invoice03/delete?id=' + id,
method: 'delete'
})
}
// 获得我的发票
export function getInvoice03(id) {
return request({
url: '/bs/invoice03/myget?id=' + id,
method: 'get'
})
}
// 获得我的发票分页
export function getInvoicePage03(query) {
return request({
url: '/bs/invoice03/mypage',
method: 'get',
params: query
})
}
// 导出我的发票 Excel
export function exportInvoiceExcel03(query) {
return request({
url: '/bs/invoice03/myexport-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 发票识别
export function invoiceScanApi03(data) {
return request({
url: '/bs/invoice03/identify',
method: 'post',
data: data
})
}
// 发票验真
export function invoiceCheckApi03(data) {
return request({
url: '/bs/invoice03/isreal ',
method: 'post',
data: data
})
}
//04
// 创建我的发票
export function createInvoice04(data) {
return request({
url: '/bs/invoice04/create',
method: 'post',
data: data
})
}
// 更新我的发票
export function updateInvoice04(data) {
return request({
url: '/bs/invoice04/update',
method: 'put',
data: data
})
}
// 删除我的发票
export function deleteInvoice04(id) {
return request({
url: '/bs/invoice04/delete?id=' + id,
method: 'delete'
})
}
// 获得我的发票
export function getInvoice04(id) {
return request({
url: '/bs/invoice04/myget?id=' + id,
method: 'get'
})
}
// 获得我的发票分页
export function getInvoicePage04(query) {
return request({
url: '/bs/invoice04/mypage',
method: 'get',
params: query
})
}
// 导出我的发票 Excel
export function exportInvoiceExcel04(query) {
return request({
url: '/bs/invoice04/myexport-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 发票识别
export function invoiceScanApi04(data) {
return request({
url: '/bs/invoice04/identify',
method: 'post',
data: data
})
}
// 发票验真
export function invoiceCheckApi04(data) {
return request({
url: '/bs/invoice04/isreal ',
method: 'post',
data: data
})
}
//05
// 创建我的发票
export function createInvoice05(data) {
return request({
url: '/bs/invoice05/create',
method: 'post',
data: data
})
}
// 更新我的发票
export function updateInvoice05(data) {
return request({
url: '/bs/invoice05/update',
method: 'put',
data: data
})
}
// 删除我的发票
export function deleteInvoice05(id) {
return request({
url: '/bs/invoice05/delete?id=' + id,
method: 'delete'
})
}
// 获得我的发票
export function getInvoice05(id) {
return request({
url: '/bs/invoice05/myget?id=' + id,
method: 'get'
})
}
// 获得我的发票分页
export function getInvoicePage05(query) {
return request({
url: '/bs/invoice05/mypage',
method: 'get',
params: query
})
}
// 导出我的发票 Excel
export function exportInvoiceExcel05(query) {
return request({
url: '/bs/invoice05/myexport-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 发票识别
export function invoiceScanApi05(data) {
return request({
url: '/bs/invoice05/identify',
method: 'post',
data: data
})
}
// 发票验真
export function invoiceCheckApi05(data) {
return request({
url: '/bs/invoice05isreal ',
method: 'post',
data: data
})
}

@ -1,5 +1,4 @@
import request from '@/plugin/axios' import request from '@/plugin/axios'
import { getRefreshToken } from '@/utils/auth'
// 登录 // 登录
export function loginIn(data) { export function loginIn(data) {
return request({ return request({
@ -46,13 +45,4 @@ export function reqCheck(data) {
}) })
} }
// 刷新访问令牌
export function refreshToken() {
return request({
url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken(),
method: 'post'
})
}

@ -73,7 +73,7 @@
color: #05a9ff; color: #05a9ff;
margin-left: 0.5rem; margin-left: 0.5rem;
display: flex; display: flex;
align-items: flex-end; align-items: end;
font-size: 0.8rem; font-size: 0.8rem;
::v-deep .van-icon { ::v-deep .van-icon {

@ -58,30 +58,6 @@
} }
} }
.box-cr-row {
// max-width: 50%;
//width: 10rem;
text-align: left;
.cr-tt {
font-size: 1rem;
}
.mt5 {
margin-top: 0.3rem;
}
.tags {
border-radius: 0.2rem;
width: 4rem;
text-align: center;
}
.ct-md {
// color: #ccc;
}
}
.box-rt { .box-rt {
display: flex; display: flex;
@ -91,19 +67,6 @@
// flex-direction: column; // flex-direction: column;
} }
}
.box-rt-sb {
display: flex;
justify-content: space-between;
padding-left: 4rem;
padding-right: 4rem;
.icon-box {
margin-left: 0.3rem;
}
// flex-direction: column;
} }
} }

@ -5,56 +5,21 @@
<div class="Re-select-header-title">发票关联</div> <div class="Re-select-header-title">发票关联</div>
<div class="Re-select-header-confirm" @click="handleConfirm"></div> <div class="Re-select-header-confirm" @click="handleConfirm"></div>
</div> </div>
<van-tabs v-model="invoiceType" :swipe-threshold="4" @change="vanTabsChange">
<van-tab name="01" title="增值税发票" />
<van-tab name="02" title="火车票" />
<van-tab name="03" title="飞机行程票" />
<van-tab name="04" title="网约车行程单" />
<van-tab name="05" title="出租车发票" />
</van-tabs>
<div class="box-1"> <div class="box-1">
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList">
<div class="new-item-box" v-for="(item,index) in tableList" :key="index"> <div class="new-item-box" v-for="(item,index) in tableList" :key="index">
<div class="new-lf"> <div class="new-lf">
<van-checkbox v-model="item.checked" shape="square"></van-checkbox> <van-checkbox v-model="item.checked" shape="square"></van-checkbox>
<!-- <van-image @click="handleShowImg(item)" width="2.5rem" height="2.5rem" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> --> <!-- <van-image @click="handleShowImg(item)" width="2.5rem" height="2.5rem" src="https://img01.yzcdn.cn/vant/cat.jpeg" /> -->
</div> </div>
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '01'"> <div class="new-cr" @click="handleSetCheck(index)">
<div class="mt5">发票消费类型 {{item.serviceType || '-'}}</div> <div>发票代码 {{item.invoiceCode}}</div>
<div class="mt5">发票代码 {{item.invoiceCode || '-'}}</div> <div>发票号码 {{item.invoiceNum}}</div>
<div class="mt5">发票号码 {{item.invoiceNum || '-'}}</div> <div>开票日期 {{ item.invoiceDate ? dayjs(item.invoiceDate).format('YYYY/MM/DD') : ''}}</div>
<div style="margin-top: 0.3rem;color:#333 ">开票日期 {{item.invoiceDate && dayjs(item.invoiceDate).format('YY/MM/DD HH:ss')}}</div>
</div>
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '02'">
<div class="mt5">车票号 {{item.ticketNum || '-'}}</div>
<div class="mt5">始发站 {{item.startingStation || '-'}}</div>
<div class="mt5">到达站 {{item.destinationStation || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">出发日期 {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5">车次号 {{item.trainNum || '-'}}</div>
</div>
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '03'">
<div class="mt5">姓名 {{item.name || '-'}}</div>
<div class="mt5">始发站 {{item.startingStation || '-'}}</div>
<div class="mt5">目的站 {{item.destinationStation || '-'}}</div>
<div class="mt5">航班号 {{item.flight || '-'}}</div>
<div class="mt5">承运人 {{item.carrier || '-'}}</div>
</div>
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '04'">
<div class="mt5">服务商 {{item.serviceProvider || '-'}}</div>
<div class="mt5">行程人手机号 {{item.phone || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 " v-if="item.items && item.items.length > 0"> {{item.items[0].pickupDate && dayjs(item.items[0].pickupDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5" v-if="item.items && item.items.length > 0"> {{item.items[0].startPlace || '-'}}</div>
<div class="mt5" v-if="item.items && item.items.length > 0"> {{item.items[0].destinationPlace || '-'}}</div>
<div class="mt5" v-if="item.items && item.items.length > 0"> {{item.items[0].city || '-'}}</div>
</div>
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '05'">
<div class="mt5">发票代码 {{item.invoiceCode || '-'}}</div>
<div class="mt5">发票号码 {{item.invoiceNum || '-'}}</div>
<div class="mt5">车牌号 {{item.taxiNum || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">日期 {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}</div>
</div> </div>
<!-- <div class="new-rt" @click="handleNewDel(index)">
<van-icon name="delete-o" size="20" />
</div> -->
</div> </div>
</RMList>
</div> </div>
</van-popup> </van-popup>
@ -63,16 +28,9 @@
<script> <script>
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { ImagePreview } from 'vant'; import { ImagePreview } from 'vant';
import {
getInvoicePage01,
getInvoicePage02,
getInvoicePage03,
getInvoicePage04,
getInvoicePage05
} from "@/api/bs/invoice";
export default { export default {
props: { props: {
invoiceIds: Object, // id invoiceIds: Array, // id
isOpen: Boolean, isOpen: Boolean,
isExist: Boolean, // isExist: Boolean, //
tripPartners: Array, // tripPartners: Array, //
@ -81,8 +39,8 @@ export default {
}, },
components: { components: {
RePick: () => import('@/components/ReComponents/RePick'), RePick: () => import('@/components/ReComponents/RePick'),
RMList: () => import('@/components/ReComponents/RMList'),
}, },
// //
computed: { computed: {
// tableList() { // tableList() {
@ -107,23 +65,8 @@ export default {
tableList: [], tableList: [],
demo: false, demo: false,
isShow: false, isShow: false,
invoiceType:'01',
invoiceIdsCopy:{},
moreLoading: false,
refreshing: false,
finished: false,
listQuery:{
pageNo: 1,
pageSize: 10,
}
} }
}, },
created() {
this.$nextTick(()=>{
this.invoiceIdsCopy = this.invoiceIds
this.getList('init')
})
},
watch: { watch: {
isOpen: { isOpen: {
handler(val) { handler(val) {
@ -136,37 +79,26 @@ export default {
deep: true, deep: true,
immediate: true immediate: true
}, },
// list: { list: {
// handler(val) { handler(val) {
// if (val && val.length) { if (val && val.length) {
// let arr = (this.list || []).map(item => { let arr = (this.list || []).map(item => {
// return { return {
// ...item, ...item,
// checked: (this.invoiceIds || []).includes(item.id) checked: (this.invoiceIds || []).includes(item.id)
// } }
// }) })
// this.tableList = JSON.parse(JSON.stringify(arr)) this.tableList = JSON.parse(JSON.stringify(arr))
// } }
// }, },
// deep: true, deep: true,
// immediate: true immediate: true
// } }
}, },
methods: { methods: {
handleSetCheck(index) { handleSetCheck(index) {
// this.tableList // this.tableList
let _this = this
this.$set(this.tableList[index], 'checked', !this.tableList[index].checked) this.$set(this.tableList[index], 'checked', !this.tableList[index].checked)
if(this.tableList[index].checked){
if(!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)){
_this.invoiceIdsCopy[_this.invoiceType] = [];
}
_this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id)
}else {
_this.invoiceIdsCopy[_this.invoiceType].splice(index,1)
}
this.$forceUpdate()
console.log(_this.invoiceIdsCopy)
}, },
handleShowImg() { handleShowImg() {
ImagePreview(['https://img01.yzcdn.cn/vant/apple-1.jpg']); ImagePreview(['https://img01.yzcdn.cn/vant/apple-1.jpg']);
@ -180,8 +112,8 @@ export default {
}, },
handleConfirm() { handleConfirm() {
// let arr = (this.tableList.filter(item => item.checked)).map(item => item.id) || [] let arr = (this.tableList.filter(item => item.checked)).map(item => item.id) || []
this.$emit('onConfirm', this.invoiceIdsCopy) this.$emit('onConfirm', arr)
}, },
hanleCancel() { hanleCancel() {
@ -190,47 +122,8 @@ export default {
handleDel(index) { handleDel(index) {
this.form.tripPartners.splice(index, 1) this.form.tripPartners.splice(index, 1)
}, },
handleLoad() {
this.listQuery.pageNo += 1
this.getList('more')
},
handleRefresh() {
this.listQuery.pageNo = 1
this.finished = false
this.getList('refresh')
},
vanTabsChange(){
this.listQuery.pageNo = 1
this.getList('init')
},
getList(val){
let _this = this
this.moreLoading = true
this.$loading(true, 'tableLoading')
const getInvoicePage = this.invoiceType == '01' ? getInvoicePage01 : this.invoiceType == '02' ? getInvoicePage02 : this.invoiceType == '03' ? getInvoicePage03 : this.invoiceType == '04' ? getInvoicePage04 : getInvoicePage05;
getInvoicePage(_this.listQuery).then(res => {
let resList = res.data && res.data.list || []
if (['init', 'refresh'].includes(val)) {
this.tableList = resList
} else {
this.tableList = this.tableList.concat(resList)
}
if (resList.length < this.pageSize) {
this.finished = true
}
if(_this.invoiceIdsCopy && _this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)){
_this.tableList.map(item =>{
item.checked=(_this.invoiceIdsCopy[_this.invoiceType] || []).includes(item.id)
})
}
}).finally(() => {
this.$nextTick(() => {
this.moreLoading = false
this.refreshing = false
this.$loading(false, 'tableLoading')
})
})
}
}, },
} }
</script> </script>
@ -267,7 +160,7 @@ export default {
.box-2 { .box-2 {
margin-top: 1rem; margin-top: 1rem;
box-sizing: border-box; box-sizing: border-box;
//padding: 0.5rem 1rem; padding: 0.5rem 1rem;
padding-top: 0; padding-top: 0;
max-height: 50vh; max-height: 50vh;
overflow: auto; overflow: auto;
@ -291,14 +184,13 @@ export default {
.box-1 { .box-1 {
@extend .box-2; @extend .box-2;
.new-item-box { .new-item-box {
width: calc(100% - 2rem); width: 100%;
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
box-sizing: border-box; box-sizing: border-box;
// padding: 0.5rem; // padding: 0.5rem;
margin: 1rem; margin: 0.5rem 0;
border-radius: 0.5rem; border-radius: 0.5rem;
//border: 1px solid #ccc;
box-shadow: 0 0 0.5rem 0.2rem #ccc; box-shadow: 0 0 0.5rem 0.2rem #ccc;
align-items: center; align-items: center;
padding: 0.5rem; padding: 0.5rem;

@ -6,91 +6,33 @@
<van-image width="3rem" height="3rem" fit="cover" :src="require('@/assets/images/invoice.png')" /> <van-image width="3rem" height="3rem" fit="cover" :src="require('@/assets/images/invoice.png')" />
<div class="bt">发票</div> <div class="bt">发票</div>
</div> --> </div> -->
<div class="box-cr-row"> <div class="box-cr">
<!-- <div class="cr-bt">--> <div class="cr-bt">
<!-- <div class="tags" :style="`border: 1px solid ;color:#05A9FF; min-width: 10rem !important;`"> {{getDictDataLabel(DICT_TYPE.BS_INVOICE_KIND,itemData.type) || '未知'}} </div>--> <div class="tags" :style="`border: 1px solid ;color:#05A9FF; min-width: 10rem !important;`"> {{getDictDataLabel(DICT_TYPE.BS_INVOICE_KIND,itemData.type) || '未知'}} </div>
<!-- </div>--> </div>
<!-- <div class="cr-tt" style="margin-top: 0.3rem;"> <!-- <div class="cr-tt" style="margin-top: 0.3rem;">
{{itemData.invoiceNum}} {{itemData.invoiceNum}}
</div> --> </div> -->
<div class="ct-md" v-if="invoiceType == '01'"> <div class="ct-md">
<div class="mt5">发票消费类型 {{itemData.serviceType || '-'}}</div> <div class="mt5">
<div class="mt5">发票代码 {{itemData.invoiceCode || '-'}}</div> 不含税金额 {{itemData.excludingTaxAmount || '-'}}
<div class="mt5">发票号码 {{itemData.invoiceNum || '-'}}</div> </div>
<div style="margin-top: 0.3rem;color:#333 ">开票日期 {{itemData.invoiceDate && dayjs(itemData.invoiceDate).format('YY/MM/DD HH:ss')}}</div> <div class="mt5">
<div class="mt5">不含税金额 {{itemData.totalAmount || '-'}}</div> 发票代码 {{itemData.invoiceCode || '-'}}
<div class="mt5">价税合计 {{itemData.amountInFiguers || '-'}}</div> </div>
<div class="mt5">税额 {{itemData.totalTax || '-'}}</div> <div style="margin-top: 0.3rem;color:#333 ">
<div class="mt5">发票种类 {{itemData.invoiceType || '-'}}</div> 开票日期 {{itemData.invoiceDate && dayjs(itemData.invoiceDate).format('YY/MM/DD HH:ss')}}
<div class="mt5">购方名称 {{itemData.purchaserName || '-'}}</div> </div>
<div class="mt5">购方纳税人识别号 {{itemData.purchaserRegisterNum || '-'}}</div> <div style="margin-top: 0.3rem;color:#333 ">
<div class="mt5">税率 {{itemData.commodityTaxRate || '-'}}</div> 验真状态 {{ itemData.status == 1 ? '已验真' : '未验真' }}
<div class="mt5">是否代开 {{itemData.agent || '-'}}</div> </div>
<div class="mt5">销售方名称 {{itemData.sellerName || '-'}}</div>
<div class="mt5">销售方纳税人识别号 {{itemData.sellerRegisterNum || '-'}}</div>
</div>
<div class="ct-md" v-if="invoiceType == '02'">
<div class="mt5">车票号 {{itemData.ticketNum || '-'}}</div>
<div class="mt5">始发站 {{itemData.startingStation || '-'}}</div>
<div class="mt5">到达站 {{itemData.destinationStation || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">出发日期 {{itemData.startingDate && dayjs(itemData.startingDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5">车次号 {{itemData.trainNum || '-'}}</div>
<div class="mt5">车票金额 {{itemData.ticketRates || '-'}}</div>
<div class="mt5">乘客姓名 {{itemData.name || '-'}}</div>
<div class="mt5">时间 {{itemData.startingTime || '-'}}</div>
<div class="mt5">座位号 {{itemData.seatNum || '-'}}</div>
</div>
<div class="ct-md" v-if="invoiceType == '03'">
<div class="mt5">姓名 {{itemData.name || '-'}}</div>
<div class="mt5">始发站 {{itemData.startingStation || '-'}}</div>
<div class="mt5">目的站 {{itemData.destinationStation || '-'}}</div>
<div class="mt5">航班号 {{itemData.flight || '-'}}</div>
<div class="mt5">承运人 {{itemData.carrier || '-'}}</div>
<div class="mt5">座位等级 {{itemData.seatClass || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">日期 {{itemData.startingDate && dayjs(itemData.startingDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5">时间 {{itemData.startingTime || '-'}}</div>
<div class="mt5">电子客票号码 {{itemData.ticketNumber || '-'}}</div>
<div class="mt5">票价 {{itemData.fare || '-'}}</div>
<div class="mt5">燃油附加费 {{itemData.fuelSurcharge || '-'}}</div>
<div class="mt5">民航发展基金/基建费 {{itemData.devFund || '-'}}</div>
<div class="mt5">合计金额 {{itemData.ticketRates || '-'}}</div>
<div class="mt5">签注 {{itemData.endorsement || '-'}}</div>
</div> </div>
<div class="ct-md" v-if="invoiceType == '04'">
<div class="mt5">服务商 {{itemData.serviceProvider || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">行程开始时间 {{itemData.startTime && dayjs(itemData.startTime).format('YY/MM/DD HH:ss')}}</div>
<div style="margin-top: 0.3rem;color:#333 ">行程结束时间 {{itemData.endTime && dayjs(itemData.endTime).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5">行程人手机号 {{itemData.phone || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">申请日期 {{itemData.applicationDate && dayjs(itemData.applicationDate).format('YY/MM/DD HH:ss')}}</div>
<div style="margin-top: 0.3rem;color:#333 " v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].pickupDate && dayjs(itemData.items[0].pickupDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].carType || '-'}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].distance || '-'}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].startPlace || '-'}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].destinationPlace || '-'}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].city || '-'}}</div>
<div class="mt5" v-if="itemData.items && itemData.items.length > 0"> {{itemData.items[0].fare || '-'}}</div>
<div class="mt5">总金额 {{itemData.totalFare || '-'}}</div>
</div>
<div class="ct-md" v-if="invoiceType == '05'">
<div class="mt5">发票代码 {{itemData.invoiceCode || '-'}}</div>
<div class="mt5">发票号码 {{itemData.invoiceNum || '-'}}</div>
<div class="mt5">车牌号 {{itemData.taxiNum || '-'}}</div>
<div style="margin-top: 0.3rem;color:#333 ">日期 {{itemData.startingDate && dayjs(itemData.startingDate).format('YY/MM/DD HH:ss')}}</div>
<div class="mt5">上车时间 {{itemData.pickupTime || '-'}}</div>
<div class="mt5">下车时间 {{itemData.dropoffTime || '-'}}</div>
<div class="mt5">总金额 {{itemData.totalFare || '-'}}</div>
<div class="mt5">开票城市 {{itemData.location || '-'}}</div>
<div class="mt5">单价 {{itemData.pricePerkm || '-'}}</div>
<div class="mt5">里程 {{itemData.distance || '-'}}</div>
</div>
</div> </div>
<div class="box-rt">
</div> <van-icon class="icon-box" v-hasPermi="['bs:invoice:show']" @click="handleShow(itemData.id)" name="eye-o" color="#05A9FF" size="25" />
<div class="box-rt-sb"> <van-icon class="icon-box" v-hasPermi="['bs:invoice:update']" @click="handleEdit(itemData.id)" name="edit" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:invoice:show']" @click="handleShow(itemData.id)" name="eye-o" color="#05A9FF" size="25" /> <van-icon class="icon-box" v-hasPermi="['bs:invoice:delete']" @click="handleDel(itemData.id)" name="delete-o" :color="'#EC3359'" size="25" />
<van-icon class="icon-box" v-hasPermi="['bs:invoice:update']" @click="handleEdit(itemData.id)" name="edit" size="25" /> </div>
<van-icon class="icon-box" v-hasPermi="['bs:invoice:delete']" @click="handleDel(itemData.id)" name="delete-o" :color="'#EC3359'" size="25" />
</div> </div>
</div> </div>
</div> </div>
@ -99,7 +41,7 @@
<script> <script>
import { mapState, mapGetters, mapMutations } from 'vuex' import { mapState, mapGetters, mapMutations } from 'vuex'
import { getDictDataLabel } from "@/utils/dict"; import { getDictDataLabel } from "@/utils/dict";
import { deleteInvoice01,deleteInvoice02,deleteInvoice03,deleteInvoice04,deleteInvoice05 } from "@/api/bs/invoice"; import { deleteInvoice, } from "@/api/bs/invoice";
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { Dialog } from 'vant' import { Dialog } from 'vant'
export default { export default {
@ -108,9 +50,7 @@ export default {
required: true, required: true,
default: () => { } default: () => { }
}, },
invoiceType:{
default:String
}
}, },
components: { components: {
@ -138,14 +78,14 @@ export default {
handleShow(id) { handleShow(id) {
this.$router.push({ this.$router.push({
path: '/invoice', path: '/invoice',
query: { id, type: 'show',invoiceType:this.invoiceType } query: { id, type: 'show' }
}) })
}, },
handleEdit(id) { handleEdit(id) {
this.jumoStudentId = id this.jumoStudentId = id
this.$router.push({ this.$router.push({
path: '/invoice', path: '/invoice',
query: { id, type: 'edit',invoiceType:this.invoiceType } query: { id, type: 'edit' }
}) })
}, },
handleDel(id) { handleDel(id) {
@ -154,7 +94,6 @@ export default {
message: '你确定要删除吗?', message: '你确定要删除吗?',
}) })
.then(() => { .then(() => {
const deleteInvoice = this.invoiceType == '01' ? deleteInvoice01 : this.invoiceType == '02' ? deleteInvoice02 : this.invoiceType == '03' ? deleteInvoice03 : this.invoiceType == '04' ? deleteInvoice04 : deleteInvoice05;
deleteInvoice(id).then(() => { deleteInvoice(id).then(() => {
this.$emit('onAllRefresh') this.$emit('onAllRefresh')
}) })

@ -2,70 +2,34 @@
<template> <template>
<div class="upload-box"> <div class="upload-box">
<div class="box-lf"> <div class="box-lf">
<van-uploader accept="*" :disabled="isChecked" v-model="localFileList" @click-preview="handleClickUpload" :before-read="handleFileBeforeRead" :before-delete="handleBeforeDel" :max-count="1" :after-read="handleAfterRead"> <van-uploader accept="*" :disabled="isChecked" v-model="localFileList" @click-preview="handleClickUpload" :before-read="handleFileBeforeRead" :before-delete="handleBeforeDel" :max-count="1" :after-read="handleAfterRead" />
<template #preview-cover="{ file }" v-if="checkFileType(localFileList)">
<div class="preview-cover">{{handleFilter(localFileList)}}</div>
</template>
</van-uploader>
<div class="up-tt">支持pngpdfjpg格式上传</div> <div class="up-tt">支持pngpdfjpg格式上传</div>
</div> </div>
<div class="box-rt"> <div class="box-rt">
<van-button type="info" icon="scan" :disabled="isChecked || disabled" @click="handleScan" native-type="button" class="btn-box" round size="small">发票识别</van-button> <van-button type="info" icon="scan" :disabled="isChecked || disabled" @click="handleScan" native-type="button" class="btn-box" round size="small">发票识别</van-button>
<van-button v-if="type == '01'" type="info" icon="label-o" :disabled="isChecked || disabled" @click="handleCheck" native-type="button" class="btn-box" round size="small"> {{isChecked ? '' : ''}}</van-button> <van-button type="info" icon="label-o" :disabled="isChecked || disabled" @click="handleCheck" native-type="button" class="btn-box" round size="small"> {{isChecked ? '已验真' : '验真'}}</van-button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { uploadFileApi } from '@/api/common' import { uploadFileApi } from '@/api/common'
import { import { invoiceScanApi, invoiceCheckApi } from "@/api/bs/invoice";
createInvoice01,
updateInvoice01,
getInvoice01,
invoiceScanApi01,
invoiceCheckApi01,
createInvoice02,
updateInvoice02,
getInvoice02,
invoiceScanApi02,
invoiceCheckApi02,
createInvoice03,
updateInvoice03,
getInvoice03,
invoiceScanApi03,
invoiceCheckApi03,
createInvoice04,
updateInvoice04,
getInvoice04,
invoiceScanApi04,
invoiceCheckApi04,
createInvoice05,
updateInvoice05,
getInvoice05,
invoiceScanApi05,
invoiceCheckApi05,
} from "@/api/bs/invoice";
export default { export default {
name: '', name: '',
props: { props: {
typeStr: String, typeStr: String,
fileList: Array, fileList: Array,
isOpen: Boolean, isOpen: Boolean,
// isChecked: Boolean, isChecked: Boolean,
disabled: Boolean, disabled: Boolean,
scanRes: Object, scanRes: Object,
type: String
}, },
watch: { watch: {
fileList: { fileList: {
handler(list) { handler(list) {
// this.localFileList = list // this.localFileList = list
this.localFileList = list this.localFileList = list
// if (Array.isArray(this.localFileList) && this.localFileList.length) {
// let url = localFileList[0].url
// if ()
// console.log('localFileList...', this.localFileList);
// }
this.uploadList = list this.uploadList = list
}, },
deep: true, deep: true,
@ -78,7 +42,6 @@ export default {
imgTypeArr: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf'], imgTypeArr: ['image/jpeg', 'image/jpg', 'image/png', 'application/pdf'],
localFileList: [], // localFileList: [], //
uploadList: [], // uploadList: [], //
isChecked: false
} }
}, },
@ -88,24 +51,6 @@ export default {
methods: { methods: {
handleFilter(file) {
let str = ''
if (file.length) {
let url = file[0].url
str = url.split('/baoxiao/')[1]
}
return str
},
checkFileType(file) {
let flag = false
if (file.length) {
let url = file[0].url
if (url.indexOf('pdf') > -1) {
flag = true
}
}
return flag
},
handleClickUpload(file) { handleClickUpload(file) {
const { url } = file const { url } = file
if (url) { if (url) {
@ -127,33 +72,27 @@ export default {
return true return true
}, },
beginCheck() { beginCheck() {
console.log('我进来验证了')
this.$loading(true) this.$loading(true)
let form = {} let form = {}
const invoiceCheckApi = this.type == '01' ? invoiceCheckApi01 : this.type == '02' ? invoiceCheckApi02 : this.type == '03' ? invoiceCheckApi03 : this.type == '04' ? invoiceCheckApi04 : invoiceCheckApi05;
invoiceCheckApi(this.scanRes).then((res) => { invoiceCheckApi(this.scanRes).then((res) => {
// if (res.data) { if (res.data) {
// form.checkCode = 2 form.checkCode = 2
// form.isChecked = true form.isChecked = true
// this.$sm(`${res.msg}`) this.$sm(`${res.msg}`)
// form.status = 1 form.status = 1
// } else { } else {
// form.status = 0 form.status = 0
// form.checkCode = 1 form.checkCode = 1
// form.isChecked = false form.isChecked = false
// this.$fm(`${res.msg}`) this.$fm(`${res.msg}`)
// }
if (res.data == 2 || res.data == 3) {
this.isChecked = true
} }
this.$emit('endCheck', res.data) this.$emit('endCheck', form)
this.$loading(false) this.$loading(false)
}).catch(() => { }).catch(() => {
this.isChecked = false form.isChecked = false
// this.form.status = 0 form.status = 0
// form.status = 0 form.checkCode = 0
// form.checkCode = 0 this.$emit('endCheck', form)
this.$emit('endCheck', 0)
this.$loading(false) this.$loading(false)
}) })
}, },
@ -170,10 +109,8 @@ export default {
this.$fm('请先上传发票!') this.$fm('请先上传发票!')
} else { } else {
const { url } = this.uploadList[0] const { url } = this.uploadList[0]
// let url = 'https://p8.itc.cn/q_70/images03/20210420/b5e2b7a15457406bb48135828b8fea03.jpeg'
this.$loading(true) this.$loading(true)
const invoiceScanApi = this.type == '01' ? invoiceScanApi01 : this.type == '02' ? invoiceScanApi02 : this.type == '03' ? invoiceScanApi03 : this.type == '04' ? invoiceScanApi04 : invoiceScanApi05; invoiceScanApi({ url }).then((res) => {
invoiceScanApi({ url, type: this.type }).then((res) => {
// this.scanRes = res.data // this.scanRes = res.data
this.$emit('scanRes', res) this.$emit('scanRes', res)
this.$loading(false) this.$loading(false)
@ -230,15 +167,6 @@ export default {
</script> </script>
<style lang='scss' scoped> <style lang='scss' scoped>
::v-deep .preview-cover {
height: 100%;
background: #fafafa;
display: flex;
justify-items: center;
align-items: center;
text-align: center;
width: 100%;
}
.upload-box { .upload-box {
width: 100%; width: 100%;
display: flex; display: flex;

@ -34,9 +34,9 @@ Vue.use(directive)
Vue.prototype.$forceCloseLoading = handleForceCloseLoading Vue.prototype.$forceCloseLoading = handleForceCloseLoading
Vue.use(pluginPermission) Vue.use(pluginPermission)
Vue.use(VueClipboard) Vue.use(VueClipboard)
if (window.location.href.indexOf('localhost') === -1 && window.location.href.indexOf('www.joineast.com') === -1) { // if (window.location.href.indexOf('localhost') === -1 && window.location.href.indexOf('www.joineast.com') === -1) {
new VConsole() // new VConsole()
} // }
Vue.prototype.$EventBus = new Vue() // 注册全局EventBus Vue.prototype.$EventBus = new Vue() // 注册全局EventBus
Vue.prototype.$compressFile = compressFile Vue.prototype.$compressFile = compressFile

@ -82,7 +82,7 @@
</template> </template>
</van-field> </van-field>
<van-field v-model="nitem.remark" :disabled="disabled" name="reason" autosize rows="2" label="备注" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" /> <van-field v-model="nitem.remark" :disabled="disabled" name="reason" autosize rows="2" label="备注" clear-trigger="always" input-align="right" placeholder="请输入" type="textarea" />
<div @click="handleShowIe('1',index,nIndex)"> <div @click="handleShowIe(index,nIndex)">
<van-field disabled :class="nitem.invoiceName ? 'actived-disabled tag-blue':'tag-blue'" v-model="nitem.invoiceName" name="reason" autosize rows="2" label="关联发票" clear-trigger="always" input-align="right" placeholder="请关联" /> <van-field disabled :class="nitem.invoiceName ? 'actived-disabled tag-blue':'tag-blue'" v-model="nitem.invoiceName" name="reason" autosize rows="2" label="关联发票" clear-trigger="always" input-align="right" placeholder="请关联" />
</div> </div>
<!--关联发票 --> <!--关联发票 -->
@ -207,9 +207,6 @@ export default {
}, },
data() { data() {
return { return {
indexOne:1,
indexTwo:1,
claimType:'',
expenseApplyList: [], expenseApplyList: [],
isShow: false, isShow: false,
dialogObj: {}, dialogObj: {},
@ -256,7 +253,7 @@ export default {
show: false, show: false,
invoiceName: '', invoiceName: '',
ieList: this.ieList, ieList: this.ieList,
invoiceIds: {}, invoiceIds: [],
feeType: null, feeType: null,
amount: undefined, amount: undefined,
invoiceCount: undefined, invoiceCount: undefined,
@ -271,7 +268,7 @@ export default {
show: false, show: false,
invoiceName: '', invoiceName: '',
ieList: this.ieList, ieList: this.ieList,
invoiceIds: {}, invoiceIds: [],
feeType: null, feeType: null,
amount: undefined, amount: undefined,
invoiceCount: undefined, invoiceCount: undefined,
@ -418,8 +415,6 @@ export default {
} }
if (this.$route.query.billType === 'RCBX') { if (this.$route.query.billType === 'RCBX') {
delete newForm.expenseClaimTrips delete newForm.expenseClaimTrips
}else {
delete newForm.expenseClaimDetails
} }
if (ignoreFeeTip) { if (ignoreFeeTip) {
this.$loading(true, 'form') this.$loading(true, 'form')
@ -520,79 +515,62 @@ export default {
handleFilterList(ids, type) { handleFilterList(ids, type) {
return new Promise((resolve) => { return new Promise((resolve) => {
let arr = [] let arr = []
// if (!type) { if (!type) {
// this.form.expenseClaimTrips.forEach(item => { this.form.expenseClaimTrips.forEach(item => {
// item.expenseClaimDetails.forEach(n => { item.expenseClaimDetails.forEach(n => {
// n.invoiceIds.forEach(z => { n.invoiceIds.forEach(z => {
// arr.push(z) arr.push(z)
// }) })
//
// }) })
// }) })
// } else { } else {
// this.form.expenseClaimDetails.forEach(n => { this.form.expenseClaimDetails.forEach(n => {
// n.invoiceIds.forEach(z => { n.invoiceIds.forEach(z => {
// arr.push(z) arr.push(z)
// }) })
//
// }) })
// } }
let beforeIds = this.ieList.filter(item => !arr.includes(item.id)) || [] let beforeIds = this.ieList.filter(item => !arr.includes(item.id)) || []
let noewIds = this.ieList.filter(item => ids.includes(item.id)) || [] let noewIds = this.ieList.filter(item => ids.includes(item.id)) || []
resolve(beforeIds.concat(noewIds)) resolve(beforeIds.concat(noewIds))
}) })
}, },
handleShowIe(type,index, nIndex) { handleShowIe(index, nIndex) {
if (this.disabled) return if (this.disabled) return
// this.indexOne = index let obj = this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex]
// this.indexTwo = nIndex this.handleFilterList(obj.invoiceIds || []).then((arr) => {
// this.claimType = type this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'ieList', arr)
// let obj = this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex] this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', true)
// this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'ieList', arr) })
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', true)
// this.handleFilterList(obj.invoiceIds || {}).then((arr) => {
//
// })
}, },
handleShowIe1(nIndex) { handleShowIe1(nIndex) {
if (this.disabled) return if (this.disabled) return
// let obj = this.form.expenseClaimDetails[nIndex] let obj = this.form.expenseClaimDetails[nIndex]
this.handleFilterList(obj.invoiceIds || [], 1).then((arr) => {
// this.$set(this.form.expenseClaimDetails[nIndex], 'ieList', arr) this.$set(this.form.expenseClaimDetails[nIndex], 'ieList', arr)
this.$set(this.form.expenseClaimDetails[nIndex], 'show', true) this.$set(this.form.expenseClaimDetails[nIndex], 'show', true)
// this.handleFilterList(obj.invoiceIds || {}, 1).then((arr) => { })
//
// })
}, },
handleConfirmIe(arr, index, nIndex) { handleConfirmIe(arr, index, nIndex) {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('') let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceIds', arr) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', false) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'show', false)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看') this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceName', nameArr)
this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr)) this.$set(this.form.expenseClaimTrips[index].expenseClaimDetails[nIndex], 'invoiceCount', arr.length)
}, },
handleConfirmIe1(arr, nIndex) { handleConfirmIe1(arr, nIndex) {
// let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('') let nameArr = ((this.ieList.filter(item => arr.includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr) this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceIds', arr)
this.$set(this.form.expenseClaimDetails[nIndex], 'show', false) this.$set(this.form.expenseClaimDetails[nIndex], 'show', false)
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', '以关联发票,请点击查看') this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceName', nameArr)
this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceCount', this.totalCount(arr)) this.$set(this.form.expenseClaimDetails[nIndex], 'invoiceCount', arr.length)
},
totalCount(obj) {
let count = 0;
for (let key in obj) {
if (Array.isArray(obj[key])) {
count += obj[key].length;
}
}
return count;
}, },
handleAddAccount(pIndex, index) { handleAddAccount(pIndex, index) {
this.form.expenseClaimTrips[pIndex].expenseClaimDetails.push({ this.form.expenseClaimTrips[pIndex].expenseClaimDetails.push({
invoiceIds: {}, invoiceIds: [],
feeType: null, feeType: null,
amount: undefined, amount: undefined,
invoiceCount: undefined, invoiceCount: undefined,
@ -602,7 +580,7 @@ export default {
handleAddAccount1() { handleAddAccount1() {
this.form.expenseClaimDetails.push({ this.form.expenseClaimDetails.push({
invoiceIds: {}, invoiceIds: [],
feeType: null, feeType: null,
amount: undefined, amount: undefined,
invoiceCount: undefined, invoiceCount: undefined,
@ -638,18 +616,18 @@ export default {
} }
}) })
} }
// this.form.expenseClaimTrips.forEach(n => { this.form.expenseClaimTrips.forEach(n => {
// n.expenseClaimDetails.forEach(z => { n.expenseClaimDetails.forEach(z => {
// let nameArr = ((this.ieList.filter(item => (z.invoiceIds || []).includes(item.id)) || []).map(item => item.invoiceCode)).join('') let nameArr = ((this.ieList.filter(item => (z.invoiceIds || []).includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
// this.$set(z, 'show', false) this.$set(z, 'show', false)
// this.$set(z, 'invoiceName', nameArr) this.$set(z, 'invoiceName', nameArr)
// }) })
// }) })
// this.form.expenseClaimDetails.forEach(z => { this.form.expenseClaimDetails.forEach(z => {
// let nameArr = ((this.ieList.filter(item => (z.invoiceIds || []).includes(item.id)) || []).map(item => item.invoiceCode)).join('') let nameArr = ((this.ieList.filter(item => (z.invoiceIds || []).includes(item.id)) || []).map(item => item.invoiceCode)).join('、')
// this.$set(z, 'show', false) this.$set(z, 'show', false)
// this.$set(z, 'invoiceName', nameArr) this.$set(z, 'invoiceName', nameArr)
// }) })
console.log('我看了一下累了..', this.form); console.log('我看了一下累了..', this.form);
this.fileList = res.data.files || [] this.fileList = res.data.files || []
this.isAuthorised = res.data.isAuthorised this.isAuthorised = res.data.isAuthorised
@ -727,7 +705,7 @@ export default {
type: 0, type: 0,
expenseClaimDetails: [ expenseClaimDetails: [
{ {
invoiceIds: {}, invoiceIds: [],
feeType: null, feeType: null,
amount: undefined, amount: undefined,
invoiceCount: undefined, invoiceCount: undefined,
@ -803,8 +781,7 @@ export default {
this.expenseApplyList = (list || []).map((item, index) => { this.expenseApplyList = (list || []).map((item, index) => {
return { return {
id: item.id, id: item.id,
title: `序号:${index + 1} 编号:${item.applyNo}申请人:${item.nickname}行程路线:${item.rode}出差天数:${item.tripDay || 0}`, title: `序号:${index + 1} 编号:${item.applyNo}申请人:${item.nickname}行程路线:${item.rode}出差天数:${item.tripDay || 0}`
disabled: item.status != 2 ? true : false
} }
}) })
resolve() resolve()

@ -5,83 +5,20 @@
<div class="section mt5"> <span class="line"> </span>发票</div> <div class="section mt5"> <span class="line"> </span>发票</div>
<div class="trips-box"> <div class="trips-box">
<div class="item-box"> <div class="item-box">
<UploadImagePdf ref="UploadImagePdf" @endCheck="handelEndCheck" :type="invoiceType" :disabled="disabled || form.status == 1" :fileList="fileList" :isChecked="isChecked" @onCheck="handleCheck" :scanRes="scanRes" @scanRes="hanadleScanRes" @onConfirm="handleImgConfirm" /> <UploadImagePdf ref="UploadImagePdf" @endCheck="handelEndCheck" :disabled="disabled || form.status == 1" :fileList="fileList" :isChecked="isChecked" @onCheck="handleCheck" :scanRes="scanRes" @scanRes="hanadleScanRes" @onConfirm="handleImgConfirm" />
</div> </div>
<div class=""></div> <div class=""></div>
</div> </div>
<div class="section"> <span class="line"> </span> 基本信息</div> <div class="section"> <span class="line"> </span> 基本信息</div>
<div class="trips-box"> <div class="trips-box">
<div class="item-box" v-if="invoiceType == '01'"> <div class="item-box">
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.serviceType ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.serviceType" @click="handleServiceTypeShow" label="发票消费类型" required clear-trigger="always" input-align="right" /> <RePick v-model="form.type" label="发票类型" :disabled="isChecked || disabled" :name="`type`" :list="stateList" isRequrie title="发票类型" titleKey="label" idKey="value" isCell clearable />
<van-field v-model="form.invoiceCode" label="发票代码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.invoiceNum" label="发票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.invoiceDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.invoiceDate1" @click="handleDateShow('invoiceDate')" label="开票日期" required clear-trigger="always" input-align="right" />
<van-field v-model="form.totalTax" label="税额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.totalAmount" label="不含税金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.amountInFiguers" label="价税合计" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.sellerName" label="销售方名称" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.invoiceType ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.invoiceType" @click="handleInvoiceTypeShow" label="发票种类" required clear-trigger="always" input-align="right" />
<van-field v-model="form.purchaserName" label="购方名称" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.purchaserRegisterNum" label="购方纳税人识别号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.commodityTaxRate" label="税率" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.agent ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.agent1" @click="handleAgentTypeShow" label="是否代开" required clear-trigger="always" input-align="right" />
<van-field v-model="form.sellerRegisterNum" label="销售方纳税人识别号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
</div>
<div class="item-box" v-if="invoiceType == '02'">
<van-field v-model="form.ticketNum" label="车票号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.startingStation" label="始发站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.destinationStation" label="到达站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="出发日期" required clear-trigger="always" input-align="right" />
<van-field v-model="form.trainNum" label="车次号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.ticketRates" label="车票金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.name" label="乘客姓名" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingTime" @click="handleTimeShow('startingTime',form.startingTime)" label="时间" required clear-trigger="always" input-align="right" />
<van-field v-model="form.seatNum" label="座位号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
</div>
<div class="item-box" v-if="invoiceType == '03'">
<van-field v-model="form.name" label="姓名" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.startingStation" label="始发站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.destinationStation" label="目的站" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.flight" label="航班号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.carrier" label="承运人" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.seatClass" label="座位等级" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="日期" required clear-trigger="always" input-align="right" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingTime" @click="handleTimeShow('startingTime',form.startingTime)" label="时间" required clear-trigger="always" input-align="right" />
<van-field v-model="form.ticketNumber" label="电子客票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.fare" label="票价" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.fuelSurcharge" label="燃油附加费" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.devFund" label="民航发展基金/基建费" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.endorsement" label="签注" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.ticketRates" label="合计金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
</div>
<div class="item-box" v-if="invoiceType == '04'">
<van-field v-model="form.serviceProvider" label="服务商" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startTime1" @click="handleDateShow('startTime')" label="行程开始时间" required clear-trigger="always" input-align="right" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.endTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.endTime1" @click="handleDateShow('endTime')" label="行程结束时间" required clear-trigger="always" input-align="right" />
<van-field v-model="form.phone" label="行程人手机号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.applicationDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.applicationDate1" @click="handleDateShow('applicationDate')" label="申请日期" required clear-trigger="always" input-align="right" />
<van-field v-model="form.totalFare" label="总金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<div v-for="(items,index) in form.items">
<span style="padding: 10px 0;font-size: 12px;font-weight: bold">行程 {{index+1}}</span>
<van-field v-model="items.carType" label="车型" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="items.distance" label="里程" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="items.startPlace" label="起点" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="items.destinationPlace" label="终点" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="items.city" label="城市" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="items.fare" label="金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
</div>
</div>
<div class="item-box" v-if="invoiceType == '05'">
<van-field v-model="form.invoiceCode" label="发票代码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" /> <van-field v-model="form.invoiceCode" label="发票代码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.invoiceNum" label="发票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" /> <van-field v-model="form.invoiceNum" label="发票号码" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.taxiNum" label="车牌号" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" /> <van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.time ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.time" @click="handleDateShow" label="开票日期" required clear-trigger="always" input-align="right" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.startingDate ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.startingDate1" @click="handleDateShow('startingDate')" label="日期" required clear-trigger="always" input-align="right" /> <van-field v-model="form.taxAmount" @blur="handleBlur1" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="税额" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.pickupTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.pickupTime" @click="handleTimeShow('pickupTime',form.pickupTime)" label="上车时间" required clear-trigger="always" input-align="right" /> <van-field v-model="form.excludingTaxAmount" @blur="handleBlur2" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="不含税金额" />
<van-field right-icon="arrow" :rules="[{ required: true, message: '请选择' }]" :disabled="isChecked || disabled" :class="form.dropoffTime ? 'actived-disabled':''" :name="`time`" placeholder="请选择" v-model="form.dropoffTime" @click="handleTimeShow('dropoffTime',form.dropoffTime)" label="下车时间" required clear-trigger="always" input-align="right" /> <van-field v-model="form.totalAmount" type="number" placeholder="请输入" :disabled="isChecked || disabled" input-align="right" :rules="[{ required: false, message: '格式错误',validator: VerifyFunc.validatorMoney }]" label="价税合计" />
<van-field v-model="form.totalFare" label="总金额" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.location" label="开票城市" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.pricePerkm" label="单价" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
<van-field v-model="form.distance" label="里程" required :disabled="isChecked || disabled" :rules="[{ required: true, message: '请输入' }]" clear-trigger="always" input-align="right" placeholder="请输入" />
</div> </div>
</div> </div>
</van-form> </van-form>
@ -94,77 +31,15 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 时间选择框-->
<van-popup v-model="timeShow" position="bottom">
<van-datetime-picker @confirm="timeConfirm" @cancel="timeCancel" v-model="currentTime" type="time" :min-hour="1" :max-hour="23" />
</van-popup>
<!-- 消费类型 -->
<van-popup v-model="serviceTypeShow" position="bottom">
<van-picker
show-toolbar
:columns="ServiceTypeList"
@cancel="serviceTypeShow = false"
@confirm="serviceTypeOnConfirm"
/>
</van-popup>
<!-- 发票种类 -->
<van-popup v-model="invoiceTypeShow" position="bottom">
<van-picker
show-toolbar
:columns="InvoiceTypeList"
@cancel="invoiceTypeShow = false"
@confirm="invoiceTypeOnConfirm"
/>
</van-popup>
<!-- 是否代开 -->
<van-popup v-model="agentTypeShow" position="bottom">
<van-picker
show-toolbar
:columns="agentList"
@cancel="agentTypeShow = false"
@confirm="agentTypeOnConfirm"
/>
</van-popup>
<!--行程时间范围选择 --> <!--行程时间范围选择 -->
<van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" color="#0088FE" @confirm="handleDateSelect" /> <van-calendar ref="vanCalendar" allow-same-day :maxDate="maxDate" v-model="dateShow" :min-date="minDate" :default-date="defaultDate" color="#0088FE" @confirm="handleDateSelect" />
</div> </div>
</template> </template>
<script> <script>
import dayjs from 'dayjs' import dayjs from 'dayjs';
import { import { deleteInvoice, createInvoice, getInvoice, updateInvoice } from "@/api/bs/invoice";
deleteInvoice01,
deleteInvoice02,
deleteInvoice03,
deleteInvoice04,
deleteInvoice05,
createInvoice01,
updateInvoice01,
getInvoice01,
invoiceScanApi01,
invoiceCheckApi01,
createInvoice02,
updateInvoice02,
getInvoice02,
invoiceScanApi02,
invoiceCheckApi02,
createInvoice03,
updateInvoice03,
getInvoice03,
invoiceScanApi03,
invoiceCheckApi03,
createInvoice04,
updateInvoice04,
getInvoice04,
invoiceScanApi04,
invoiceCheckApi04,
createInvoice05,
updateInvoice05,
getInvoice05,
invoiceScanApi05,
invoiceCheckApi05,
exportInvoiceExcel01, exportInvoiceExcel02, exportInvoiceExcel03, exportInvoiceExcel04, exportInvoiceExcel05
} from "@/api/bs/invoice";
import { listData } from "@/api/system/dict/data"; import { listData } from "@/api/system/dict/data";
import { getDictDatas, DICT_TYPE } from "@/utils/dict"; import { getDictDatas, DICT_TYPE } from "@/utils/dict";
import VerifyFunc from '@/utils/verify' import VerifyFunc from '@/utils/verify'
@ -209,39 +84,6 @@ export default {
defaultDate: new Date(), defaultDate: new Date(),
dateShow: false, dateShow: false,
form: {}, form: {},
invoiceType:'01',
dateType:'',
timeShow:false,
currentTime:'',
timeType:'',
ServiceTypeList: [
{ text: '餐饮', value: '餐饮' },
{ text: '电器设备', value: '电器设备' },
{ text: '通讯', value: '通讯' },
{ text: '服务', value: '服务' },
{ text: '日用品食品', value: '日用品食品' },
{ text: '医疗', value: '医疗' },
{ text: '交通', value: '交通' },
{ text: '其他', value: '其他' },
],
InvoiceTypeList: [
{ text: '普通发票', value: '普通发票' },
{ text: '专用发票', value: '专用发票' },
{ text: '电子普通发票', value: '电子普通发票' },
{ text: '电子专用发票', value: '电子专用发票' },
{ text: '通行费电子普票', value: '通行费电子普票' },
{ text: '区块链发票', value: '区块链发票' },
{ text: '通用机打电子发票', value: '通用机打电子发票' },
{ text: '电子发票(专用发票)', value: '电子发票(专用发票)' },
{ text: '电子发票(普通发票)', value: '电子发票(普通发票)' },
],
agentList:[
{ text: '否', value: false },
{ text: '是', value: true },
],
serviceTypeShow:false,
invoiceTypeShow:false,
agentTypeShow:false
}; };
}, },
// //
@ -287,13 +129,12 @@ export default {
} }
}, },
handelEndCheck(obj) { handelEndCheck(obj) {
this.form.status = obj const { isChecked } = obj
// const { isChecked } = obj this.isChecked = isChecked
// this.isChecked = isChecked this.form = {
// this.form = { ...this.form,
// ...this.form, ...obj
// ...obj }
// }
// if (isChecked) { // if (isChecked) {
// } else // } else
}, },
@ -306,9 +147,6 @@ export default {
} }
this.$refs.UploadImagePdf.beginCheck() this.$refs.UploadImagePdf.beginCheck()
}).catch((err) => { }).catch((err) => {
if (err && err.length > 0){
this.$fm('您还有数据未填写')
}
if (err && err.length > 0 && err[0].name) { if (err && err.length > 0 && err[0].name) {
const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`); const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`);
const fieldHeight = fieldElement.offsetHeight; const fieldHeight = fieldElement.offsetHeight;
@ -321,12 +159,7 @@ export default {
hanadleScanRes(res) { hanadleScanRes(res) {
this.form = { this.form = {
...(res.data || {}), ...(res.data || {}),
invoiceDate1: `${res.data.invoiceDate ? dayjs(res.data.invoiceDate).format('YYYY/MM/DD') : ''}`, time: `${res.data.invoiceDate ? dayjs(res.data.invoiceDate).format('YYYY/MM/DD') : ''}`,
startingDate1:`${res.data.startingDate ? dayjs(res.data.startingDate).format('YYYY/MM/DD') : ''}`,
startTime1:`${res.data.startTime ? dayjs(res.data.startTime).format('YYYY/MM/DD') : ''}`,
endTime1:`${res.data.endTime ? dayjs(res.data.endTime).format('YYYY/MM/DD') : ''}`,
applicationDate1:`${res.data.applicationDate ? dayjs(res.data.applicationDate).format('YYYY/MM/DD') : ''}`,
agent1:res.data.agent,
type: res.data.type type: res.data.type
} }
this.scanRes = res.data || {} this.scanRes = res.data || {}
@ -335,23 +168,15 @@ export default {
this.fileList = list this.fileList = list
}, },
handleInitForm() { handleInitForm() {
let _this = this const { id, type } = this.$route.query || {}
const { id, type,invoiceType } = this.$route.query || {}
this.typeStr = type this.typeStr = type
this.invoiceType = invoiceType
if (id) { if (id) {
this.$loading(true, 'loadingSb') this.$loading(true, 'loadingSb')
const getInvoice = _this.invoiceType == '01' ? getInvoice01 : _this.invoiceType == '02' ? getInvoice02 : _this.invoiceType == '03' ? getInvoice03 : _this.invoiceType == '04' ? getInvoice04 : getInvoice05;
getInvoice(id).then((res) => { getInvoice(id).then((res) => {
let backRes = res.data || {} let backRes = res.data || {}
this.form = { this.form = {
...backRes, ...backRes,
invoiceDate1: `${res.data.invoiceDate ? dayjs(res.data.invoiceDate).format('YYYY/MM/DD') : ''}`, time: `${backRes.invoiceDate ? dayjs(backRes.invoiceDate).format('YYYY/MM/DD') : ''}`,
startingDate1:`${res.data.startingDate ? dayjs(res.data.startingDate).format('YYYY/MM/DD') : ''}`,
startTime1:`${res.data.startTime ? dayjs(res.data.startTime).format('YYYY/MM/DD') : ''}`,
endTime1:`${res.data.endTime ? dayjs(res.data.endTime).format('YYYY/MM/DD') : ''}`,
applicationDate1:`${res.data.applicationDate ? dayjs(res.data.applicationDate).format('YYYY/MM/DD') : ''}`,
agent1:res.data.agent,
type: backRes.type type: backRes.type
} }
this.fileList = res.data.files || [] this.fileList = res.data.files || []
@ -418,7 +243,6 @@ export default {
}) })
.then(() => { .then(() => {
this.$loading(true, 'form') this.$loading(true, 'form')
const deleteInvoice = this.invoiceType == '01' ? deleteInvoice01 : this.invoiceType == '02' ? deleteInvoice02 : this.invoiceType == '03' ? deleteInvoice03 : this.invoiceType == '04' ? deleteInvoice04 : deleteInvoice05;
deleteInvoice(this.form.id).then(() => { deleteInvoice(this.form.id).then(() => {
// //
this.$EventBus.$emit('handleResetLive', 'company-myInvoice') this.$EventBus.$emit('handleResetLive', 'company-myInvoice')
@ -442,7 +266,6 @@ export default {
} }
this.$loading(true, 'form') this.$loading(true, 'form')
if (newForm.id != null) { if (newForm.id != null) {
const updateInvoice = this.invoiceType == '01' ? updateInvoice01 : this.invoiceType == '02' ? updateInvoice02 : this.invoiceType == '03' ? updateInvoice03 : this.invoiceType == '04' ? updateInvoice04 : updateInvoice05;
updateInvoice(newForm).then(() => { updateInvoice(newForm).then(() => {
history.back() history.back()
this.$modal.msgSuccess("修改成功!"); this.$modal.msgSuccess("修改成功!");
@ -452,7 +275,6 @@ export default {
}) })
return; return;
} }
const createInvoice = this.invoiceType == '01' ? createInvoice01 : this.invoiceType == '02' ? createInvoice02 : this.invoiceType == '03' ? createInvoice03 : this.invoiceType == '04' ? createInvoice04 : createInvoice05;
createInvoice(newForm).then(() => { createInvoice(newForm).then(() => {
this.$loading(false, 'form') this.$loading(false, 'form')
this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`) this.$sm(`${this.form.id ? '修改成功!' : '新增成功!'}`)
@ -462,9 +284,6 @@ export default {
}); });
}).catch((err) => { }).catch((err) => {
this.$loading(false, 'form') this.$loading(false, 'form')
if (err && err.length > 0){
this.$fm('您还有数据未填写')
}
if (err && err.length > 0 && err[0].name) { if (err && err.length > 0 && err[0].name) {
const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`); const fieldElement = this.$refs.form.$el.querySelector(`[name="${err[0].name}"]`);
const fieldHeight = fieldElement.offsetHeight; const fieldHeight = fieldElement.offsetHeight;
@ -507,79 +326,23 @@ export default {
this.tripTypeList = res.data.list || [] this.tripTypeList = res.data.list || []
}) })
}, },
handleDateShow(dateType) { handleDateShow() {
this.dateType = dateType console.log('handleDateShow...');
let date = dateType == 'invoiceDate'?this.form.invoiceDate:dateType=='startingDate'?this.form.startingDate:dateType=='startTime'?this.form.startTime:dateType=='endTime'?this.form.endTime:dateType=='applicationDate'?this.form.applicationDate:'' const { invoiceDate } = this.form
// const { date } = this.form
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.vanCalendar && this.$refs.vanCalendar.reset() this.$refs.vanCalendar && this.$refs.vanCalendar.reset()
this.dateShow = true this.dateShow = true
if (date) { if (invoiceDate) {
let time = dayjs(Number(date)).format('YYYY/MM/DD'); let time = dayjs(Number(invoiceDate)).format('YYYY/MM/DD');
this.defaultDate = new Date(time) this.defaultDate = new Date(time)
} }
}) })
}, },
handleDateSelect(val) { handleDateSelect(val) {
if(this.dateType == 'invoiceDate'){ this.$set(this.form, 'time', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'invoiceDate1', `${dayjs(val).format('YYYY/MM/DD')}`) this.$set(this.form, 'invoiceDate', `${dayjs(val).valueOf()}`)
this.$set(this.form, 'invoiceDate', `${dayjs(val).valueOf()}`)
}else if(this.dateType == 'startingDate'){
this.$set(this.form, 'startingDate1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startingDate', `${dayjs(val).valueOf()}`)
}else if(this.dateType == 'startTime'){
this.$set(this.form, 'startTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'startTime', `${dayjs(val).valueOf()}`)
}else if(this.dateType == 'endTime'){
this.$set(this.form, 'endTime1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'endTime', `${dayjs(val).valueOf()}`)
}else if(this.dateType == 'applicationDate'){
this.$set(this.form, 'applicationDate1', `${dayjs(val).format('YYYY/MM/DD')}`)
this.$set(this.form, 'applicationDate', `${dayjs(val).valueOf()}`)
}
this.dateShow = false this.dateShow = false
}, },
handleTimeShow(timeType,date){
this.timeShow = true
this.currentTime = date
this.timeType = timeType
},
timeConfirm(val){
if(this.timeType=='pickupTime'){
this.form.pickupTime = val
}else if(this.timeType=='dropoffTime'){
this.form.dropoffTime = val
}else if(this.timeType=='startingTime'){
this.form.startingTime = val
}
this.timeShow = false
},
timeCancel(){
this.timeShow = false
},
serviceTypeOnConfirm(value){
this.form.serviceType = value.text
this.serviceTypeShow = false
},
invoiceTypeOnConfirm(value){
this.form.invoiceType = value.text
this.invoiceTypeShow = false
},
agentTypeOnConfirm(value){
this.form.agent1 = value.text
this.form.agent = value.value
this.agentTypeShow = false
},
handleServiceTypeShow(){
this.serviceTypeShow = true
},
handleInvoiceTypeShow(){
this.invoiceTypeShow = true
},
handleAgentTypeShow(){
this.agentTypeShow = true
}
}, },
} }
</script> </script>

@ -5,190 +5,37 @@
<div class="hf-l-list" v-show="!isActSearch"> <div class="hf-l-list" v-show="!isActSearch">
<van-dropdown-menu class="hf-l-list-menu"> <van-dropdown-menu class="hf-l-list-menu">
<!-- 课程包列表状态 --> <!-- 课程包列表状态 -->
<!-- <van-dropdown-item title="发票类型" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">--> <van-dropdown-item title="发票类型" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<!-- <div class="hf-drop-view">--> <div class="hf-drop-view">
<!-- <div class="hf-drop-contain">--> <div class="hf-drop-contain">
<!-- <div class="hr-drop-filter-item" @click.stop="handleClass(item.value)" v-for="item in stateList" :key="item.value">--> <div class="hr-drop-filter-item" @click.stop="handleClass(item.value)" v-for="item in stateList" :key="item.value">
<!-- <van-icon v-if="listQuery.type && listQuery.type == item.value" name="success" color="#0088FE" />--> <van-icon v-if="listQuery.type && listQuery.type == item.value" name="success" color="#0088FE" />
<!-- <span :class="{'hr-drop-filter-item-act': listQuery.type && listQuery.type == item.value }">{{item.label}}</span>--> <span :class="{'hr-drop-filter-item-act': listQuery.type && listQuery.type == item.value }">{{item.label}}</span>
<!-- </div>-->
<!-- </div>-->
<!-- <div class="common-double-button">-->
<!-- <van-button class="common-double-button-l" @click="handleReset()"></van-button>-->
<!-- <van-button class="common-double-button-r" @click="handleConfirm"></van-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </van-dropdown-item>-->
<!-- &lt;!&ndash; 讲座日期 &ndash;&gt;-->
<!-- <van-dropdown-item title="开票日期" :title-class="isHtab4 ? 'common-act-color' : ''" @open="handleDropOpen(5)" ref="vanDropItem4">-->
<!-- <div class="hf-drop-view">-->
<!-- <div class="hf-drop-quick" style="margin-top: 0;">-->
<!-- <div class="hf-drop-quick-item" style="margin-bottom: 0;">-->
<!-- <ReQuickDateBtns @change="handleQuickDate" :startData="listQuery.startDate" :endData="listQuery.endDate" style="margin-top: 1rem;" />-->
<!-- <div class="hf-drop-quick-calendar">-->
<!-- <van-calendar ref="vanCalendar" :formatter="dayTextFormatter" @select="handleDateSelect" :default-date="defaultDate" :poppable="false" type="range" :show-title="false" color="#0088FE" :show-confirm="false" allow-same-day :min-date="new Date('2000/01/01')" :style="{ height: '400px' }" />-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <div class="common-double-button">-->
<!-- <van-button class="common-double-button-l" @click="handleDateReset(4)"></van-button>-->
<!-- <van-button class="common-double-button-r" @click="handleConfirm"></van-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </van-dropdown-item>-->
<div v-if="type == '01'">
<van-dropdown-item title="发票代码" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.invoiceCode" shape="round" placeholder="请输入发票代码" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div> </div>
</div> </div>
</van-dropdown-item> <div class="common-double-button">
<van-dropdown-item title="发票号码" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1"> <van-button class="common-double-button-l" @click="handleReset()"></van-button>
<div class="hf-drop-view"> <van-button class="common-double-button-r" @click="handleConfirm"></van-button>
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.invoiceNum" shape="round" placeholder="请输入发票代码" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div> </div>
</van-dropdown-item> </div>
</div> </van-dropdown-item>
<div v-if="type == '02'"> <!-- 讲座日期 -->
<van-dropdown-item title="始发站" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1"> <van-dropdown-item title="开票日期" :title-class="isHtab4 ? 'common-act-color' : ''" @open="handleDropOpen(5)" ref="vanDropItem4">
<div class="hf-drop-view"> <div class="hf-drop-view">
<div class="hf-drop-contain"> <div class="hf-drop-quick" style="margin-top: 0;">
<van-search style="width: 100%" v-model="listQuery.startingStation" shape="round" placeholder="请输入始发站" :clearable="false" /> <div class="hf-drop-quick-item" style="margin-bottom: 0;">
</div> <ReQuickDateBtns @change="handleQuickDate" :startData="listQuery.startDate" :endData="listQuery.endDate" style="margin-top: 1rem;" />
<div class="common-double-button"> <div class="hf-drop-quick-calendar">
<van-button class="common-double-button-l" @click="handleReset()"></van-button> <van-calendar ref="vanCalendar" :formatter="dayTextFormatter" @select="handleDateSelect" :default-date="defaultDate" :poppable="false" type="range" :show-title="false" color="#0088FE" :show-confirm="false" allow-same-day :min-date="new Date('2000/01/01')" :style="{ height: '400px' }" />
<van-button class="common-double-button-r" @click="handleConfirm"></van-button> </div>
</div> </div>
</div> </div>
</van-dropdown-item> <div class="common-double-button">
<van-dropdown-item title="到达站" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1"> <van-button class="common-double-button-l" @click="handleDateReset(4)"></van-button>
<div class="hf-drop-view"> <van-button class="common-double-button-r" @click="handleConfirm"></van-button>
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.destinationStation" shape="round" placeholder="请输入到达站" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
</div>
<div v-if="type == '03'">
<van-dropdown-item title="姓名" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.name" shape="round" placeholder="请输入姓名" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
<van-dropdown-item title="始发站" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.startingStation" shape="round" placeholder="请输入始发站" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
<van-dropdown-item title="目的站" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.destinationStation" shape="round" placeholder="请输入目的站" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
</div>
<div v-if="type == '04'">
<van-dropdown-item title="行程人手机号" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.phone" shape="round" placeholder="请输入行程人手机号" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div> </div>
</van-dropdown-item> </div>
<van-dropdown-item title="起点" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1"> </van-dropdown-item>
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.startPlace" shape="round" placeholder="请输入起点" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
<van-dropdown-item title="终点" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.destinationPlace" shape="round" placeholder="请输入终点" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
</div>
<div v-if="type == '05'">
<van-dropdown-item title="发票号码" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.invoiceNum" shape="round" placeholder="请输入发票代码" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
<van-dropdown-item title="车牌号" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.taxiNum" shape="round" placeholder="请输入车牌号" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
<van-dropdown-item title="里程" :title-class="isHtab1 ? 'common-act-color' : ''" @open="handleDropOpen()" ref="vanDropItem1">
<div class="hf-drop-view">
<div class="hf-drop-contain">
<van-search style="width: 100%" v-model="listQuery.distance" shape="round" placeholder="请输入里程" :clearable="false" />
</div>
<div class="common-double-button">
<van-button class="common-double-button-l" @click="handleReset()"></van-button>
<van-button class="common-double-button-r" @click="handleConfirm"></van-button>
</div>
</div>
</van-dropdown-item>
</div>
</van-dropdown-menu> </van-dropdown-menu>
</div> </div>
<div class="hf-r-list"> <div class="hf-r-list">
@ -237,7 +84,6 @@ export default {
props: { props: {
listType: String, // 'detail' listType: String, // 'detail'
paramProp: Object, paramProp: Object,
type:String,
}, },
components: { components: {
ReQuickDateBtns: () => import('@/components/ReComponents/ReQuickDateBtns'), ReQuickDateBtns: () => import('@/components/ReComponents/ReQuickDateBtns'),
@ -310,7 +156,7 @@ export default {
this.listQuery.endDate = `${e.time[1]} 23:59:59` this.listQuery.endDate = `${e.time[1]} 23:59:59`
}, },
handleConfirm() { handleConfirm() {
// this.$refs.vanDropItem4 && this.$refs.vanDropItem4.toggle(false) this.$refs.vanDropItem4 && this.$refs.vanDropItem4.toggle(false)
this.$refs.vanDropItem1 && this.$refs.vanDropItem1.toggle(false) this.$refs.vanDropItem1 && this.$refs.vanDropItem1.toggle(false)
this.$emit('onListQuery', this.listQuery) this.$emit('onListQuery', this.listQuery)
}, },
@ -391,12 +237,10 @@ export default {
}, },
handleMoreConfirm() { handleMoreConfirm() {
this.$emit('onListQuery', this.listQuery) this.$emit('onListQuery', this.listQuery)
this.moreFilterShow = false
}, },
handleReset() { handleReset() {
this.listQuery = {} this.listQuery.type = null
this.$emit('onListQuery', this.listQuery)
}, },

@ -1,19 +1,10 @@
<template> <template>
<!-- 出差列表 --> <!-- 出差列表 -->
<div> <div>
<div style="position: sticky;top: 0;background-color: white;z-index: 999"> <HeaderFilter :listType="listType" @onListQuery="handleListQuery" :paramProp="listQuery" />
<van-tabs v-model="type" :swipe-threshold="4" @change="vanTabsChange">
<van-tab name="01" title="增值税发票" />
<van-tab name="02" title="火车票" />
<van-tab name="03" title="飞机行程票" />
<van-tab name="04" title="网约车行程单" />
<van-tab name="05" title="出租车发票" />
</van-tabs>
</div>
<HeaderFilter :listType="listType" :type="type" @onListQuery="handleListQuery" :paramProp="listQuery" />
<RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList"> <RMList :moreLoading.sync="moreLoading" :refreshing.sync="refreshing" :finished.sync="finished" @onLoad="handleLoad" @onRefresh="handleRefresh" isMore :tableList="tableList">
<div> <div>
<MyInvoiceListCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :invoiceType="type" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" /> <MyInvoiceListCard v-for="(item,index) in tableList" :key="item.id" :itemData="item" :listType="listType" @onUpdataInfo="handleUpdataInfo($event, index)" @onAllRefresh="handleAllRefresh" />
</div> </div>
</RMList> </RMList>
<div class="common-bottom-btns" style="bottom:8rem"> <div class="common-bottom-btns" style="bottom:8rem">
@ -34,9 +25,6 @@
<span>返回首页</span> <span>返回首页</span>
</div> </div>
</div> </div>
<van-popup v-model="showPicker" position="bottom">
<van-picker :columns="columns" show-toolbar title="选择开票类型" @cancel="onCancel" @confirm="onConfirm" />
</van-popup>
</div> </div>
</template> </template>
@ -45,8 +33,7 @@
import { getScrollTop, findAreaIdName } from '@/utils' import { getScrollTop, findAreaIdName } from '@/utils'
// import { getOrderListApi, getDataStatisticsApi, updateOrderSingleListApi } from '@/api/potentialGuest/order' // import { getOrderListApi, getDataStatisticsApi, updateOrderSingleListApi } from '@/api/potentialGuest/order'
// import { getInvoicePage, } from "@/api/bs/expenseApply"; // import { getInvoicePage, } from "@/api/bs/expenseApply";
// import { deleteInvoice, getInvoice, getInvoicePage, exportInvoiceExcel } from "@/api/bs/invoice"; import { deleteInvoice, getInvoice, getInvoicePage, exportInvoiceExcel } from "@/api/bs/invoice";
import { deleteInvoice01, getInvoicePage01, exportInvoiceExcel01, deleteInvoice02, getInvoicePage02, exportInvoiceExcel02, deleteInvoice03, getInvoicePage03, exportInvoiceExcel03, deleteInvoice04, getInvoicePage04, exportInvoiceExcel04, deleteInvoice05, getInvoicePage05, exportInvoiceExcel05 } from "@/api/bs/invoice";
import { mapState, mapMutations } from 'vuex' import { mapState, mapMutations } from 'vuex'
import dayjs from 'dayjs' import dayjs from 'dayjs'
export default { export default {
@ -66,9 +53,6 @@ export default {
refreshing: false, refreshing: false,
finished: false, finished: false,
tableList: [], tableList: [],
type:'01',
columns: ['增值税发票', '火车票', '飞机行程票', '网约车行程单', '出租车发票'],
showPicker:false,
listQuery: { listQuery: {
pageNo: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
@ -115,7 +99,6 @@ export default {
pageNo: 1, pageNo: 1,
pageSize: this.singlePageSize, pageSize: this.singlePageSize,
} }
const getInvoicePage = this.type == '01' ? getInvoicePage01 : this.type == '02' ? getInvoicePage02 : this.type == '03' ? getInvoicePage03 : this.type == '04' ? getInvoicePage04 : getInvoicePage05;
getInvoicePage(listQuery).then((res) => { getInvoicePage(listQuery).then((res) => {
let arr = (res.data && res.data.list || []).filter(item => item.id == id) let arr = (res.data && res.data.list || []).filter(item => item.id == id)
resolve(arr) resolve(arr)
@ -138,7 +121,6 @@ export default {
handleListQuery(paramProp) { handleListQuery(paramProp) {
this.listQuery = { this.listQuery = {
...paramProp, ...paramProp,
pageSize: 10,
invoiceDate: paramProp.startDate && [dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'), dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm')] invoiceDate: paramProp.startDate && [dayjs(paramProp.startDate).format('YYYY-MM-DD HH:ss:mm'), dayjs(paramProp.endDate).format('YYYY-MM-DD HH:ss:mm')]
} }
this.finished = false this.finished = false
@ -160,7 +142,12 @@ export default {
this.height = 0 this.height = 0
}, },
handleToAdd() { handleToAdd() {
this.showPicker = true this.$router.push({
path: '/invoice',
query: {
type: 'add'
}
})
}, },
handleAllRefresh() { handleAllRefresh() {
// this.getTableList('refresh') // this.getTableList('refresh')
@ -189,12 +176,10 @@ export default {
getTableList(val) { getTableList(val) {
// const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery // const { shellIdsLocal, collegeInfoIdLocal, startDate, endDate, keyword, type, method, targets, usePersonId, teacherIds, chargePersonIds } = this.listQuery
const query = { const query = {
...this.listQuery, ...this.listQuery
type:this.type
} }
this.moreLoading = true this.moreLoading = true
this.$loading(true, 'tableLoading') this.$loading(true, 'tableLoading')
const getInvoicePage = this.type == '01' ? getInvoicePage01 : this.type == '02' ? getInvoicePage02 : this.type == '03' ? getInvoicePage03 : this.type == '04' ? getInvoicePage04 : getInvoicePage05;
getInvoicePage(query).then(res => { getInvoicePage(query).then(res => {
let resList = res.data && res.data.list || [] let resList = res.data && res.data.list || []
if (['init', 'refresh'].includes(val)) { if (['init', 'refresh'].includes(val)) {
@ -215,23 +200,6 @@ export default {
// this.$loading(false, `cTableLoading_${this.listType}`) // this.$loading(false, `cTableLoading_${this.listType}`)
}) })
}, },
onCancel(){
this.showPicker = false
},
onConfirm(value,index){
this.$router.push({
path: '/invoice',
query: {
type: 'add',
invoiceType:`0${index+1}`
}
})
},
vanTabsChange(){
this.listQuery.pageNo = 1
this.finished = false
this.getTableList('init')
}
} }
} }
</script> </script>

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
// import { getSafing } from '@/api/login' import { getSafing } from '@/api/login'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -39,14 +39,14 @@ export default {
}, },
methods: { methods: {
handleInit() { handleInit() {
// getSafing().then(res => { getSafing().then(res => {
// this.form = res.data || {} this.form = res.data || {}
// }).catch(err => { }).catch(err => {
// if (err.status === 201) { if (err.status === 201) {
// let redirectUrl = this.$router.currentRoute.query.redirect let redirectUrl = this.$router.currentRoute.query.redirect
// if (redirectUrl) this.$router.replace('/' + decodeURIComponent(redirectUrl)) if (redirectUrl) this.$router.replace('/' + decodeURIComponent(redirectUrl))
// } }
// }) })
} }
} }
} }

@ -118,6 +118,7 @@ export default {
}) })
}, },
handleFilterList() { handleFilterList() {
console.log('首页加载...');
this.roterList = [] this.roterList = []
let arr = [ let arr = [
{ {
@ -203,6 +204,7 @@ export default {
row: item.row.filter(n => n.show) row: item.row.filter(n => n.show)
} }
}) })
console.log('roterList..', this.roterList);
}, },
checkPermission, checkPermission,
handelTo(route) { handelTo(route) {

Loading…
Cancel
Save