中扬CRM客户关系管理系统
LSH
2023-10-10 9c3c9bf7dfaf0f1c162a6aa06fdb7ca81711f70d
src/main/webapp/static/js/priOnline2/priOnline.js
@@ -84,16 +84,38 @@
        cols: [[
            {type: 'checkbox', fixed: 'left'}
            ,{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: 'templateName',
                align: 'center',
                title: '客户名称',
                style: 'color: #1890ff;cursor:pointer',
                event: 'moreCstmr',
                width: 350,
                hide: false
            }
            ,{field: 'cstmrId$', align: 'center',title: '客户id',hide: true}
            ,{field: 'orderNum', align: 'center',title: '核价单号',hide: false}
            ,{field: 'planId$', align: 'center',title: '规划单号', style: 'color: #1890ff;cursor:pointer', event: 'morePlan',hide: false}
            , {
                field: 'planId$',
                align: 'center',
                title: '规划单号',
                style: 'color: #1890ff;cursor:pointer',
                event: 'morePlan',
                hide: false
            }
            ,{field: 'itemId', align: 'center',title: '规划单号', hide: true}
            ,{field: 'createTime$', align: 'center',title: '创建时间'}
            ,{field: 'updateTime$', align: 'center',title: '更新时间'}
            ,{field: 'status$', align: 'center',title: '状态'}
            // ,{field: 'memberId$', align: 'center',title: ''}
            ,{field: 'settle$', align: 'center',title: '进度', style: 'color: #1890ff;cursor:pointer', event: 'more',hide: false}
            , {
                field: 'settle$',
                align: 'center',
                title: '进度',
                style: 'color: #1890ff;cursor:pointer',
                event: 'more',
                hide: false
            }
            ,{field: 'user$', align: 'center',title: '业务员'}
            ,{field: 'updateUserId$', align: 'center',title: '更新人员'}
            ,{field: 'checkDataStatus$', align: 'center',title: '报价数据'}
@@ -236,6 +258,17 @@
    table.on('tool(priOnline)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'approvalEnd':
                layer.confirm('审批拒绝?', {
                    skin: 'layui-layer-admin',
                    shade: .1,
                    offset: '200px',
                    title: data.name
                }, function (i) {
                    layer.close(i);
                    approvalEnd(data.id);
                });
                break;
            case 'approval':
                layer.confirm('审批通过?', {
                    skin: 'layui-layer-admin',
@@ -548,7 +581,32 @@
            }
        });
    }
    function approvalEnd(planId, plannerId, dIdx) {
        let loadIndex = layer.load(2);
        $.ajax({
            url: baseUrl+"/priOnline2/approvalEnd/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {
                priOnlineId: priOnlineId,
                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});
                }
            }
        })
    }
    function approval(priOnlineId, plannerId, dIdx) {
        let loadIndex = layer.load(2);