From bb8479f20752ef0b6b582a844d8aaec87f1a195a Mon Sep 17 00:00:00 2001 From: java110 <928255095@qq.com> Date: Thu, 26 Nov 2020 17:38:34 +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 --- .../property/addMeterWater/addMeterWater.js | 3 + .../payFeeDiscount/payFeeDiscount.html | 47 ++++++++++++ .../property/payFeeDiscount/payFeeDiscount.js | 74 +++++++++++++++++++ 3 files changed, 124 insertions(+) create mode 100644 public/components/property/payFeeDiscount/payFeeDiscount.html create mode 100644 public/components/property/payFeeDiscount/payFeeDiscount.js diff --git a/public/components/property/addMeterWater/addMeterWater.js b/public/components/property/addMeterWater/addMeterWater.js index 3932dc997..36e1cd8df 100644 --- a/public/components/property/addMeterWater/addMeterWater.js +++ b/public/components/property/addMeterWater/addMeterWater.js @@ -239,10 +239,13 @@ function (json, res) { var _feeConfigManageInfo = JSON.parse(json); vc.component.addMeterWaterInfo.feeConfigs = _feeConfigManageInfo.feeConfigs; + }, function (errInfo, error) { console.log('请求失败处理'); }); + + $that._queryPreMeterWater($that.addMeterWaterInfo.roomId); }, _queryPreMeterWater: function (_roomId) { let _meterType = '1010'; diff --git a/public/components/property/payFeeDiscount/payFeeDiscount.html b/public/components/property/payFeeDiscount/payFeeDiscount.html new file mode 100644 index 000000000..d917182b1 --- /dev/null +++ b/public/components/property/payFeeDiscount/payFeeDiscount.html @@ -0,0 +1,47 @@ +
+
+
+
+
+
折扣信息
+
+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + +
折扣类型折扣名称规则折扣金额
{{feeDiscount.discountType == '1001'?'优惠':'违约'}}{{feeDiscount.discountName}} +
+ {{item.specName}}:{{item.specValue}}
+
30
+
    +
    +
    +
    +
    +
    +
    \ No newline at end of file diff --git a/public/components/property/payFeeDiscount/payFeeDiscount.js b/public/components/property/payFeeDiscount/payFeeDiscount.js new file mode 100644 index 000000000..e0f362d1a --- /dev/null +++ b/public/components/property/payFeeDiscount/payFeeDiscount.js @@ -0,0 +1,74 @@ +/** + 入驻小区 +**/ +(function (vc) { + var DEFAULT_PAGE = 1; + var DEFAULT_ROWS = 20; + vc.extends({ + data: { + payFeeDiscountInfo: { + feeDiscounts: [], + feeId: '', + cycles: 1 + } + }, + _initMethod: function () { + + }, + _initEvent: function () { + vc.on('payFeeDiscount', 'computeFeeDiscount', function (_param) { + vc.copyObject(_param, $that.payFeeDiscountInfo); + vc.component._listFeeDiscounts(DEFAULT_PAGE, DEFAULT_ROWS); + }); + }, + methods: { + _listFeeDiscounts: function (_page, _rows) { + + vc.component.payFeeDiscountInfo.conditions.page = _page; + vc.component.payFeeDiscountInfo.conditions.row = _rows; + let param = { + params: { + page: DEFAULT_PAGE, + row: DEFAULT_ROWS, + feeId: $that.payFeeDiscountInfo.feeId, + communityId: $that.payFeeDiscountInfo.communityId, + cycles: $that.payFeeDiscountInfo.cycles + } + }; + + //发送get请求 + vc.http.apiGet('/feeDiscount/queryFeeDiscount', + param, + function (json, res) { + let _payFeeDiscountInfo = JSON.parse(json); + $that.payFeeDiscountInfo.feeDiscounts = _payFeeDiscountInfo.data; + }, function (errInfo, error) { + console.log('请求失败处理'); + } + ); + }, + _openAddFeeDiscountModal: function () { + vc.emit('addFeeDiscount', 'openAddFeeDiscountModal', {}); + }, + _openEditFeeDiscountModel: function (_feeDiscount) { + vc.emit('editFeeDiscount', 'openEditFeeDiscountModal', _feeDiscount); + }, + _openDeleteFeeDiscountModel: function (_feeDiscount) { + vc.emit('deleteFeeDiscount', 'openDeleteFeeDiscountModal', _feeDiscount); + }, + _queryFeeDiscountMethod: function () { + vc.component._listFeeDiscounts(DEFAULT_PAGE, DEFAULT_ROWS); + + }, + _moreCondition: function () { + if (vc.component.payFeeDiscountInfo.moreCondition) { + vc.component.payFeeDiscountInfo.moreCondition = false; + } else { + vc.component.payFeeDiscountInfo.moreCondition = true; + } + } + + + } + }); +})(window.vc);