Commit 2193e498 authored by xiejb's avatar xiejb

添加发票信息功能

parent 81b81896
......@@ -8,3 +8,12 @@ export function getMyInvoiceList(params) {
loading: true
})
}
// 新获取发票列表
export function getNewMyInvoiceList(params) {
return fetch({
url: '/OrderLife/newInvoice',
method: 'post',
data: params,
loading: true
})
}
\ No newline at end of file
......@@ -83,7 +83,7 @@ export default {
error: false,
searchNum: '0',
currentPage: 1,
pageSize: 10,
pageSize: 20,
postDataList: [],
checked: '',
checkedList: [],
......
......@@ -37,7 +37,7 @@ export default {
}
},
invoiceList: [],
invoiceListShow: true
invoiceListShow: false
}
},
computed: {
......@@ -227,10 +227,10 @@ export default {
},
// 高级搜索查询
moreSearchConfirm(data) {
console.log(data)
// console.log(data)
this.invoiceListShow = true
this.moreSearchInfo = JSON.parse(JSON.stringify(data))
console.log(this.$refs.invoiceList)
// console.log(this.$refs.invoiceList)
this.$refs.invoiceList.httpAction(this.moreSearchInfo)
},
// 高级搜索取消
......
......@@ -103,15 +103,15 @@ export default {
let data = {
'clientID': [
],
'endDate': '2021-03-15',
'endDate': '',
'goodsCode': '',
'goodsDesc': '',
'goodsId': '',
'goodsName': '',
'goodsSpec': '',
'invoiceCode': '',
'invoiceCode': this.$route.query.invoiceCode,
'invoiceDate': '',
'invoiceFullNo': '',
'invoiceFullNo': this.$route.query.invoiceFullNo,
'invoiceNo': this.$route.query.invoiceNo,
'isTwoTicket': '',
'manufacturer': '',
......@@ -124,11 +124,12 @@ export default {
'pageSize': this.pageSize,
'sort': '',
'sourceDb': this.$route.query.sourceDb,
'startDate': '2021-03-08',
'startDate': '',
'supplierId': [
]
}
getMyInvoiceList(data).then(rt => {
if (rt.code === 200) {
if (rt.data.code === '00000') {
if (rt.data.entity && rt.data.entity.invoiceList.length > 0) {
_this.invoiceItem = rt.data.entity.invoiceList[0]
......@@ -136,6 +137,9 @@ export default {
} else {
_this.$toast(rt.data.message)
}
} else {
_this.$toast(rt.msg)
}
// 加载状态结束
_this.isLoading = false
}).catch(e => {
......
......@@ -22,7 +22,7 @@
<script>
// 引入接口
import { getMyInvoiceList } from '@/api/myInvoice'
import { getNewMyInvoiceList } from '@/api/myInvoice'
import myInvoiecListItem from './myInvoiecListItem.vue'
import {getFormateDate} from '@/utils/common'
export default {
......@@ -112,7 +112,7 @@ export default {
let _this = this
let data = {
'clientID': [
'3168'
'3083'
],
'endDate': this.moreSearchInfo.time.end,
'goodsCode': '',
......@@ -135,14 +135,98 @@ export default {
'pageSize': this.pageSize,
'sort': '',
'sourceDb': 'SHYY',
// 'startDate': this.moreSearchInfo.time.start,
'startDate': '2021-01-02',
'startDate': this.moreSearchInfo.time.start,
// 'startDate': '2021-01-02',
'supplierId': [
'305','879','301'
'225'
]
}
getMyInvoiceList(data).then(rt => {
if (rt.data.code === '00000') {
let dict = {
'list': this.setMoreSearchInfoAction(),
// 'list': [data],
'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间
'pageNum': _this.currentPage,
'pageSize': _this.pageSize
}
console.log(dict)
// let dic = {
// "list": [
// {
// "businessType": "",
// "clientID": [
// "3004",
// "57847"
// ],
// "endDate": "2021-06-24",
// "startDate": "2021-06-24",
// "goodsCode": "",
// "goodsDesc": "",
// "goodsId": "",
// "goodsName": "",
// "goodsSpec": "",
// "isDelivered": "",
// "isInvoice": "",
// "isWeb": "",
// "manufacturer": "",
// "mdmClientCode": "",
// "order": "",
// "orderId": "",
// "orderNo": "",
// "orderStatusCode": "",
// "orderType": "SALE",
// "pageNum": 1,
// "pageSize": 10,
// "shippingAdress": "",
// "sort": "",
// "sourceDb": "SHYY",
// "sourceOrderNo": "",
// "sourceSystem": "",
// "supplierId": [
// "188",
// "204"
// ]
// },
// {
// "clientID": [
// "3168"
// ],
// "endDate": "2021-06-25",
// "goodsCode": "",
// "goodsDesc": "",
// "goodsId": "",
// "goodsName": "",
// "goodsSpec": "",
// "invoiceCode": "",
// "invoiceDate": "",
// "invoiceFullNo": "",
// "invoiceNo": "",
// "isTwoTicket": "",
// "manufacturer": "",
// "mdmClientCode": "",
// "mdmGoodsCode": "",
// "order": "",
// "orderId": "",
// "orderNo": "",
// "pageNum": 1,
// "pageSize": 10,
// "sort": "",
// "sourceDb": "SHYY",
// "startDate": "2021-06-25",
// "supplierId": [
// "305",
// "879",
// "301"
// ]
// }
// ],
// "endDate": "2021-06-24",
// "startDate": "2021-06-24",
// "pageNum": 1,
// "pageSize": 10
// }
getNewMyInvoiceList(dict).then(rt => {
if (rt.data.code && rt.data.code === '00000') {
if (_this.isRefreshing) {
_this.invoiceList = rt.data.entity.invoiceList
} else if (rt.data.entity.invoiceList || rt.data.entity.invoiceList.length > 0) {
......@@ -157,9 +241,10 @@ export default {
} else {
// 加载成功后下一页自增1
_this.currentPage++
_this.finished = false
}
} else {
_this.$toast(rt.message)
_this.$toast(rt.msg)
_this.isRefreshing = false
_this.error = true
_this.finished = false
......@@ -187,6 +272,7 @@ export default {
sourceDbList.push(item.ownerid)
}
const model = {
'businessType': '',
'clientID': this.getClientValueArray(_this.moreSearchInfo.client, item.id), // 客户编码
'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间
......
......@@ -96,8 +96,8 @@
<div>
<div class="goods-all" @click="openOrderInvoice()">
<span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span>
<!-- <span class="title-more">更多</span>-->
<!-- <van-icon class="title-arrow" name="arrow"/>-->
<span class="title-more">更多</span>
<van-icon class="title-arrow" name="arrow"/>
</div>
<div class="order-common" style="margin-bottom: 10px">
<invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo"
......@@ -201,19 +201,19 @@ export default {
},
/* 打开发票列表页面 */
openOrderInvoice() {
// this.$router.push({
// path: 'orderInvoice',
// query: this.detailData
// })
this.$router.push({
path: 'orderInvoice',
query: this.detailData
})
},
/* 打开单个发票页面 */
openInvoice(model) {
// let item = this.detailData
// item.invoiceNo = model.invoiceNo
// this.$router.push({
// path: 'orderInvoiecDetail',
// query: item
// })
let item = this.detailData
item.invoiceNo = model.invoiceNo
this.$router.push({
path: 'orderInvoiecDetail',
query: item
})
// console.log(item)
},
/* 计算订单状态Step */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment