|
|
@@ -83,9 +83,13 @@ export default {
|
|
|
isAllCheck: false,
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.initData()
|
|
|
- this.getClient()
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.initData().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ })
|
|
|
+ this.getClient().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ })
|
|
|
},
|
|
|
computed: {
|
|
|
selectList () {
|
|
|
@@ -145,9 +149,13 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
+ init() {
|
|
|
+ this.initData()
|
|
|
+ this.getClient()
|
|
|
+ },
|
|
|
// 初始化页面数据
|
|
|
initData () {
|
|
|
- purchaseDebtList({id:this.option.id}).then(res => {
|
|
|
+ return purchaseDebtList({id:this.option.id}).then(res => {
|
|
|
console.log(res)
|
|
|
this.detailsList = res.data.list.map(ele => {
|
|
|
return {
|
|
|
@@ -158,7 +166,7 @@ export default {
|
|
|
}).catch(err => { console.log(err) })
|
|
|
},
|
|
|
getClient() {
|
|
|
- ghsDetail({id:this.option.id}).then(res => {
|
|
|
+ return ghsDetail({id:this.option.id}).then(res => {
|
|
|
console.log('res', res)
|
|
|
this.customInfo = res.data
|
|
|
}).catch(err => {console.log('err', err)})
|
|
|
@@ -192,8 +200,9 @@ export default {
|
|
|
purchaseClearCreateOrder({ purchaseIds:arr.join(','),ghsId:this.option.id }).then(res => {
|
|
|
console.log('res ===>', res)
|
|
|
if(res.code == 1) {
|
|
|
- uni.navigateTo({
|
|
|
- url: '/pagesPurchase/gatherPay?orderSn=' + res.data.orderSn + '&actPrice=' + res.data.actPrice
|
|
|
+ this.pageTo({
|
|
|
+ url: '/pagesPurchase/gatherPay?orderSn=' + res.data.orderSn + '&actPrice=' + res.data.actPrice,
|
|
|
+ type: 2
|
|
|
})
|
|
|
}
|
|
|
}).catch(err => {console.log('err===>', err)})
|