mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 14:17:54 +08:00
优化费用
This commit is contained in:
parent
3ea89ca006
commit
9bebb1b93e
38
public/components/property/editFee/editFee.html
Normal file
38
public/components/property/editFee/editFee.html
Normal file
@ -0,0 +1,38 @@
|
||||
<div id="editFeeModel" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-body">
|
||||
<h3 class="m-t-none m-b ">费用变更</h3>
|
||||
<div class="ibox-content">
|
||||
<div>
|
||||
<div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">建账时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editFeeInfo.startTime" type="text" placeholder="必填,请填写计费起始时间"
|
||||
class="form-control editFeeStartTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">计费起始时间</label>
|
||||
<div class="col-sm-10">
|
||||
<input v-model="editFeeInfo.endTime" type="text" placeholder="必填,请填写计费终止时间"
|
||||
class="form-control editFeeEndTime">
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<button class="btn btn-primary float-right" type="button" v-on:click="_doEidtFee()"><i
|
||||
class="fa fa-check"></i> 提交
|
||||
</button>
|
||||
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;"
|
||||
data-dismiss="modal">取消
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
133
public/components/property/editFee/editFee.js
Normal file
133
public/components/property/editFee/editFee.js
Normal file
@ -0,0 +1,133 @@
|
||||
(function (vc) {
|
||||
|
||||
vc.extends({
|
||||
data: {
|
||||
editFeeInfo: {
|
||||
feeId: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._initEditFeeDateInfo();
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('editFee', 'openEditFeeModal',
|
||||
function (_fee) {
|
||||
vc.copyObject(_fee, $that.editFeeInfo);
|
||||
$('#editFeeModel').modal('show');
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_initEditFeeDateInfo: function () {
|
||||
$('.editFeeStartTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
|
||||
});
|
||||
$('.editFeeStartTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".editFeeStartTime").val();
|
||||
vc.component.editFeeInfo.startTime = value;
|
||||
});
|
||||
$('.editFeeEndTime').datetimepicker({
|
||||
language: 'zh-CN',
|
||||
fontAwesome: 'fa',
|
||||
format: 'yyyy-mm-dd hh:ii:ss',
|
||||
initTime: true,
|
||||
initialDate: new Date(),
|
||||
autoClose: 1,
|
||||
todayBtn: true
|
||||
});
|
||||
$('.editFeeEndTime').datetimepicker()
|
||||
.on('changeDate', function (ev) {
|
||||
var value = $(".editFeeEndTime").val();
|
||||
var start = Date.parse(new Date(vc.component.editFeeInfo.startTime))
|
||||
var end = Date.parse(new Date(value))
|
||||
if (start - end >= 0) {
|
||||
vc.toast("计费起始时间必须大于建账时间")
|
||||
$(".editFeeEndTime").val('')
|
||||
} else {
|
||||
vc.component.editFeeInfo.endTime = value;
|
||||
}
|
||||
});
|
||||
},
|
||||
editFeeValidate() {
|
||||
return vc.validate.validate({
|
||||
editFeeInfo: vc.component.editFeeInfo
|
||||
},
|
||||
{
|
||||
'editFeeInfo.startTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "建账时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "建账时间不是有效的时间格式"
|
||||
},
|
||||
],
|
||||
'editFeeInfo.endTime': [{
|
||||
limit: "required",
|
||||
param: "",
|
||||
errInfo: "计费起始时间不能为空"
|
||||
},
|
||||
{
|
||||
limit: "dateTime",
|
||||
param: "",
|
||||
errInfo: "计费起始时间不是有效的时间格式"
|
||||
},
|
||||
]
|
||||
|
||||
});
|
||||
},
|
||||
_doEidtFee: function () {
|
||||
|
||||
if (!vc.component.editFeeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
vc.component.editFeeInfo.communityId = vc.getCurrentCommunity().communityId;
|
||||
|
||||
|
||||
vc.http.apiPost('fee.updateFee', JSON.stringify(vc.component.editFeeInfo), {
|
||||
emulateJSON: true
|
||||
},
|
||||
function (json, res) {
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200) {
|
||||
//关闭model
|
||||
$('#editFeeModel').modal('hide');
|
||||
vc.component.clearAddFeeConfigInfo();
|
||||
vc.emit('listRoomFee','notify', {});
|
||||
|
||||
return;
|
||||
}
|
||||
vc.toast(json);
|
||||
|
||||
},
|
||||
function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
|
||||
vc.toast(errInfo);
|
||||
|
||||
});
|
||||
},
|
||||
clearAddFeeConfigInfo: function () {
|
||||
vc.component.editFeeInfo = {
|
||||
feeId: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
};
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
})(window.vc);
|
||||
@ -26,11 +26,11 @@
|
||||
<!-- <th class="text-center">费用项ID</th> -->
|
||||
<th class="text-center">费用项目</th>
|
||||
<th class="text-center">费用标识</th>
|
||||
<th class="text-center">费用类型</th>
|
||||
<th class="text-center">房屋面积</th>
|
||||
<th class="text-center">单价</th>
|
||||
<th class="text-center">附加费/固定费</th>
|
||||
<th class="text-center">应收金额</th>
|
||||
<th class="text-center">费用类型</th>
|
||||
<th class="text-center">房屋面积</th>
|
||||
<th class="text-center">单价</th>
|
||||
<th class="text-center">附加费/固定费</th>
|
||||
<th class="text-center">应收金额</th>
|
||||
<th class="text-center">建账时间</th>
|
||||
<th class="text-center">计费起始时间</th>
|
||||
<th class="text-center">计费结束时间</th>
|
||||
@ -53,7 +53,9 @@
|
||||
<td class="text-center">{{fee.deadlineTime}}</td>
|
||||
<td class="text-center">{{fee.stateName}}</td>
|
||||
<td class="text-right">
|
||||
<button class="btn btn-link btn-xs" v-if="fee.state != '2009001' && vc.hasPrivilege('502020082314267912')"
|
||||
|
||||
<button class="btn btn-link btn-xs"
|
||||
v-if="fee.state != '2009001' && vc.hasPrivilege('502020082314267912')"
|
||||
v-on:click="_payFee(fee)">缴费
|
||||
</button>
|
||||
<button class="btn btn-link btn-xs" v-on:click="_payFeeHis(fee)">缴费历史
|
||||
@ -62,6 +64,10 @@
|
||||
v-if="fee.isDefault == 'F' && fee.state != '2009001'"
|
||||
v-on:click="_deleteFee(fee)">取消费用
|
||||
</button>
|
||||
<button class="btn btn-link btn-xs"
|
||||
v-if="fee.state != '2009001' && vc.hasPrivilege('502020090427190001')"
|
||||
v-on:click="_editFee(fee)">费用变更
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -74,4 +80,5 @@
|
||||
</div>
|
||||
</div>
|
||||
<vc:create path="property/deleteFee"></vc:create>
|
||||
<vc:create path="property/editFee"></vc:create>
|
||||
</div>
|
||||
@ -63,6 +63,9 @@
|
||||
_fee.builtUpArea=$that.listRoomCreateFeeInfo.builtUpArea;
|
||||
vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?'+vc.objToGetParam(_fee));
|
||||
},
|
||||
_editFee:function(_fee){
|
||||
vc.emit('editFee', 'openEditFeeModal',_fee);
|
||||
},
|
||||
_payFeeHis:function(_fee){
|
||||
_fee.builtUpArea=$that.listRoomCreateFeeInfo.builtUpArea;
|
||||
vc.jumpToPage('/admin.html#/pages/property/propertyFee?'+vc.objToGetParam(_fee));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user