| | |
| | | { field: 'hospitalName', width: 300, title: '医院名称' }, |
| | | { field: 'departmentName', width: 100, title: '科室名称' }, |
| | | { field: 'contractNo', width: 150, title: '合同编号' }, |
| | | { field: 'contractTitle', width: 150, title: '合同名' }, |
| | | { field: 'contractTitle', width: 260, title: '合同名' }, |
| | | { field: 'contractBeginTime', width: 150, title: '合同生效时间',templet:function(d) |
| | | { |
| | | return new Date(d.contractBeginTime).dateFormat("yyyy/MM/dd"); |
| | |
| | | return new Date(d.contractEndTime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'contractTime', width: 180, title: '合同签订时间',templet:function(d){ |
| | | return new Date(d.contractTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | return new Date(d.contractTime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'enabled', width: 120, templet: '#contract-tpl-state', sort: true, title: '状态' }, |
| | | // { field: 'enabled', width: 120, templet: '#contract-tpl-state', sort: true, title: '状态' }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间' }, |
| | | { align: 'center', width: 150, toolbar: '#contract-table-bar', title: '操作' } |
| | | ]] |
| | | }); |
| | | } |
| | | renderTable(); |
| | | |
| | | // 修改状态 |
| | | form.on('switch(contract-tpl-state)', function (obj) { |
| | | layer.load(2); |
| | | admin.req('api-opration/contract/updateEnabled', { |
| | | id: obj.elem.value, |
| | | enabled: obj.elem.checked ? true : false |
| | | }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (data.code == 0) { |
| | | layer.msg(data.msg, { icon: 1, time: 500 }); |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | $(obj.elem).prop('checked', !obj.elem.checked); |
| | | form.render('checkbox'); |
| | | } |
| | | }, 'GET'); |
| | | }); |
| | | |
| | | // 工具条点击事件 |
| | | table.on('tool(contract-table)', function (obj) { |
| | | if (obj.event === 'del') { // 删除 |
| | |
| | | where:{'orderId':orderId}, |
| | | headers: { 'Authorization': 'Bearer ' + config.getToken().access_token }, |
| | | page: true, |
| | | limit:5, |
| | | limit:10, |
| | | limits:[5,10], |
| | | cols: [[ |
| | | { field: 'proName', width: 300, title: '产品名称' }, |
| | |
| | | return new Date(d.proBegintime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'proEndtime', width: 180, title: '结束时间',templet:function(d){ |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间' }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间' } |
| | | ]] |
| | | }); |
| | | } |