mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
update addConfig function
This commit is contained in:
parent
1d64375198
commit
8ffafb15b6
@ -1,4 +1,4 @@
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string,
|
||||
@ -12,7 +12,7 @@
|
||||
feeName: '',
|
||||
feeFlag: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
endTime: '2050-01-01',
|
||||
computingFormula: '',
|
||||
squarePrice: '',
|
||||
additionalAmount: '',
|
||||
@ -26,43 +26,43 @@
|
||||
paymentCd: '',
|
||||
computingFormulaText: '',
|
||||
deductFrom: 'Y',
|
||||
payOnline:'Y',
|
||||
scale:'1',
|
||||
decimalPlace:'2',
|
||||
units:'元'
|
||||
payOnline: 'Y',
|
||||
scale: '1',
|
||||
decimalPlace: '2',
|
||||
units: '元'
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
_initMethod: function() {
|
||||
vc.component._initAddFeeConfigDateInfo();
|
||||
//与字典表费用类型关联
|
||||
vc.getDict('pay_fee_config', "fee_type_cd_show", function (_data) {
|
||||
vc.getDict('pay_fee_config', "fee_type_cd_show", function(_data) {
|
||||
vc.component.addFeeConfigInfo.feeTypeCds = _data;
|
||||
});
|
||||
//与字典表计算公式关联
|
||||
vc.getDict('pay_fee_config', "computing_formula", function (_data) {
|
||||
vc.getDict('pay_fee_config', "computing_formula", function(_data) {
|
||||
vc.component.addFeeConfigInfo.computingFormulas = _data;
|
||||
});
|
||||
//与字典表费用标识关联
|
||||
vc.getDict('pay_fee_config', 'fee_flag', function (_data) {
|
||||
vc.getDict('pay_fee_config', 'fee_flag', function(_data) {
|
||||
vc.component.addFeeConfigInfo.feeFlags = _data;
|
||||
});
|
||||
//与字典表付费类型关联
|
||||
vc.getDict('pay_fee_config', 'payment_cd', function (_data) {
|
||||
vc.getDict('pay_fee_config', 'payment_cd', function(_data) {
|
||||
vc.component.addFeeConfigInfo.paymentCds = _data;
|
||||
});
|
||||
//与字典表出账类型关联
|
||||
vc.getDict('pay_fee_config', 'bill_type', function (_data) {
|
||||
vc.getDict('pay_fee_config', 'bill_type', function(_data) {
|
||||
vc.component.addFeeConfigInfo.billTypes = _data;
|
||||
});
|
||||
},
|
||||
_initEvent: function () {
|
||||
_initEvent: function() {
|
||||
vc.on('addFeeConfig', 'openAddFeeConfigModal',
|
||||
function () {
|
||||
function() {
|
||||
$('#addFeeConfigModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initAddFeeConfigDateInfo: function () {
|
||||
_initAddFeeConfigDateInfo: function() {
|
||||
$('.addFeeConfigStartTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
@ -74,7 +74,7 @@
|
||||
todayBtn: true
|
||||
});
|
||||
$('.addFeeConfigStartTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
.on('changeDate', function(ev) {
|
||||
var value = $(".addFeeConfigStartTime").val();
|
||||
var start = Date.parse(new Date(value));
|
||||
var end = Date.parse(new Date(vc.component.addFeeConfigInfo.endTime));
|
||||
@ -97,7 +97,7 @@
|
||||
todayBtn: true
|
||||
});
|
||||
$('.addFeeConfigEndTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
.on('changeDate', function(ev) {
|
||||
var value = $(".addFeeConfigEndTime").val();
|
||||
var start = Date.parse(new Date(vc.component.addFeeConfigInfo.startTime));
|
||||
var end = Date.parse(new Date(value));
|
||||
@ -126,8 +126,7 @@
|
||||
return vc.validate.validate({
|
||||
addFeeConfigInfo: vc.component.addFeeConfigInfo
|
||||
}, {
|
||||
'addFeeConfigInfo.feeTypeCd': [
|
||||
{
|
||||
'addFeeConfigInfo.feeTypeCd': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "费用类型不能为空"
|
||||
@ -138,8 +137,7 @@
|
||||
errInfo: "费用类型格式错误"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.feeName': [
|
||||
{
|
||||
'addFeeConfigInfo.feeName': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "收费项目不能为空"
|
||||
@ -150,8 +148,7 @@
|
||||
errInfo: "收费项目不能超过100位"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.feeFlag': [
|
||||
{
|
||||
'addFeeConfigInfo.feeFlag': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "费用标识不能为空"
|
||||
@ -162,8 +159,7 @@
|
||||
errInfo: "费用类型格式错误"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.startTime': [
|
||||
{
|
||||
'addFeeConfigInfo.startTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "计费起始时间不能为空"
|
||||
@ -174,8 +170,7 @@
|
||||
errInfo: "计费起始时间不是有效的时间格式"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.endTime': [
|
||||
{
|
||||
'addFeeConfigInfo.endTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "计费终止时间不能为空"
|
||||
@ -186,8 +181,7 @@
|
||||
errInfo: "计费终止时间不是有效的时间格式"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.computingFormula': [
|
||||
{
|
||||
'addFeeConfigInfo.computingFormula': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "计算公式不能为空"
|
||||
@ -198,8 +192,7 @@
|
||||
errInfo: "计算公式格式错误"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.squarePrice': [
|
||||
{
|
||||
'addFeeConfigInfo.squarePrice': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "计费单价不能为空"
|
||||
@ -210,8 +203,7 @@
|
||||
errInfo: "计费单价格式错误"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.additionalAmount': [
|
||||
{
|
||||
'addFeeConfigInfo.additionalAmount': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "附加费用不能为空"
|
||||
@ -227,8 +219,7 @@
|
||||
param: "",
|
||||
errInfo: "出账类型不能为空"
|
||||
}],
|
||||
'addFeeConfigInfo.paymentCycle': [
|
||||
{
|
||||
'addFeeConfigInfo.paymentCycle': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "缴费周期不能为空"
|
||||
@ -239,8 +230,7 @@
|
||||
errInfo: "缴费周期必须为数字 单位月"
|
||||
},
|
||||
],
|
||||
'addFeeConfigInfo.paymentCd': [
|
||||
{
|
||||
'addFeeConfigInfo.paymentCd': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "付费类型不能为空"
|
||||
@ -253,7 +243,7 @@
|
||||
]
|
||||
});
|
||||
},
|
||||
saveFeeConfigInfo: function () {
|
||||
saveFeeConfigInfo: function() {
|
||||
//固定费用
|
||||
if (vc.component.addFeeConfigInfo.computingFormula == '2002') {
|
||||
vc.component.addFeeConfigInfo.squarePrice = "0.00";
|
||||
@ -292,7 +282,7 @@
|
||||
vc.http.apiPost('/feeConfig.saveFeeConfig', JSON.stringify(vc.component.addFeeConfigInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
let _json = JSON.parse(json)
|
||||
if (_json.code == 0) {
|
||||
@ -306,12 +296,12 @@
|
||||
vc.toast(_json.msg);
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(errInfo);
|
||||
});
|
||||
},
|
||||
clearAddFeeConfigInfo: function () {
|
||||
clearAddFeeConfigInfo: function() {
|
||||
var _feeTypeCds = vc.component.addFeeConfigInfo.feeTypeCds;
|
||||
var _computingFormulas = vc.component.addFeeConfigInfo.computingFormulas;
|
||||
var _feeFlags = vc.component.addFeeConfigInfo.feeFlags;
|
||||
@ -322,7 +312,7 @@
|
||||
feeName: '',
|
||||
feeFlag: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
endTime: '2050-01-01',
|
||||
computingFormula: '',
|
||||
squarePrice: '',
|
||||
additionalAmount: '',
|
||||
@ -336,10 +326,10 @@
|
||||
paymentCd: '',
|
||||
computingFormulaText: '',
|
||||
deductFrom: 'Y',
|
||||
payOnline:'Y',
|
||||
scale:'1',
|
||||
decimalPlace:'2',
|
||||
units:'元'
|
||||
payOnline: 'Y',
|
||||
scale: '1',
|
||||
decimalPlace: '2',
|
||||
units: '元'
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user