// pages/regular/index.js import * as UTIL from '../../utils/util.js'; import * as API from '../../utils/API.js'; let EVN_CONFIG = require('../../env/env'); const DISTRIBUTE_ENVIROMENT = 'IMGURL'; let { URL_PREFIX, } = EVN_CONFIG[DISTRIBUTE_ENVIROMENT]; const app = getApp(); Page({ /** * 页面的初始数据 */ data: { isIPX: app.globalData.isIPX, option1: [], option2: [], option3: [], value1: '', value2: '', value3: '', showPopup:false, result1:'', result2:'', result3:'', beginApplyDate:'' , //申请开始时间 endApplyDate: '' , //申请结束时间 txnamtMin: '' , //金额范围 最小 xnamtMax: '' , //金额范围最大 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { var that = this; // 业务类型字典查询 UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'trans_type', {method:'GET'}, { success: (res) => { let option2 = [{ text: '业务类型', value: '' }]; res.data.map(rr=>{ option2.push({ text: rr.dictLabel, value: rr.dictValue }) }) that.setData({ option2:option2, transTypeOptions:res.data, }) } }) // 来往账标识字典查询 UTIL.httpRequest(API.URL_GET_GETDICTTYPE + 'direction', {method:'GET'}, { success: (res) => { let option3 = []; res.data.map(rr=>{ option3.push({ text: rr.dictLabel, value: rr.dictValue }) }) option3[0].text = '来往账标识'; that.setData({ option3:option3, value3:res.data[0].dictValue, result3:res.data[0].dictValue, directionOptions:res.data, }) } }) var sendData = { pageNum:'1', pageSize:'100', accountName:'', bankAccountNumber:'', status:'N', method:'GET', accountType:102 } UTIL.httpRequest(API.URL_GET_ACCOUNTLIST, sendData,{ success: (res) => { console.log(res.rows) let option1 = []; res.rows.map(rr=>{ console.log(rr); option1.push({ text: rr.accountName, value: rr.bankAccountNumber }) }) that.setData({ option1:option1, value1:res.rows[0].bankAccountNumber, result1:res.rows[0].bankAccountNumber, accountList:res.rows }) let perames = {method:'GET',actacn:res.rows[0].bankAccountNumber} //转账列表 UTIL.httpRequest(API.URL_GET_GETRECONCILIATION , perames, { success: (res) => { that.setData({ list:res.rows }) } }) } }) }, goSubmit(){ var that = this ; let form = { actacn:that.data.result1 , //付款账户 payeeActacn: '' , //收款账号 payeeToname:'' , //收款人 transtype:that.data.result2 ,// 业务类型 数据字典:trans_type direction:that.data.result3 ,// 来往账标识 数据字典:direction params:new Map([ ['beginApplyDate', that.data.beginApplyDate], ['endApplyDate', that.data.endApplyDate], ['txnamtMin', that.data.txnamtMin], ['xnamtMax', that.data.xnamtMax], ]), method:'POST', } console.log(form); UTIL.httpRequest(API.URL_GET_GETRECONCILIATIONMOBILE , form, { success: (res) => { that.setData({ list:res.rows, showPopup:false }) } }) }, bindDateBeginChange: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setData({ beginApplyDate: e.detail.value }) }, bindDateEndChange: function(e) { console.log('picker发送选择改变,携带值为', e.detail.value) this.setData({ endApplyDate: e.detail.value }) }, back:function(){ wx.navigateBack({ delta: 1 }) }, showPopup(){ var that = this; that.setData({ showPopup:true }) }, onClose() { this.setData({ showPopup: false }); }, onChangeZH(event) { console.log(event.detail); this.setData({ result1: event.detail, }); }, onChangeLX(event) { console.log(event.detail); this.setData({ result2: event.detail, }); }, onChangeBS(event) { console.log(event.detail); this.setData({ result3: event.detail, }); }, changeTab1(event){ this.setData({ result1: event.detail, value1: event.detail }); }, changeTab2(event){ this.setData({ result2: event.detail, value2: event.detail }); }, changeTab3(event){ this.setData({ result3: event.detail, value3: event.detail }); }, minInput(e){ var that = this ; that.setData({ txnamtMin: e.detail.value, //金额范围 最小 }) }, maxInput(e){ var that = this ; that.setData({ xnamtMax: e.detail.value, //金额范围最大 }) }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })