diff --git a/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.html b/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.html new file mode 100644 index 000000000..24ec6533c --- /dev/null +++ b/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.html @@ -0,0 +1,72 @@ +
+
+
+ + +
+
+ +
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 费用类型{{simplifyFeeReceiptInfo.objType == '3333'?'房屋':'车位'}}总金额缴费时间收据ID
+ + {{feeReceipt.objType == '3333'? '房屋费':'车位费'}}{{feeReceipt.objName}}{{feeReceipt.amount}}{{feeReceipt.createTime}}{{feeReceipt.receiptId}}
+
    +
    +
    +
    + +
    +
    +
    + + +
    \ No newline at end of file diff --git a/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.js b/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.js new file mode 100644 index 000000000..496d5568b --- /dev/null +++ b/public/components/property/simplifyFeeReceipt/simplifyFeeReceipt.js @@ -0,0 +1,186 @@ +/** + 入驻小区 + **/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 10; + vc.extends({ + data: { + simplifyFeeReceiptInfo: { + feeReceipts: [], + objType: '3333', + objId: '', + roomId: '', + carId: '', + total: '', + records: '', + ownerId: '', + ownerCars: [], + selectReceipts: [], + quan: false + } + }, + watch: { // 监视双向绑定的数据数组 + simplifyFeeReceiptInfo: { + handler() { // 数据数组有变化将触发此函数 + if ($that.simplifyFeeReceiptInfo.selectReceipts.length == $that.simplifyFeeReceiptInfo.feeReceipts.length) { + $that.simplifyFeeReceiptInfo.quan = true; + } else { + $that.simplifyFeeReceiptInfo.quan = false; + } + }, + deep: true // 深度监视 + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + //切换 至费用页面 + vc.on('simplifyFeeReceipt', 'switch', function (_param) { + if (_param.roomId == '') { + return; + } + $that.clearSimplifyFeeReceiptInfo(); + vc.copyObject(_param, $that.simplifyFeeReceiptInfo); + $that.simplifyFeeReceiptInfo.objId = _param.roomId; + $that._listSimplifyFeeReceipt(DEFAULT_PAGE, DEFAULT_ROWS); + }); + + vc.on('simplifyFeeReceipt', 'notify', function () { + $that._listSimplifyFeeReceipt(DEFAULT_PAGE, DEFAULT_ROWS); + }); + + + vc.on('simplifyFeeReceipt', 'paginationPlus', 'page_event', + function (_currentPage) { + + vc.component._listSimplifyFeeReceipt(_currentPage, DEFAULT_ROWS); + }); + }, + methods: { + _listSimplifyFeeReceipt: function (_page, _rows) { + $that.simplifyFeeReceiptInfo.selectReceipts = []; + $that.simplifyFeeReceiptInfo.quan = false; + let _objId = $that.simplifyFeeReceiptInfo.objType == '3333' + ? $that.simplifyFeeReceiptInfo.roomId + : $that.simplifyFeeReceiptInfo.carId; + var param = { + params: { + page: _page, + row: _rows, + objType: $that.simplifyFeeReceiptInfo.objType, + objId: _objId, + communityId: vc.getCurrentCommunity().communityId + } + }; + //发送get请求 + vc.http.apiGet('/feeReceipt/queryFeeReceipt', + param, + function (json, res) { + var _feeReceiptManageInfo = JSON.parse(json); + vc.component.simplifyFeeReceiptInfo.total = _feeReceiptManageInfo.total; + vc.component.simplifyFeeReceiptInfo.records = _feeReceiptManageInfo.records; + vc.component.simplifyFeeReceiptInfo.feeReceipts = _feeReceiptManageInfo.data; + vc.emit('simplifyFeeReceipt', 'paginationPlus', 'init', { + total: vc.component.simplifyFeeReceiptInfo.records, + currentPage: _page + }); + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _queryFeeReceiptMethod: function () { + vc.component._listFeeReceipts(DEFAULT_PAGE, DEFAULT_ROWS); + }, + _printFeeReceipt: function (_receipt) { + if ($that.simplifyFeeReceiptInfo.selectReceipts.length < 1) { + vc.toast('请选择打印收据'); + return; + } + let receiptids = ''; + $that.simplifyFeeReceiptInfo.selectReceipts.forEach(item => { + receiptids += (item + ','); + }) + if (receiptids.endsWith(',')) { + receiptids = receiptids.substring(0, receiptids.length - 1); + } + window.open("/print.html#/pages/property/printPayFee?receiptIds=" + receiptids); + }, + clearSimplifyFeeReceiptInfo: function () { + $that.simplifyFeeReceiptInfo = { + feeReceipts: [], + objType: '3333', + objId: '', + roomId: '', + carId: '', + total: '', + records: '', + ownerId: '', + ownerCars: [], + selectReceipts: [], + quan: false + } + }, + _changeSimplifyFeeReceiptFeeTypeCd: function (_feeTypeCd) { + + if ($that.simplifyFeeReceiptInfo.objType == '3333') { + vc.emit('simplifyFeeReceipt', 'notify', {}); + return; + } + $that._listSimplifyFeeReceiptOwnerCar() + .then((data) => { + vc.emit('simplifyFeeReceipt', 'notify', {}); + }, (err) => { + //vc.toast(err); + }) + }, + changeSimplifyFeeReceiptCar: function () { + $that._changeSimplifyFeeReceiptFeeTypeCd(); + }, + _listSimplifyFeeReceiptOwnerCar: function () { + return new Promise((resolve, reject) => { + let param = { + params: { + page: 1, + row: 50, + ownerId: $that.simplifyFeeReceiptInfo.ownerId, + communityId: vc.getCurrentCommunity().communityId + } + } + //发送get请求 + vc.http.apiGet('owner.queryOwnerCars', + param, + function (json, res) { + let _json = JSON.parse(json); + $that.simplifyFeeReceiptInfo.ownerCars = _json.data; + if (_json.data.length > 0) { + $that.simplifyFeeReceiptInfo.carId = _json.data[0].carId; + resolve(_json.data); + return; + } + reject("没有车位"); + }, function (errInfo, error) { + reject(errInfo); + } + ); + + }) + + }, + checkAllReceipt: function (e) { + let checkObj = document.querySelectorAll('.checReceiptItem'); // 获取所有checkbox项 + if (e.target.checked) { // 判定全选checkbox的勾选状态 + for (var i = 0; i < checkObj.length; i++) { + if (!checkObj[i].checked) { // 将未勾选的checkbox选项push到绑定数组中 + vc.component.simplifyFeeReceiptInfo.selectReceipts.push(checkObj[i].value); + } + } + } else { // 如果是去掉全选则清空checkbox选项绑定数组 + vc.component.simplifyFeeReceiptInfo.selectReceipts = []; + } + } + } + }); +})(window.vc); diff --git a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html index 48ba3576a..1a0b97b70 100644 --- a/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html +++ b/public/components/property/simplifyOwnerRepair/simplifyOwnerRepair.html @@ -33,7 +33,7 @@
    -
    +
    diff --git a/public/index.html b/public/index.html index 0301afc24..bdede314b 100644 --- a/public/index.html +++ b/public/index.html @@ -15,9 +15,6 @@ - - - diff --git a/public/pages/property/feeReceipt/feeReceipt.html b/public/pages/property/feeReceipt/feeReceipt.html index 7f85e504c..cfdbdbab6 100644 --- a/public/pages/property/feeReceipt/feeReceipt.html +++ b/public/pages/property/feeReceipt/feeReceipt.html @@ -11,7 +11,7 @@
    diff --git a/public/pages/property/printPayFee/printPayFee.html b/public/pages/property/printPayFee/printPayFee.html index 26ac67b22..e5bb02cd3 100644 --- a/public/pages/property/printPayFee/printPayFee.html +++ b/public/pages/property/printPayFee/printPayFee.html @@ -3,7 +3,7 @@
    {{printPayFeeInfo.communityName}} 收据单
    - 单号:{{printPayFeeInfo.receiptId}} + 单号:{{printPayFeeInfo.receiptNum}}
    @@ -15,7 +15,7 @@
    - + @@ -40,7 +40,7 @@ - + @@ -50,7 +50,7 @@
    编号 收费项目 收费范围{{item.amount}} {{item.remark}}
    大写人民币(元) {{vc.changeNumMoneyToChinese(printPayFeeInfo.amount)}}

    -

    +

    @@ -65,7 +65,8 @@ - diff --git a/public/pages/property/printPayFee/printPayFee.js b/public/pages/property/printPayFee/printPayFee.js index 6dadbb05e..ef3ec5c70 100644 --- a/public/pages/property/printPayFee/printPayFee.js +++ b/public/pages/property/printPayFee/printPayFee.js @@ -4,14 +4,15 @@ data: { printPayFeeInfo: { communityName: '', - receiptId:'', + receiptId: '', + receiptIds: '', roomName: '', amount: 0.00, fees: [], feeTime: '', - wechatName:'', - content:'', - qrImg:'' + wechatName: '', + content: '', + qrImg: '' }, printFlag: '0' }, @@ -19,6 +20,7 @@ //vc.component._initPrintPurchaseApplyDateInfo(); $that.printPayFeeInfo.receiptId = vc.getParam('receiptId'); + $that.printPayFeeInfo.receiptIds = vc.getParam('receiptIds'); //$that.printPayFeeInfo.feeTime = vc.dateTimeFormat(new Date()); $that.printPayFeeInfo.communityName = vc.getCurrentCommunity().name; @@ -35,14 +37,15 @@ _initPayFee: function () { }, - _loadReceipt:function(){ + _loadReceipt: function () { var param = { params: { - page:1, - row:1, - receiptId:$that.printPayFeeInfo.receiptId, - communityId:vc.getCurrentCommunity().communityId + page: 1, + row: 30, + receiptId: $that.printPayFeeInfo.receiptId, + receiptIds: $that.printPayFeeInfo.receiptIds, + communityId: vc.getCurrentCommunity().communityId } }; @@ -51,26 +54,33 @@ param, function (json, res) { var _feeReceiptManageInfo = JSON.parse(json); - let _feeReceipt = _feeReceiptManageInfo.data[0]; + let _feeReceipt = _feeReceiptManageInfo.data; + let _amount = 0; + _feeReceipt.forEach(item => { + _amount += parseFloat(item.amount) + }); + + $that.printPayFeeInfo.amount = _amount; + $that.printPayFeeInfo.roomName = _feeReceipt[0].objName; + $that.printPayFeeInfo.feeTime = _feeReceipt[0].createTime; + $that.printPayFeeInfo.receiptNum = _feeReceipt[0].receiptId; - $that.printPayFeeInfo.amount = _feeReceipt.amount; - $that.printPayFeeInfo.roomName = _feeReceipt.objName; - $that.printPayFeeInfo.feeTime = _feeReceipt.createTime; $that._loadReceiptDetail(); - + }, function (errInfo, error) { console.log('请求失败处理'); } ); }, - _loadReceiptDetail:function(){ + _loadReceiptDetail: function () { var param = { params: { - page:1, - row:100, - receiptId:$that.printPayFeeInfo.receiptId, - communityId:vc.getCurrentCommunity().communityId + page: 1, + row: 100, + receiptId: $that.printPayFeeInfo.receiptId, + receiptIds: $that.printPayFeeInfo.receiptIds, + communityId: vc.getCurrentCommunity().communityId } }; @@ -79,7 +89,7 @@ param, function (json, res) { var _feeReceiptManageInfo = JSON.parse(json); - let _feeReceiptDetails = _feeReceiptManageInfo.data; + let _feeReceiptDetails = _feeReceiptManageInfo.data; $that.printPayFeeInfo.fees = _feeReceiptDetails; }, function (errInfo, error) { console.log('请求失败处理'); diff --git a/public/pages/property/simplifyAcceptance/simplifyAcceptance.html b/public/pages/property/simplifyAcceptance/simplifyAcceptance.html index 190d073de..0ee8f6952 100644 --- a/public/pages/property/simplifyAcceptance/simplifyAcceptance.html +++ b/public/pages/property/simplifyAcceptance/simplifyAcceptance.html @@ -160,6 +160,10 @@ 道闸同步 + @@ -187,6 +191,10 @@
    +
    + +
    +