From a730987f2a3eb600b3c0d90961aa6ac7925b902e Mon Sep 17 00:00:00 2001 From: houruijun <411269194@kidgrow.com> Date: Mon, 28 Sep 2020 15:49:38 +0800 Subject: [PATCH] 1.增加小数类型处理公共类 2.开通支付修改互斥条件和查询参数 3.修改单次支付的开通金额统一单位为分 --- kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html | 240 +++++++++++++++++++++++++++++++++-------------------------- 1 files changed, 134 insertions(+), 106 deletions(-) diff --git a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html index a5eb861..0156127 100644 --- a/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html +++ b/kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/recharge.html @@ -275,113 +275,141 @@ //回显医院基本数据 let hospitalData = admin.getTempData('t_hospital'); if (hospitalData != null) { - form.val('recharge-form', hospitalData); - $("#hospitalAreas").val(hospitalData.hospitalProvince + " " + hospitalData.hospitalCity + " " + - hospitalData.hospitalArea); - } - //装载产品数据 - table.render({ - elem: '#product-table', - url: config.base_server + 'api-opration/product/all', - method: 'GET', - cellMinWidth: 50, - headers: { - 'Authorization': 'Bearer ' + config.getToken().access_token - }, - page: false, - where: { - is_del: 0, - enabled: 1 - }, - cols: [ - [{ - field: 'proName', - sort: true, - width: 330, - title: '产品名称', - align: 'center', - fixed: 'left' - }, - { - field: 'proType', - sort: true, - align: 'center', - width: 80, - templet: function (d) { - if (d.proType === 0) - return "试用" - else - return "正式" - }, - title: '类型' - }, - { - field: 'proTime', - width: 100, - title: '时长', - align: 'center', - templet: function (d) { - switch (d.proTimeUnit) { - case 0: - return d.proTime + "天"; - break; - case 1: - return d.proTime + "月"; - break; - case 2: - return d.proTime + "年"; - break; - } + admin.req('api-user/sysdepartment/getPayMes?departmentId=' + hospitalData.departmentId, {}, + function (data) { + layer.closeAll('loading'); + debugger + if (0 === data.code) { + queryData = data.data; + if (queryData === true) { + admin.finishPopupCenter(); + layer.msg("当前科室开通了单次支付功能,不能进行充值业务!", { + icon: 3, + time: 5000 + }); + } else { + form.val('recharge-form', hospitalData); + $("#hospitalAreas").val(hospitalData.hospitalProvince + " " + hospitalData + .hospitalCity + " " + + hospitalData.hospitalArea); + + //装载产品数据 + table.render({ + elem: '#product-table', + url: config.base_server + 'api-opration/product/all', + method: 'GET', + cellMinWidth: 50, + headers: { + 'Authorization': 'Bearer ' + config.getToken().access_token + }, + page: false, + where: { + is_del: 0, + enabled: 1 + }, + cols: [ + [{ + field: 'proName', + sort: true, + width: 330, + title: '产品名称', + align: 'center', + fixed: 'left' + }, + { + field: 'proType', + sort: true, + align: 'center', + width: 80, + templet: function (d) { + if (d.proType === 0) + return "试用" + else + return "正式" + }, + title: '类型' + }, + { + field: 'proTime', + width: 100, + title: '时长', + align: 'center', + templet: function (d) { + switch (d.proTimeUnit) { + case 0: + return d.proTime + "天"; + break; + case 1: + return d.proTime + "月"; + break; + case 2: + return d.proTime + "年"; + break; + } + } + }, + { + field: 'ailightCount', + width: 100, + align: 'center', + title: '读片量' + }, + { + field: 'recordCount', + width: 100, + align: 'center', + title: '报告量' + }, + { + field: 'beginTime', + align: 'center', + width: 120, + title: '开始日期', + event: "date" + }, + { + field: 'endTime', + align: 'center', + width: 120, + title: '结束日期', + event: "date" + }, + { + field: 'isShare', + fixed: 'right', + align: 'center', + width: 100, + templet: '#product-tpl-isShare', + title: '共享' + }, + { + field: 'id', + fixed: 'right', + align: 'center', + width: 100, + toolbar: '#product-tpl-bar', + title: '操作' + } + ] + ], + done: function (res) { + permissionsInput(res, config); + } + }); } - }, - { - field: 'ailightCount', - width: 100, - align: 'center', - title: '读片量' - }, - { - field: 'recordCount', - width: 100, - align: 'center', - title: '报告量' - }, - { - field: 'beginTime', - align: 'center', - width: 120, - title: '开始日期', - event: "date" - }, - { - field: 'endTime', - align: 'center', - width: 120, - title: '结束日期', - event: "date" - }, - { - field: 'isShare', - fixed: 'right', - align: 'center', - width: 100, - templet: '#product-tpl-isShare', - title: '共享' - }, - { - field: 'id', - fixed: 'right', - align: 'center', - width: 100, - toolbar: '#product-tpl-bar', - title: '操作' } - ] - ], - done: function (res) { - permissionsInput(res, config); - } - }); + else + { + admin.finishPopupCenter(); + layer.msg("验证医院科室数据异常!", { + icon: 2, + time: 3000 + }); + } + }, 'get'); + + } + //待充值列表功能操作 table.on('tool(product-table-temp)', function (obj) { if (obj.event === "del") { @@ -403,7 +431,7 @@ format: "yyyy-MM-dd", show: true, done: function (value, date) { - var nowTr=obj.tr; + var nowTr = obj.tr; if (field === "beginTime") { var endTimes = getNowDate(data.proTime, data.proTimeUnit, value); -- Gitblit v1.8.0