mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
df9cead65b
commit
3ab250e781
8
app.js
8
app.js
@ -34,10 +34,10 @@ let opts = {
|
||||
//app.use('/callComponent',proxy('https://app.demo.winqi.cn/',opts));
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012/',opts));
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
//app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
//app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||
app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
app.use('/callComponent',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
app.use('/app',proxy('http://api.demo.winqi.cn:8012',opts));
|
||||
//app.use('/callComponent',proxy('http://192.168.1.16:8012',opts));
|
||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
|
||||
//app.listen(3000);
|
||||
app.use(express.json());
|
||||
|
||||
@ -60,6 +60,7 @@
|
||||
},
|
||||
_payFee:function(_fee){
|
||||
_fee.roomName=$that.listRoomCreateFeeInfo.roomName;
|
||||
_fee.builtUpArea=$that.listRoomCreateFeeInfo.builtUpArea;
|
||||
vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?'+vc.objToGetParam(_fee));
|
||||
},
|
||||
_payFeeHis:function(_fee){
|
||||
|
||||
@ -38,15 +38,23 @@
|
||||
<div class="form-group row" v-if="payFeeOrderInfo.feeFlag != '2006012'">
|
||||
<label class="col-sm-2 col-form-label">缴费周期</label>
|
||||
<div class="col-sm-6">
|
||||
<select class="custom-select" v-model="payFeeOrderInfo.cycles"
|
||||
@change="_changeMonth(payFeeOrderInfo.cycles)">
|
||||
<option disabled value="">必填,请选择缴费周期</option>
|
||||
<select class="custom-select" v-model="payFeeOrderInfo.tempCycles"
|
||||
@change="_changeMonth(payFeeOrderInfo.tempCycles)">
|
||||
<option value="">请选择缴费周期</option>
|
||||
<option v-for="item in payFeeOrderInfo.paymentCycles" :value="item">{{item}}个月
|
||||
</option>
|
||||
<option value="-101">自定义</option>
|
||||
<option value="-102">自定义周期</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row" v-if="payFeeOrderInfo.tempCycles == '-102'">
|
||||
<label class="col-sm-2 col-form-label">实际周期</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text"
|
||||
placeholder="请输入实际周期" v-model="payFeeOrderInfo.cycles" oninput ="value=value.replace(/[^\d]/g,'')" v-on:change="changeCycle(payFeeOrderInfo.cycles)"
|
||||
class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label" style="padding-right:0px;">备注</label>
|
||||
<div class="col-sm-8" style="padding-left:5px;">
|
||||
@ -56,11 +64,35 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4" style="padding-left: 30px;">
|
||||
<div class="row" v-if="payFeeOrderInfo.builtUpArea">
|
||||
<label class="col-sm-3 col-form-label"
|
||||
>面积:</label>
|
||||
<label class="col-sm-8 col-form-label"
|
||||
>{{payFeeOrderInfo.builtUpArea}}</label>
|
||||
</div>
|
||||
<div class="row" v-if="payFeeOrderInfo.builtUpArea">
|
||||
<label class="col-sm-3 col-form-label"
|
||||
>单价:</label>
|
||||
<label class="col-sm-8 col-form-label"
|
||||
>{{payFeeOrderInfo.squarePrice}}</label>
|
||||
</div>
|
||||
<div class="row" v-if="payFeeOrderInfo.builtUpArea">
|
||||
<label class="col-sm-3 col-form-label"
|
||||
>附加费:</label>
|
||||
<label class="col-sm-8 col-form-label"
|
||||
>{{payFeeOrderInfo.additionalAmount}}</label>
|
||||
</div>
|
||||
<div class="row" v-else>
|
||||
<label class="col-sm-3 col-form-label"
|
||||
>固定费:</label>
|
||||
<label class="col-sm-8 col-form-label"
|
||||
>{{payFeeOrderInfo.additionalAmount}}</label>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-sm-3 col-form-label"
|
||||
style="line-height: 50px;padding-right:0px;">应收款:</label>
|
||||
<label class="col-sm-8 col-form-label"
|
||||
style="font-size: 30px;color: red;padding-left:0px;">¥{{payFeeOrderInfo.totalFeePrice}}</label>
|
||||
style="font-size: 30px;color: red;padding-left:0px;">¥{{_mathCeil(payFeeOrderInfo.totalFeePrice)}}</label>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<label class="col-sm-3 col-form-label" style="padding-right:0px;">支付方式:</label>
|
||||
|
||||
@ -10,15 +10,19 @@
|
||||
endTime: '',
|
||||
feeFlag: '',
|
||||
feePrice: 0.00,
|
||||
cycles: '1',
|
||||
tempCycles: '',
|
||||
cycles: '',
|
||||
paymentCycles: [],
|
||||
totalFeePrice: 0.00,
|
||||
receivedAmount: '',
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
roomName:'',
|
||||
squarePrice:'',
|
||||
additionalAmount:'',
|
||||
remark:''
|
||||
roomName: '',
|
||||
squarePrice: '',
|
||||
additionalAmount: '',
|
||||
remark: '',
|
||||
builtUpArea: 0.0,
|
||||
squarePrice: 0.0,
|
||||
additionalAmount: 0.0
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -32,6 +36,11 @@
|
||||
$that.payFeeOrderInfo.roomName = vc.getParam('roomName');
|
||||
$that.payFeeOrderInfo.squarePrice = vc.getParam('squarePrice');
|
||||
$that.payFeeOrderInfo.additionalAmount = vc.getParam('additionalAmount');
|
||||
$that.payFeeOrderInfo.builtUpArea = vc.getParam('builtUpArea');
|
||||
$that.payFeeOrderInfo.squarePrice = vc.getParam('squarePrice');
|
||||
$that.payFeeOrderInfo.additionalAmount = vc.getParam('additionalAmount');
|
||||
|
||||
|
||||
$that.payFeeOrderInfo.paymentCycles = [];
|
||||
for (let _index = 1; _index < 7; _index++) {
|
||||
$that.payFeeOrderInfo.paymentCycles.push(_index * vc.getParam('paymentCycle'))
|
||||
@ -81,17 +90,26 @@
|
||||
});
|
||||
},
|
||||
_payFee: function (_page, _row) {
|
||||
if ($that.payFeeOrderInfo.tempCycles != "" && $that.payFeeOrderInfo.tempCycles != '-102') {
|
||||
$that.payFeeOrderInfo.cycles = $that.payFeeOrderInfo.tempCycles;
|
||||
}
|
||||
if ($that.payFeeOrderInfo.cycles == "") {
|
||||
$that.payFeeOrderInfo.cycles = '-101';
|
||||
}
|
||||
if (!vc.component.payFeeValidate()) {
|
||||
vc.toast(vc.validate.errInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
let _printFees = [];
|
||||
_printFees.push({
|
||||
feeId: $that.payFeeOrderInfo.feeId,
|
||||
squarePrice:$that.payFeeOrderInfo.squarePrice,
|
||||
squarePrice: $that.payFeeOrderInfo.squarePrice,
|
||||
additionalAmount: $that.payFeeOrderInfo.additionalAmount,
|
||||
feeName: $that.payFeeOrderInfo.feeName,
|
||||
amount: $that.payFeeOrderInfo.feePrice
|
||||
amount: $that.payFeeOrderInfo.receivedAmount
|
||||
});
|
||||
|
||||
vc.http.post(
|
||||
@ -105,11 +123,11 @@
|
||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||
if (res.status == 200) {
|
||||
let _feeInfo = {
|
||||
totalAmount: $that.payFeeOrderInfo.feePrice,
|
||||
totalAmount: $that.payFeeOrderInfo.receivedAmount,
|
||||
fees: _printFees
|
||||
}
|
||||
|
||||
vc.saveData('_feeInfo',_feeInfo);
|
||||
vc.saveData('_feeInfo', _feeInfo);
|
||||
//关闭model
|
||||
$("#payFeeResult").modal({
|
||||
backdrop: "static",//点击空白处不关闭对话框
|
||||
@ -125,11 +143,23 @@
|
||||
});
|
||||
},
|
||||
_changeMonth: function (_cycles) {
|
||||
if ('-101' == _cycles) {
|
||||
if ('-102' == _cycles) {
|
||||
vc.component.payFeeOrderInfo.totalFeePrice = 0.00;
|
||||
vc.component.payFeeOrderInfo.receivedAmount = '';
|
||||
return;
|
||||
}
|
||||
let _newCycles = _cycles;
|
||||
|
||||
if (_cycles == '') {
|
||||
_newCycles = $that.payFeeOrderInfo.paymentCycles[0];
|
||||
}
|
||||
vc.component.payFeeOrderInfo.totalFeePrice = Math.floor(parseFloat(_newCycles) * parseFloat(vc.component.payFeeOrderInfo.feePrice) * 100) / 100;
|
||||
vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;
|
||||
},
|
||||
changeCycle:function(_cycles){
|
||||
if(_cycles == ''){
|
||||
return ;
|
||||
}
|
||||
vc.component.payFeeOrderInfo.totalFeePrice = Math.floor(parseFloat(_cycles) * parseFloat(vc.component.payFeeOrderInfo.feePrice) * 100) / 100;
|
||||
vc.component.payFeeOrderInfo.receivedAmount = vc.component.payFeeOrderInfo.totalFeePrice;
|
||||
},
|
||||
@ -140,6 +170,9 @@
|
||||
_printAndBack: function () {
|
||||
//$('#payFeeResult').modal("hide");
|
||||
window.open("/print.html#/pages/property/printPayFee?roomName=" + $that.payFeeOrderInfo.roomName)
|
||||
},
|
||||
_mathCeil:function(_price){
|
||||
return Math.ceil(_price);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user