|
@@ -61,16 +61,14 @@ export default {
|
|
|
isAllCheck: false,
|
|
isAllCheck: false,
|
|
|
searchTime:'',
|
|
searchTime:'',
|
|
|
startTime:'',
|
|
startTime:'',
|
|
|
- endTime:''
|
|
|
|
|
|
|
+ endTime:'',
|
|
|
|
|
+ ghsId:0
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onPullDownRefresh() {
|
|
onPullDownRefresh() {
|
|
|
this.initData().then(res => {
|
|
this.initData().then(res => {
|
|
|
uni.stopPullDownRefresh();
|
|
uni.stopPullDownRefresh();
|
|
|
})
|
|
})
|
|
|
- this.getClient().then(res => {
|
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
|
- })
|
|
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
selectList () {
|
|
selectList () {
|
|
@@ -128,10 +126,8 @@ export default {
|
|
|
},
|
|
},
|
|
|
init() {
|
|
init() {
|
|
|
this.initData()
|
|
this.initData()
|
|
|
- this.getClient()
|
|
|
|
|
},
|
|
},
|
|
|
initData () {
|
|
initData () {
|
|
|
-
|
|
|
|
|
let id = 0
|
|
let id = 0
|
|
|
if(this.option.id){
|
|
if(this.option.id){
|
|
|
id = this.option.id
|
|
id = this.option.id
|
|
@@ -139,10 +135,12 @@ export default {
|
|
|
//小票上的二维码打开结账页
|
|
//小票上的二维码打开结账页
|
|
|
//https://api.shop.huahb.cn/#/pagesPurchase/gathering?id=378
|
|
//https://api.shop.huahb.cn/#/pagesPurchase/gathering?id=378
|
|
|
if(this.option.q){
|
|
if(this.option.q){
|
|
|
- let currentUrl = decodeURIComponent(this.option.q);
|
|
|
|
|
|
|
+ let currentUrl = decodeURIComponent(this.option.q)
|
|
|
id = currentUrl.substring(currentUrl.lastIndexOf("?id=") + 4)
|
|
id = currentUrl.substring(currentUrl.lastIndexOf("?id=") + 4)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ this.ghsId = id
|
|
|
|
|
+ this.getGhsInfo(id)
|
|
|
return purchaseDebtList({id:id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(res => {
|
|
return purchaseDebtList({id:id,searchTime:this.searchTime,startTime:this.startTime,endTime:this.endTime}).then(res => {
|
|
|
this.detailsList = res.data.list.map(ele => {
|
|
this.detailsList = res.data.list.map(ele => {
|
|
|
return {
|
|
return {
|
|
@@ -154,8 +152,8 @@ export default {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
- getClient() {
|
|
|
|
|
- return ghsDetail({id:this.option.id}).then(res => {
|
|
|
|
|
|
|
+ getGhsInfo(id) {
|
|
|
|
|
+ return ghsDetail({id:id}).then(res => {
|
|
|
this.customInfo = res.data
|
|
this.customInfo = res.data
|
|
|
}).catch(err => {})
|
|
}).catch(err => {})
|
|
|
},
|
|
},
|
|
@@ -188,7 +186,7 @@ export default {
|
|
|
that.selectList.forEach(item => {
|
|
that.selectList.forEach(item => {
|
|
|
arr.push(item.id)
|
|
arr.push(item.id)
|
|
|
})
|
|
})
|
|
|
- purchaseClearCreateOrder({ purchaseIds:arr.join(','),ghsId:that.option.id }).then(res => {
|
|
|
|
|
|
|
+ purchaseClearCreateOrder({ purchaseIds:arr.join(','),ghsId:that.ghsId }).then(res => {
|
|
|
if(res.code == 1) {
|
|
if(res.code == 1) {
|
|
|
if(res.data.hasUnComplete && res.data.hasUnComplete == 1){
|
|
if(res.data.hasUnComplete && res.data.hasUnComplete == 1){
|
|
|
that.$util.confirmModal({content:'还有待完成的账单',okText:'查看'},() => {
|
|
that.$util.confirmModal({content:'还有待完成的账单',okText:'查看'},() => {
|