diff --git a/src/components/ConnectInvoice/index.vue b/src/components/ConnectInvoice/index.vue index 2f7072f..50efa5b 100644 --- a/src/components/ConnectInvoice/index.vue +++ b/src/components/ConnectInvoice/index.vue @@ -14,46 +14,46 @@
-
-
- - +
+
+ + +
+
+
发票消费类型: {{item.serviceType || '-'}}
+
发票代码: {{item.invoiceCode || '-'}}
+
发票号码: {{item.invoiceNum || '-'}}
+
开票日期: {{item.invoiceDate && dayjs(item.invoiceDate).format('YY/MM/DD HH:ss')}}
+
+
+
车票号: {{item.ticketNum || '-'}}
+
始发站: {{item.startingStation || '-'}}
+
到达站: {{item.destinationStation || '-'}}
+
出发日期: {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}
+
车次号: {{item.trainNum || '-'}}
+
+
+
姓名: {{item.name || '-'}}
+
始发站: {{item.startingStation || '-'}}
+
目的站: {{item.destinationStation || '-'}}
+
航班号: {{item.flight || '-'}}
+
承运人: {{item.carrier || '-'}}
+
+
+
服务商: {{item.serviceProvider || '-'}}
+
行程人手机号: {{item.phone || '-'}}
+
上车日期: {{item.items[0].pickupDate && dayjs(item.items[0].pickupDate).format('YY/MM/DD HH:ss')}}
+
起点: {{item.items[0].startPlace || '-'}}
+
终点: {{item.items[0].destinationPlace || '-'}}
+
城市: {{item.items[0].city || '-'}}
+
+
+
发票代码: {{item.invoiceCode || '-'}}
+
发票号码: {{item.invoiceNum || '-'}}
+
车牌号: {{item.taxiNum || '-'}}
+
日期: {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}
+
-
-
发票消费类型: {{item.serviceType || '-'}}
-
发票代码: {{item.invoiceCode || '-'}}
-
发票号码: {{item.invoiceNum || '-'}}
-
开票日期: {{item.invoiceDate && dayjs(item.invoiceDate).format('YY/MM/DD HH:ss')}}
-
-
-
车票号: {{item.ticketNum || '-'}}
-
始发站: {{item.startingStation || '-'}}
-
到达站: {{item.destinationStation || '-'}}
-
出发日期: {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}
-
车次号: {{item.trainNum || '-'}}
-
-
-
姓名: {{item.name || '-'}}
-
始发站: {{item.startingStation || '-'}}
-
目的站: {{item.destinationStation || '-'}}
-
航班号: {{item.flight || '-'}}
-
承运人: {{item.carrier || '-'}}
-
-
-
服务商: {{item.serviceProvider || '-'}}
-
行程人手机号: {{item.phone || '-'}}
-
上车日期: {{item.items[0].pickupDate && dayjs(item.items[0].pickupDate).format('YY/MM/DD HH:ss')}}
-
起点: {{item.items[0].startPlace || '-'}}
-
终点: {{item.items[0].destinationPlace || '-'}}
-
城市: {{item.items[0].city || '-'}}
-
-
-
发票代码: {{item.invoiceCode || '-'}}
-
发票号码: {{item.invoiceNum || '-'}}
-
车牌号: {{item.taxiNum || '-'}}
-
日期: {{item.startingDate && dayjs(item.startingDate).format('YY/MM/DD HH:ss')}}
-
-
@@ -72,6 +72,7 @@ import { } from "@/api/bs/invoice"; export default { props: { + temClaimNo: [Number, String], // 关联发票 有值代表编辑 无值代表新增 invoiceIds: Object, // 选中得发票id isOpen: Boolean, isExist: Boolean, // 是否存在 @@ -107,19 +108,20 @@ export default { tableList: [], demo: false, isShow: false, - invoiceType:'01', - invoiceIdsCopy:{}, + invoiceType: '01', + invoiceIdsCopy: {}, moreLoading: false, refreshing: false, finished: false, - listQuery:{ + listQuery: { pageNo: 1, pageSize: 10, + temClaimNo: 0, } } }, created() { - this.$nextTick(()=>{ + this.$nextTick(() => { this.invoiceIdsCopy = this.invoiceIds this.getList('init') }) @@ -127,6 +129,7 @@ export default { watch: { isOpen: { handler(val) { + console.log('6....1111..', val); this.isShow = val if (val) { this.handleInitList() @@ -157,13 +160,13 @@ export default { // this.tableList let _this = this this.$set(this.tableList[index], 'checked', !this.tableList[index].checked) - if(this.tableList[index].checked){ - if(!_this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)){ + 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) + } else { + _this.invoiceIdsCopy[_this.invoiceType].splice(index, 1) } this.$forceUpdate() console.log(_this.invoiceIdsCopy) @@ -199,15 +202,20 @@ export default { this.finished = false this.getList('refresh') }, - vanTabsChange(){ + vanTabsChange() { this.listQuery.pageNo = 1 this.getList('init') }, - getList(val){ + 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; + if (_this.temClaimNo) { + _this.listQuery.temClaimNo = _this.temClaimNo + } else { + _this.listQuery.temClaimNo = 0 + } getInvoicePage(_this.listQuery).then(res => { let resList = res.data && res.data.list || [] if (['init', 'refresh'].includes(val)) { @@ -218,9 +226,9 @@ export default { 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) + if (_this.invoiceIdsCopy && _this.invoiceIdsCopy.hasOwnProperty(_this.invoiceType)) { + _this.tableList.map(item => { + item.checked = (_this.invoiceIdsCopy[_this.invoiceType] || []).includes(item.id) }) } }).finally(() => { diff --git a/src/components/MyInvoiceListCard/index.vue b/src/components/MyInvoiceListCard/index.vue index 92811de..543b860 100644 --- a/src/components/MyInvoiceListCard/index.vue +++ b/src/components/MyInvoiceListCard/index.vue @@ -7,9 +7,9 @@
发票
-->
- - - + + + @@ -89,8 +89,8 @@
- - + +
@@ -99,7 +99,7 @@