| | |
| | | <div class="layui-card"> |
| | | <div class="layui-card-header" style="padding-top: 5px; padding-bottom: 5px"> |
| | | <div> |
| | | <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold"></i> |
| | | <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold"></i> |
| | | <span id="form-name" style="margin: 0 6px;font-size: 18px;font-weight: bold;letter-spacing: 1px"></span> |
| | | <span style="opacity: .5;font-size: small;margin-left: 5px">跟踪项目</span> |
| | | <span style="opacity: .5;font-size: small;margin-left: 5px">售前规划申请单</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | |
| | | <script> |
| | | var orderId = top.orderByMore; |
| | | var planId = top.planByMore; |
| | | $('.layui-layer-close').hide(); |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | |
| | | function init(){ |
| | | notice.msg('正在载入数据......', {icon: 4, position: "topRight"}); |
| | | $.ajax({ |
| | | url: baseUrl + "/order/" + orderId + "/auth", |
| | | url: baseUrl + "/plan/" + planId + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | let order = res.data; |
| | | top.orderByMore = null; |
| | | $("#form-name").html(order.name); |
| | | let plan = res.data; |
| | | top.planByMore = null; |
| | | $("#form-name").html(plan.name); |
| | | // 设备明细 |
| | | form.val('formAdvForm', order); |
| | | form.val('formAdvForm', plan); |
| | | // 跟进人 |
| | | initFollowers(order.id); |
| | | initFollowers(plan.id); |
| | | layDateRender(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | |
| | | layDateRender(); |
| | | |
| | | // 渲染跟进人模块 |
| | | function initFollowers(orderId) { |
| | | if (!orderId) { |
| | | function initFollowers(planId) { |
| | | if (!planId) { |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/order/followers/table/auth", |
| | | url: baseUrl+"/plan/followers/table/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId |
| | | planId: planId |
| | | }, |
| | | method: 'GET', |
| | | success: function (res) { |
| | |
| | | case "del": |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/followers/remove/auth", |
| | | url: baseUrl+"/plan/followers/remove/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId, |
| | | planId: planId, |
| | | userId: data.userId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | initFollowers(orderId); |
| | | initFollowers(planId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | |
| | | } |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/order/followers/add/auth", |
| | | url: baseUrl+"/plan/followers/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | orderId: orderId, |
| | | planId: planId, |
| | | followerIds: selectList.map(function (d) { |
| | | return d.value; |
| | | }) |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.close(loadIndex); |
| | | initFollowers(orderId); |
| | | initFollowers(planId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |