优化代码

This commit is contained in:
java110 2020-09-24 00:39:27 +08:00
parent deb647f865
commit d6dfcd80c4
6 changed files with 33 additions and 27 deletions

View File

@ -13,14 +13,15 @@
<select class="custom-select" v-model="addFeePrintSpecInfo.specCd"> <select class="custom-select" v-model="addFeePrintSpecInfo.specCd">
<option selected disabled value="">必填,请选择规格</option> <option selected disabled value="">必填,请选择规格</option>
<option value="1010">催缴打印说明</option> <option value="1010">催缴打印说明</option>
<option value="2020">收据打印说明</option>
</select> </div> </select> </div>
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-sm-2 col-form-label">图片</label> <label class="col-sm-2 col-form-label">图片</label>
<div class="col-sm-10"> <div class="col-sm-10">
<vc:create path="frame/uploadImage" callBackListener="addFeePrintSpec" <vc:create path="frame/uploadImage" callBackListener="addFeePrintSpec"
callBackFunction="notifyUploadImage" imageCount="1" callBackFunction="notifyUploadImage" imageCount="1" namespace="addFeePrintSpec">
namespace="addFeePrintSpec">
</vc:create> </vc:create>
</div> </div>
</div> </div>

View File

@ -13,6 +13,7 @@
<select class="custom-select" v-model="editFeePrintSpecInfo.specCd"> <select class="custom-select" v-model="editFeePrintSpecInfo.specCd">
<option selected disabled value="">必填,请选择规格</option> <option selected disabled value="">必填,请选择规格</option>
<option value="1010">催缴打印说明</option> <option value="1010">催缴打印说明</option>
<option value="2020">收据打印说明</option>
</select> </div> </select> </div>
</div> </div>

View File

@ -28,7 +28,7 @@
<td class="text-center"> <td class="text-center">
<img :src="feePrintSpec.qrImg" style="border-radius: 5px;" width="100px" height="100px"/> <img :src="feePrintSpec.qrImg" style="border-radius: 5px;" width="100px" height="100px"/>
</td> </td>
<td class="text-center">{{feePrintSpec.specCd == '1010'?'催缴打印说明':'未知'}}</td> <td class="text-center">{{feePrintSpec.specCd == '1010'?'催缴打印说明':'收据打印说明'}}</td>
<td class="text-center">{{feePrintSpec.printId}}</td> <td class="text-center">{{feePrintSpec.printId}}</td>
<td class="text-right"> <td class="text-right">
<div class="btn-group"> <div class="btn-group">

View File

@ -46,7 +46,8 @@
<tr height="60px"> <tr height="60px">
<td colspan="3"> <td colspan="3">
<p style="max-width: 600px;"> <p style="max-width: 600px;">
{{printPayFeeInfo.content}} <!-- {{printPayFeeInfo.content}} -->
<div v-html="printPayFeeInfo.content"></div>
</p> </p>
</td> </td>
<td colspan="4"> <td colspan="4">

View File

@ -3,6 +3,7 @@
<div> <div>
<div class=" text-center"> <div class=" text-center">
<h1>{{printPayFeeInfo.communityName}} 收据单</h1> <h1>{{printPayFeeInfo.communityName}} 收据单</h1>
<span>单号:{{printPayFeeInfo.receiptId}}</span>
</div> </div>
<div class="row margin-top"> <div class="row margin-top">
<div class="col-sm-4"> <div class="col-sm-4">
@ -22,8 +23,7 @@
<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> <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>
@ -37,7 +37,6 @@
<td class="text-center">{{vc.dateFormat(item.startTime)}}至{{vc.dateFormat(item.endTime)}}</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.cycle}}</td>
<td class="text-center">{{item.squarePrice}}</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">{{item.area}}</td>
<td class="text-center"></td> <td class="text-center"></td>
<td class="text-center">{{item.amount}}</td> <td class="text-center">{{item.amount}}</td>
@ -45,20 +44,21 @@
</tr> </tr>
<tr > <tr >
<td colspan="1" class="text-center ">大写人民币(元)</td> <td colspan="1" class="text-center ">大写人民币(元)</td>
<td colspan="5" class="text-center ">{{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}} <td colspan="4" class="text-center ">{{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}}
</td> </td>
<td colspan="4" class="text-center ">{{printPayFeeInfo.amount}}</td> <td colspan="4" class="text-center ">{{printPayFeeInfo.amount}}</td>
</tr> </tr>
<tr height="60px" v-if="printPayFeeInfo.wechatName != ''"> <tr height="60px">
<td colspan="10" > <td colspan="5">
<p> <p style="max-width: 600px;">
尊敬的业主: <!-- {{printPayFeeInfo.content}} -->
</p> <div v-html="printPayFeeInfo.content"></div>
<p>
您好!感谢您在百忙中来缴费,为了更好的服务您,我们已开通网上缴费,请您关注《{{printPayFeeInfo.wechatName}}》公众号并注册,实现网上缴费。
</p> </p>
</td> </td>
<td colspan="4">
<img :src="printPayFeeInfo.qrImg" width="100px" height="100px">
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>

View File

@ -9,7 +9,9 @@
amount: 0.00, amount: 0.00,
fees: [], fees: [],
feeTime: '', feeTime: '',
wechatName:'' wechatName:'',
content:'',
qrImg:''
}, },
printFlag: '0' printFlag: '0'
}, },
@ -17,13 +19,13 @@
//vc.component._initPrintPurchaseApplyDateInfo(); //vc.component._initPrintPurchaseApplyDateInfo();
$that.printPayFeeInfo.receiptId = vc.getParam('receiptId'); $that.printPayFeeInfo.receiptId = vc.getParam('receiptId');
$that.printPayFeeInfo.feeTime = vc.dateTimeFormat(new Date()); //$that.printPayFeeInfo.feeTime = vc.dateTimeFormat(new Date());
$that.printPayFeeInfo.communityName = vc.getCurrentCommunity().name; $that.printPayFeeInfo.communityName = vc.getCurrentCommunity().name;
$that._loadReceipt(); $that._loadReceipt();
$that._loadWechat(); $that._loadPrintSpec();
}, },
_initEvent: function () { _initEvent: function () {
@ -53,7 +55,7 @@
$that.printPayFeeInfo.amount = _feeReceipt.amount; $that.printPayFeeInfo.amount = _feeReceipt.amount;
$that.printPayFeeInfo.roomName = _feeReceipt.objName; $that.printPayFeeInfo.roomName = _feeReceipt.objName;
$that.printPayFeeInfo.feeTime = _feeReceipt.createTime;
$that._loadReceiptDetail(); $that._loadReceiptDetail();
}, function (errInfo, error) { }, function (errInfo, error) {
@ -84,24 +86,25 @@
} }
); );
}, },
_loadWechat: function () { _loadPrintSpec: function () {
var param = { var param = {
params: { params: {
page: 1, page: 1,
row: 1, row: 1,
weChatType: 1100, specCd: 2020,
communityId: vc.getCurrentCommunity().communityId communityId: vc.getCurrentCommunity().communityId
} }
}; };
//发送get请求 //发送get请求
vc.http.apiGet('smallWeChat.listSmallWeChats', vc.http.apiGet('/feePrintSpec/queryFeePrintSpec',
param, param,
function (json, res) { function (json, res) {
var _smallWeChatInfo = JSON.parse(json); var _json = JSON.parse(json);
var _smallWeChats = _smallWeChatInfo.smallWeChats; var _data = _json.data;
if(_smallWeChats.length > 0){ if (_data.length > 0) {
$that.printPayFeeInfo.wechatName = _smallWeChats[0].name $that.printPayFeeInfo.content = _data[0].content;
$that.printPayFeeInfo.qrImg = _data[0].qrImg;
} }
}, function (errInfo, error) { }, function (errInfo, error) {
console.log('请求失败处理'); console.log('请求失败处理');