|
|
@@ -80,13 +80,11 @@ export default {
|
|
|
status: '0'
|
|
|
}
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.getpurchaseList()
|
|
|
- },
|
|
|
+
|
|
|
onPullDownRefresh() {
|
|
|
this.getpurchaseList().then(res => {
|
|
|
- uni.stopPullDownRefresh()
|
|
|
- })
|
|
|
+ uni.stopPullDownRefresh()
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
// tab切换
|
|
|
@@ -100,16 +98,18 @@ export default {
|
|
|
this.getpurchaseList()
|
|
|
}
|
|
|
},
|
|
|
+ init() {
|
|
|
+ this.getpurchaseList()
|
|
|
+ },
|
|
|
// 获取采购记录列表
|
|
|
getpurchaseList () {
|
|
|
- purchaseList({ status: this.status }).then(res => {
|
|
|
- console.log(res, 222222)
|
|
|
+ return purchaseList({ status: this.status }).then(res => {
|
|
|
this.list.data = res.data.list
|
|
|
- this.tabs[0].value = res.data.allNum
|
|
|
- this.tabs[1].value = res.data.unPayNum
|
|
|
- this.tabs[2].value = res.data.unSendNum
|
|
|
- this.tabs[3].value = res.data.sendingNum
|
|
|
- this.tabs[4].value = res.data.finishNum
|
|
|
+ this.tabs[0].value = res.data.shop.totalPurchaseOrder // 全部
|
|
|
+ this.tabs[1].value = res.data.shop.cgUnPay // 待付款
|
|
|
+ this.tabs[2].value = res.data.shop.cgUnSend // 待配送
|
|
|
+ this.tabs[3].value = res.data.shop.cgSending // 配送中
|
|
|
+ this.tabs[4].value = res.data.shop.cgFinish // 已完成
|
|
|
}).catch(err => { console.log(err) })
|
|
|
},
|
|
|
// 采购记录详情
|