mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
优化代码
This commit is contained in:
parent
06bf2df1a0
commit
99f9673d7c
@ -6,23 +6,34 @@
|
|||||||
<option disabled value="">请选择收费类型</option>
|
<option disabled value="">请选择收费类型</option>
|
||||||
<option selected value="3333">房屋费</option>
|
<option selected value="3333">房屋费</option>
|
||||||
<option value="6666">车位费</option>
|
<option value="6666">车位费</option>
|
||||||
|
<option value="7777">合同费</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType == '6666'">
|
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType == '6666'">
|
||||||
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId" @change="changeSimplifyFeeReceiptCar()">
|
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.carId"
|
||||||
|
@change="changeSimplifyFeeReceiptCar()">
|
||||||
<option disabled value="">请选择车辆</option>
|
<option disabled value="">请选择车辆</option>
|
||||||
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerCars" :value="item.carId">{{item.carNum}}
|
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerCars" :value="item.carId">{{item.carNum}}
|
||||||
</option>
|
</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 padding-right-xs padding-left-xl">
|
<div class="col-lg-2 padding-right-xs padding-left-xl" v-else-if="simplifyFeeReceiptInfo.objType == '7777'">
|
||||||
|
<select class="custom-select custom-select-sm" v-model="simplifyCarFeeInfo.contractId"
|
||||||
|
@change="changeSimplifyFeeReceiptCar()">
|
||||||
|
<option disabled value="">请选择合同</option>
|
||||||
|
<option v-for="(item,index) in simplifyFeeReceiptInfo.ownerContracts" :value="item.contractId">
|
||||||
|
{{item.contractCode}}
|
||||||
|
</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '7777'">
|
||||||
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag"
|
<select class="custom-select custom-select-sm" v-model="simplifyFeeReceiptInfo.ownerFlag"
|
||||||
@change="_queryFeeReceiptMethod()">
|
@change="_queryFeeReceiptMethod()">
|
||||||
<option value="F">当前{{simplifyFeeReceiptInfo.objType == '6666'?'车辆':'房屋'}}</option>
|
<option value="F">当前{{simplifyFeeReceiptInfo.objType == '6666'?'车辆':'房屋'}}</option>
|
||||||
<option value="T">全部{{simplifyFeeReceiptInfo.objType == '6666'?'车辆':'房屋'}}</option>
|
<option value="T">全部{{simplifyFeeReceiptInfo.objType == '6666'?'车辆':'房屋'}}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '6666'">
|
<div class="col-lg-2 padding-right-xs padding-left-xl" v-if="simplifyFeeReceiptInfo.objType != '6666' ">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-6 text-right padding-right-lg">
|
<div class="col-lg-6 text-right padding-right-lg">
|
||||||
@ -49,7 +60,7 @@
|
|||||||
@click="checkAllReceipt($event)">
|
@click="checkAllReceipt($event)">
|
||||||
</th>
|
</th>
|
||||||
<th class="text-center">费用类型</th>
|
<th class="text-center">费用类型</th>
|
||||||
<th class="text-center">{{simplifyFeeReceiptInfo.objType == '3333'?'房屋':'车位'}}</th>
|
<th class="text-center">{{_getFeeObjName(simplifyFeeReceiptInfo.objType)}}</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">收据ID</th>
|
<th class="text-center">收据ID</th>
|
||||||
@ -61,7 +72,7 @@
|
|||||||
<input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId"
|
<input type="checkbox" class="i-checks checReceiptItem" v-bind:value="feeReceipt.receiptId"
|
||||||
v-model="simplifyFeeReceiptInfo.selectReceipts">
|
v-model="simplifyFeeReceiptInfo.selectReceipts">
|
||||||
</td>
|
</td>
|
||||||
<td class="text-center">{{feeReceipt.objType == '3333'? '房屋费':'车位费'}}</td>
|
<td class="text-center">{{_getFeeObjName(feeReceipt.objType)}}费</td>
|
||||||
<td class="text-center">{{feeReceipt.objName}}</td>
|
<td class="text-center">{{feeReceipt.objName}}</td>
|
||||||
<td class="text-center">{{feeReceipt.amount}}</td>
|
<td class="text-center">{{feeReceipt.amount}}</td>
|
||||||
<td class="text-center">{{feeReceipt.createTime}}</td>
|
<td class="text-center">{{feeReceipt.createTime}}</td>
|
||||||
|
|||||||
@ -10,15 +10,17 @@
|
|||||||
feeReceipts: [],
|
feeReceipts: [],
|
||||||
objType: '3333',
|
objType: '3333',
|
||||||
objId: '',
|
objId: '',
|
||||||
payObjId:'',
|
payObjId: '',
|
||||||
roomId: '',
|
roomId: '',
|
||||||
carId: '',
|
carId: '',
|
||||||
total: '',
|
total: '',
|
||||||
records: '',
|
records: '',
|
||||||
ownerId: '',
|
ownerId: '',
|
||||||
ownerCars: [],
|
ownerCars: [],
|
||||||
|
ownerContracts: [],
|
||||||
selectReceipts: [],
|
selectReceipts: [],
|
||||||
ownerFlag:'F',
|
ownerFlag: 'F',
|
||||||
|
contractId: '',
|
||||||
quan: false
|
quan: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -65,9 +67,15 @@
|
|||||||
_listSimplifyFeeReceipt: function (_page, _rows) {
|
_listSimplifyFeeReceipt: function (_page, _rows) {
|
||||||
$that.simplifyFeeReceiptInfo.selectReceipts = [];
|
$that.simplifyFeeReceiptInfo.selectReceipts = [];
|
||||||
$that.simplifyFeeReceiptInfo.quan = false;
|
$that.simplifyFeeReceiptInfo.quan = false;
|
||||||
let _objId = $that.simplifyFeeReceiptInfo.objType == '3333'
|
let _objId = '';
|
||||||
? $that.simplifyFeeReceiptInfo.roomId
|
|
||||||
: $that.simplifyFeeReceiptInfo.carId;
|
if ($that.simplifyFeeReceiptInfo.objType == '3333') {
|
||||||
|
_objId = $that.simplifyFeeReceiptInfo.roomId
|
||||||
|
} else if ($that.simplifyFeeReceiptInfo.objType == '6666') {
|
||||||
|
_objId = $that.simplifyFeeReceiptInfo.carId
|
||||||
|
} else {
|
||||||
|
_objId = $that.simplifyFeeReceiptInfo.contractId
|
||||||
|
}
|
||||||
var param = {
|
var param = {
|
||||||
params: {
|
params: {
|
||||||
page: _page,
|
page: _page,
|
||||||
@ -78,7 +86,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
//根据业主去查询
|
//根据业主去查询
|
||||||
if( $that.simplifyFeeReceiptInfo.ownerFlag == 'T'){
|
if ($that.simplifyFeeReceiptInfo.ownerFlag == 'T') {
|
||||||
param.params.objId = '';
|
param.params.objId = '';
|
||||||
param.params.payObjId = $that.simplifyFeeReceiptInfo.payObjId;
|
param.params.payObjId = $that.simplifyFeeReceiptInfo.payObjId;
|
||||||
}
|
}
|
||||||
@ -114,7 +122,7 @@
|
|||||||
if (receiptids.endsWith(',')) {
|
if (receiptids.endsWith(',')) {
|
||||||
receiptids = receiptids.substring(0, receiptids.length - 1);
|
receiptids = receiptids.substring(0, receiptids.length - 1);
|
||||||
}
|
}
|
||||||
window.open("/print.html#/pages/property/printPayFee?receiptIds=" + receiptids+"&apply=N");
|
window.open("/print.html#/pages/property/printPayFee?receiptIds=" + receiptids + "&apply=N");
|
||||||
},
|
},
|
||||||
|
|
||||||
_printApplyFeeReceipt: function (_receipt) {
|
_printApplyFeeReceipt: function (_receipt) {
|
||||||
@ -129,10 +137,10 @@
|
|||||||
if (receiptids.endsWith(',')) {
|
if (receiptids.endsWith(',')) {
|
||||||
receiptids = receiptids.substring(0, receiptids.length - 1);
|
receiptids = receiptids.substring(0, receiptids.length - 1);
|
||||||
}
|
}
|
||||||
window.open("/print.html#/pages/property/printPayFee?receiptIds=" + receiptids+"&apply=Y");
|
window.open("/print.html#/pages/property/printPayFee?receiptIds=" + receiptids + "&apply=Y");
|
||||||
},
|
},
|
||||||
|
|
||||||
_printFeeSmallReceipt:function(){
|
_printFeeSmallReceipt: function () {
|
||||||
if ($that.simplifyFeeReceiptInfo.selectReceipts.length < 1) {
|
if ($that.simplifyFeeReceiptInfo.selectReceipts.length < 1) {
|
||||||
vc.toast('请选择打印收据');
|
vc.toast('请选择打印收据');
|
||||||
return;
|
return;
|
||||||
@ -157,8 +165,10 @@
|
|||||||
records: '',
|
records: '',
|
||||||
ownerId: '',
|
ownerId: '',
|
||||||
ownerCars: [],
|
ownerCars: [],
|
||||||
|
ownerContracts: [],
|
||||||
selectReceipts: [],
|
selectReceipts: [],
|
||||||
ownerFlag:'F',
|
ownerFlag: 'F',
|
||||||
|
contractId: '',
|
||||||
quan: false
|
quan: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -166,14 +176,22 @@
|
|||||||
|
|
||||||
if ($that.simplifyFeeReceiptInfo.objType == '3333') {
|
if ($that.simplifyFeeReceiptInfo.objType == '3333') {
|
||||||
vc.emit('simplifyFeeReceipt', 'notify', {});
|
vc.emit('simplifyFeeReceipt', 'notify', {});
|
||||||
return;
|
} else if ($that.simplifyFeeReceiptInfo.objType == '6666') {
|
||||||
}
|
|
||||||
$that._listSimplifyFeeReceiptOwnerCar()
|
$that._listSimplifyFeeReceiptOwnerCar()
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
vc.emit('simplifyFeeReceipt', 'notify', {});
|
vc.emit('simplifyFeeReceipt', 'notify', {});
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
//vc.toast(err);
|
//vc.toast(err);
|
||||||
})
|
})
|
||||||
|
} else {
|
||||||
|
$that._listSimplifyFeeReceiptOwnerContract()
|
||||||
|
.then((data) => {
|
||||||
|
vc.emit('simplifyFeeReceipt', 'notify', {});
|
||||||
|
}, (err) => {
|
||||||
|
//vc.toast(err);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
changeSimplifyFeeReceiptCar: function () {
|
changeSimplifyFeeReceiptCar: function () {
|
||||||
$that._changeSimplifyFeeReceiptFeeTypeCd();
|
$that._changeSimplifyFeeReceiptFeeTypeCd();
|
||||||
@ -204,6 +222,34 @@
|
|||||||
reject(errInfo);
|
reject(errInfo);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
})
|
||||||
|
},
|
||||||
|
_listSimplifyFeeReceiptOwnerContract: function () {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
let param = {
|
||||||
|
params: {
|
||||||
|
page: 1,
|
||||||
|
row: 50,
|
||||||
|
objId: $that.simplifyFeeReceiptInfo.ownerId,
|
||||||
|
communityId: vc.getCurrentCommunity().communityId
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//发送get请求
|
||||||
|
vc.http.apiGet('/contract/queryContract',
|
||||||
|
param,
|
||||||
|
function (json, res) {
|
||||||
|
let _json = JSON.parse(json);
|
||||||
|
$that.simplifyFeeReceiptInfo.ownerContracts = _json.data;
|
||||||
|
if (_json.data.length > 0) {
|
||||||
|
$that.simplifyFeeReceiptInfo.contractId = _json.data[0].contractId;
|
||||||
|
resolve(_json.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
reject("没有车位");
|
||||||
|
}, function (errInfo, error) {
|
||||||
|
reject(errInfo);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -219,6 +265,17 @@
|
|||||||
} else { // 如果是去掉全选则清空checkbox选项绑定数组
|
} else { // 如果是去掉全选则清空checkbox选项绑定数组
|
||||||
vc.component.simplifyFeeReceiptInfo.selectReceipts = [];
|
vc.component.simplifyFeeReceiptInfo.selectReceipts = [];
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
_getFeeObjName:function(_feeTypeCd){
|
||||||
|
if(_feeTypeCd == '3333'){
|
||||||
|
|
||||||
|
return '房屋';
|
||||||
|
}else if(_feeTypeCd == '6666'){
|
||||||
|
return '车位';
|
||||||
|
}else{
|
||||||
|
return '合同';
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user