| | |
| | | cellMinWidth: 150, |
| | | cols: [[ |
| | | {type: 'checkbox', fixed: 'left'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80} |
| | | ,{field: 'templateName', align: 'center',title: '模板名'} |
| | | ,{field: 'orderNum', align: 'center',title: '产品费用明细单号'} |
| | | ,{field: 'id', title: 'ID', sort: true,align: 'center', fixed: 'left', width: 80,hide : true} |
| | | ,{field: 'templateName', align: 'center',title: '客户名称', style: 'color: #1890ff;cursor:pointer', event: 'moreCstmr', width: 350,hide: false} |
| | | ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true} |
| | | ,{field: 'inOrderNum', align: 'center',title: '预算编号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号'} |
| | | ,{field: 'orderNum', align: 'center',title: '产品费用明细单号'} |
| | | ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan'} |
| | | ,{field: 'itemId', align: 'center',title: '规划单号', hide: true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | ,{field: 'updateTime$', align: 'center',title: '更新时间'} |
| | | ,{field: 'memberId$', align: 'center',title: '业务员'} |
| | | ,{field: 'userId$', align: 'center',title: '创建人员'} |
| | | ,{field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false} |
| | | // ,{field: 'userId$', align: 'center',title: '创建人员'} |
| | | ,{field: 'updateUserId$', align: 'center',title: '更新人员'} |
| | | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:200} |
| | | ]], |
| | |
| | | table.on('tool(priQuoteBudget)', 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.priQuoteBudgetByMore = data.id; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "priQuoteBudget_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'moreCstmr': |
| | | top.cstmrByMore = data.cstmrId$; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../cstmr/cstmr_more.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case 'morePlan': |
| | | top.planByMore = data.itemId; |
| | | admin.popupRight({ |
| | | type: 1, |
| | | window: "top", |
| | | area: "1250px", |
| | | url: "../plan/plan_more_other.html", |
| | | end: function () { |
| | | // $(".layui-laypage-btn")[0].click(); |
| | | } |
| | | }) |
| | | break; |
| | | case "quoteBudget": |
| | | layer.open({ |
| | | type: 2, |
| | |
| | | }); |
| | | } |
| | | |
| | | function approval(priQuoteBudgetId, plannerId, dIdx) { |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/priQuoteBudget/approval/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | priQuoteBudgetId: priQuoteBudgetId, |
| | | 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}); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |