From 37d817e974793cf8c4959f0b44dc0ca82f5f18cc Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: Wed, 1 Jul 2020 21:54:57 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=80=E6=AC=A1=E6=80=A7?=
=?UTF-8?q?=E7=BC=B4=E8=B4=B9=20=E4=B8=8D=E4=B8=8D=E8=83=BD=E9=80=89?=
=?UTF-8?q?=E7=BC=B4=E8=B4=B9=E5=91=A8=E6=9C=9F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../property/payFeeOrder/payFeeOrder.html | 26 +--
.../pages/property/payFeeOrder/payFeeOrder.js | 160 +++++++++---------
2 files changed, 97 insertions(+), 89 deletions(-)
diff --git a/public/pages/property/payFeeOrder/payFeeOrder.html b/public/pages/property/payFeeOrder/payFeeOrder.html
index 1dd7f5545..47aa87968 100644
--- a/public/pages/property/payFeeOrder/payFeeOrder.html
+++ b/public/pages/property/payFeeOrder/payFeeOrder.html
@@ -35,12 +35,14 @@
-
-
+
\ No newline at end of file
diff --git a/public/pages/property/payFeeOrder/payFeeOrder.js b/public/pages/property/payFeeOrder/payFeeOrder.js
index 3b41a0a16..d1b2c61a0 100644
--- a/public/pages/property/payFeeOrder/payFeeOrder.js
+++ b/public/pages/property/payFeeOrder/payFeeOrder.js
@@ -1,80 +1,82 @@
-(function(vc){
+(function (vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
- data:{
- payFeeOrderInfo:{
- feeId:'',
- feeName:'',
+ data: {
+ payFeeOrderInfo: {
+ feeId: '',
+ feeName: '',
feeTypeCdName: '',
endTime: '',
- feePrice:0.00,
- cycles:'1',
- paymentCycles:[],
- totalFeePrice:0.00,
- receivedAmount:'',
- communityId:vc.getCurrentCommunity().communityId
+ feeFlag: '',
+ feePrice: 0.00,
+ cycles: '1',
+ paymentCycles: [],
+ totalFeePrice: 0.00,
+ receivedAmount: '',
+ communityId: vc.getCurrentCommunity().communityId
}
},
- _initMethod:function(){
- if(vc.notNull(vc.getParam("feeId"))){
- vc.component.payFeeOrderInfo.feeId = vc.getParam('feeId');
- vc.component.payFeeOrderInfo.feeName = vc.getParam('feeName');
- vc.component.payFeeOrderInfo.feeTypeCdName = vc.getParam('feeTypeCdName');
- vc.component.payFeeOrderInfo.endTime = vc.getParam('endTime').replace(/%3A/g,':');
- vc.component.payFeeOrderInfo.feePrice = vc.getParam('feePrice');
- $that.payFeeOrderInfo.paymentCycles = [];
- for(let _index=1 ; _index < 7; _index ++){
+ _initMethod: function () {
+ if (vc.notNull(vc.getParam("feeId"))) {
+ vc.component.payFeeOrderInfo.feeId = vc.getParam('feeId');
+ vc.component.payFeeOrderInfo.feeName = vc.getParam('feeName');
+ vc.component.payFeeOrderInfo.feeTypeCdName = vc.getParam('feeTypeCdName');
+ vc.component.payFeeOrderInfo.endTime = vc.getParam('endTime').replace(/%3A/g, ':');
+ vc.component.payFeeOrderInfo.feePrice = vc.getParam('feePrice');
+ $that.payFeeOrderInfo.feeFlag = vc.getParam('feeFlag');
+ $that.payFeeOrderInfo.paymentCycles = [];
+ for (let _index = 1; _index < 7; _index++) {
$that.payFeeOrderInfo.paymentCycles.push(_index * vc.getParam('paymentCycle'))
- }
+ }
};
vc.component.payFeeOrderInfo.totalFeePrice = vc.component.payFeeOrderInfo.feePrice;
- vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice ;
+ vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;
+
-
},
- _initEvent:function(){
+ _initEvent: function () {
},
- methods:{
- payFeeValidate:function(){
- return vc.validate.validate({
- payFeeOrderInfo:vc.component.payFeeOrderInfo
- },{
- 'payFeeOrderInfo.feeId':[
- {
- limit:"required",
- param:"",
- errInfo:"费用ID不能为空"
- }
- ],
- 'payFeeOrderInfo.cycles':[
- {
- limit:"required",
- param:"",
- errInfo:"缴费周期不能为空"
- }
- ],
- 'payFeeOrderInfo.receivedAmount':[
- {
- limit:"required",
- param:"",
- errInfo:"实收金额不能为空"
- },
- {
- limit:"money",
- param:"",
- errInfo:"实收金额不是有效的金额"
- }
- ]
- });
- },
- _payFee:function(_page,_row){
- if(!vc.component.payFeeValidate()){
+ methods: {
+ payFeeValidate: function () {
+ return vc.validate.validate({
+ payFeeOrderInfo: vc.component.payFeeOrderInfo
+ }, {
+ 'payFeeOrderInfo.feeId': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "费用ID不能为空"
+ }
+ ],
+ 'payFeeOrderInfo.cycles': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "缴费周期不能为空"
+ }
+ ],
+ 'payFeeOrderInfo.receivedAmount': [
+ {
+ limit: "required",
+ param: "",
+ errInfo: "实收金额不能为空"
+ },
+ {
+ limit: "money",
+ param: "",
+ errInfo: "实收金额不是有效的金额"
+ }
+ ]
+ });
+ },
+ _payFee: function (_page, _row) {
+ if (!vc.component.payFeeValidate()) {
vc.toast(vc.validate.errInfo);
- return ;
+ return;
}
vc.http.post(
@@ -82,39 +84,39 @@
'payFee',
JSON.stringify(vc.component.payFeeOrderInfo),
{
- emulateJSON:true
- },
- function(json,res){
+ emulateJSON: true
+ },
+ function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
- if(res.status == 200){
+ if (res.status == 200) {
//关闭model
- $("#payFeeResult").modal({
- backdrop: "static",//点击空白处不关闭对话框
- show:true
- });
- return ;
+ $("#payFeeResult").modal({
+ backdrop: "static",//点击空白处不关闭对话框
+ show: true
+ });
+ return;
}
vc.toast(json);
- },
- function(errInfo,error){
+ },
+ function (errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
- });
+ });
},
- _changeMonth:function(_cycles){
- if('-101' == _cycles){
+ _changeMonth: function (_cycles) {
+ if ('-101' == _cycles) {
vc.component.payFeeOrderInfo.totalFeePrice = 0.00;
vc.component.payFeeOrderInfo.receivedAmount = '';
- return ;
+ return;
}
- vc.component.payFeeOrderInfo.totalFeePrice = Math.floor(parseFloat(_cycles)*parseFloat(vc.component.payFeeOrderInfo.feePrice)*100)/100;
- vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice ;
+ vc.component.payFeeOrderInfo.totalFeePrice = Math.floor(parseFloat(_cycles) * parseFloat(vc.component.payFeeOrderInfo.feePrice) * 100) / 100;
+ vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;
},
- _back:function(){
+ _back: function () {
$('#payFeeResult').modal("hide");
vc.getBack();
},
- _printAndBack:function(){
+ _printAndBack: function () {
$('#payFeeResult').modal("hide");
vc.getBack();