| | |
| | | <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> |
| | | </div> |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="card-body-item"> |
| | | <div class="header-sub"> |
| | | 电话 |
| | | </div> |
| | | <div class="header-desc" id="form-tel"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="card-body-item" style="width: 400px"> |
| | | <div class="header-sub"> |
| | | 详细地址 |
| | | </div> |
| | | <div class="header-desc" id="form-addr"> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="card-body-item"> |
| | | <div class="header-sub"> |
| | | 负责人 |
| | | </div> |
| | | <div class="header-desc" id="form-director" style="color: #006fdb;"> |
| | | |
| | | </div> |
| | | <span style="opacity: .5;font-size: small;margin-left: 5px">跟踪项目</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </script> |
| | | |
| | | <script> |
| | | var cstmrId = top.cstmrByMore; |
| | | var orderId = top.orderByMore; |
| | | $('.layui-layer-close').hide(); |
| | | layui.config({ |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | |
| | | function init(){ |
| | | notice.msg('正在载入数据......', {icon: 4, position: "topRight"}); |
| | | $.ajax({ |
| | | url: baseUrl + "/cstmr/" + cstmrId + "/auth", |
| | | url: baseUrl + "/order/" + orderId + "/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'GET', |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | let cstmr = res.data; |
| | | top.cstmrByMore = null; |
| | | $("#form-name").html(cstmr.name); |
| | | if (cstmr.tel) {$("#form-tel").html(cstmr.tel);} |
| | | if (cstmr.addr) {$("#form-addr").html(cstmr.addr);$("#form-addr").attr("title", cstmr.addr);} |
| | | if (cstmr.director$) {$("#form-director").html(cstmr.director$);} |
| | | let order = res.data; |
| | | top.orderByMore = null; |
| | | $("#form-name").html(order.name); |
| | | // 设备明细 |
| | | form.val('formAdvForm', cstmr); |
| | | form.val('formAdvForm', order); |
| | | // 跟进人 |
| | | initFollowers(cstmr.id); |
| | | initFollowers(order.id); |
| | | layDateRender(); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | |
| | | layDateRender(); |
| | | |
| | | // 渲染跟进人模块 |
| | | function initFollowers(cstmrId) { |
| | | if (!cstmrId) { |
| | | function initFollowers(orderId) { |
| | | if (!orderId) { |
| | | return; |
| | | } |
| | | $.ajax({ |
| | | url: baseUrl+"/cstmr/followers/table/auth", |
| | | url: baseUrl+"/order/followers/table/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | cstmrId: cstmrId |
| | | orderId: orderId |
| | | }, |
| | | method: 'GET', |
| | | success: function (res) { |
| | |
| | | case "del": |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/cstmr/followers/remove/auth", |
| | | url: baseUrl+"/order/followers/remove/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | cstmrId: cstmrId, |
| | | orderId: orderId, |
| | | userId: data.userId |
| | | }, |
| | | method: 'POST', |
| | | success: function (res) { |
| | | layer.close(loadIndex); |
| | | if (res.code === 200){ |
| | | initFollowers(cstmrId); |
| | | initFollowers(orderId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | } else { |
| | |
| | | } |
| | | let loadIndex = layer.load(2); |
| | | $.ajax({ |
| | | url: baseUrl+"/cstmr/followers/add/auth", |
| | | url: baseUrl+"/order/followers/add/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | data: { |
| | | cstmrId: cstmrId, |
| | | orderId: orderId, |
| | | followerIds: selectList.map(function (d) { |
| | | return d.value; |
| | | }) |
| | |
| | | success: function (res) { |
| | | if (res.code === 200){ |
| | | layer.close(loadIndex); |
| | | initFollowers(cstmrId); |
| | | initFollowers(orderId); |
| | | } else if (res.code === 403){ |
| | | top.location.href = baseUrl+"/"; |
| | | }else { |