mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 05:46:03 +08:00
开发创建费用页面 优化完成
This commit is contained in:
parent
81f3ca9903
commit
df25598467
@ -218,7 +218,7 @@
|
||||
$('#addMeterWaterModel').modal('hide');
|
||||
vc.component.clearAddMeterWaterInfo();
|
||||
vc.emit('meterWaterManage', 'listMeterWater', {});
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
vc.emit('simplifyCarFee', 'notify', {});
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
(function (vc) {
|
||||
(function(vc) {
|
||||
vc.extends({
|
||||
propTypes: {
|
||||
callBackListener: vc.propTypes.string, //父组件名称
|
||||
@ -21,11 +21,11 @@
|
||||
endTime: vc.addMonthDate(new Date(), 1)
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.initDate('proxyFeeStartTime', function (_startTime) {
|
||||
_initMethod: function() {
|
||||
vc.initDate('proxyFeeStartTime', function(_startTime) {
|
||||
$that.addProxyFeeInfo.startTime = _startTime;
|
||||
});
|
||||
vc.initDate('proxyFeeEndTime', function (_endTime) {
|
||||
vc.initDate('proxyFeeEndTime', function(_endTime) {
|
||||
$that.addProxyFeeInfo.endTime = _endTime;
|
||||
let start = Date.parse(new Date($that.addProxyFeeInfo.startTime))
|
||||
let end = Date.parse(new Date($that.addProxyFeeInfo.endTime))
|
||||
@ -35,8 +35,8 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('addProxyFee', 'openAddProxyFeeModal', function (_param) {
|
||||
_initEvent: function() {
|
||||
vc.on('addProxyFee', 'openAddProxyFeeModal', function(_param) {
|
||||
if (_param.hasOwnProperty("objType")) {
|
||||
$that.addProxyFeeInfo.objType = _param.objType;
|
||||
}
|
||||
@ -53,10 +53,10 @@
|
||||
addProxyFeeInfo: vc.component.addProxyFeeInfo
|
||||
}, {
|
||||
'addProxyFeeInfo.amount': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "金额不能为空"
|
||||
},
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "金额不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
@ -64,10 +64,10 @@
|
||||
},
|
||||
],
|
||||
'addProxyFeeInfo.consumption': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "用量不能为空"
|
||||
},
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "用量不能为空"
|
||||
},
|
||||
{
|
||||
limit: "money",
|
||||
param: "",
|
||||
@ -85,10 +85,10 @@
|
||||
errInfo: "费用必填"
|
||||
}],
|
||||
'addProxyFeeInfo.startTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "开始时间不能为空"
|
||||
},
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "开始时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "date",
|
||||
param: "",
|
||||
@ -96,10 +96,10 @@
|
||||
},
|
||||
],
|
||||
'addProxyFeeInfo.endTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "结束时间不能为空"
|
||||
},
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "结束时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "date",
|
||||
param: "",
|
||||
@ -108,7 +108,7 @@
|
||||
],
|
||||
});
|
||||
},
|
||||
saveProxyInfo: function () {
|
||||
saveProxyInfo: function() {
|
||||
if (!vc.component.addProxyFeeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
@ -125,30 +125,30 @@
|
||||
JSON.stringify(vc.component.addProxyFeeInfo), {
|
||||
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) {
|
||||
//关闭model
|
||||
$('#addProxyFeeModel').modal('hide');
|
||||
vc.component.clearAddProxyFeeInfo();
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
vc.toast(_json.msg);
|
||||
return;
|
||||
}
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.message(errInfo);
|
||||
});
|
||||
},
|
||||
_changeProxyFeeConfig: function () {
|
||||
_changeProxyFeeConfig: function() {
|
||||
$that.addProxyFeeInfo.amount = '';
|
||||
$that.addProxyFeeInfo.consumption = '';
|
||||
},
|
||||
_changeProxyFeeTypeCd: function (_feeTypeCd) {
|
||||
_changeProxyFeeTypeCd: function(_feeTypeCd) {
|
||||
$that.addProxyFeeInfo.amount = '';
|
||||
$that.addProxyFeeInfo.consumption = '';
|
||||
var param = {
|
||||
@ -163,15 +163,15 @@
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.get('roomCreateFeeAdd', 'list', param,
|
||||
function (json, res) {
|
||||
function(json, res) {
|
||||
var _feeConfigManageInfo = JSON.parse(json);
|
||||
vc.component.addProxyFeeInfo.feeConfigs = _feeConfigManageInfo.feeConfigs;
|
||||
},
|
||||
function (errInfo, error) {
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
});
|
||||
},
|
||||
clearAddProxyFeeInfo: function () {
|
||||
clearAddProxyFeeInfo: function() {
|
||||
vc.component.addProxyFeeInfo = {
|
||||
amount: '',
|
||||
consumption: '',
|
||||
@ -188,7 +188,7 @@
|
||||
endTime: vc.addMonthDate(new Date(), 1)
|
||||
};
|
||||
},
|
||||
_getConfig: function () {
|
||||
_getConfig: function() {
|
||||
let _feeConfigs = $that.addProxyFeeInfo.feeConfigs;
|
||||
let _config = null;
|
||||
_feeConfigs.forEach(item => {
|
||||
@ -198,7 +198,7 @@
|
||||
});
|
||||
return _config;
|
||||
},
|
||||
_changeAmount: function () {
|
||||
_changeAmount: function() {
|
||||
let _config = $that._getConfig();
|
||||
let _amount = $that.addProxyFeeInfo.amount;
|
||||
if (_config == null) {
|
||||
@ -216,7 +216,7 @@
|
||||
let _consumption = (_amount - _config.additionalAmount) / _config.squarePrice;
|
||||
$that.addProxyFeeInfo.consumption = _consumption.toFixed(2);
|
||||
},
|
||||
_changeConsumption: function () {
|
||||
_changeConsumption: function() {
|
||||
let _config = $that._getConfig();
|
||||
let _consumption = $that.addProxyFeeInfo.consumption;
|
||||
if (_config == null) {
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#deleteFeeModel').modal('hide');
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('listContractFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
<div class="form-group row" v-show="editFeeInfo.computingFormula == '1102'">
|
||||
<label class="col-sm-2 col-form-label"><span><vc:i18n name="递增开始时间" namespace="editFee"></vc:i18n></span></label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editFeeInfo.rateStartTime" type="text" :placeholder="vc.i18n('必填,请填写递增开始时间','editFee')" class="form-control roomRateStartTime">
|
||||
<input v-model="editFeeInfo.rateStartTime" type="text" :placeholder="vc.i18n('必填,请填写递增开始时间','editFee')" class="form-control editRoomRateStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
_initEvent: function() {
|
||||
vc.on('editFee', 'openEditFeeModal',
|
||||
function(_fee) {
|
||||
$that.clearAddFeeConfigInfo();
|
||||
vc.copyObject(_fee, $that.editFeeInfo);
|
||||
if (_fee.startTime.indexOf(":") == -1) {
|
||||
$that.editFeeInfo.startTime = $that.editFeeInfo.startTime + " 00:00:00";
|
||||
@ -69,7 +70,7 @@
|
||||
vc.component.editFeeInfo.endTime = value;
|
||||
}
|
||||
});
|
||||
vc.initDate('rateStartTime', function(_endTime) {
|
||||
vc.initDate('editRoomRateStartTime', function(_endTime) {
|
||||
$that.editFeeInfo.rateStartTime = _endTime;
|
||||
let start = Date.parse(new Date($that.editFeeInfo.startTime))
|
||||
let end = Date.parse(new Date($that.editFeeInfo.rateStartTime))
|
||||
@ -139,7 +140,7 @@
|
||||
//关闭model
|
||||
$('#editFeeModel').modal('hide');
|
||||
vc.component.clearAddFeeConfigInfo();
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('listContractFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
|
||||
@ -1,54 +1,53 @@
|
||||
(function(vc,vm){
|
||||
(function(vc, vm) {
|
||||
|
||||
vc.extends({
|
||||
data:{
|
||||
finishFeeInfo:{
|
||||
data: {
|
||||
finishFeeInfo: {
|
||||
|
||||
}
|
||||
},
|
||||
_initMethod:function(){
|
||||
_initMethod: function() {
|
||||
|
||||
},
|
||||
_initEvent:function(){
|
||||
vc.on('finishFee','openFinishFeeModal',function(_params){
|
||||
},
|
||||
_initEvent: function() {
|
||||
vc.on('finishFee', 'openFinishFeeModal', function(_params) {
|
||||
|
||||
vc.component.finishFeeInfo = _params;
|
||||
$('#finishFeeModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods:{
|
||||
finishFee:function(){
|
||||
vc.component.finishFeeInfo.communityId=vc.getCurrentCommunity().communityId;
|
||||
methods: {
|
||||
finishFee: function() {
|
||||
vc.component.finishFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'fee.finishFee',
|
||||
JSON.stringify(vc.component.finishFeeInfo),
|
||||
{
|
||||
emulateJSON:true
|
||||
},
|
||||
function(json,res){
|
||||
JSON.stringify(vc.component.finishFeeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if(res.status == 200){
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#finishFeeModel').modal('hide');
|
||||
vc.emit('listRoomFee','notify',{});
|
||||
vc.emit('listParkingSpaceFee','notify',{});
|
||||
vc.emit('simplifyRoomFee', 'notify',{});
|
||||
vc.emit('simplifyCarFee', 'notify',{});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
vc.emit('simplifyCarFee', 'notify', {});
|
||||
vc.toast("结束费用成功");
|
||||
return ;
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
},
|
||||
function(errInfo,error){
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
vc.toast(json);
|
||||
});
|
||||
});
|
||||
},
|
||||
closeFinishFeeModel:function(){
|
||||
closeFinishFeeModel: function() {
|
||||
$('#finishFeeModel').modal('hide');
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc,window.vc.component);
|
||||
})(window.vc, window.vc.component);
|
||||
@ -197,7 +197,7 @@
|
||||
var _json = JSON.parse(json);
|
||||
$('#roomCreateFeeAddModel').modal('hide');
|
||||
$that.clearRoomCreateFeeAddData();
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
if (_json.hasOwnProperty('code') && _json.code != 0) {
|
||||
vc.toast(_json.msg);
|
||||
|
||||
@ -143,7 +143,7 @@
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#tempImportRoomFeeModel').modal('hide');
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('simplifyRoomFee', 'notify', {});
|
||||
vc.emit('listContractFee', 'notify', {});
|
||||
}
|
||||
|
||||
@ -118,11 +118,11 @@
|
||||
room: $that.listRoomCreateFeeInfo
|
||||
});
|
||||
},
|
||||
_openRoomCreateFeeComboModal:function(){
|
||||
vc.jumpToPage('/#/pages/property/createFeeByCombo?payerObjId='
|
||||
+$that.listRoomCreateFeeInfo.roomId
|
||||
+"&payerObjName="+$that.listRoomCreateFeeInfo.roomName
|
||||
+"&payerObjType=3333")
|
||||
_openRoomCreateFeeComboModal: function() {
|
||||
vc.jumpToPage('/#/pages/property/createFeeByCombo?payerObjId=' +
|
||||
$that.listRoomCreateFeeInfo.roomId +
|
||||
"&payerObjName=" + $that.listRoomCreateFeeInfo.roomName +
|
||||
"&payerObjType=3333")
|
||||
},
|
||||
_openAddMeterWaterModal: function() {
|
||||
vc.emit('addMeterWater', 'openAddMeterWaterModal', {
|
||||
@ -188,7 +188,7 @@
|
||||
$that.listRoomCreateFeeInfo.roomName = listRoomData.rooms[0].floorNum + "-" + listRoomData.rooms[0].roomNum;
|
||||
}
|
||||
// 换存搜索条件
|
||||
vc.emit('listRoomFee', 'notify', {})
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
},
|
||||
function(errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
@ -62,6 +62,10 @@
|
||||
$that.updateCurrentPage(_currentPage);
|
||||
vc.component.listRoom(_currentPage, DEFAULT_ROW);
|
||||
});
|
||||
|
||||
vc.on('roomCreateFee', 'notify', function() {
|
||||
vc.component._loadListRoomCreateFeeInfo(DEFAULT_PAGE, DEFAULT_ROW);
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
_openRoomCreateFeeAddModal: function(_room, _isMore) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user