|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297 |
- // pages/handle/liist.js
- import * as UTIL from '../../../utils/util.js';
- import * as API from '../../../utils/API.js';
- const app = getApp();
- Page({
-
- /**
- * 页面的初始数据
- */
- data: {
- isIPX: app.globalData.isIPX,
- pageNums:1,
- scrollHeight:"",
- financeList:[],
- index:0,
- array:["收支明细公开"],
- userInfoObj:[],
- date: UTIL.formatDates(new Date),
- data:{},
- list:[],
- msgTime:0,
- msgText:"",
- showPopup:false
- },
- onConfirmReviewTime(e){
- let data = e.detail.value;
- this.setData({
- 'date':data,
- 'pageNums':1});
- this.getList();
- },
- paging(){
- this.setData({
- pageNums:this.data.pageNums+1,
- })
- this.getList();
- },
- getList(id){
- UTIL.httpRequest(API.URL_GET_TRANSFERINFO+id, {method:'GET'},{
- success: (res) => {
- if(res.code == 200){
- res.data.expenditureAmount = Number(res.data.expenditureAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
- return $1 + ","; }).replace(/\.$/, "")
- this.setData({'data':res.data})
- }else{
- UTIL.showToastNoneIcon(res.msg);
- }
- }
- })
- UTIL.httpRequest(API.URL_GET_TRANSFERINFOS+id, {method:'GET'},{
- success: (res) => {
- if(res.code == 200){
- res.rows.map(rr => {
- rr.incomeAmount = Number(rr.incomeAmount ).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, ($0, $1) => {
- return $1 + ","; }).replace(/\.$/, "")
- })
- console.log(res.rows);
- this.setData({list:res.rows})
- }else{
- UTIL.showToastNoneIcon(res.msg);
- }
-
- }
- })
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- this.getList(options.id)
- },
- goSubmit(){
- let _this = this
- if(this.data.data.bankType!=4){
- if(this.data.data.expenditureAmount > 50000&&this.data.data.bankType == '3'){
- wx.showModal({
- title: "",
- showCancel: false,
- showComfirm: false,
- content: "银行仅在工作日的9:00~17:00之间接收金额大于5万元的交易申请,不在此服务时间段内提交申请将导致交易失败!",
- confirmText: '确定',
- success: function (e) {
- //非建行
- if(_this.data.data.accountPassword==null||_this.data.data.accountPassword.length<1){
- UTIL.showToastNoneIcon("请输入支付口令!");
- }else{
- _this.setData({'showPopup':true})
- }
- }
- })
- }else if(this.data.data.bankType == '2'&&this.data.list.length>1&&this.data.data.isPeers == 'Y'){
- wx.showModal({
- title: "",
- showCancel: false,
- content: "同行批量转账业务银行仅支持在每日9:00-17:00之间办理,交易请求接受成功后银行会在次日3:30统一进行处理,正常1小时内处理完成,请在此时间后查询处理结果!",
- confirmText: '确定',
- success: function (e) {
- //非建行
- if(_this.data.data.accountPassword==null||_this.data.data.accountPassword.length<1){
- UTIL.showToastNoneIcon("请输入支付口令!");
- }else{
- _this.setData({'showPopup':true})
- }
- }
- })
- }else{
- wx.showModal({
- title: "",
- showCancel: false,
- content: "跨行批量转账业务银行仅支持在每日9:00-16:00之间办理,交易请求接受成功后银行会在当日17点-23点统一进行处理,请在此时间后查询处理结果!",
- confirmText: '确定',
- success: function (e) {
- //非建行
- if(_this.data.data.accountPassword==null||_this.data.data.accountPassword.length<1){
- UTIL.showToastNoneIcon("请输入支付口令!");
- }else{
- _this.setData({'showPopup':true})
- }
- }
- })
- }
- }else{
- //建行
- wx.showModal({
- title: "",
- showCancel: false,
- content: "跨行批量转账业务银行仅支持在每日9:00-16:00之间办理,交易请求接受成功后银行会在当日17点-23点统一进行处理,请在此时间后查询处理结果!",
- confirmText: '确定',
- success: function (e) {
- if(_this.data.data.alternateField1==null||_this.data.data.alternateField1.length<1){
- UTIL.showToastNoneIcon("请输入验证码!");
- }else{
- _this.setData({'showPopup':true})
- }
- }
- })
-
- }
- },
- bindNewInput: function (e) {
- this.setData({
- [e.currentTarget.dataset.name]: e.detail.value
- })
- },
- confirmPay(){
- let _this = this
- this.setData({'showPopup':false})
- if(this.data.data.bankType!=4){
- let params = {
- id : this.data.data.id,
- accountPassword:this.data.data.accountPassword
- }
- UTIL.httpRequest(API.URL_GET_PAY,params,{
- success: (res) => {
- if (res.code == API.SUCCESS_CODE) {
- wx.showModal({
- title: "",
- showCancel: false,
- content: "支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。",
- confirmText: '确定',
- success: function (e) {
- _this.back()
- }
- })
- }else{
- wx.showModal({
- title: "",
- showCancel: false,
- content: res.msg,
- confirmText: '确定',
- success: function (e) {
- _this.back()
- }
- })
- }
- },
- fail:(res) => {
- UTIL.showToastNoneIcon(res)
- }
- })
- }else{
- let params = {
- id : this.data.data.id,
- accountPassword:this.data.data.accountPassword
- }
- UTIL.httpRequest(API.URL_GET_PAY,params,{
- success: (res) => {
- wx.showModal({
- title: "",
- showCancel: false,
- content: "支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。",
- confirmText: '确定',
- success: function (e) {
- _this.back()
- }
- })
- },
- fail:(res) => {
- UTIL.showToastNoneIcon(res)
- }
- })
- }
-
- },
- cancelPay(){
- this.setData({'showPopup':false})
- },
- sendMsg(){
- let _this = this
- let params = {
- id : this.data.data.id
- }
- if(this.data.msgTime>0){
- return false
- }
- UTIL.httpRequest(API.URL_GET_SENDMSG,params,{
- success: (res) => {
- if (res.toString().indexOf('短信发送失败') == -1){
- _this.setData({'msgText':180+'s后可重新发送','msgTime':180})
- _this.msgTimer = setInterval(()=>{
- let tt = _this.data.msgTime
- _this.setData({'msgText':tt--+'s后可重新发送','msgTime':tt})
- if (_this.data.msgTime == 0){
- clearInterval(_this.msgTimer);
- _this.msgTime = 0 ;
- _this.smsText = '';
- }
- },1000)
- }else{
- UTIL.showToastNoneIcon("短信发送失败,请联系管理员!");
- }
- }
- })
- },
- bindPickerChange:function(e){
- this.setData({index:e.detail.value});
- },
- switchTab:function(e){
- this.setData({
- active:e.currentTarget.dataset.gid
- })
- },
- back:function(){
- wx.navigateBack({
- delta: 1
- })
- },
-
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
-
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
-
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
-
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
-
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
- })
|