diff --git a/pages/rechargeDetail/rechargeDetail.vue b/pages/rechargeDetail/rechargeDetail.vue index 853e040..0ae7222 100644 --- a/pages/rechargeDetail/rechargeDetail.vue +++ b/pages/rechargeDetail/rechargeDetail.vue @@ -146,6 +146,8 @@ arrayWay: [], index: 0, indexWay: 0, + kind:'', + type:'', beginDate: currentDate, overDate: currentDate, orderList: [], @@ -234,7 +236,9 @@ let data = res.data; that.kindArray = data; + that.kind = data[0].kind; that.arrayWay = data[0].typeList; + that.type = data[0].typeList[0].type; console.log(data) }) @@ -242,21 +246,24 @@ bindPickerChange: function(e) { let that = this; that.index = e.detail.value + that.kind = that.kindArray[that.index].kind; that.arrayWay = that.kindArray[that.index].typeList; + that.type = that.kindArray[that.index].typeList[0].type; that.fetchData() }, bindPickerChangeWay: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value) - this.indexWay = e.detail.value - that.fetchData() + this.indexWay = e.detail.value; + this.type = that.arrayWay[this.indexWay].type; + this.fetchData() }, bindStartDateChange: function(e) { this.beginDate = e.detail.value - that.fetchData() + this.fetchData() }, bindEndDateChange: function(e) { this.overDate = e.detail.value - that.fetchData() + this.fetchData() }, getDate(type) { const date = new Date(); @@ -275,8 +282,8 @@ getDetailSummary() { let that = this; let data = { - kind: '1', - type: '1', + kind: that.kind, + type: that.type, beginDate: new Date(that.beginDate + " 00:00:00"), endDate: new Date(that.overDate + " 23:59:59") }; @@ -304,8 +311,8 @@ let paramsData = { pageNum: that.page, pageSize: that.pageSize, - kind: '1', - type: '1', + kind: that.kind, + type: that.type, beginDate: new Date(that.beginDate + " 00:00:00"), endDate: new Date(that.overDate + " 23:59:59") }