|
|
@ -14,46 +14,46 @@
|
|
|
|
</van-tabs>
|
|
|
|
</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">
|
|
|
|
<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 class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '01'">
|
|
|
|
|
|
|
|
<div class="mt5">发票消费类型: {{item.serviceType || '-'}}</div>
|
|
|
|
|
|
|
|
<div class="mt5">发票代码: {{item.invoiceCode || '-'}}</div>
|
|
|
|
|
|
|
|
<div class="mt5">发票号码: {{item.invoiceNum || '-'}}</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>
|
|
|
|
<div class="new-cr" @click="handleSetCheck(index,item)" v-if="invoiceType == '01'">
|
|
|
|
|
|
|
|
<div class="mt5">发票消费类型: {{item.serviceType || '-'}}</div>
|
|
|
|
|
|
|
|
<div class="mt5">发票代码: {{item.invoiceCode || '-'}}</div>
|
|
|
|
|
|
|
|
<div class="mt5">发票号码: {{item.invoiceNum || '-'}}</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>
|
|
|
|
|
|
|
|
</RMList>
|
|
|
|
</RMList>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
@ -72,6 +72,7 @@ import {
|
|
|
|
} from "@/api/bs/invoice";
|
|
|
|
} from "@/api/bs/invoice";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
|
|
|
|
temClaimNo: [Number, String], // 关联发票 有值代表编辑 无值代表新增
|
|
|
|
invoiceIds: Object, // 选中得发票id
|
|
|
|
invoiceIds: Object, // 选中得发票id
|
|
|
|
isOpen: Boolean,
|
|
|
|
isOpen: Boolean,
|
|
|
|
isExist: Boolean, // 是否存在
|
|
|
|
isExist: Boolean, // 是否存在
|
|
|
@ -107,19 +108,20 @@ export default {
|
|
|
|
tableList: [],
|
|
|
|
tableList: [],
|
|
|
|
demo: false,
|
|
|
|
demo: false,
|
|
|
|
isShow: false,
|
|
|
|
isShow: false,
|
|
|
|
invoiceType:'01',
|
|
|
|
invoiceType: '01',
|
|
|
|
invoiceIdsCopy:{},
|
|
|
|
invoiceIdsCopy: {},
|
|
|
|
moreLoading: false,
|
|
|
|
moreLoading: false,
|
|
|
|
refreshing: false,
|
|
|
|
refreshing: false,
|
|
|
|
finished: false,
|
|
|
|
finished: false,
|
|
|
|
listQuery:{
|
|
|
|
listQuery: {
|
|
|
|
pageNo: 1,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 10,
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
temClaimNo: 0,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
this.$nextTick(() => {
|
|
|
|
this.invoiceIdsCopy = this.invoiceIds
|
|
|
|
this.invoiceIdsCopy = this.invoiceIds
|
|
|
|
this.getList('init')
|
|
|
|
this.getList('init')
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -127,6 +129,7 @@ export default {
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
isOpen: {
|
|
|
|
isOpen: {
|
|
|
|
handler(val) {
|
|
|
|
handler(val) {
|
|
|
|
|
|
|
|
console.log('6....1111..', val);
|
|
|
|
this.isShow = val
|
|
|
|
this.isShow = val
|
|
|
|
if (val) {
|
|
|
|
if (val) {
|
|
|
|
this.handleInitList()
|
|
|
|
this.handleInitList()
|
|
|
@ -157,13 +160,13 @@ export default {
|
|
|
|
// this.tableList
|
|
|
|
// this.tableList
|
|
|
|
let _this = this
|
|
|
|
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.tableList[index].checked) {
|
|
|
|
if(!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)){
|
|
|
|
if (!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) {
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType] = [];
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType] = [];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id)
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType].push(this.tableList[index].id)
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType].splice(index,1)
|
|
|
|
_this.invoiceIdsCopy[_this.invoiceType].splice(index, 1)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.$forceUpdate()
|
|
|
|
this.$forceUpdate()
|
|
|
|
console.log(_this.invoiceIdsCopy)
|
|
|
|
console.log(_this.invoiceIdsCopy)
|
|
|
@ -199,15 +202,20 @@ export default {
|
|
|
|
this.finished = false
|
|
|
|
this.finished = false
|
|
|
|
this.getList('refresh')
|
|
|
|
this.getList('refresh')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
vanTabsChange(){
|
|
|
|
vanTabsChange() {
|
|
|
|
this.listQuery.pageNo = 1
|
|
|
|
this.listQuery.pageNo = 1
|
|
|
|
this.getList('init')
|
|
|
|
this.getList('init')
|
|
|
|
},
|
|
|
|
},
|
|
|
|
getList(val){
|
|
|
|
getList(val) {
|
|
|
|
let _this = this
|
|
|
|
let _this = this
|
|
|
|
this.moreLoading = true
|
|
|
|
this.moreLoading = true
|
|
|
|
this.$loading(true, 'tableLoading')
|
|
|
|
this.$loading(true, 'tableLoading')
|
|
|
|
const getInvoicePage = this.invoiceType == '01' ? getInvoicePage01 : this.invoiceType == '02' ? getInvoicePage02 : this.invoiceType == '03' ? getInvoicePage03 : this.invoiceType == '04' ? getInvoicePage04 : getInvoicePage05;
|
|
|
|
const getInvoicePage = this.invoiceType == '01' ? getInvoicePage01 : this.invoiceType == '02' ? getInvoicePage02 : this.invoiceType == '03' ? getInvoicePage03 : this.invoiceType == '04' ? getInvoicePage04 : getInvoicePage05;
|
|
|
|
|
|
|
|
if (_this.temClaimNo) {
|
|
|
|
|
|
|
|
_this.listQuery.temClaimNo = _this.temClaimNo
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
_this.listQuery.temClaimNo = 0
|
|
|
|
|
|
|
|
}
|
|
|
|
getInvoicePage(_this.listQuery).then(res => {
|
|
|
|
getInvoicePage(_this.listQuery).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)) {
|
|
|
@ -218,9 +226,9 @@ export default {
|
|
|
|
if (resList.length < this.pageSize) {
|
|
|
|
if (resList.length < this.pageSize) {
|
|
|
|
this.finished = true
|
|
|
|
this.finished = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(_this.invoiceIdsCopy && _this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)){
|
|
|
|
if (_this.invoiceIdsCopy && _this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) {
|
|
|
|
_this.tableList.map(item =>{
|
|
|
|
_this.tableList.map(item => {
|
|
|
|
item.checked=(_this.invoiceIdsCopy[_this.invoiceType] || []).includes(item.id)
|
|
|
|
item.checked = (_this.invoiceIdsCopy[_this.invoiceType] || []).includes(item.id)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|