From 15a8437c302acb0758f5d76d1da167f48768890b Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 18 Feb 2023 23:36:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../addMachinePrinter/addMachinePrinter.html | 3 +- .../addMachinePrinter/addMachinePrinter.js | 8 ++- .../addPrinterRuleFee/addPrinterRuleFee.html | 44 ++++++------ .../addPrinterRuleFee/addPrinterRuleFee.js | 6 +- .../editMachinePrinter.html | 3 +- .../editMachinePrinter/editMachinePrinter.js | 9 ++- .../property/addOwnerRepair/addOwnerRepair.js | 2 +- .../machinePrinterManage.html | 2 +- .../printSmallPayFee/printSmallPayFee.html | 45 +++++++++++- .../printSmallPayFee/printSmallPayFee.js | 72 ++++++++++++++++++- public/smallPrint.html | 4 ++ 11 files changed, 161 insertions(+), 37 deletions(-) diff --git a/public/components/print/addMachinePrinter/addMachinePrinter.html b/public/components/print/addMachinePrinter/addMachinePrinter.html index 271a45864..838d14f43 100644 --- a/public/components/print/addMachinePrinter/addMachinePrinter.html +++ b/public/components/print/addMachinePrinter/addMachinePrinter.html @@ -23,8 +23,7 @@
diff --git a/public/components/print/addMachinePrinter/addMachinePrinter.js b/public/components/print/addMachinePrinter/addMachinePrinter.js index bc989805c..42b157ee9 100644 --- a/public/components/print/addMachinePrinter/addMachinePrinter.js +++ b/public/components/print/addMachinePrinter/addMachinePrinter.js @@ -11,10 +11,13 @@ machineName: '', machineCode: '', implBean: '', - + implBeans:[] } }, _initMethod: function() { + vc.getDict('machine_printer','impl_bean',function(_data){ + $that.addMachinePrinterInfo.implBeans=_data; + }) }, _initEvent: function() { @@ -102,11 +105,12 @@ }); }, clearAddMachinePrinterInfo: function() { + let _implBeans = $that.addMachinePrinterInfo.implBeans; vc.component.addMachinePrinterInfo = { machineName: '', machineCode: '', implBean: '', - + implBeans:_implBeans }; } } diff --git a/public/components/print/addPrinterRuleFee/addPrinterRuleFee.html b/public/components/print/addPrinterRuleFee/addPrinterRuleFee.html index d7529e459..1a8580cdc 100644 --- a/public/components/print/addPrinterRuleFee/addPrinterRuleFee.html +++ b/public/components/print/addPrinterRuleFee/addPrinterRuleFee.html @@ -1,45 +1,47 @@ - diff --git a/public/pages/property/printSmallPayFee/printSmallPayFee.js b/public/pages/property/printSmallPayFee/printSmallPayFee.js index 7dbfceb35..a9bf49b0e 100755 --- a/public/pages/property/printSmallPayFee/printSmallPayFee.js +++ b/public/pages/property/printSmallPayFee/printSmallPayFee.js @@ -12,7 +12,10 @@ wechatName: '', content: '', qrImg: '', - payObjName: '' + payObjName: '', + machineId:'', + quantity:'1', + machines:[] }, printFlag: '0' }, @@ -124,6 +127,73 @@ _closePage: function () { window.opener = null; window.close(); + }, + _openCloudPrint:function(){ + $('#cloudPrintModel').modal('show'); + $that._listMachinePrinter(); + }, + _listMachinePrinter: function(_page, _rows) { + let param = { + params: { + page: 1, + row: 100, + communityId: vc.getCurrentCommunity().communityId + } + }; + + //发送get请求 + vc.http.apiGet('/printer.listMachinePrinter', + param, + function(json, res) { + var _couponPropertyPoolManageInfo = JSON.parse(json); + vc.component.printSmallPayFeeInfo.machines = _couponPropertyPoolManageInfo.data; + + if($that.printSmallPayFeeInfo.machines && $that.printSmallPayFeeInfo.machines.length > 0){ + $that.printSmallPayFeeInfo.machineId = $that.printSmallPayFeeInfo.machines[0].machineId; + } + + }, + function(errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _cloudPrintPayFeeDetail:function(){ + let _detailIds = []; + $that.printSmallPayFeeInfo.fees.forEach(_data=>{ + _detailIds.push(_data.detailId); + }) + if(_detailIds.length < 1){ + vc.toast('未包含费用'); + return ; + } + let _data = { + communityId:vc.getCurrentCommunity().communityId, + machineId:$that.printSmallPayFeeInfo.machineId, + quantity:$that.printSmallPayFeeInfo.quantity, + detailId:_detailIds.join(',') + } + vc.http.apiPost( + '/print.printPayFeeDetail', + JSON.stringify(_data), { + emulateJSON: true + }, + function (json, res) { + let _json = JSON.parse(json); + if (_json.code == 0) { + //关闭model + $('#cloudPrintModel').modal('hide'); + vc.toast("提交成功"); + return; + } else { + vc.toast(_json.msg); + } + }, + function (errInfo, error) { + console.log('请求失败处理'); + vc.component.addFloorInfo.errorInfo = errInfo; + vc.toast(errInfo) + }); } } }); diff --git a/public/smallPrint.html b/public/smallPrint.html index 371352443..b76785ae7 100755 --- a/public/smallPrint.html +++ b/public/smallPrint.html @@ -5,13 +5,17 @@ 收据单 +
+ + +