This commit is contained in:
颓废太子 2021-11-24 17:49:41 +08:00
commit 3d146fe295
3 changed files with 88 additions and 87 deletions

View File

@ -9,12 +9,10 @@
<div class="col-lg-4 text-right">
</div>
<div class="col-lg-6 text-right" v-if="simplifyCarFeeInfo.carId">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openSimplifyCarAddMeterWaterModal()">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_openSimplifyCarAddMeterWaterModal()">
水电抄表
</button>
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px"
v-on:click="_openSimplifyCarCreateFeeAddModal()">
<button type="button" class="btn btn-primary btn-sm" style="margin-left:10px" v-on:click="_openSimplifyCarCreateFeeAddModal()">
创建费用
</button>
</div>
@ -22,62 +20,56 @@
<div>
<table class="footable table table-stripped toggle-arrow-tiny" style="margin-top:10px" data-page-size="10">
<thead>
<tr>
<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>
</tr>
<tr>
<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>
</tr>
</thead>
<tbody>
<tr v-for="fee in simplifyCarFeeInfo.fees">
<td class="text-center">{{fee.feeName}}</td>
<td class="text-center">{{fee.feeFlagName}}</td>
<td class="text-center">{{fee.feeTypeCdName}}</td>
<td class="text-center">{{fee.amountOwed}}</td>
<td class="text-center">{{fee.startTime}}</td>
<td class="text-center">{{_getEndTime(fee)}}</td>
<td class="text-center">{{_getDeadlineTime(fee)}}</td>
<td class="text-center" v-if="fee.feeTypeCd == '888800010015' || fee.feeTypeCd == '888800010016' "
:title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>上期度数:{{fee.preDegrees}}</div>
<div>本期度数:{{fee.curDegrees}}</div>
<div>单价:{{fee.squarePrice}}</div>
<div>附加费:{{fee.additionalAmount}}</div>
</td>
<td class="text-center" width="150" v-else-if="fee.feeTypeCd == '888800010017'"
:title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>算法:{{_getAttrValue(fee.feeAttrs,'390005')}}</div>
<div>用量:{{_getAttrValue(fee.feeAttrs,'390003')}}</div>
</td>
<td class="text-center" v-else :title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>单价:{{fee.squarePrice}}</div>
<div>固定费:{{fee.additionalAmount}}</div>
</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')"
v-on:click="_simplifyCarPayFee(fee)">缴费
<tr v-for="fee in simplifyCarFeeInfo.fees">
<td class="text-center">{{fee.feeName}}</td>
<td class="text-center">{{fee.feeFlagName}}</td>
<td class="text-center">{{fee.feeTypeCdName}}</td>
<td class="text-center">{{fee.amountOwed}}</td>
<td class="text-center">{{fee.startTime}}</td>
<td class="text-center">{{_getEndTime(fee)}}</td>
<td class="text-center">{{_getDeadlineTime(fee)}}</td>
<td class="text-center" v-if="fee.feeTypeCd == '888800010015' || fee.feeTypeCd == '888800010016' " :title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>上期度数:{{fee.preDegrees}}</div>
<div>本期度数:{{fee.curDegrees}}</div>
<div>单价:{{fee.squarePrice}}</div>
<div>附加费:{{fee.additionalAmount}}</div>
</td>
<td class="text-center" width="150" v-else-if="fee.feeTypeCd == '888800010017'" :title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>算法:{{_getAttrValue(fee.feeAttrs,'390005')}}</div>
<div>用量:{{_getAttrValue(fee.feeAttrs,'390003')}}</div>
</td>
<td class="text-center" v-else :title="_simplifyCarGetFeeOwnerInfo(fee.feeAttrs)">
<div>单价:{{fee.squarePrice}}</div>
<div>固定费:{{fee.additionalAmount}}</div>
</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')" v-on:click="_simplifyCarPayFee(fee)">缴费
</button>
<button class="btn btn-link btn-xs" v-on:click="_simplifyCarPayFeeHis(fee)">缴费历史
<button class="btn btn-link btn-xs" v-on:click="_simplifyCarPayFeeHis(fee)">缴费历史
</button>
<button class="btn btn-link btn-xs"
v-if="fee.isDefault == 'F' && vc.hasPrivilege('502020090604200029')"
v-on:click="_simplifyCarDeleteFee(fee)">取消费用
<button class="btn btn-link btn-xs" v-if="fee.isDefault == 'F' && vc.hasPrivilege('502020090604200029')" v-on:click="_simplifyCarDeleteFee(fee)">取消费用
</button>
<button class="btn btn-link btn-xs"
v-if="fee.state != '2009001' && vc.hasPrivilege('502020090427190001')"
v-on:click="_simplifyCarEditFee(fee)">费用变更
<button class="btn btn-link btn-xs" v-if="vc.hasPrivilege('502021070488970005')" v-on:click="_simplifyCarFinishFee(fee)">手工结束
</button>
</td>
</tr>
<button class="btn btn-link btn-xs" v-if="fee.state != '2009001' && vc.hasPrivilege('502020090427190001')" v-on:click="_simplifyCarEditFee(fee)">费用变更
</button>
</td>
</tr>
</tbody>
</table>
<div class="row">
@ -92,5 +84,5 @@
</div>
</div>
</div>
</div>

View File

@ -1,4 +1,4 @@
(function (vc) {
(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
@ -18,12 +18,12 @@
totalAmount: 0.0
}
},
_initMethod: function () {
_initMethod: function() {
},
_initEvent: function () {
_initEvent: function() {
//切换 至费用页面
vc.on('simplifyCarFee', 'switch', function (_param) {
vc.on('simplifyCarFee', 'switch', function(_param) {
if (_param.ownerId == '') {
return;
@ -39,16 +39,16 @@
})
});
vc.on('simplifyCarFee', 'notify', function () {
vc.on('simplifyCarFee', 'notify', function() {
$that._listSimplifyCarFee(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyCarFee', 'paginationPlus', 'page_event',
function (_currentPage) {
function(_currentPage) {
$that._listSimplifyCarFee(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listSimplifyCarFee: function (_page, _row) {
_listSimplifyCarFee: function(_page, _row) {
var param = {
params: {
page: _page,
@ -57,14 +57,14 @@
payerObjId: vc.component.simplifyCarFeeInfo.carId
}
};
if(!vc.component.simplifyCarFeeInfo.carId){
if (!vc.component.simplifyCarFeeInfo.carId) {
return;
}
//发送get请求
vc.http.get('listParkingSpaceFee',
'list',
param,
function (json) {
function(json) {
let _feeConfigInfo = JSON.parse(json);
vc.component.simplifyCarFeeInfo.total = _feeConfigInfo.total;
vc.component.simplifyCarFeeInfo.records = _feeConfigInfo.records;
@ -79,35 +79,42 @@
total: _feeConfigInfo.records,
currentPage: _page
});
}, function () {
},
function() {
console.log('请求失败处理');
}
);
},
_simplifyCarPayFee: function (_fee) {
_simplifyCarPayFee: function(_fee) {
_fee.roomName = vc.component.simplifyCarFeeInfo.carNum;
//vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?' + vc.objToGetParam(_fee));
vc.jumpToPage('/admin.html#/pages/property/payFeeOrder?feeId=' + _fee.feeId);
},
_simplifyCarPayFeeHis: function (_fee) {
_simplifyCarPayFeeHis: function(_fee) {
vc.jumpToPage('/admin.html#/pages/property/propertyFee?' + vc.objToGetParam(_fee));
},
_simplifyCarEditFee: function (_fee) {
_simplifyCarEditFee: function(_fee) {
vc.emit('editFee', 'openEditFeeModal', _fee);
},
_simplifyCarDeleteFee: function (_fee) {
_simplifyCarDeleteFee: function(_fee) {
vc.emit('deleteFee', 'openDeleteFeeModal', {
communityId: vc.getCurrentCommunity().communityId,
feeId: _fee.feeId
});
},
_openSimplifyCarCreateFeeAddModal: function () {
_openSimplifyCarCreateFeeAddModal: function() {
vc.emit('carCreateFeeAdd', 'openCarCreateFeeAddModal', {
isMore: false,
car: $that.simplifyCarFeeInfo
});
},
_openSimplifyCarAddMeterWaterModal: function () {
_simplifyCarFinishFee: function(_fee) {
vc.emit('finishFee', 'openFinishFeeModal', {
communityId: vc.getCurrentCommunity().communityId,
feeId: _fee.feeId
});
},
_openSimplifyCarAddMeterWaterModal: function() {
vc.emit('addMeterWater', 'openAddMeterWaterModal', {
roomId: $that.simplifyCarFeeInfo.carId,
@ -116,7 +123,7 @@
objType: '6666'
});
},
_getSimplifyCarDeadlineTime: function (_fee) {
_getSimplifyCarDeadlineTime: function(_fee) {
if (_fee.amountOwed == 0 && _fee.endTime == _fee.deadlineTime) {
return "-";
@ -128,26 +135,26 @@
return _fee.deadlineTime;
},
_getSimplifyCarEndTime: function (_fee) {
_getSimplifyCarEndTime: function(_fee) {
if (_fee.state == '2009001') {
return "-";
}
return _fee.endTime;
},
_listOwnerCar: function () {
_listOwnerCar: function() {
return new Promise((resolve, reject) => {
let param = {
params: {
page: 1,
row: 50,
ownerId: $that.simplifyCarFeeInfo.ownerId,
communityId: vc.getCurrentCommunity().communityId
params: {
page: 1,
row: 50,
ownerId: $that.simplifyCarFeeInfo.ownerId,
communityId: vc.getCurrentCommunity().communityId
}
}
}
//发送get请求
//发送get请求
vc.http.apiGet('owner.queryOwnerCars',
param,
function (json, res) {
function(json, res) {
let _json = JSON.parse(json);
$that.simplifyCarFeeInfo.ownerCars = _json.data;
@ -161,7 +168,8 @@
return;
}
reject("没有车位");
}, function (errInfo, error) {
},
function(errInfo, error) {
reject(errInfo);
}
);
@ -170,7 +178,7 @@
},
changeSimplifyCar: function () {
changeSimplifyCar: function() {
let _car = null;
$that.simplifyCarFeeInfo.ownerCars.forEach(item => {
if (item.carId == $that.simplifyCarFeeInfo.carId) {
@ -186,7 +194,7 @@
$that.simplifyCarFeeInfo.parkingName = _car.areaNum + '停车场' + _car.num + '停车位';
$that._listSimplifyCarFee(DEFAULT_PAGE, DEFAULT_ROWS);
},
clearSimplifyCarFeeInfo: function () {
clearSimplifyCarFeeInfo: function() {
$that.simplifyCarFeeInfo = {
fees: [],
ownerCars: [],
@ -202,7 +210,7 @@
totalAmount: 0.0
}
},
_simplifyCarGetFeeOwnerInfo: function (attrs) {
_simplifyCarGetFeeOwnerInfo: function(attrs) {
let ownerName = $that._getAttrValue(attrs, '390008');
let ownerLink = $that._getAttrValue(attrs, '390009');
@ -214,4 +222,4 @@
}
});
})(window.vc);
})(window.vc);

View File

@ -212,6 +212,7 @@
//关闭model
$("#doPayFeeModal").modal('hide')
$that.payFeeOrderInfo.showEndTime = '';
$that.payFeeOrderInfo.authCode = ''
},
_qrCodePayFee: function() {
let _printFees = [];