优化代码

This commit is contained in:
java110 2021-05-19 18:15:26 +08:00
parent 17d692e987
commit a5c28b72fb
3 changed files with 36 additions and 13 deletions

View File

@ -30,10 +30,10 @@
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeReceiptMethod()">
<i class="fa fa-search"></i> 查询
</button>
<button type="button" class="btn btn-primary btn-sm"
<!-- <button type="button" class="btn btn-primary btn-sm"
v-on:click="_printFeeReceipts(feeReceiptManageInfo.conditions)">
<i class="fa fa-files-o"></i> 打印
</button>
</button> -->
</div>
</div>
<div class="row">
@ -50,7 +50,7 @@
</div>
</div>
<div class="col-sm-3">
<div class="form-group">
<!-- <div class="form-group">
<select class="custom-select" v-model="feeReceiptManageInfo.conditions.type">
<option selected value="">请选择打印类型</option>
<option value="1">装修单据</option>
@ -59,7 +59,7 @@
<option value="4">车辆单据</option>
<option value="5">公摊费票据</option>
</select>
</div>
</div> -->
</div>
<!--<div class="col-sm-1">
<button type="button" class="btn btn-primary btn-sm"

View File

@ -79,17 +79,28 @@
</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>
<label class="col-sm-3 col-form-label">房屋:</label>
<label class="col-sm-9 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>
<label class="col-sm-3 col-form-label">金额:</label>
<label class="col-sm-9 col-form-label">{{owePayFeeOrderInfo.feePrices}}元</label>
</div>
<div class="row form-group">
<label class="col-sm-3 col-form-label" >支付方式:</label>
<div class="col-sm-9">
<select class="custom-select" v-model="owePayFeeOrderInfo.primeRate">
<option selected disabled value="">必填,请选择支付方式</option>
<option v-for="(item,index) in owePayFeeOrderInfo.primeRates" :key="index"
:value="item.statusCd">{{item.name}}
</option>
</select>
</div>
</div>
<div class="row">
<label class="col-sm-2 col-form-label">备注:</label>
<label class="col-sm-10 col-form-label">
<label class="col-sm-3 col-form-label">备注:</label>
<label class="col-sm-9 col-form-label">
<textarea placeholder="可填,请填写备注" class="form-control"
v-model="owePayFeeOrderInfo.remark">
</textarea>

View File

@ -13,7 +13,9 @@
payObjType: '',
roomName: '',
receiptIds: '',
remark: ''
remark: '',
primeRate: '',
primeRates: []
}
},
watch: {
@ -36,6 +38,10 @@
$that.owePayFeeOrderInfo.payObjType = _payObjType;
$that.owePayFeeOrderInfo.roomName = vc.getParam('roomName');
$that._loadOweFees();
//与字典表支付方式关联
vc.getDict('pay_fee_detail', "prime_rate", function (_data) {
vc.component.owePayFeeOrderInfo.primeRates = _data;
});
},
_initEvent: function () {
@ -85,6 +91,10 @@
_doPayFee: function () {
let _fees = [];
let _printFees = [];
if($that.owePayFeeOrderInfo.primeRate == ''){
vc.toast('请选择支付方式');
return ;
}
$that.owePayFeeOrderInfo.selectPayFeeIds.forEach(function (_item) {
$that.owePayFeeOrderInfo.oweFees.forEach(function (_oweFeeItem) {
if (_item == _oweFeeItem.feeId) {
@ -92,7 +102,8 @@
feeId: _item,
startTime: _oweFeeItem.endTime,
endTime: _oweFeeItem.deadlineTime,
receivedAmount: _oweFeeItem.feePrice
receivedAmount: _oweFeeItem.feePrice,
primeRate:$that.owePayFeeOrderInfo.primeRate
});
_printFees.push({
feeId: _item,
@ -100,7 +111,8 @@
additionalAmount: _oweFeeItem.additionalAmount,
feeName: _oweFeeItem.feeName,
amount: _oweFeeItem.feePrice,
roomName: $that.owePayFeeOrderInfo.roomName
roomName: $that.owePayFeeOrderInfo.roomName,
primeRate:$that.owePayFeeOrderInfo.primeRate
});
}
})