mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-14 18:58:44 +08:00
优化收据打印
This commit is contained in:
parent
93fc89c14c
commit
b3dadbeeec
98
public/pages/property/feeReceipt/feeReceipt.html
Normal file
98
public/pages/property/feeReceipt/feeReceipt.html
Normal file
@ -0,0 +1,98 @@
|
||||
<div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox ">
|
||||
<div class="ibox-title">
|
||||
<h5>查询条件</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<select class="custom-select" v-model="feeReceiptManageInfo.conditions.objType">
|
||||
<option selected value="">请选择预存类型</option>
|
||||
<option value="3333">房屋费</option>
|
||||
<option value="6666">车位费</option>
|
||||
</select>
|
||||
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="form-group">
|
||||
<input type="text" placeholder="收费对象" v-model="feeReceiptManageInfo.conditions.roomId"
|
||||
class=" form-control" placeholder="请输入房屋或车位信息">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<!-- <select class="custom-select" v-model="feeReceiptManageInfo.conditions.state">
|
||||
<option selected value="">请选择状态</option>
|
||||
<option value="1001">未使用</option>
|
||||
<option value="2002">已使用</option>
|
||||
</select>-->
|
||||
</div>
|
||||
<div class="col-sm-1">
|
||||
<button type="button" class="btn btn-primary btn-sm" v-on:click="_queryFeeReceiptMethod()">
|
||||
<i class="glyphicon glyphicon-search"></i> 查询
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="ibox">
|
||||
<div class="ibox-title">
|
||||
<h5>收据信息</h5>
|
||||
<div class="ibox-tools" style="top:10px;">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="ibox-content">
|
||||
|
||||
<table class="footable table table-stripped toggle-arrow-tiny" data-page-size="15">
|
||||
<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">收据ID</th>
|
||||
<th class="text-center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="feeReceipt in feeReceiptManageInfo.feeReceipts">
|
||||
<td class="text-center">{{feeReceipt.objType == '3333'? '房屋费':'车位费'}}</td>
|
||||
<td class="text-center">{{feeReceipt.objName}}</td>
|
||||
<td class="text-center">{{feeReceipt.amount}}</td>
|
||||
<td class="text-center">{{feeReceipt.createTime}}</td>
|
||||
<td class="text-center">{{feeReceipt.receiptId}}</td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
<button class="btn-white btn btn-xs"
|
||||
v-on:click="_printFeeReceipt(feeReceipt)">补打收据</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<ul class="pagination float-right"></ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
<!-- 分页 -->
|
||||
<vc:create path="frame/pagination"></vc:create>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
80
public/pages/property/feeReceipt/feeReceipt.js
Normal file
80
public/pages/property/feeReceipt/feeReceipt.js
Normal file
@ -0,0 +1,80 @@
|
||||
/**
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
feeReceiptManageInfo: {
|
||||
rooms: [],
|
||||
feeReceipts: [],
|
||||
total: 0,
|
||||
records: 1,
|
||||
moreCondition: false,
|
||||
feeReceiptId: '',
|
||||
conditions: {
|
||||
objType: '',
|
||||
objId: '',
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
}
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
vc.component._listFeeReceipts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('feeReceiptManage', 'listFeeReceipt', function (_param) {
|
||||
vc.component._listFeeReceipts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('pagination', 'page_event', function (_currentPage) {
|
||||
vc.component._listFeeReceipts(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
_listFeeReceipts: function (_page, _rows) {
|
||||
|
||||
vc.component.feeReceiptManageInfo.conditions.page = _page;
|
||||
vc.component.feeReceiptManageInfo.conditions.row = _rows;
|
||||
|
||||
var param = {
|
||||
params: vc.component.feeReceiptManageInfo.conditions
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/feeReceipt/queryFeeReceipt',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _feeReceiptManageInfo = JSON.parse(json);
|
||||
vc.component.feeReceiptManageInfo.total = _feeReceiptManageInfo.total;
|
||||
vc.component.feeReceiptManageInfo.records = _feeReceiptManageInfo.records;
|
||||
vc.component.feeReceiptManageInfo.feeReceipts = _feeReceiptManageInfo.data;
|
||||
vc.emit('pagination', 'init', {
|
||||
total: vc.component.feeReceiptManageInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
|
||||
_queryFeeReceiptMethod: function () {
|
||||
vc.component._listFeeReceipts(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
},
|
||||
_printFeeReceipt: function (_receipt) {
|
||||
window.open("/print.html#/pages/property/printPayFee?receiptId=" + _receipt.receiptId);
|
||||
},
|
||||
_moreCondition: function () {
|
||||
if (vc.component.feeReceiptManageInfo.moreCondition) {
|
||||
vc.component.feeReceiptManageInfo.moreCondition = false;
|
||||
} else {
|
||||
vc.component.feeReceiptManageInfo.moreCondition = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
@ -11,7 +11,8 @@
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
payObjId: '',
|
||||
payObjType: '',
|
||||
roomName: ''
|
||||
roomName: '',
|
||||
receiptId:''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -116,8 +117,11 @@
|
||||
totalAmount: $that.owePayFeeOrderInfo.feePrices,
|
||||
fees: _printFees
|
||||
}
|
||||
let _data = JSON.parse(json).data;
|
||||
|
||||
vc.saveData('_feeInfo', _feeInfo);
|
||||
$that.owePayFeeOrderInfo.receiptId = _data.receiptId;
|
||||
|
||||
//vc.saveData('_feeInfo', _feeInfo);
|
||||
//关闭model
|
||||
$("#payFeeResult").modal({
|
||||
backdrop: "static",//点击空白处不关闭对话框
|
||||
@ -140,7 +144,7 @@
|
||||
},
|
||||
_printAndBack: function () {
|
||||
$('#payFeeResult').modal("hide");
|
||||
window.open("/print.html#/pages/property/printPayFee?roomName=" + $that.owePayFeeOrderInfo.roomName)
|
||||
window.open("/print.html#/pages/property/printPayFee?receiptId=" + $that.owePayFeeOrderInfo.receiptId)
|
||||
},
|
||||
_dealSelectFee: function () {
|
||||
let totalFee = 0.00;
|
||||
|
||||
@ -22,7 +22,8 @@
|
||||
remark: '',
|
||||
builtUpArea: 0.0,
|
||||
squarePrice: 0.0,
|
||||
additionalAmount: 0.0
|
||||
additionalAmount: 0.0,
|
||||
receiptId:''
|
||||
}
|
||||
},
|
||||
_initMethod: function () {
|
||||
@ -130,7 +131,11 @@
|
||||
fees: _printFees
|
||||
}
|
||||
|
||||
vc.saveData('_feeInfo', _feeInfo);
|
||||
let _data = JSON.parse(json).data;
|
||||
|
||||
$that.payFeeOrderInfo.receiptId = _data.receiptId;
|
||||
|
||||
//vc.saveData('_feeInfo', _feeInfo);
|
||||
//关闭model
|
||||
$("#payFeeResult").modal({
|
||||
backdrop: "static",//点击空白处不关闭对话框
|
||||
@ -175,7 +180,7 @@
|
||||
},
|
||||
_printAndBack: function () {
|
||||
//$('#payFeeResult').modal("hide");
|
||||
window.open("/print.html#/pages/property/printPayFee?roomName=" + $that.payFeeOrderInfo.roomName)
|
||||
window.open("/print.html#/pages/property/printPayFee?receiptId=" + $that.payFeeOrderInfo.receiptId)
|
||||
},
|
||||
_mathCeil:function(_price){
|
||||
return Math.ceil(_price);
|
||||
|
||||
@ -20,8 +20,11 @@
|
||||
<tr>
|
||||
<th scope="col" class="text-center">编号</th>
|
||||
<th scope="col" class="text-center">收费项目</th>
|
||||
<th scope="col" class="text-center">收费范围</th>
|
||||
<th scope="col" class="text-center">周期</th>
|
||||
<th scope="col" class="text-center">单价</th>
|
||||
<th scope="col" class="text-center">固定费</th>
|
||||
<th scope="col" class="text-center">面积/用量</th>
|
||||
<th scope="col" class="text-center">单位</th>
|
||||
<th scope="col" class="text-center">金额</th>
|
||||
<th scope="col" class="text-center">备注</th>
|
||||
@ -31,18 +34,23 @@
|
||||
<tr v-for="(item,index) in printPayFeeInfo.fees">
|
||||
<th scope="row" class="text-center">{{index +1}}</th>
|
||||
<td class="text-center">{{item.feeName}}</td>
|
||||
<td class="text-center">{{vc.dateFormat(item.startTime)}}至{{vc.dateFormat(item.endTime)}}</td>
|
||||
<td class="text-center">{{item.cycle}}</td>
|
||||
<td class="text-center">{{item.squarePrice}}</td>
|
||||
<td class="text-center">{{item.additionalAmount}}</td>
|
||||
<td class="text-center">{{item.area}}</td>
|
||||
<td class="text-center">元</td>
|
||||
<td class="text-center">{{item.amount}}</td>
|
||||
<td class="text-center">{{item.remark}}</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td colspan="2" class="text-center " >总费用</td>
|
||||
<td colspan="5" class="text-center ">{{printPayFeeInfo.feePrices}}元</td>
|
||||
<td colspan="1" class="text-center ">大写人民币(元)</td>
|
||||
<td colspan="5" class="text-center ">{{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}}
|
||||
</td>
|
||||
<td colspan="4" class="text-center ">{{printPayFeeInfo.amount}}</td>
|
||||
</tr>
|
||||
<tr height="60px" v-if="printPayFeeInfo.wechatName != ''">
|
||||
<td colspan="7" >
|
||||
<td colspan="10" >
|
||||
<p>
|
||||
尊敬的业主:
|
||||
</p>
|
||||
|
||||
@ -4,8 +4,9 @@
|
||||
data: {
|
||||
printPayFeeInfo: {
|
||||
communityName: '',
|
||||
receiptId:'',
|
||||
roomName: '',
|
||||
feePrices: 0.00,
|
||||
amount: 0.00,
|
||||
fees: [],
|
||||
feeTime: '',
|
||||
wechatName:''
|
||||
@ -15,14 +16,12 @@
|
||||
_initMethod: function () {
|
||||
//vc.component._initPrintPurchaseApplyDateInfo();
|
||||
|
||||
$that.printPayFeeInfo.roomName = vc.getParam('roomName');
|
||||
$that.printPayFeeInfo.receiptId = vc.getParam('receiptId');
|
||||
$that.printPayFeeInfo.feeTime = vc.dateTimeFormat(new Date());
|
||||
|
||||
let _feeInfo = vc.getData('_feeInfo');
|
||||
$that.printPayFeeInfo.communityName = vc.getCurrentCommunity().name;
|
||||
|
||||
$that.printPayFeeInfo.feePrices = _feeInfo.totalAmount;
|
||||
$that.printPayFeeInfo.fees = _feeInfo.fees;
|
||||
$that._loadReceipt();
|
||||
|
||||
$that._loadWechat();
|
||||
},
|
||||
@ -33,6 +32,57 @@
|
||||
methods: {
|
||||
_initPayFee: function () {
|
||||
|
||||
},
|
||||
_loadReceipt:function(){
|
||||
|
||||
var param = {
|
||||
params: {
|
||||
page:1,
|
||||
row:1,
|
||||
receiptId:$that.printPayFeeInfo.receiptId,
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/feeReceipt/queryFeeReceipt',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _feeReceiptManageInfo = JSON.parse(json);
|
||||
let _feeReceipt = _feeReceiptManageInfo.data[0];
|
||||
|
||||
$that.printPayFeeInfo.amount = _feeReceipt.amount;
|
||||
$that.printPayFeeInfo.roomName = _feeReceipt.objName;
|
||||
|
||||
$that._loadReceiptDetail();
|
||||
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadReceiptDetail:function(){
|
||||
|
||||
var param = {
|
||||
params: {
|
||||
page:1,
|
||||
row:100,
|
||||
receiptId:$that.printPayFeeInfo.receiptId,
|
||||
communityId:vc.getCurrentCommunity().communityId
|
||||
}
|
||||
};
|
||||
|
||||
//发送get请求
|
||||
vc.http.apiGet('/feeReceipt/queryFeeReceiptDetail',
|
||||
param,
|
||||
function (json, res) {
|
||||
var _feeReceiptManageInfo = JSON.parse(json);
|
||||
let _feeReceiptDetails = _feeReceiptManageInfo.data;
|
||||
$that.printPayFeeInfo.fees = _feeReceiptDetails;
|
||||
}, function (errInfo, error) {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
},
|
||||
_loadWechat: function () {
|
||||
var param = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user