mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
0b2e95efdd
commit
38428651e5
8
app.js
8
app.js
@ -36,12 +36,12 @@ let 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://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://192.168.1.16:8012',opts));
|
||||
//app.use('/app',proxy('http://192.168.1.16:8012',opts));
|
||||
|
||||
//app.listen(3000);
|
||||
app.use(express.json());
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
<button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
<!-- <button type="button" class="btn btn-link btn-sm" style="margin-right:10px;"
|
||||
v-on:click="_moreCondition()">{{payFeeAuditManageInfo.moreCondition == true?'隐藏':'更多'}}
|
||||
</button>
|
||||
</button> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
@ -87,7 +87,11 @@
|
||||
<td class="text-center">{{payFee.receivedAmount}}</td>
|
||||
<td class="text-center">{{payFee.userName}}</td>
|
||||
<td class="text-center">{{payFee.createTime}}</td>
|
||||
<td class="text-center">{{_getState(payFee.state)}}</td>
|
||||
<td class="text-center">
|
||||
<span class="badge badge-success" v-if="payFee.state == '2020'">{{_getState(payFee.state)}}</span>
|
||||
<span class="badge badge-danger" v-else-if="payFee.state == '3030'">{{_getState(payFee.state)}}</span>
|
||||
<span class="badge badge-info" v-else>{{_getState(payFee.state)}}</span>
|
||||
</td>
|
||||
<td class="text-center">{{payFee.message}}</td>
|
||||
<td class="text-center">{{payFee.remark}}</td>
|
||||
<td class="text-right">
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
userCode:'',
|
||||
state:''
|
||||
state:'1010'
|
||||
},
|
||||
curPayFee:{}
|
||||
}
|
||||
@ -33,7 +33,7 @@
|
||||
},
|
||||
_initEvent: function () {
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listpayFees(_currentPage, DEFAULT_ROWS);
|
||||
vc.component._listPayFees(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
|
||||
vc.on('payFeeAuditManage','audtiNotify',function(_param){
|
||||
|
||||
@ -104,7 +104,7 @@
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-8">
|
||||
<button type="button" class="btn btn-warning btn-lg btn-block"
|
||||
@click="_payFee()">提交收费</button>
|
||||
@click="_openPayFee()">提交收费</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -133,4 +133,38 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="doPayFeeModal" 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">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" v-if="payFeeOrderInfo.feeFlag != '2006012' && payFeeOrderInfo.showEndTime != ''">
|
||||
<label class="col-sm-3 col-form-label" >缴费时间段:</label>
|
||||
<label class="col-sm-8 col-form-label">{{payFeeOrderInfo.endTime}}至{{payFeeOrderInfo.showEndTime}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="col-sm-3 col-form-label">应收金额:</label>
|
||||
<label class="col-sm-8 col-form-label">{{_mathCeil(payFeeOrderInfo.totalFeePrice)}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="col-sm-3 col-form-label">实收金额:</label>
|
||||
<label class="col-sm-8 col-form-label">{{payFeeOrderInfo.receivedAmount}}</label>
|
||||
</div>
|
||||
<div class="row" >
|
||||
<label class="col-sm-3 col-form-label">备注:</label>
|
||||
<label class="col-sm-8 col-form-label">{{payFeeOrderInfo.remark}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" @click="_closeDoPayFeeModal()">关闭</button>
|
||||
<button type="button" class="btn btn-primary" @click="_payFee()">确定收费</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -18,12 +18,12 @@
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
roomName: '',
|
||||
squarePrice: '',
|
||||
additionalAmount: '',
|
||||
remark: '',
|
||||
builtUpArea: 0.0,
|
||||
squarePrice: 0.0,
|
||||
additionalAmount: 0.0,
|
||||
receiptId:''
|
||||
receiptId: '',
|
||||
showEndTime:''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -90,11 +90,11 @@
|
||||
]
|
||||
});
|
||||
},
|
||||
_payFee: function (_page, _row) {
|
||||
_openPayFee: function () {
|
||||
if ($that.payFeeOrderInfo.tempCycles != "" && $that.payFeeOrderInfo.tempCycles != '-102') {
|
||||
$that.payFeeOrderInfo.cycles = $that.payFeeOrderInfo.tempCycles;
|
||||
}
|
||||
if($that.payFeeOrderInfo.feeFlag == '2006012'){
|
||||
if ($that.payFeeOrderInfo.feeFlag == '2006012') {
|
||||
$that.payFeeOrderInfo.cycles = '1';
|
||||
}
|
||||
if ($that.payFeeOrderInfo.cycles == "") {
|
||||
@ -105,8 +105,22 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!(/(^[1-9]\d*$)/.test($that.payFeeOrderInfo.cycles))) {
|
||||
$that.payFeeOrderInfo.showEndTime = '';
|
||||
}else{
|
||||
console.log('cycle',$that.payFeeOrderInfo.cycles)
|
||||
$that.payFeeOrderInfo.showEndTime = vc.addMonth(new Date($that.payFeeOrderInfo.endTime),parseInt($that.payFeeOrderInfo.cycles));
|
||||
}
|
||||
//关闭model
|
||||
$("#doPayFeeModal").modal('show');
|
||||
},
|
||||
_closeDoPayFeeModal: function () {
|
||||
//关闭model
|
||||
$("#doPayFeeModal").modal('hide')
|
||||
$that.payFeeOrderInfo.showEndTime = '';
|
||||
},
|
||||
_payFee: function (_page, _row) {
|
||||
$that._closeDoPayFeeModal();
|
||||
let _printFees = [];
|
||||
_printFees.push({
|
||||
feeId: $that.payFeeOrderInfo.feeId,
|
||||
@ -157,16 +171,16 @@
|
||||
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 ;
|
||||
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;
|
||||
@ -175,14 +189,14 @@
|
||||
$('#payFeeResult').modal("hide");
|
||||
vc.getBack();
|
||||
},
|
||||
_goBack:function(){
|
||||
_goBack: function () {
|
||||
vc.goBack();
|
||||
},
|
||||
_printAndBack: function () {
|
||||
//$('#payFeeResult').modal("hide");
|
||||
window.open("/print.html#/pages/property/printPayFee?receiptId=" + $that.payFeeOrderInfo.receiptId)
|
||||
},
|
||||
_mathCeil:function(_price){
|
||||
_mathCeil: function (_price) {
|
||||
return Math.ceil(_price);
|
||||
}
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<th data-hide="phone">缴费时间</th>
|
||||
<th data-hide="phone">缴费起始时间</th>
|
||||
<th data-hide="phone">缴费结束时间</th>
|
||||
<th data-hide="phone">退费标识</th>
|
||||
<th data-hide="phone">状态</th>
|
||||
<th data-hide="phone">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@ -82,7 +82,7 @@
|
||||
{{feeDetail.stateName}}
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group" v-if="!feeDetail.state || feeDetail.state== 1200">
|
||||
<div class="btn-group" v-if="feeDetail.state=='1400' || feeDetail.state== 1200">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_openRefundModel(feeDetail)">申请退费
|
||||
</button>
|
||||
|
||||
@ -965,7 +965,7 @@
|
||||
Vue.http.headers.common['REQ-TIME'] = vcFramework.getDateYYYYMMDDHHMISS();
|
||||
Vue.http.headers.common['SIGN'] = '';
|
||||
if (api.indexOf('/') >= 0) {
|
||||
_api = '/app' + api;
|
||||
_api = '/app' + api;
|
||||
} else {
|
||||
_api = '/callComponent/' + api;
|
||||
}
|
||||
@ -1029,7 +1029,7 @@
|
||||
Vue.http.headers.common['USER-ID'] = '-1';
|
||||
|
||||
if (api.indexOf('/') >= 0) {
|
||||
_api = '/app' + api;
|
||||
_api = '/app' + api;
|
||||
} else {
|
||||
_api = '/callComponent/' + api;
|
||||
}
|
||||
@ -1599,6 +1599,40 @@
|
||||
});
|
||||
}
|
||||
|
||||
daysInMonth = function (year, month) {
|
||||
if (month == 1) {
|
||||
if (year % 4 == 0 && year % 100 != 0)
|
||||
return 29;
|
||||
else
|
||||
return 28;
|
||||
} else if ((month <= 6 && month % 2 == 0) || (month = 6 && month % 2 == 1))
|
||||
return 31;
|
||||
else
|
||||
return 30;
|
||||
}
|
||||
|
||||
vcFramework.addMonth = function (_date, _month) {
|
||||
let y = _date.getFullYear();
|
||||
let m = _date.getMonth();
|
||||
let nextY = y;
|
||||
let nextM = m;
|
||||
//如果当前月+要加上的月>11 这里之所以用11是因为 js的月份从0开始
|
||||
if ((m + _month) > 11) {
|
||||
nextY = y + 1;
|
||||
nextM = parseInt(m + _month) - 12;
|
||||
} else {
|
||||
nextM = m + _month
|
||||
}
|
||||
let daysInNextMonth = daysInMonth(nextY, nextM);
|
||||
let day = _date.getDate();
|
||||
if (day > daysInNextMonth) {
|
||||
day = daysInNextMonth;
|
||||
}
|
||||
let _newDate = new Date(nextY, nextM, day)
|
||||
return _newDate.getFullYear() + '-' + (_newDate.getMonth() + 1) + '-' + _newDate.getDay() + " " + _date.getHours() + ":" + _date.getMinutes() + ":" + _date.getSeconds();
|
||||
};
|
||||
|
||||
|
||||
|
||||
})(window.vcFramework);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user