From a2cdf5dbdd8d6126f07fa6fc78fa258c985825eb Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Mon, 13 Jun 2022 15:37:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=87=8D=E5=A4=A7=E4=BA=8B=E9=A1=B9=EF=BC=8C?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/paymentManager/toPay/toPay.js | 284 ++++++++++++++ pages/paymentManager/toPay/toPay.json | 19 + pages/paymentManager/toPay/toPay.wxml | 69 ++++ pages/paymentManager/toPay/toPay.wxss | 525 ++++++++++++++++++++++++++ 4 files changed, 897 insertions(+) create mode 100644 pages/paymentManager/toPay/toPay.js create mode 100644 pages/paymentManager/toPay/toPay.json create mode 100644 pages/paymentManager/toPay/toPay.wxml create mode 100644 pages/paymentManager/toPay/toPay.wxss diff --git a/pages/paymentManager/toPay/toPay.js b/pages/paymentManager/toPay/toPay.js new file mode 100644 index 0000000..9b915ae --- /dev/null +++ b/pages/paymentManager/toPay/toPay.js @@ -0,0 +1,284 @@ +// 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(/\.$/, "") + }) + 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) => { + wx.showModal({ + title: "", + showCancel: false, + content: "支付成功,请等待银行进行处理,稍后可通过查询结果按钮查询银行处理结果。", + 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 () { + + } +}) \ No newline at end of file diff --git a/pages/paymentManager/toPay/toPay.json b/pages/paymentManager/toPay/toPay.json new file mode 100644 index 0000000..c5811ae --- /dev/null +++ b/pages/paymentManager/toPay/toPay.json @@ -0,0 +1,19 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "van-row": "@vant/weapp/row/index", + "van-col": "@vant/weapp/col/index", + "van-cell": "@vant/weapp/cell/index", + "van-cell-group": "@vant/weapp/cell-group/index", + "van-tag": "@vant/weapp/tag/index", + "van-icon": "@vant/weapp/icon/index", + "van-button": "@vant/weapp/button/index", + "van-field": "@vant/weapp/field/index", + "van-popup": "@vant/weapp/popup/index", + "van-picker": "@vant/weapp/picker/index", + "van-calendar": "@vant/weapp/calendar/index", + "van-dialog": "@vant/weapp/dialog/index", + "van-collapse": "@vant/weapp/collapse/index", + "van-collapse-item": "@vant/weapp/collapse-item/index" + } +} \ No newline at end of file diff --git a/pages/paymentManager/toPay/toPay.wxml b/pages/paymentManager/toPay/toPay.wxml new file mode 100644 index 0000000..0c9a3fd --- /dev/null +++ b/pages/paymentManager/toPay/toPay.wxml @@ -0,0 +1,69 @@ + + + + 待我支付 + + + + + + {{data.expenditureAmount}} + + + + 共{{list.length}}条 + + + 支付总金额 + {{data.applyTime}} + + + + {{data.payerAccount}} + + + {{data.payer}} + + + {{data.remark}} + + + + + + + + {{item.payee}} + ¥{{item.incomeAmount}} + + + + {{item.payeeAccount}} + + {{item.bankDeposit}} + + + + + + + + + + + + + + *{{msgText}} + + + + + 取消 + 支付 + + + \ No newline at end of file diff --git a/pages/paymentManager/toPay/toPay.wxss b/pages/paymentManager/toPay/toPay.wxss new file mode 100644 index 0000000..ca6a481 --- /dev/null +++ b/pages/paymentManager/toPay/toPay.wxss @@ -0,0 +1,525 @@ +/* pages/apply/paymentTemplate/add/add.wxss */ +text{display: block;} +.top{ + height: 64px; + width: 100%; + position: fixed; + z-index: 999; + top:0px; +} +.top text{ + position: relative; + top: 30px; + margin-right: 30px; + display: block; + color: #eee; + text-align: center; + width: 100%; + font-size: 16px; +} +.input_tittop input{ + border: 1px solid #DCDCDC; + padding: 0px 10px; + height: 32px; + line-height: 32px; + border-radius: 5px; + width: 100%; +} +.error input{ + border: 1px solid red!important; +} +.bgPage{ + width: 140%; + position:absolute; + transform: translate(-15%, -50%); + height: 300px; + z-index: -1; +} +.center{ + padding-bottom: 15px; + background: #f2f2f2; +} +.main-title{ + background-image: linear-gradient(to right, #2C8E68 , #B3DB62); + color: #ffffff; + font-size: 18px; + padding: 10px 0; + text-align: center; + position: relative; +} +.main-box{ + background: #ffffff; + padding: 20px; + width: 94%; + margin: 0 auto; + border-radius: 10px; + box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); +} +.main-box block{ + float: right; +} +.title{ + padding: 10px calc(3% + 20px); +} +.topBox .van-cell{ + padding: 0!important; + margin-bottom: 15px; +} +.topBox .van-cell .van-cell__title, .topBox .van-cell .van-cell__value , .topBox .van-cell .van-field__label{ + font-size: 15px; + color: #444444; +} +.topBox .van-cell .van-cell__title{ + margin-right: 0!important; + max-width: 76px!important; + min-width: 76px!important; +} + +.top-box{ + /* margin-top: 20px; + margin-bottom: 28px; */ +} +.top-box text{ + margin-bottom: 15px; +} +.top-box text:last-child{ + margin-bottom: 0px; +} +.box-title{ + color: #2C8E68; + text-align: center; + font-size: 16px; +} +.center-box .main-box{ + margin-bottom: 15px; +} +.xm van-cell:first-child .van-cell{ + border-bottom: 1px solid #cccccc; + margin: 0; + padding-bottom: 15px!important; + margin-bottom: 15px; +} +.table-box van-field van-cell .van-cell{ + margin-bottom: 15px; +} +.table-box van-field:last-child van-cell .van-cell{ + margin-bottom: 0px; +} +.table-box view text icon{ + display: inline-block; + font-size: 14px; + border: 1px solid red; + color: red; +} +.table-box .van-cell{ + padding: 0!important; +} +@font-face { + font-family: 'my-icon'; + src: url('../../../image/icon/fj_icon.png') format('truetype'); +} +.my-icon { + font-family: 'my-icon'; +} + +.my-icon-extra::before { + content: '\e626'; +} +.fj-box text{ + background-color: #5CAE77; + color: #ffffff; + text-align: center; + border-radius: 5px; + white-space:pre-wrap; + padding: 22px 8px; +} +.fj-li{ + margin-top: 20px; + display: flex; + /* flex-wrap: wrap; */ +} +.fj-li .img_li{ + width: 100%; + height: 18.5vw; +} + +.fj-li .img_add{ + overflow: hidden; +} + +.bottomBtn{ + display: flex; + width: 94%; + margin: 0 auto; + justify-content:space-between; + margin-top: 30px; +} +.bottomBtn view{ + display: flex; + width: 100%; + background-color: #ffffff; + border-radius: 5px; + box-shadow: 0px 5px 9px #DCDCDC; + padding: 10px 0px; + text-align: center; + align-items:center; + justify-content:center; + font-size: 14px; + color: #2C8E68; +} +.bottomBtn view image{ + width: 18px; + height: 18px; + margin-right: 5px; +} + + +.bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 50px; + margin-bottom: 50px; + display: flex; + z-index: 999999; +} + +.bottom view { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; +} + +.bottom .btn1{ + border: 1px solid #2C8E68; + padding: 8px 0px; + color: #2C8E68; +} + +.bottom .btn2{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + margin-left: 6%; + color: #fff; +} +.bottom .btn3{ + border: 1px solid transparent; + padding: 8px 0px; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + color: #fff; + width: 100%; +} +.steps-box{ + padding: 0; + margin-top: 15px; +} +.steps-box .van-row{ + padding: 0 20px; +} + +.steps-box view{ + margin-bottom: 0; +} + +.steps-box .van-col{ + position: relative; + height: 70px; + } + .steps-box .van-col--21{ + padding: 12PX 0; + padding-left: 10px; + } + .steps-box .van-row:nth-child(2n){ + background: rgba(29,111,233,0.1); + } + .steps-box .van-cell{ + background: transparent; + padding: 0 10Px; + } + .steps-box .bq{ + display: inline-block; + padding: 0PX 10PX; + line-height: 0.64rem; + border-radius: 5PX; + } + .steps-box .index{ + background: #1D6FE9; + color: #ffffff; + text-align: center; + width: 20PX; + height: 20PX; + line-height: 20PX; + border-radius: 50%; + position: absolute; + left: 0; + top: 50%; + transform: translate(0,-50%); + } + .steps-box .indexCenter{ + top: 0!important; + } + .steps-box .van-row:first-child .van-col:first-child .indexBorder{ + top: calc(50% - 5px); + } + .steps-box .indexBorder{ + width: 10PX; + position: absolute; + right: 0; + top: 0; + height: 100%; + + } + .steps-box .indexBorder .yq{ + height: 10PX; + width: 10PX; + background: #C9C9C9; + border-radius: 50%; + } + .steps-box .indexBorder .ss{ + height: calc(50% - 5PX); + width: 1PX; + background: #C9C9C9; + position: relative; + left: 4PX; + } + .steps-box .indexBorder .ssT{ + height: calc(50% - 5PX); + width: 1PX; + background: #C9C9C9; + position: relative; + left: 4PX; + } + .agree{ + background-color: rgba(92, 174, 119, 0.1); + color:#5CAE77 ; + width: 80%; + text-align: center; + float: right; + } + .in{ + background-color: rgba(245, 163, 39, 0.1); + color:#F5A327 ; + width: 80%; + text-align: center; + float: right; + } + .disagree{ + background-color: rgba(233, 0, 0, 0.1); + color:#E90000 ; + width: 80%; + text-align: center; + float: right; + } + .steps-box .van-cell__title{ + flex: 0.7; + } + .steps-box .van-cell__value{ + flex: 0.3; + } + .steps-tit{ + font-size: 16px; + text-align: center; + background-color: #2C8E68; + color: #ffffff; + padding: 20px 0; + border-top-left-radius: 10px; + border-top-right-radius: 10px; + } + .bottom{ + width: 84%; + margin: 0 auto; + text-align: center; + margin-top: 30px; + margin-bottom: 80px; + } + + .bottom button { + width: 47%; + margin: 0 auto; + border-radius: 30px; + display: inline-block; + } + + .bottom .btnAgree{ + border: 1px solid transparent; + background-image: linear-gradient(to right, #2C8E68, #5CAE77); + margin-left: 6%; + } + + .input_tit{ + border: 1px solid #DCDCDC; + padding: 0px 10px; + height: 32px; + line-height: 32px; + border-radius: 5px; + margin-bottom: 15px; + } + .img_box{ + position: relative; + width: 100%; + display: flex; + flex-wrap: wrap; + } + .img_box .img_list{ + width: 25%; + margin-left: 5%; + position: relative; + } + .img_box .img_list .van-icon{ + font-size: 20px; + position: absolute; + top: 0; + right: 0; + transform: translate(50%,-50%); + } + .img_box .img_list:nth-child(n+4){ + margin-top: 15px; + } + .van-cell--required:before { + left: -8px!important; + } + .input_money{ + padding: 0px 10px; + height: 32px; + line-height: 32px; + color: #E90000; + font-size: 26px; + display: inline-block; + width: 70%; + text-align: center; + } + + .money_box{ + font-size: 26px; + border-bottom:1px solid #DCDCDC; + width: 70%; + margin: 0 auto; + margin-bottom: 15px; + color: #E90000; + display: flex; + align-items: center; + justify-content: center; + } + + .btnBox{ + text-align: center; + position: relative; + height: 26px; + } + .down{ + width: 30px; + height: 26px; + margin: 0 auto; + } + + .update{ + width: 26px; + height: 26px; + position: absolute; + right: 41px; + } + .delete{ + width: 26px; + height: 26px; + position: absolute; + right: 0; + } + + .van-collapse-item { + background: transparent; + margin: 0 auto; + width: 100%; + margin: 0 auto; + margin-top: 15px; + } + .van-collapse-item__content{ + padding: 0!important; + } + + .van-collapse .van-cell{ + padding: 0; + background: transparent; + } + + .van-collapse .tit_box .title{ + text-align: center; + font-size: 18px; + } + .van-collapse .main-box{ + /* padding: 0; + box-shadow: none; */ + } + .van-collapse .tit_box{ + width: 94%; + background: #ffffff; + margin: 0 auto; + border-radius: 10px; + box-shadow: 0px 5px 5px rgba(0, 0, 0, 0.16); + padding: 20px; + } + .van-collapse .tit_box .top-box .van-cell{ + margin-bottom: 15px; + } + + .van-field__label { + color: var(--field-label-color,#646566); + } + .van-field__control { + color: var(--field-label-color,#646566)!important; + } + .workflow{ + border-bottom:1px solid #ddd; + padding:20rpx; + } + .workflow .process_intro { + display: flex; + margin-bottom: 10px; + } + + .workflow .time{ + flex: 1; + text-align: right; + font-size: 12px; + color: #9ea1aa; + } + + + .workflow .workflow_list .process_pay{ + display: flex; + height: 52rpx; + align-items: center; + } + + + .workflow .workflow_list .process_pay .describe{ + font-size: 30rpx; + width: 330rpx; + color: #3c9370; + display: flex; + align-items: center; + } + .workflow .workflow_list .process_pay .describe .amount_icon{ + width: 32rpx; + height: 32rpx; + margin-right: 12rpx; + text-align: right; + font-size: 14px; + } + + .workflow .workflow_list .amount{ + font-size: 14px; + flex: 1; + text-align: right; + color: #f31e1f; + } + .workflow .workflow_list .amounts{ + font-size: 14px; + flex: 1; + text-align: right; + color:#4caf50; + } + .workflow .workflow_list .process_pay .amount .unit{ + font-size: 26rpx; + } \ No newline at end of file