1.取消了删除科室的时候,联动删除医院的公能
2.调整了运营平台部分页面的字段显示
| | |
| | | //科室数据 |
| | | SysDepartment sysDepartment=departmentMapper.selectById(departmentId); |
| | | //医院数据 |
| | | SysHospital sysHospital = baseMapper.selectById(id); |
| | | if (sysHospital == null) { |
| | | return ResultBody.failed("医院数据不存在!"); |
| | | } |
| | | //SysHospital sysHospital = baseMapper.selectById(id); |
| | | // if (sysHospital == null) { |
| | | // return ResultBody.failed("医院数据不存在!"); |
| | | // } |
| | | if (sysDepartment == null) { |
| | | return ResultBody.failed("科室数据不存在!"); |
| | | } |
| | | //医院下的所有科室数据 |
| | | Map<String,Object> columnMap=new HashMap<String,Object>(); |
| | | columnMap.put("org_parent_id",sysHospital.getOrgId()); |
| | | columnMap.put("is_del",0); |
| | | columnMap.put("enabled",1); |
| | | List<SysOrganization> sysOrganizationList=sysOrganizationMapper.selectByMap(columnMap); |
| | | //如果这个医院下有多个科室,禁用只对当前科室有效,否则也要禁用医院 |
| | | if(sysOrganizationList.size()==1) |
| | | { |
| | | sysHospital.setIsDel(true); |
| | | baseMapper.updateById(sysHospital); |
| | | SysOrganization sysOrganizationH=sysOrganizationMapper.selectById(sysHospital.getOrgId()); |
| | | if (sysOrganizationH != null) { |
| | | sysOrganizationH.setIsDel(true); |
| | | sysOrganizationMapper.updateById(sysOrganizationH); |
| | | } |
| | | } |
| | | // Map<String,Object> columnMap=new HashMap<String,Object>(); |
| | | // columnMap.put("org_parent_id",sysHospital.getOrgId()); |
| | | // columnMap.put("is_del",0); |
| | | // columnMap.put("enabled",1); |
| | | // List<SysOrganization> sysOrganizationList=sysOrganizationMapper.selectByMap(columnMap); |
| | | // //如果这个医院下有多个科室,删除只对当前科室有效,否则也要删除医院 |
| | | // if(sysOrganizationList.size()==1) |
| | | // { |
| | | // sysHospital.setIsDel(true); |
| | | // baseMapper.updateById(sysHospital); |
| | | // SysOrganization sysOrganizationH=sysOrganizationMapper.selectById(sysHospital.getOrgId()); |
| | | // if (sysOrganizationH != null) { |
| | | // sysOrganizationH.setIsDel(true); |
| | | // sysOrganizationMapper.updateById(sysOrganizationH); |
| | | // } |
| | | // } |
| | | sysDepartment.setIsDel(true); |
| | | int j=departmentMapper.updateById(sysDepartment); |
| | | //删除组织数据 |
| | |
| | | sysOrganizationD.setIsDel(true); |
| | | sysOrganizationMapper.updateById(sysOrganizationD); |
| | | } |
| | | return (j>0) ? ResultBody.ok().data(sysHospital).msg("删除成功") : ResultBody.failed("删除失败"); |
| | | return (j>0) ? ResultBody.ok().data(sysDepartment).msg("科室删除成功") : ResultBody.failed("科室删除失败"); |
| | | } |
| | | |
| | | /** |
| | |
| | | left JOIN sys_hospital syshos on sysdoctor.hospital_id=syshos.id |
| | | left JOIN sys_department sysdep on sysdoctor.department_id=sysdep.id |
| | | where sysuser.id=#{userId} |
| | | and sysuser.is_del=0 and sysuser.enabled=1 |
| | | and syshos.is_del=0 and syshos.enabled=1 |
| | | and sysdep.is_del=0 and sysdep.enabled=1 |
| | | </select> |
| | | <select id="hospitalDoctorList" parameterType="long" resultType="com.kidgrow.usercenter.vo.HospitalDoctorListVo"> |
| | | SELECT |
| | |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs permissions" permissions="users-edit" |
| | | lay-event="reset">重置密码</button> |
| | | {{#}}} |
| | | |
| | | |
| | | <button class="layui-btn layui-btn-primary layui-btn-xs permissions" permissions="sysdoctor-edit" |
| | | lay-event="edit">修改</button> |
| | | <button class="layui-btn layui-btn-xs permissions" permissions="sysdoctor-del" lay-event="del">删除</button> |
| | |
| | | [{ |
| | | field: 'hospitalName', |
| | | width: 180, |
| | | title: '医院名称' |
| | | title: '医院名称', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'departmentName', |
| | | width: 80, |
| | | title: '科室', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'doctorName', |
| | | width: 120, |
| | | title: '医生姓名' |
| | | title: '医生姓名', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'doctorRank', |
| | |
| | | data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.alert("密码重置为:"+data.data, {icon: 1}); |
| | | layer.alert("密码重置为:" + data.data, { |
| | | icon: 1 |
| | | }); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | |
| | | }, 'PUT'); |
| | | }); |
| | | } else if (layEvent === 'edit') { |
| | | showEditModel_add("编辑",data); |
| | | showEditModel_add("编辑", data); |
| | | } else if (layEvent === 'del') { |
| | | layer.confirm('确定删除此用户吗?', function (i) { |
| | | layer.close(i); |
| | |
| | | }); |
| | | |
| | | // 显示新增弹窗 |
| | | var showEditModel_add = function (title,data) { |
| | | var showEditModel_add = function (title, data) { |
| | | admin.putTempData('t_doctor', data); |
| | | admin.popupCenter({ |
| | | title: title, |
| | |
| | | <a class="layui-btn layui-btn-xs permissions" permissions="product-rechage" lay-event="pay">充值</a> |
| | | <!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看详情</a> --> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs permissions" permissions="hospital-save" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="hospital-del" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="hospital-del" lay-event="del">删除科室</a> |
| | | </script> |
| | | <!-- 表格状态列 --> |
| | | <script type="text/html" id="hospital-tpl-state"> |
| | |
| | | var data = obj.data; |
| | | var layEvent = obj.event; |
| | | if (layEvent === 'del') { |
| | | layer.confirm('确定要删除吗?', function (i) { |
| | | layer.confirm('确定要删除科室数据吗?', function (i) { |
| | | layer.load(2); |
| | | var whereModel = { |
| | | id: obj.data.hospitalId, |
| | |
| | | // // 显示编辑弹窗 |
| | | var showEditModel = function (data) { |
| | | admin.popupCenter({ |
| | | title: (strUtil.isEmpty(data))?'添加医院':'编辑医院', |
| | | title: (strUtil.isEmpty(data))?'添加医院/科室':'编辑医院/科室', |
| | | path: 'pages/opration/hospital_form_base.html', |
| | | area: '900px', |
| | | finish: function () { |
| | |
| | | </div> |
| | | <div class="layui-form-item model-form-footer" style="margin-right: 20px;"> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | <button class="layui-btn permissions" permissions="product-rechage" lay-filter="recharge-form-submit" lay-submit>确定充值</button> |
| | | <button class="layui-btn permissions" permissions="product-rechage" lay-filter="recharge-form-submit" |
| | | lay-submit>确定充值</button> |
| | | </div> |
| | | <input type="hidden" value="" id="departmentId" name="departmentId" /> |
| | | <input type="hidden" value="" id="hospitalId" name="hospitalId" /> |
| | |
| | | </script> |
| | | <!-- 表格状态列 --> |
| | | <script type="text/html" id="product-tpl-isShare"> |
| | | <input type="checkbox" lay-filter="product-tpl-isShare" value="{{d.id}}" lay-skin="switch" lay-text="共享|不共享"/> |
| | | <input type="checkbox" lay-filter="product-tpl-isShare" value="{{d.id}}" lay-skin="switch" lay-text="共享|不共享" /> |
| | | </script> |
| | | <script> |
| | | layui.use(['form', 'table', 'util', 'config', 'laydate', 'admin'], function () { |
| | |
| | | |
| | | //执行一个laydate实例 |
| | | laydate.render({ |
| | | elem: '#contractBeginTime'//指定元素 |
| | | elem: '#contractBeginTime' //指定元素 |
| | | }); |
| | | laydate.render({ |
| | | elem: '#contractEndTime' //指定元素 |
| | |
| | | data: admin.getTempData("t_tempProduct"), |
| | | page: false, |
| | | height: '120px', |
| | | cols: [[ |
| | | { field: 'proName', width: 320, title: '产品名称', align: 'center', fixed: 'left' }, |
| | | cols: [ |
| | | [{ |
| | | field: 'proName', |
| | | width: 320, |
| | | title: '产品名称', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'proType', |
| | | align: 'center', |
| | | width: 100, |
| | | 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: 'recordCount', |
| | | width: 110, |
| | | align: 'center', |
| | | title: '报告数' |
| | | }, |
| | | { |
| | | field: 'ailightCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '读片量' |
| | | }, |
| | | { |
| | | field: 'beginTime', |
| | | align: 'center', |
| | | width: 120, |
| | | title: '开始日期' |
| | | }, |
| | | { |
| | | field: 'endTime', |
| | | align: 'center', |
| | | width: 120, |
| | | title: '结束日期' |
| | | }, |
| | | { |
| | | field: 'isShare', |
| | | fixed: 'right', |
| | | align: 'center', |
| | | width: 100, |
| | | templet: function (d) { |
| | | if (d.isShare == 0) |
| | | return "不共享" |
| | | else |
| | | return "共享" |
| | | }, |
| | | title: '共享' |
| | | }, |
| | | { |
| | | field: 'id', |
| | | fixed: 'right', |
| | | align: 'center', |
| | | width: 80, |
| | | toolbar: '#product-tpl-bar-temp', |
| | | title: '操作' |
| | | } |
| | | ] |
| | | ] |
| | | }); |
| | | } |
| | | |
| | | //回显医院基本数据 |
| | | 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', |
| | | method: 'GET', |
| | | headers: { |
| | | 'Authorization': 'Bearer ' + config.getToken().access_token |
| | | }, |
| | | page: false, |
| | | height: '300px', |
| | | where: { |
| | | enabled: 1 |
| | | }, |
| | | cols: [ |
| | | [{ |
| | | field: 'proName', |
| | | sort: true, |
| | | width: 300, |
| | | title: '产品名称', |
| | | align: 'center', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | field: 'proType', align: 'center', width: 100, templet: function (d) { |
| | | field: 'proType', |
| | | sort: true, |
| | | align: 'center', |
| | | width: 80, |
| | | templet: function (d) { |
| | | if (d.proType === 0) |
| | | return "试用" |
| | | else |
| | | return "正式" |
| | | }, title: '类型' |
| | | }, |
| | | title: '类型' |
| | | }, |
| | | { |
| | | field: 'proTime', width: 100, title: '时长', align: 'center', templet: function (d) { |
| | | field: 'proTime', |
| | | width: 100, |
| | | title: '时长', |
| | | align: 'center', |
| | | templet: function (d) { |
| | | switch (d.proTimeUnit) { |
| | | case 0: |
| | | return d.proTime + "天"; |
| | |
| | | } |
| | | } |
| | | }, |
| | | { field: 'recordCount', width: 110, align: 'center', title: '报告数' }, |
| | | { field: 'ailightCount', width: 100, align: 'center', title: '读片量' }, |
| | | { |
| | | field: 'beginTime', align: 'center', width: 120, title: '开始日期' |
| | | field: 'recordCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '报告数' |
| | | }, |
| | | { |
| | | field: 'endTime', align: 'center', width: 120, title: '结束日期' |
| | | field: 'ailightCount', |
| | | width: 100, |
| | | align: 'center', |
| | | title: '读片量' |
| | | }, |
| | | { |
| | | field: 'isShare', fixed: 'right', align: 'center', width: 100, templet: function (d) { |
| | | if (d.isShare == 0) |
| | | return "不共享" |
| | | else |
| | | return "共享" |
| | | }, title: '共享' |
| | | field: 'beginTime', |
| | | align: 'center', |
| | | width: 130, |
| | | title: '开始日期', |
| | | templet: function (d) { |
| | | return getNowDate(); |
| | | }, |
| | | event: "date", |
| | | edit: 'text' |
| | | }, |
| | | { field: 'id', fixed: 'right', align: 'center', width: 80, toolbar: '#product-tpl-bar-temp', title: '操作' } |
| | | ]] |
| | | }); |
| | | } |
| | | |
| | | //回显医院基本数据 |
| | | 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', |
| | | method: 'GET', |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: false, |
| | | height: '300px', |
| | | where: { enabled: 1 }, |
| | | cols: [[ |
| | | { field: 'proName', sort: true, width: 300, 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: 'endTime', |
| | | align: 'center', |
| | | width: 130, |
| | | title: '结束日期', |
| | | templet: function (d) { |
| | | return getNowDate(d.proTime, d.proTimeUnit); |
| | | }, |
| | | event: "date", |
| | | edit: 'text' |
| | | }, |
| | | { |
| | | 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: '操作' |
| | | } |
| | | }, |
| | | { field: 'recordCount', width: 100, align: 'center', title: '报告数' }, |
| | | { field: 'ailightCount', width: 100, align: 'center', title: '读片量' }, |
| | | { |
| | | field: 'beginTime', align: 'center', width: 130, title: '开始日期', templet: function (d) { |
| | | return getNowDate(); |
| | | }, event: "date", edit: 'text' |
| | | }, |
| | | { |
| | | field: 'endTime', align: 'center', width: 130, title: '结束日期', templet: function (d) { |
| | | return getNowDate(d.proTime, d.proTimeUnit); |
| | | }, event: "date", edit: 'text' |
| | | }, |
| | | { 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); |
| | | ] |
| | | ], |
| | | done: function (res) { |
| | | permissionsInput(res, config); |
| | | } |
| | | }); |
| | | //待充值列表功能操作 |
| | |
| | | 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(); |
| | | data.beginTime = (!strUtil.isEmpty(data.beginTime)) ? data.beginTime : obj.tr.find("td[data-field='beginTime'] div").text(); |
| | | data.endTime = (!strUtil.isEmpty(data.endTime)) ? data.endTime : obj.tr.find("td[data-field='endTime'] div").text(); |
| | | data.beginTime = (!strUtil.isEmpty(data.beginTime)) ? data.beginTime : obj.tr.find( |
| | | "td[data-field='beginTime'] div").text(); |
| | | data.endTime = (!strUtil.isEmpty(data.endTime)) ? data.endTime : obj.tr.find( |
| | | "td[data-field='endTime'] div").text(); |
| | | data.isShare = obj.tr.find("td[data-field='isShare'] em").text(); |
| | | data.isShare = (data.isShare.indexOf("不") == 0) ? 0 : 1 |
| | | ; |
| | | data.isShare = (data.isShare.indexOf("不") == 0) ? 0 : 1; |
| | | if (!strUtil.isEmpty(data.beginTime) && !strUtil.isEmpty(data.endTime)) { |
| | | if (dateUtil.compareDate(data.endTime, data.beginTime)) { |
| | | tempDataList(data); |
| | | waitRecharge(); |
| | | } |
| | | else { |
| | | } else { |
| | | layer.msg("结束时间必须大于开始时间!"); |
| | | return false; |
| | | } |
| | | } |
| | | else { |
| | | } else { |
| | | layer.msg("时间格式有误!"); |
| | | return false; |
| | | } |
| | |
| | | //监听单元格编辑 判断日期格式 |
| | | table.on('edit(product-table)', function (obj) { |
| | | var value = obj.value //得到修改后的值 |
| | | , data = obj.data //得到所在行所有键值 |
| | | , field = obj.field; //得到字段 |
| | | if (dateUtil.isDate(value)) { |
| | | } |
| | | else { |
| | | , |
| | | data = obj.data //得到所在行所有键值 |
| | | , |
| | | field = obj.field; //得到字段 |
| | | if (dateUtil.isDate(value)) {} else { |
| | | layer.msg("输入的日期格式无效!"); |
| | | } |
| | | }); |
| | |
| | | var now = new Date(); |
| | | if (strUtil.isEmpty(proTime) && strUtil.isEmpty(proTimeUnit)) { |
| | | return now.dateFormat("yyyy-MM-dd"); |
| | | } |
| | | else { |
| | | } else { |
| | | proTime = strUtil.isEmpty(proTime) ? 0 : proTime; |
| | | proTimeUnit = strUtil.isEmpty(proTimeUnit) ? 0 : proTimeUnit; |
| | | switch (proTimeUnit) { |
| | |
| | | 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("yyyy-MM-dd"); |
| | | return new Date(now.setMonth(now.getMonth() + proTime + 1)).dateFormat( |
| | | "yyyy-MM-dd"); |
| | | break; |
| | | case 2: |
| | | return new Date(now.setFullYear(now.getFullYear() + proTime)).dateFormat("yyyy-MM-dd"); |
| | | return new Date(now.setFullYear(now.getFullYear() + proTime)).dateFormat( |
| | | "yyyy-MM-dd"); |
| | | break; |
| | | } |
| | | } |
| | |
| | | }) |
| | | listData.push(data); |
| | | admin.putTempData("t_tempProduct", listData); |
| | | } |
| | | else { |
| | | } else { |
| | | admin.putTempData("t_tempProduct", ""); |
| | | } |
| | | } |
| | |
| | | var listData = admin.getTempData("t_tempProduct"); |
| | | if (listData != null) { |
| | | if (data.field != null) { |
| | | layer.confirm("确定要将待充值列表中的" + listData.length + "个产品充值给当前医院吗?", { btn: ["确定", "返回"] }, function () { |
| | | data.field.contractBeginTime=data.field.contractBeginTime+" 00:00:00"; |
| | | 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) { |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | | var orderData = data.data; |
| | | //处理订单明细数据 |
| | | var listDetailData = new Array(); |
| | | $.each(listData, function (index, item) { |
| | | var detailData = { |
| | | orderId: orderData.id, |
| | | proId: item.id, |
| | | proType: item.proType, |
| | | proName: item.proName, |
| | | isShare: item.isShare, |
| | | ailightCount: item.ailightCount, |
| | | recordCount: item.recordCount, |
| | | proBegintime: item.beginTime + ' 00:00:00', |
| | | proEndtime: item.endTime + ' 23:59:59' |
| | | }; |
| | | listDetailData.push(detailData); |
| | | }) |
| | | |
| | | if (listDetailData.length > 0) { |
| | | //提交订单数据 |
| | | admin.req('api-opration/productorderdetail/saveall', JSON.stringify(listDetailData), function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | | //现将临时数据清理 |
| | | admin.putTempData("t_tempProduct", ""); |
| | | layer.msg(data.msg, { icon: 1, time: 3000 }, function () { |
| | | admin.finishPopupCenter(); |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg(data.msg, { icon: 2, time: 1000 }); |
| | | } |
| | | }, 'POST'); |
| | | layer.confirm("确定要将待充值列表中的" + listData.length + "个产品充值给当前医院吗?", { |
| | | btn: ["确定", "返回"] |
| | | }, function () { |
| | | data.field.contractBeginTime = data.field.contractBeginTime + |
| | | " 00:00:00"; |
| | | 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) { |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | | var orderData = data.data; |
| | | //处理订单明细数据 |
| | | var listDetailData = new Array(); |
| | | $.each(listData, function (index, item) { |
| | | var detailData = { |
| | | orderId: orderData.id, |
| | | proId: item.id, |
| | | proType: item.proType, |
| | | proName: item.proName, |
| | | isShare: item.isShare, |
| | | ailightCount: item.ailightCount, |
| | | recordCount: item.recordCount, |
| | | proBegintime: item.beginTime + |
| | | ' 00:00:00', |
| | | proEndtime: item.endTime + |
| | | ' 23:59:59' |
| | | }; |
| | | listDetailData.push(detailData); |
| | | }) |
| | | |
| | | if (listDetailData.length > 0) { |
| | | //提交订单数据 |
| | | admin.req('api-opration/productorderdetail/saveall', |
| | | JSON.stringify(listDetailData), |
| | | function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code === 0) { |
| | | //现将临时数据清理 |
| | | admin.putTempData("t_tempProduct", |
| | | ""); |
| | | layer.msg(data.msg, { |
| | | icon: 1, |
| | | time: 3000 |
| | | }, function () { |
| | | admin |
| | | .finishPopupCenter(); |
| | | }); |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 1000 |
| | | }); |
| | | } |
| | | }, 'POST'); |
| | | } else { |
| | | layer.msg("充值数据异常为空!", { |
| | | icon: 2, |
| | | time: 1000 |
| | | }); |
| | | } |
| | | } else { |
| | | layer.msg(data.msg, { |
| | | icon: 2, |
| | | time: 1000 |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg("充值数据异常为空!", { icon: 2, time: 1000 }); |
| | | } |
| | | } |
| | | else { |
| | | layer.msg(data.msg, { icon: 2, time: 1000 }); |
| | | } |
| | | }, 'POST'); |
| | | }, 'POST'); |
| | | }) |
| | | } else { |
| | | layer.msg("数据异常!", { |
| | | icon: 2, |
| | | time: 1000 |
| | | }); |
| | | } |
| | | else { |
| | | layer.msg("数据异常!", { icon: 2, time: 1000 }); |
| | | } |
| | | } |
| | | else { |
| | | layer.msg("请先将要充值的产品加入待充值!", { icon: 2, time: 2000 }); |
| | | } else { |
| | | layer.msg("请先将要充值的产品加入待充值!", { |
| | | icon: 2, |
| | | time: 2000 |
| | | }); |
| | | } |
| | | layer.closeAll('loading'); |
| | | return false; |