mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
优化业主详情页面费用功能
This commit is contained in:
parent
14a0380088
commit
0bf4bcbef4
@ -52,13 +52,13 @@
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".roomCreateFeeStartTime").val();
|
||||
var start = Date.parse(new Date(value));
|
||||
var end = Date.parse(new Date(vc.component.roomsCreateFeeInfo.endTime));
|
||||
var end = Date.parse(new Date($that.roomsCreateFeeInfo.endTime));
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费起始时间必须小于计费终止时间");
|
||||
$(".roomCreateFeeStartTime").val('');
|
||||
vc.component.roomsCreateFeeInfo.startTime = "";
|
||||
$that.roomsCreateFeeInfo.startTime = "";
|
||||
} else {
|
||||
vc.component.roomsCreateFeeInfo.startTime = value;
|
||||
$that.roomsCreateFeeInfo.startTime = value;
|
||||
}
|
||||
});
|
||||
$('.roomCreateFeeEndTime').datetimepicker({
|
||||
@ -74,14 +74,14 @@
|
||||
$('.roomCreateFeeEndTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".roomCreateFeeEndTime").val();
|
||||
var start = Date.parse(new Date(vc.component.roomsCreateFeeInfo.startTime));
|
||||
var start = Date.parse(new Date($that.roomsCreateFeeInfo.startTime));
|
||||
var end = Date.parse(new Date(value));
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费终止时间必须大于计费起始时间");
|
||||
$(".roomCreateFeeEndTime").val('');
|
||||
vc.component.roomsCreateFeeInfo.endTime = "";
|
||||
$that.roomsCreateFeeInfo.endTime = "";
|
||||
} else {
|
||||
vc.component.roomsCreateFeeInfo.endTime = value;
|
||||
$that.roomsCreateFeeInfo.endTime = value;
|
||||
}
|
||||
});
|
||||
//防止多次点击时间插件失去焦点
|
||||
@ -171,6 +171,7 @@
|
||||
}
|
||||
vc.toast("创建收费成功,总共[" + _json.totalRoom + "]房屋,成功[" + _json.successRoom + "],失败[" + _json.errorRoom + "]", 8000);
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
vc.emit('ownerDetailRoomFee', 'notify', {});
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h3 class="modal-title" id="addRoleStaffModelLabel">
|
||||
<span><vc:i18n name="员工" namespace="addRoleStaff"></vc:i18n></span>
|
||||
<vc:i18n name="员工" namespace="addRoleStaff"></vc:i18n>
|
||||
</h3>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
|
||||
@ -47,7 +47,7 @@
|
||||
params: {
|
||||
page: _page,
|
||||
row: _row,
|
||||
userName: _name,
|
||||
searchUserName: _name,
|
||||
roleId: vc.component.addRoleStaffInfo.roleId
|
||||
}
|
||||
};
|
||||
|
||||
@ -193,4 +193,5 @@
|
||||
<vc:create path="fee/roomsCreateFee"></vc:create>
|
||||
<vc:create path="fee/roomsProxyFee"></vc:create>
|
||||
|
||||
|
||||
</div>
|
||||
@ -7,16 +7,16 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('deleteFee', 'openDeleteFeeModal', function (_params) {
|
||||
vc.component.deleteFeeInfo = _params;
|
||||
$that.deleteFeeInfo = _params;
|
||||
$('#deleteFeeModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
deleteFee: function () {
|
||||
vc.component.deleteFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.deleteFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'/fee.deleteFee',
|
||||
JSON.stringify(vc.component.deleteFeeInfo), {
|
||||
JSON.stringify($that.deleteFeeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
@ -33,7 +33,7 @@
|
||||
vc.emit('simplifyContractFee', 'notify', {});
|
||||
vc.emit('carDetailFee', 'notify', {});
|
||||
vc.emit('contractDetailRoomFee', 'notify', {});
|
||||
|
||||
vc.emit('ownerDetailRoomFee', 'notify', {});
|
||||
|
||||
vc.toast("删除费用成功");
|
||||
vc.emit('listRoomFee', 'notify', {});
|
||||
@ -52,4 +52,4 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc, window.vc.component);
|
||||
})(window.vc, window.$that);
|
||||
@ -14,7 +14,7 @@
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._initEditFeeDateInfo();
|
||||
$that._initEditFeeDateInfo();
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editFee', 'openEditFeeModal',
|
||||
@ -36,24 +36,24 @@
|
||||
|
||||
vc.initDate('editFeeStartTime',function(_value){
|
||||
let start = Date.parse(new Date(_value));
|
||||
let end = Date.parse(new Date(vc.component.editFeeInfo.endTime));
|
||||
let end = Date.parse(new Date($that.editFeeInfo.endTime));
|
||||
if (start - end >= 0) {
|
||||
vc.toast("建账时间必须小于计费起始时间");
|
||||
$(".editFeeStartTime").val('');
|
||||
vc.component.editFeeInfo.startTime = "";
|
||||
$that.editFeeInfo.startTime = "";
|
||||
} else {
|
||||
vc.component.editFeeInfo.startTime = _value;
|
||||
$that.editFeeInfo.startTime = _value;
|
||||
}
|
||||
});
|
||||
vc.initDate('editFeeEndTime',function(_value){
|
||||
let start = Date.parse(new Date(vc.component.editFeeInfo.startTime))
|
||||
let start = Date.parse(new Date($that.editFeeInfo.startTime))
|
||||
let end = Date.parse(new Date(_value))
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费起始时间必须大于建账时间");
|
||||
$(".editFeeEndTime").val('');
|
||||
vc.component.editFeeInfo.endTime = "";
|
||||
$that.editFeeInfo.endTime = "";
|
||||
} else {
|
||||
vc.component.editFeeInfo.endTime = _value;
|
||||
$that.editFeeInfo.endTime = _value;
|
||||
}
|
||||
})
|
||||
vc.initDate('editRoomRateStartTime', function (_endTime) {
|
||||
@ -77,7 +77,7 @@
|
||||
},
|
||||
editFeeValidate() {
|
||||
return vc.validate.validate({
|
||||
editFeeInfo: vc.component.editFeeInfo
|
||||
editFeeInfo: $that.editFeeInfo
|
||||
}, {
|
||||
'editFeeInfo.startTime': [{
|
||||
limit: "required",
|
||||
@ -92,12 +92,12 @@
|
||||
});
|
||||
},
|
||||
_doEidtFee: function () {
|
||||
if (!vc.component.editFeeValidate()) {
|
||||
if (!$that.editFeeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.editFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost('fee.updateFee', JSON.stringify(vc.component.editFeeInfo), {
|
||||
$that.editFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost('fee.updateFee', JSON.stringify($that.editFeeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
@ -105,7 +105,7 @@
|
||||
if (_json.code == 0) {
|
||||
//关闭model
|
||||
$('#editFeeModel').modal('hide');
|
||||
vc.component.clearAddFeeConfigInfo();
|
||||
$that.clearAddFeeConfigInfo();
|
||||
vc.emit('roomCreateFee', 'notify', {});
|
||||
vc.emit('listParkingSpaceFee', 'notify', {});
|
||||
vc.emit('listContractFee', 'notify', {});
|
||||
@ -114,7 +114,7 @@
|
||||
vc.emit('simplifyContractFee', 'notify', {});
|
||||
vc.emit('carDetailFee', 'notify', {});
|
||||
vc.emit('contractDetailRoomFee', 'notify', {});
|
||||
|
||||
vc.emit('ownerDetailRoomFee', 'notify', {});
|
||||
vc.toast("操作成功");
|
||||
return;
|
||||
} else {
|
||||
@ -127,7 +127,7 @@
|
||||
});
|
||||
},
|
||||
clearAddFeeConfigInfo: function () {
|
||||
vc.component.editFeeInfo = {
|
||||
$that.editFeeInfo = {
|
||||
feeId: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
|
||||
@ -12,17 +12,17 @@
|
||||
_initEvent: function() {
|
||||
vc.on('finishFee', 'openFinishFeeModal', function(_params) {
|
||||
|
||||
vc.component.finishFeeInfo = _params;
|
||||
$that.finishFeeInfo = _params;
|
||||
$('#finishFeeModel').modal('show');
|
||||
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
finishFee: function() {
|
||||
vc.component.finishFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
$that.finishFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
vc.http.apiPost(
|
||||
'fee.finishFee',
|
||||
JSON.stringify(vc.component.finishFeeInfo), {
|
||||
JSON.stringify($that.finishFeeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function(json, res) {
|
||||
@ -36,6 +36,7 @@
|
||||
vc.emit('simplifyCarFee', 'notify', {});
|
||||
vc.emit('listContractFee', 'notify', {});
|
||||
vc.emit('contractDetailRoomFee', 'notify', {});
|
||||
vc.emit('ownerDetailRoomFee', 'notify', {});
|
||||
vc.toast("结束费用成功");
|
||||
return;
|
||||
}
|
||||
@ -52,4 +53,4 @@
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc, window.vc.component);
|
||||
})(window.vc, window.$that);
|
||||
@ -4,66 +4,79 @@
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>
|
||||
<span><vc:i18n name="账户信息" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
<vc:i18n name="账户信息" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
|
||||
v-on:click="_queryPayFeeUserAccount()">
|
||||
<vc:i18n name="刷新" namespace="simplifyRoomFee"></vc:i18n>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<input type="checkbox" class="i-checks"
|
||||
v-bind:checked="payFeeUserAccountInfo.quanAccount == true"
|
||||
@click="checkAllAccount($event)">
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="账户类型" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="账户名" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="账户金额" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span><vc:i18n name="操作" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-center">
|
||||
<input type="checkbox" class="i-checks"
|
||||
v-bind:checked="payFeeUserAccountInfo.quanAccount == true"
|
||||
@click="checkAllAccount($event)">
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="账户类型" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="账户名" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="账户金额" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</span>
|
||||
</th>
|
||||
<th class="text-center">
|
||||
<span>
|
||||
<vc:i18n name="操作" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="userAccount in payFeeUserAccountInfo.accountList">
|
||||
<td class="text-center">
|
||||
<input type="checkbox" class="i-checks checkAccountItem"
|
||||
v-bind:value="userAccount.acctId"
|
||||
v-model="payFeeUserAccountInfo.selectAccountIds">
|
||||
</td>
|
||||
<td class="text-center">{{userAccount.acctTypeName}}</td>
|
||||
<td class="text-center">{{userAccount.acctName}}</td>
|
||||
<td class="text-center">{{userAccount.amount}}
|
||||
<span><vc:i18n name="元" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" v-show="userAccount.acctType != '2004'"
|
||||
<tr v-for="userAccount in payFeeUserAccountInfo.accountList">
|
||||
<td class="text-center">
|
||||
<input type="checkbox" class="i-checks checkAccountItem"
|
||||
v-bind:value="userAccount.acctId"
|
||||
v-model="payFeeUserAccountInfo.selectAccountIds">
|
||||
</td>
|
||||
<td class="text-center">{{userAccount.acctTypeName}}</td>
|
||||
<td class="text-center">{{userAccount.acctName}}</td>
|
||||
<td class="text-center">{{userAccount.amount}}
|
||||
<span>
|
||||
<vc:i18n name="元" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</span>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<button type="button" v-show="userAccount.acctType != '2004'"
|
||||
class="btn btn-primary btn-sm"
|
||||
v-on:click="_openAddUserAmountModal(userAccount)">
|
||||
<i class="fa fa-plus"></i>
|
||||
<span><vc:i18n name="预存" namespace="payFeeUserAccount"></vc:i18n></span>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
<vc:i18n name="预存" namespace="payFeeUserAccount"></vc:i18n>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -37,17 +37,20 @@
|
||||
vc.on('payFeeUserAccount', 'computeFeeUserAmount', function (_param) {
|
||||
$that.payFeeUserAccountInfo.selectAccountIds = [];
|
||||
vc.copyObject(_param, $that.payFeeUserAccountInfo);
|
||||
vc.component._listUserAccount(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listUserAccount(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('payFeeUserAccount', 'refresh', function () {
|
||||
vc.component._listUserAccount(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
$that._listUserAccount(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('payFeeUserAccount', 'clear', function () {
|
||||
vc.component.payFeeUserAccountInfo.accountList = [];
|
||||
vc.component.payFeeUserAccountInfo.selectAccountIds = [];
|
||||
$that.payFeeUserAccountInfo.accountList = [];
|
||||
$that.payFeeUserAccountInfo.selectAccountIds = [];
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_queryPayFeeUserAccount:function(){
|
||||
$that._listUserAccount(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_listUserAccount: function (_page, _rows) {
|
||||
let param = {
|
||||
params: {
|
||||
@ -75,7 +78,8 @@
|
||||
},
|
||||
// 预存
|
||||
_openAddUserAmountModal: function (_userAccount) {
|
||||
vc.emit('payFeeOrder', 'openAddModalWithParams', _userAccount)
|
||||
//vc.emit('payFeeOrder', 'openAddModalWithParams', _userAccount);
|
||||
window.open('/#/pages/owner/ownerDetail?ownerId=' + _userAccount.objId + "¤tTab=ownerDetailAccount")
|
||||
},
|
||||
checkAllAccount: function (e) {
|
||||
var checkObj = document.querySelectorAll('.checkAccountItem'); // 获取所有checkbox项
|
||||
@ -83,11 +87,11 @@
|
||||
for (var i = 0; i < checkObj.length; i++) {
|
||||
if (!checkObj[i].checked) { // 将未勾选的checkbox选项push到绑定数组中
|
||||
let _value = checkObj[i].value;
|
||||
vc.component.payFeeUserAccountInfo.selectAccountIds.push(_value);
|
||||
$that.payFeeUserAccountInfo.selectAccountIds.push(_value);
|
||||
}
|
||||
}
|
||||
} else { // 如果是去掉全选则清空checkbox选项绑定数组
|
||||
vc.component.payFeeUserAccountInfo.selectAccountIds = [];
|
||||
$that.payFeeUserAccountInfo.selectAccountIds = [];
|
||||
}
|
||||
},
|
||||
_computeFeeUserAmount: function () {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
<div id="prestoreAccount2Model" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
<div id="prestoreAccount2Model" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
|
||||
@ -291,4 +291,8 @@
|
||||
|
||||
|
||||
<vc:create path="property/editOwner" notifyLoadDataComponentName="ownerDetail" componentTitle="业主"></vc:create>
|
||||
|
||||
<vc:create path="property/deleteFee"></vc:create>
|
||||
<vc:create path="property/editFee"></vc:create>
|
||||
<vc:create path="property/finishFee"></vc:create>
|
||||
</div>
|
||||
Loading…
Reference in New Issue
Block a user