| | |
| | | , {field: 'status$', align: 'center', title: '状态'} |
| | | , {field: 'userId$', align: 'center', title: '添加人员'} |
| | | , {field: 'createTime$', align: 'center', title: '添加时间'} |
| | | , {field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | , {field: 'updateBy$', align: 'center', title: '修改人员'} |
| | | , {field: 'updateTime$', align: 'center', title: '修改时间'} |
| | | , {field: 'memo', align: 'center', title: '备注'} |
| | | |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 400} |
| | | , {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 500} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | table.on('tool(contract)', function (obj) { |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'approval': |
| | | layer.confirm('审批通过?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1, |
| | | offset: '200px', |
| | | title: data.name |
| | | }, function (i) { |
| | | layer.close(i); |
| | | approval(data.id); |
| | | }); |
| | | break; |
| | | case 'more': |
| | | top.contractByMore = data.id; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "contract_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | |
| | | |
| | | layDateRender(); |
| | | |
| | | function approval(contractId, plannerId, dIdx) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/contract/approval/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | contractId: contractId, |
| | | plannerId: plannerId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | if (dIdx) { |
| | | layer.close(dIdx); |
| | | } |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | layer.msg(res.msg, {icon: 1}); |
| | | tableReload(); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | | layer.msg(res.msg, {icon: 2}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |