优化不懂

This commit is contained in:
java110 2023-09-18 16:41:16 +08:00
parent 3251f856d3
commit c02e03db7a
5 changed files with 168 additions and 94 deletions

View File

@ -9,23 +9,20 @@
<th class="text-center">
<vc:i18n name="收费对象" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<span>
<vc:i18n name="周期(单位:月)" namespace="simplifyHisFee"></vc:i18n>
</span>
<th class="text-center">
<vc:i18n name="收据编号" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<span>
<vc:i18n name="应收/实收(单位:元)" namespace="simplifyHisFee"></vc:i18n>
</span>
<vc:i18n name="周期(单位:月)" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="应收/实收(单位:元)" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="缴费方式" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<span>
<vc:i18n name="缴费起始段" namespace="simplifyHisFee"></vc:i18n>
</span>
<vc:i18n name="缴费起始段" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="缴费时间" namespace="simplifyHisFee"></vc:i18n>
@ -34,9 +31,7 @@
<vc:i18n name="收银员" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<span>
<vc:i18n name="状态" namespace="simplifyHisFee"></vc:i18n>
</span>
<vc:i18n name="状态" namespace="simplifyHisFee"></vc:i18n>
</th>
<th data-hide="phone" class="text-center">
<vc:i18n name="备注" namespace="simplifyHisFee"></vc:i18n>
@ -54,6 +49,17 @@
<td class="text-center">
{{feeDetail.payerObjName}}
</td>
<td class="text-center" v-if="feeDetail.receiptCode">
{{feeDetail.receiptCode}}
</td>
<td class="text-center" v-else>
<div v-if="feeDetail.state == '1400'">
<a href="javascript:void(0)" @click="_openGeneratorReceiptCode(feeDetail)">手工生成</a>
</div>
<div v-else>
-
</div>
</td>
<td class="text-center">
{{feeDetail.cycles}}
</td>
@ -110,6 +116,46 @@
</tr>
</table>
<vc:create namespace="simplifyHisFee" path="frame/paginationPlus"></vc:create>
</div>
<div id="generatorReceiptModel" class="modal fade" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-body">
<h3 class="m-t-none m-b ">
<vc:i18n name="生成收据" namespace="simplifyHisFee"></vc:i18n>
</h3>
<div class="ibox-content">
<div>
<div class="form-group row">
<label class="col-sm-2 col-form-label">
<vc:i18n name="收据编号" namespace="simplifyHisFee"></vc:i18n>
</label>
<div class="col-sm-4">
<select class="custom-select" v-model="simplifyHisFeeInfo.receiptType">
<option selected disabled value="">
{{vc.i18n('必填,请选择收据编号生成方式','simplifyHisFee')}}
</option>
<option value="Y">{{vc.i18n('系统生成','simplifyHisFee')}}</option>
<option value="N">{{vc.i18n('自定义','simplifyHisFee')}}</option>
</select>
</div>
<div class="col-sm-4" v-if="simplifyHisFeeInfo.receiptType == 'N'">
<input v-model="simplifyHisFeeInfo.receiptCode" type="text" :placeholder="vc.i18n('必填,请填写收据编号','simplifyHisFee')" class="form-control">
</div>
</div>
<div class="ibox-content">
<button class="btn btn-primary float-right" type="button" v-on:click="_generatorReceiptCode()">
<i class="fa fa-check"></i>&nbsp;生成
</button>
<button type="button" class="btn btn-warning float-right" style="margin-right:20px;" data-dismiss="modal">
<i class="fa fa-times"></i>&nbsp;取消
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -1,7 +1,7 @@
/**
入驻小区
**/
(function (vc) {
(function(vc) {
var DEFAULT_PAGE = 1;
var DEFAULT_ROWS = 10;
vc.extends({
@ -10,14 +10,16 @@
total: 0,
records: 1,
feeDetails: [],
ownerId: ''
ownerId: '',
feeDetail: {},
receiptType: 'Y',
receiptCode: ''
}
},
_initMethod: function () {
},
_initEvent: function () {
_initMethod: function() {},
_initEvent: function() {
//切换 至费用页面
vc.on('simplifyHisFee', 'switch', function (_param) {
vc.on('simplifyHisFee', 'switch', function(_param) {
$that.clearSimplifyHisFeeInfo();
if (_param.ownerId == '') {
return;
@ -26,16 +28,16 @@
$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyHisFee', 'notify', function () {
vc.on('simplifyHisFee', 'notify', function() {
$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
});
vc.on('simplifyHisFee', 'paginationPlus', 'page_event',
function (_currentPage) {
function(_currentPage) {
vc.component._listSimplifyFeeDetails(_currentPage, DEFAULT_ROWS);
});
},
methods: {
_listSimplifyFeeDetails: function (_page, _row) {
_listSimplifyFeeDetails: function(_page, _row) {
let param = {
params: {
page: _page,
@ -48,7 +50,7 @@
//发送get请求
vc.http.apiGet('/fee.queryFeeDetail',
param,
function (json) {
function(json) {
let _feeConfigInfo = JSON.parse(json);
vc.component.simplifyHisFeeInfo.total = _feeConfigInfo.total;
vc.component.simplifyHisFeeInfo.records = _feeConfigInfo.records;
@ -59,22 +61,54 @@
currentPage: _page
});
},
function () {
function() {
console.log('请求失败处理');
}
);
},
clearSimplifyHisFeeInfo: function () {
clearSimplifyHisFeeInfo: function() {
$that.simplifyHisFeeInfo = {
total: 0,
records: 1,
feeDetails: [],
ownerId: ''
ownerId: '',
feeDetail: {},
receiptType: 'Y',
receiptCode: ''
}
},
_toRefundFee: function (_detail) {
_toRefundFee: function(_detail) {
vc.jumpToPage('/#/pages/property/propertyFee?feeId=' + _detail.feeId);
},
_openGeneratorReceiptCode: function(_detail) {
$that.simplifyHisFeeInfo.feeDetail = _detail;
$('#generatorReceiptModel').modal('show');
},
_generatorReceiptCode: function() {
let _data = {
detailId: $that.simplifyHisFeeInfo.feeDetail.detailId,
communityId: vc.getCurrentCommunity().communityId,
receiptCode: $that.simplifyHisFeeInfo.receiptCode
};
vc.http.apiPost('/receipt.generatorReceipt',
JSON.stringify(_data), {
emulateJSON: true
},
function(json, res) {
let _json = JSON.parse(json);
vc.toast(_json.msg);
if (_json.code != '0') {
return;
}
$that._listSimplifyFeeDetails(DEFAULT_PAGE, DEFAULT_ROWS);
$('#generatorReceiptModel').modal('hide');
},
function(errInfo, error) {
console.log('请求失败处理');
vc.toast(errInfo);
});
}
}
});

View File

View File

View File

@ -12,14 +12,12 @@
<div class="row">
<div class="col-sm-3">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入停车场ID','parkingAreaManage')"
v-model="parkingAreaManageInfo.conditions.paId" class=" form-control">
<input type="text" :placeholder="vc.i18n('请输入停车场ID','parkingAreaManage')" v-model="parkingAreaManageInfo.conditions.paId" class=" form-control">
</div>
</div>
<div class="col-sm-4">
<div class="form-group">
<input type="text" :placeholder="vc.i18n('请输入停车场编号','parkingAreaManage')"
v-model="parkingAreaManageInfo.conditions.num" class=" form-control">
<input type="text" :placeholder="vc.i18n('请输入停车场编号','parkingAreaManage')" v-model="parkingAreaManageInfo.conditions.num" class=" form-control">
</div>
</div>
<div class="col-sm-3">
@ -52,8 +50,7 @@
<span><vc:i18n name="停车场信息" namespace="parkingAreaManage"></vc:i18n></span>
</h5>
<div class="ibox-tools" style="top:10px;">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddParkingAreaModal()"
v-if="vc.hasPrivilege('502022100147030003')">
<button type="button" class="btn btn-primary btn-sm" v-on:click="_openAddParkingAreaModal()" v-if="vc.hasPrivilege('502022100147030003')">
<i class="fa fa-plus"></i>
<span><vc:i18n name="添加" namespace="parkingAreaManage"></vc:i18n></span>
</button>
@ -62,80 +59,77 @@
<div class="ibox-content">
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
<thead>
<tr>
<th class="text-center">
<span><vc:i18n name="停车场ID" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="停车场编号" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="停车场类型" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th v-for="(item,index) in parkingAreaManageInfo.listColumns" class="text-center">
{{item.specName}}
</th>
<th class="text-center">
<span><vc:i18n name="备注" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="创建时间" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="parkingAreaManage"></vc:i18n></span>
</th>
</tr>
<tr>
<th class="text-center">
<span><vc:i18n name="停车场ID" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="停车场编号" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="停车场类型" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th v-for="(item,index) in parkingAreaManageInfo.listColumns" class="text-center">
{{item.specName}}
</th>
<th class="text-center">
<span><vc:i18n name="备注" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="创建时间" namespace="parkingAreaManage"></vc:i18n></span>
</th>
<th class="text-center">
<span><vc:i18n name="操作" namespace="parkingAreaManage"></vc:i18n></span>
</th>
</tr>
</thead>
<tbody>
<tr v-for="parkingArea in parkingAreaManageInfo.parkingAreas">
<td class="text-center">{{parkingArea.paId}}</td>
<td class="text-center">{{parkingArea.num}}</td>
<td class="text-center" v-if="parkingArea.typeCd=='1001'">
{{vc.i18n('地上停车场','parkingAreaManage')}}
</td>
<td class="text-center" v-else>
{{vc.i18n('地下停车场','parkingAreaManage')}}
</td>
<td v-for="item in parkingArea.listValues" class="text-center">
{{item}}
</td>
<td class="text-center">
{{parkingArea.remark}}
</td>
<td class="text-center">{{parkingArea.createTime}}</td>
<td class="text-center">
<div class="btn-group" v-if="vc.hasPrivilege('502022100103010004')">
<button class="btn-white btn btn-xs"
v-on:click="_openEditParkingAreaModel(parkingArea)">
<tr v-for="parkingArea in parkingAreaManageInfo.parkingAreas">
<td class="text-center">{{parkingArea.paId}}</td>
<td class="text-center">{{parkingArea.num}}</td>
<td class="text-center" v-if="parkingArea.typeCd=='1001'">
{{vc.i18n('地上停车场','parkingAreaManage')}}
</td>
<td class="text-center" v-else>
{{vc.i18n('地下停车场','parkingAreaManage')}}
</td>
<td v-for="item in parkingArea.listValues" class="text-center">
{{item}}
</td>
<td class="text-center">
{{parkingArea.remark}}
</td>
<td class="text-center">{{parkingArea.createTime}}</td>
<td class="text-center">
<div class="btn-group" v-if="vc.hasPrivilege('502022100103010004')">
<button class="btn-white btn btn-xs" v-on:click="_openEditParkingAreaModel(parkingArea)">
<span><vc:i18n name="修改" namespace="parkingAreaManage"></vc:i18n></span>
</button>
</div>
<div class="btn-group" v-if="vc.hasPrivilege('502022100117490005')">
<button class="btn-white btn btn-xs"
v-on:click="_openDeleteParkingAreaModel(parkingArea)">
</div>
<div class="btn-group" v-if="vc.hasPrivilege('502022100117490005')">
<button class="btn-white btn btn-xs" v-on:click="_openDeleteParkingAreaModel(parkingArea)">
<span><vc:i18n name="删除" namespace="parkingAreaManage"></vc:i18n></span>
</button>
</div>
<!-- <div class="btn-group">
</div>
<!-- <div class="btn-group">
<button class="btn-white btn btn-xs" v-on:click="_openParkingAreaText(parkingArea)">
<span><vc:i18n name="问候语" namespace="parkingAreaManage"></vc:i18n></span>
</button>
</div> -->
<div class="btn-group" v-if="vc.hasPrivilege('502022100112510006')">
<button class="btn-white btn btn-xs"
v-on:click="_openParkingAreaTotalControl(parkingArea)">
<div class="btn-group" v-if="vc.hasPrivilege('502022100112510006')">
<button class="btn-white btn btn-xs" v-on:click="_openParkingAreaTotalControl(parkingArea)">
<span><vc:i18n name="控制台" namespace="parkingAreaManage"></vc:i18n></span>
</button>
</div>
</td>
</tr>
</div>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
<tr>
<td colspan="7">
<ul class="pagination float-right"></ul>
</td>
</tr>
</tfoot>
</table>
<!-- 分页 -->