Commit 2193e498 authored by xiejb's avatar xiejb

添加发票信息功能

parent 81b81896
...@@ -8,3 +8,12 @@ export function getMyInvoiceList(params) { ...@@ -8,3 +8,12 @@ export function getMyInvoiceList(params) {
loading: true 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 { ...@@ -83,7 +83,7 @@ export default {
error: false, error: false,
searchNum: '0', searchNum: '0',
currentPage: 1, currentPage: 1,
pageSize: 10, pageSize: 20,
postDataList: [], postDataList: [],
checked: '', checked: '',
checkedList: [], checkedList: [],
......
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
} }
}, },
invoiceList: [], invoiceList: [],
invoiceListShow: true invoiceListShow: false
} }
}, },
computed: { computed: {
...@@ -227,10 +227,10 @@ export default { ...@@ -227,10 +227,10 @@ export default {
}, },
// 高级搜索查询 // 高级搜索查询
moreSearchConfirm(data) { moreSearchConfirm(data) {
console.log(data) // console.log(data)
this.invoiceListShow = true this.invoiceListShow = true
this.moreSearchInfo = JSON.parse(JSON.stringify(data)) this.moreSearchInfo = JSON.parse(JSON.stringify(data))
console.log(this.$refs.invoiceList) // console.log(this.$refs.invoiceList)
this.$refs.invoiceList.httpAction(this.moreSearchInfo) this.$refs.invoiceList.httpAction(this.moreSearchInfo)
}, },
// 高级搜索取消 // 高级搜索取消
......
...@@ -103,15 +103,15 @@ export default { ...@@ -103,15 +103,15 @@ export default {
let data = { let data = {
'clientID': [ 'clientID': [
], ],
'endDate': '2021-03-15', 'endDate': '',
'goodsCode': '', 'goodsCode': '',
'goodsDesc': '', 'goodsDesc': '',
'goodsId': '', 'goodsId': '',
'goodsName': '', 'goodsName': '',
'goodsSpec': '', 'goodsSpec': '',
'invoiceCode': '', 'invoiceCode': this.$route.query.invoiceCode,
'invoiceDate': '', 'invoiceDate': '',
'invoiceFullNo': '', 'invoiceFullNo': this.$route.query.invoiceFullNo,
'invoiceNo': this.$route.query.invoiceNo, 'invoiceNo': this.$route.query.invoiceNo,
'isTwoTicket': '', 'isTwoTicket': '',
'manufacturer': '', 'manufacturer': '',
...@@ -124,11 +124,12 @@ export default { ...@@ -124,11 +124,12 @@ export default {
'pageSize': this.pageSize, 'pageSize': this.pageSize,
'sort': '', 'sort': '',
'sourceDb': this.$route.query.sourceDb, 'sourceDb': this.$route.query.sourceDb,
'startDate': '2021-03-08', 'startDate': '',
'supplierId': [ 'supplierId': [
] ]
} }
getMyInvoiceList(data).then(rt => { getMyInvoiceList(data).then(rt => {
if (rt.code === 200) {
if (rt.data.code === '00000') { if (rt.data.code === '00000') {
if (rt.data.entity && rt.data.entity.invoiceList.length > 0) { if (rt.data.entity && rt.data.entity.invoiceList.length > 0) {
_this.invoiceItem = rt.data.entity.invoiceList[0] _this.invoiceItem = rt.data.entity.invoiceList[0]
...@@ -136,6 +137,9 @@ export default { ...@@ -136,6 +137,9 @@ export default {
} else { } else {
_this.$toast(rt.data.message) _this.$toast(rt.data.message)
} }
} else {
_this.$toast(rt.msg)
}
// 加载状态结束 // 加载状态结束
_this.isLoading = false _this.isLoading = false
}).catch(e => { }).catch(e => {
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<script> <script>
// 引入接口 // 引入接口
import { getMyInvoiceList } from '@/api/myInvoice' import { getNewMyInvoiceList } from '@/api/myInvoice'
import myInvoiecListItem from './myInvoiecListItem.vue' import myInvoiecListItem from './myInvoiecListItem.vue'
import {getFormateDate} from '@/utils/common' import {getFormateDate} from '@/utils/common'
export default { export default {
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
let _this = this let _this = this
let data = { let data = {
'clientID': [ 'clientID': [
'3168' '3083'
], ],
'endDate': this.moreSearchInfo.time.end, 'endDate': this.moreSearchInfo.time.end,
'goodsCode': '', 'goodsCode': '',
...@@ -135,14 +135,98 @@ export default { ...@@ -135,14 +135,98 @@ export default {
'pageSize': this.pageSize, 'pageSize': this.pageSize,
'sort': '', 'sort': '',
'sourceDb': 'SHYY', 'sourceDb': 'SHYY',
// 'startDate': this.moreSearchInfo.time.start, 'startDate': this.moreSearchInfo.time.start,
'startDate': '2021-01-02', // 'startDate': '2021-01-02',
'supplierId': [ 'supplierId': [
'305','879','301' '225'
] ]
} }
getMyInvoiceList(data).then(rt => { let dict = {
if (rt.data.code === '00000') { '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) { if (_this.isRefreshing) {
_this.invoiceList = rt.data.entity.invoiceList _this.invoiceList = rt.data.entity.invoiceList
} else if (rt.data.entity.invoiceList || rt.data.entity.invoiceList.length > 0) { } else if (rt.data.entity.invoiceList || rt.data.entity.invoiceList.length > 0) {
...@@ -157,9 +241,10 @@ export default { ...@@ -157,9 +241,10 @@ export default {
} else { } else {
// 加载成功后下一页自增1 // 加载成功后下一页自增1
_this.currentPage++ _this.currentPage++
_this.finished = false
} }
} else { } else {
_this.$toast(rt.message) _this.$toast(rt.msg)
_this.isRefreshing = false _this.isRefreshing = false
_this.error = true _this.error = true
_this.finished = false _this.finished = false
...@@ -187,6 +272,7 @@ export default { ...@@ -187,6 +272,7 @@ export default {
sourceDbList.push(item.ownerid) sourceDbList.push(item.ownerid)
} }
const model = { const model = {
'businessType': '',
'clientID': this.getClientValueArray(_this.moreSearchInfo.client, item.id), // 客户编码 'clientID': this.getClientValueArray(_this.moreSearchInfo.client, item.id), // 客户编码
'endDate': _this.moreSearchInfo.time.end, // 结束时间 'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间 'startDate': _this.moreSearchInfo.time.start, // 开始时间
......
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<div> <div>
<div class="goods-all" @click="openOrderInvoice()"> <div class="goods-all" @click="openOrderInvoice()">
<span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span> <span class="all-title">发票信息 ({{ invoiceData.total ? invoiceData.total : 0 }})</span>
<!-- <span class="title-more">更多</span>--> <span class="title-more">更多</span>
<!-- <van-icon class="title-arrow" name="arrow"/>--> <van-icon class="title-arrow" name="arrow"/>
</div> </div>
<div class="order-common" style="margin-bottom: 10px"> <div class="order-common" style="margin-bottom: 10px">
<invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo" <invoice-simple-item v-for="(item, index) in invoiceData.invoiceList" :item="item" :key="item.invoiceNo"
...@@ -201,19 +201,19 @@ export default { ...@@ -201,19 +201,19 @@ export default {
}, },
/* 打开发票列表页面 */ /* 打开发票列表页面 */
openOrderInvoice() { openOrderInvoice() {
// this.$router.push({ this.$router.push({
// path: 'orderInvoice', path: 'orderInvoice',
// query: this.detailData query: this.detailData
// }) })
}, },
/* 打开单个发票页面 */ /* 打开单个发票页面 */
openInvoice(model) { openInvoice(model) {
// let item = this.detailData let item = this.detailData
// item.invoiceNo = model.invoiceNo item.invoiceNo = model.invoiceNo
// this.$router.push({ this.$router.push({
// path: 'orderInvoiecDetail', path: 'orderInvoiecDetail',
// query: item query: item
// }) })
// console.log(item) // console.log(item)
}, },
/* 计算订单状态Step */ /* 计算订单状态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