Commit 81b81896 authored by xiejb's avatar xiejb

发票列表 添加多货主调用

parent a40793a2
...@@ -37,7 +37,7 @@ export default { ...@@ -37,7 +37,7 @@ export default {
} }
}, },
invoiceList: [], invoiceList: [],
invoiceListShow: false invoiceListShow: true
} }
}, },
computed: { computed: {
......
<template> <template>
<div id="myInvoiceList"> <div id="myInvoiceList">
<div class="content"> <div class="content" ref="wrapper">
<van-pull-refresh class="list" ref="supplierList" v-model="isRefreshing" @refresh="onRefresh"> <van-pull-refresh class="list" ref="supplierList" v-model="isRefreshing" @refresh="onRefresh">
<van-list <van-list
v-model="isLoading" v-model="isLoading"
...@@ -64,6 +64,7 @@ export default { ...@@ -64,6 +64,7 @@ export default {
} }
}, },
sphImage: require('@/assets/img/u48.png'), sphImage: require('@/assets/img/u48.png'),
scrollPos: 0
} }
}, },
computed: { computed: {
...@@ -78,6 +79,10 @@ export default { ...@@ -78,6 +79,10 @@ export default {
return time return time
} }
}, },
activated() {
this.$refs.wrapper.scrollTop = this.scrollPos
console.log('位置还原', this.scrollPos)
},
mounted() { mounted() {
// this.onLoad() // this.onLoad()
}, },
...@@ -89,6 +94,9 @@ export default { ...@@ -89,6 +94,9 @@ export default {
}, },
gotoDetail(model) { gotoDetail(model) {
// console.log(model) // console.log(model)
let wrapperScrollTop = this.$refs.wrapper.scrollTop
this.scrollPos = wrapperScrollTop
console.log('点击时列表位置', this.scrollPos)
this.$emit('gotoDetail', model) this.$emit('gotoDetail', model)
}, },
onRefresh() { onRefresh() {
...@@ -127,7 +135,8 @@ export default { ...@@ -127,7 +135,8 @@ 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',
'supplierId': [ 'supplierId': [
'305','879','301' '305','879','301'
] ]
...@@ -164,6 +173,85 @@ export default { ...@@ -164,6 +173,85 @@ export default {
_this.error = true _this.error = true
_this.finished = true _this.finished = true
}) })
},
// 高级搜索条件
setMoreSearchInfoAction () {
let _this = this
const sourceDbList = []
const dataList = []
console.log(_this.moreSearchInfo)
_this.moreSearchInfo.consignor.forEach(item => {
if(sourceDbList.indexOf(item.ownerid) > -1) {
return
} else {
sourceDbList.push(item.ownerid)
}
const model = {
'clientID': this.getClientValueArray(_this.moreSearchInfo.client, item.id), // 客户编码
'endDate': _this.moreSearchInfo.time.end, // 结束时间
'startDate': _this.moreSearchInfo.time.start, // 开始时间
'goodsCode': !_this.moreSearchInfo.goods.goodsOpcode ? '':_this.moreSearchInfo.goods.goodsOpcode, // 商品代码
'goodsDesc': '', // 商品描述
'goodsId': !_this.moreSearchInfo.goods.comGoodsId ? '':_this.moreSearchInfo.goods.comGoodsId, // 商品ID
'goodsName': '', // 商品名称
'goodsSpec': '', // 商品规格
'manufacturer': '', // 生产企业
'mdmClientCode': '', // 主数据客户编码
'order': '',
'orderId': '', // 订单ID
'orderNo': !_this.moreSearchInfo.orderNo ? '':_this.moreSearchInfo.orderNo, // 订单号
'orderType': 'SALE', // 订单类型 正常销售SALE销售退货SALE_RTN
'pageNum': _this.currentPage,
'pageSize': _this.pageSize,
'shippingAdress': '', // 送货地址
'sort': '',
'sourceDb': !item.ownerid ? '':item.ownerid, // 数据来源
'sourceOrderNo': '', // 来源订单号(网上订单号)
'sourceSystem': '', // 订单来源 来源订单号和订单来源必须同时不为空
'supplierId': this.getSupplierValueArray(_this.moreSearchInfo.supplier,item.id) // 供应商(部门)编码
}
dataList.push(model)
})
// console.log(dataList)
return dataList
},
// 是否返回空数组
getArray (value) {
if (this.isJudgeStrNull(value)) {
return [value]
}
return []
},
// 返回客户数据数组
getClientValueArray (array,companynameId) {
const vaueArray = []
array.forEach(item => {
if (item.companynameId === companynameId) {
vaueArray.push(item.comPartyId)
}
})
return vaueArray
},
// 返回供应商数据数组
getSupplierValueArray (array,companynameId) {
const vaueArray = []
array.forEach(item => {
if (item.companynameId === companynameId) {
if (item.org === '205' || item.org === '307') {
vaueArray.push('508')
} else {
vaueArray.push(item.org)
}
}
})
return vaueArray
},
/// 判断数值是否为空
isJudgeStrNull(val) {
if (val !== null && val !== undefined && val !== '') {
return true
}
return false
} }
} }
} }
......
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