优化代码

This commit is contained in:
java110 2021-01-01 16:41:20 +08:00
parent 6114fe421c
commit c214f68b92
3 changed files with 50 additions and 5 deletions

View File

@ -67,6 +67,42 @@
</div>
</div>
<div id="doOwePayFeeModal" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">收费确认</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class="row">
<label class="col-sm-2 col-form-label">房屋:</label>
<label class="col-sm-10 col-form-label">{{owePayFeeOrderInfo.roomName}}</label>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">金额:</label>
<label class="col-sm-10 col-form-label">{{owePayFeeOrderInfo.feePrices}}元</label>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">备注:</label>
<label class="col-sm-10 col-form-label">
<textarea placeholder="可填,请填写备注" class="form-control"
v-model="owePayFeeOrderInfo.remark">
</textarea>
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" @click="_closeDoOwePayFeeModal()">关闭</button>
<button type="button" class="btn btn-primary" @click="_doPayFee()">确定收费</button>
</div>
</div>
</div>
</div>
<div id="payFeeResult" class="modal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">

View File

@ -12,7 +12,8 @@
payObjId: '',
payObjType: '',
roomName: '',
receiptId: ''
receiptId: '',
remark: ''
}
},
watch: {
@ -74,7 +75,14 @@
}
);
},
_payFee: function (_page, _row) {
_payFee: function () {
//打开model
$("#doOwePayFeeModal").modal('show');
},
_closeDoOwePayFeeModal: function () {
$("#doOwePayFeeModal").modal('hide');
},
_doPayFee: function () {
let _fees = [];
let _printFees = [];
$that.owePayFeeOrderInfo.selectPayFeeIds.forEach(function (_item) {
@ -102,7 +110,8 @@
}
let _data = {
communityId: vc.getCurrentCommunity().communityId,
fees: _fees
fees: _fees,
remark: $that.owePayFeeOrderInfo.remark
}
vc.http.apiPost(
'/fee.payOweFee',
@ -113,6 +122,7 @@
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
let _json = JSON.parse(json);
$that._closeDoOwePayFeeModal();
if (_json.code == 0) {
let _feeInfo = {
@ -137,6 +147,7 @@
},
function (errInfo, error) {
console.log('请求失败处理');
$that._closeDoOwePayFeeModal();
vc.toast(errInfo);
});
},

View File

@ -131,8 +131,6 @@
* 点击 提交缴费
*/
_openPayFee: function () {
console.log('tempCycles : ', $that.payFeeOrderInfo.tempCycles);
console.log('cycles : ', $that.payFeeOrderInfo.cycles);
if ($that.payFeeOrderInfo.tempCycles != "" && $that.payFeeOrderInfo.tempCycles != '-102') {
$that.payFeeOrderInfo.cycles = $that.payFeeOrderInfo.tempCycles;
}