|
|
|
@ -16,11 +16,15 @@ Scene({ |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10 |
|
|
|
}, |
|
|
|
lastTime: null |
|
|
|
itemId: null |
|
|
|
}, |
|
|
|
// * 生命周期函数--监听页面加载
|
|
|
|
onLoad: function (options) { |
|
|
|
this.setData({ height: app.globalData.fragmentHeight }) |
|
|
|
if(options.itemId){ |
|
|
|
this.setData({ height: app.globalData.fragmentHeight, itemId: options.itemId }) |
|
|
|
} else { |
|
|
|
this.setData({ height: app.globalData.fragmentHeight }) |
|
|
|
} |
|
|
|
this.fetchOrderList() |
|
|
|
}, |
|
|
|
onRefreshList: function (isame) { |
|
|
|
@ -30,14 +34,13 @@ Scene({ |
|
|
|
this.setData({ orderList: [], ['form.pageNum']: 1, ['form.isSameCustomer']: isame == 1 ? 1 : 0, loading: true, finished: false }) |
|
|
|
this.fetchOrderList() |
|
|
|
}, |
|
|
|
//1:待定价,2:待过皮重,3:待过磅审核,4:待付款,5:已完成
|
|
|
|
fetchOrderList: function () { |
|
|
|
if (this.data.requesting || this.data.finished) { |
|
|
|
return |
|
|
|
} |
|
|
|
this.data.requesting = true |
|
|
|
getPeymentList(this.data.form).then(result => { |
|
|
|
if (result.data && result.data.records.length) { |
|
|
|
if (result.data && result.data.records && result.data.records.length) { |
|
|
|
var respList = result.data.records |
|
|
|
let nowList = `orderList[${this.data.orderList.length}]` |
|
|
|
var num = this.data.form.pageNum |
|
|
|
@ -57,9 +60,11 @@ Scene({ |
|
|
|
lookItem: function (e) { |
|
|
|
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] |
|
|
|
const channel = this.getOpenerEventChannel() |
|
|
|
if(!channel){ |
|
|
|
return |
|
|
|
} |
|
|
|
channel.emit('onCallback', { what: 62, detail: item }) |
|
|
|
wx.navigateBack() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |