| | |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">合同信息</li> |
| | | </ul> |
| | | <div class="layui-tab-content" style="margin: 0px;"> |
| | | <div class="layui-tab-content" style="margin: 0px 0px -10px 0px;"> |
| | | <div class="layui-tab-item layui-show"> |
| | | <div class="layui-form-item" style="padding: 0; margin-bottom: 0px;"> |
| | | <div class="layui-row"> |
| | |
| | | <div class="layui-col-sm3"> |
| | | <label class="layui-form-label" style="padding: 0;">科室名称</label> |
| | | <div class="layui-input-block"> |
| | | <input name="departmentName" id="departmentName" style="border: none; margin-top:-10px" |
| | | readonly class="layui-input" /> |
| | | <input name="departmentName" id="departmentName" |
| | | style="border: none; margin-top:-10px" readonly class="layui-input" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | | <label class="layui-form-label" style="padding: 0;">服务人员</label> |
| | | <div class="layui-input-block"> |
| | | <input name="serverUserName" id="serverUserName" |
| | | style="border: none; margin-top:-10px;width: 120px;" readonly class="layui-input" /> |
| | | style="border: none; margin-top:-10px;width: 120px;" readonly |
| | | class="layui-input" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <div class="layui-col-sm3"> |
| | | <label class="layui-form-label">合同编号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="contractNo" id="contractNo" type="text" class="layui-input" maxlength="50" |
| | | style="width: 185px;" autocomplete="off" lay-verify="required" required /> |
| | | <input name="contractNo" id="contractNo" type="text" class="layui-input" |
| | | maxlength="50" style="width: 185px;" autocomplete="off" lay-verify="required" |
| | | required /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">产品信息</li> |
| | | </ul> |
| | | <div class="layui-tab-content" style="margin: 0px;"> |
| | | <div class="layui-tab-content" style="margin: -10px 0px -10px 0px;"> |
| | | <div class="layui-tab-item layui-show" style="padding-top: 0px;"> |
| | | <table class="layui-table" id="product-table" lay-filter="product-table" style="margin: 0px;"></table> |
| | | <table class="layui-table" id="product-table" lay-filter="product-table" style="margin: 0px;"> |
| | | </table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <ul class="layui-tab-title"> |
| | | <li class="layui-this">待充值产品</li> |
| | | </ul> |
| | | <div class="layui-tab-content"> |
| | | <div class="layui-tab-content" style="margin: -10px 0px -10px 0px;"> |
| | | <div class="layui-tab-item layui-show" style="padding-top: 0px;"> |
| | | <table class="layui-table" id="product-table-temp" lay-filter="product-table-temp" style="margin: 0px;"> |
| | | <table class="layui-table" id="product-table-temp" lay-filter="product-table-temp" |
| | | style="margin: 0px;"> |
| | | </table> |
| | | </div> |
| | | </div> |
| | |
| | | cols: [ |
| | | [{ |
| | | field: 'proName', |
| | | width: 320, |
| | | width: 330, |
| | | title: '产品名称', |
| | | align: 'center', |
| | | fixed: 'left' |
| | |
| | | { |
| | | field: 'proType', |
| | | align: 'center', |
| | | width: 100, |
| | | width: 80, |
| | | templet: function (d) { |
| | | if (d.proType === 0) |
| | | return "试用" |
| | |
| | | } |
| | | }, |
| | | { |
| | | field: 'recordCount', |
| | | width: 110, |
| | | align: 'center', |
| | | title: '报告数' |
| | | }, |
| | | { |
| | | field: 'ailightCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '读片量' |
| | | }, |
| | | { |
| | | field: 'recordCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '报告量' |
| | | }, |
| | | { |
| | | field: 'beginTime', |
| | |
| | | field: 'id', |
| | | fixed: 'right', |
| | | align: 'center', |
| | | width: 80, |
| | | width: 100, |
| | | toolbar: '#product-tpl-bar-temp', |
| | | title: '操作' |
| | | } |
| | |
| | | //装载产品数据 |
| | | table.render({ |
| | | elem: '#product-table', |
| | | url: config.base_server + 'api-opration/product', |
| | | url: config.base_server + 'api-opration/product/all', |
| | | method: 'GET', |
| | | cellMinWidth: 50, |
| | | headers: { |
| | |
| | | [{ |
| | | field: 'proName', |
| | | sort: true, |
| | | width: 300, |
| | | width: 330, |
| | | title: '产品名称', |
| | | align: 'center', |
| | | fixed: 'left' |
| | |
| | | } |
| | | }, |
| | | { |
| | | field: 'recordCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '报告数' |
| | | }, |
| | | { |
| | | field: 'ailightCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '读片量' |
| | | }, |
| | | { |
| | | field: 'recordCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '报告量' |
| | | }, |
| | | { |
| | | field: 'beginTime', |
| | | align: 'center', |
| | | width: 130, |
| | | width: 120, |
| | | title: '开始日期', |
| | | templet: function (d) { |
| | | return getNowDate(); |
| | | }, |
| | | event: "date", |
| | | edit: 'text' |
| | | event: "date" |
| | | }, |
| | | { |
| | | field: 'endTime', |
| | | align: 'center', |
| | | width: 130, |
| | | width: 120, |
| | | title: '结束日期', |
| | | templet: function (d) { |
| | | return getNowDate(d.proTime, d.proTimeUnit); |
| | | }, |
| | | event: "date", |
| | | edit: 'text' |
| | | event: "date" |
| | | }, |
| | | { |
| | | field: 'isShare', |
| | |
| | | }); |
| | | //单元格点击事件 |
| | | table.on('tool(product-table)', function (obj) { |
| | | var newdata = {}; |
| | | var data = obj.data; |
| | | var selectData = {}; |
| | | if (obj.event === 'date') { |
| | | var field = $(this).data('field'); |
| | | laydate.render({ |
| | | elem: this.firstChild, |
| | | format: "yyyy-MM-dd", |
| | | show: true, |
| | | done: function (value, date) { |
| | | var nowTr=obj.tr; |
| | | if (field === "beginTime") { |
| | | var endTimes = getNowDate(data.proTime, data.proTimeUnit, |
| | | value); |
| | | newdata["beginTime"] = value; |
| | | newdata["endTime"] = endTimes; |
| | | } else if (field === "endTime") { |
| | | newdata["endTime"] = value; |
| | | var beginTimes = getNowDate((0 - parseInt(data.proTime)), |
| | | data.proTimeUnit, value); |
| | | newdata["beginTime"] = beginTimes; |
| | | } |
| | | obj.update(newdata); |
| | | } |
| | | }); |
| | | } |
| | | if (obj.event === "pay") { |
| | | data.beginTime = obj.tr.find("td[data-field='beginTime'] input").val(); |
| | | data.endTime = obj.tr.find("td[data-field='endTime'] input").val(); |
| | |
| | | } |
| | | }); |
| | | //自动计算时间 |
| | | var getNowDate = function (proTime, proTimeUnit) { |
| | | var now = new Date(); |
| | | var getNowDate = function (proTime, proTimeUnit, now) { |
| | | if (strUtil.isEmpty(now)) { |
| | | now = new Date(); |
| | | } else { |
| | | now = dateUtil.strTurnDate(now); |
| | | } |
| | | if (strUtil.isEmpty(proTime) && strUtil.isEmpty(proTimeUnit)) { |
| | | return now.dateFormat("yyyy-MM-dd"); |
| | | } else { |
| | |
| | | return new Date(now.setDate(now.getDate() + proTime)).dateFormat("yyyy-MM-dd"); |
| | | break; |
| | | case 1: |
| | | return new Date(now.setMonth(now.getMonth() + proTime + 1)).dateFormat( |
| | | return new Date(now.setMonth(now.getMonth() + proTime)).dateFormat( |
| | | "yyyy-MM-dd"); |
| | | break; |
| | | case 2: |
| | |
| | | isRun=true; |
| | | data.field.contractBeginTime = data.field.contractBeginTime + |
| | | " 00:00:00"; |
| | | data.field.contractEndTime = data.field.contractEndTime + " 23:59:59"; |
| | | data.field.contractEndTime = data.field.contractEndTime + |
| | | " 23:59:59"; |
| | | data.field.contractTime = data.field.contractTime + " 00:00:00"; |
| | | admin.req('api-opration/contract', JSON.stringify(data.field), |
| | | function (data) { |
| | |
| | | |
| | | if (listDetailData.length > 0) { |
| | | //提交订单数据 |
| | | admin.req('api-opration/productorderdetail/saveall', |
| | | admin.req( |
| | | 'api-opration/productorderdetail/saveall', |
| | | JSON.stringify(listDetailData), |
| | | function (data) { |
| | | isRun=false; |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | | //现将临时数据清理 |
| | | admin.putTempData("t_tempProduct", |
| | | admin.putTempData( |
| | | "t_tempProduct", |
| | | ""); |
| | | layer.msg(data.msg, { |
| | | icon: 1, |