中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-14 1ed9fc433c407c7d4f369b720422ce4d41e34f3b
#
1个文件已修改
68 ■■■■ 已修改文件
src/main/webapp/views/order/order_more.html 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/order/order_more.html
@@ -44,36 +44,9 @@
        <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">&#xe68e;</i>
                    <i class="layui-icon" style="font-size: 20px;color: #1890ff;font-weight: bold">&#xe609;</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">
                        &nbsp;
                    </div>
                </div>
                <div class="card-body-item" style="width: 400px">
                    <div class="header-sub">
                        详细地址
                    </div>
                    <div class="header-desc" id="form-addr">
                        &nbsp;
                    </div>
                </div>
                <div class="card-body-item">
                    <div class="header-sub">
                        负责人
                    </div>
                    <div class="header-desc" id="form-director" style="color: #006fdb;">
                        &nbsp;
                    </div>
                    <span style="opacity: .5;font-size: small;margin-left: 5px">跟踪项目</span>
                </div>
            </div>
        </div>
@@ -215,7 +188,7 @@
</script>
<script>
    var cstmrId = top.cstmrByMore;
    var orderId = top.orderByMore;
    $('.layui-layer-close').hide();
    layui.config({
        base: baseUrl + "/static/layui/lay/modules/"
@@ -235,22 +208,19 @@
        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 + "/";
@@ -271,15 +241,15 @@
        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) {
@@ -304,17 +274,17 @@
                                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 {
@@ -354,10 +324,10 @@
                        }
                        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;
                                })
@@ -366,7 +336,7 @@
                            success: function (res) {
                                if (res.code === 200){
                                    layer.close(loadIndex);
                                    initFollowers(cstmrId);
                                    initFollowers(orderId);
                                } else if (res.code === 403){
                                    top.location.href = baseUrl+"/";
                                }else {