java110
2020-02-18 6313c9a0b96304d5b0f1da478e31e66e8a1bec10
WebService/src/main/resources/components/feePackage/add-feeConfig/addFeeConfig.js
@@ -17,12 +17,19 @@
                computingFormula: '',
                squarePrice: '',
                additionalAmount: '',
                feeTypeCds:[],
                computingFormulas:[]
            }
        },
        _initMethod: function() {
},
            vc.component._initAddFeeConfigDateInfo();
            vc.getDict('pay_fee_config',"fee_type_cd",function(_data){
                vc.component.addFeeConfigInfo.feeTypeCds = _data;
            });
            vc.getDict('pay_fee_config',"computing_formula",function(_data){
                vc.component.addFeeConfigInfo.computingFormulas = _data;
            });
        },
        _initEvent: function() {
            vc.on('addFeeConfig', 'openAddFeeConfigModal',
            function() {
@@ -30,6 +37,36 @@
            });
        },
        methods: {
            _initAddFeeConfigDateInfo: function () {
                vc.component.addFeeConfigInfo.startTime = vc.dateFormat(new Date().getTime());
                $('.addFeeConfigStartTime').datetimepicker({
                    language: 'zh-CN',
                    format: 'yyyy-mm-dd hh:ii:ss',
                    initTime: true,
                    initialDate: new Date(),
                    autoClose: 1,
                    todayBtn: true
                });
                $('.addFeeConfigStartTime').datetimepicker()
                    .on('changeDate', function (ev) {
                        var value = $(".addFeeConfigStartTime").val();
                        vc.component.addFeeConfigInfo.startTime = value;
                    });
                $('.addFeeConfigEndTime').datetimepicker({
                    language: 'zh-CN',
                    format: 'yyyy-mm-dd hh:ii:ss',
                    initTime: true,
                    initialDate: new Date(),
                    autoClose: 1,
                    todayBtn: true
                });
                $('.addFeeConfigEndTime').datetimepicker()
                    .on('changeDate', function (ev) {
                        var value = $(".addFeeConfigEndTime").val();
                        vc.component.addFeeConfigInfo.endTime = value;
                    });
            },
            addFeeConfigValidate() {
                return vc.validate.validate({
                    addFeeConfigInfo: vc.component.addFeeConfigInfo
@@ -127,6 +164,10 @@
                });
            },
            saveFeeConfigInfo: function() {
                //固定费用
                if(vc.component.addFeeConfigInfo.computingFormula == '2002'){
                   vc.component.addFeeConfigInfo.squarePrice = "0.00";
                }
                if (!vc.component.addFeeConfigValidate()) {
                    vc.toast(vc.validate.errInfo);
@@ -165,6 +206,8 @@
                });
            },
            clearAddFeeConfigInfo: function() {
                var _feeTypeCds =  vc.component.addFeeConfigInfo.feeTypeCds;
                var _computingFormulas = vc.component.addFeeConfigInfo.computingFormulas;
                vc.component.addFeeConfigInfo = {
                    feeTypeCd: '',
                    feeName: '',
@@ -174,6 +217,8 @@
                    computingFormula: '',
                    squarePrice: '',
                    additionalAmount: '',
                    feeTypeCds:_feeTypeCds,
                    computingFormulas:_computingFormulas
                };
            }