中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-19 1e0e97841ceb7db7d419f75b2d3110f4217ce632
src/main/webapp/static/js/plan/plan.js
@@ -2,7 +2,9 @@
var pageCount = 0;
layui.config({
    base: baseUrl + "/static/layui/lay/modules/"
}).use(['table','laydate', 'form', 'admin', 'xmSelect'], function(){
}).extend({
    steps: 'steps/steps',
}).use(['table','laydate', 'form', 'admin', 'xmSelect', 'steps'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
@@ -10,12 +12,13 @@
    var form = layui.form;
    var admin = layui.admin;
    var xmSelect = layui.xmSelect;
    var steps = layui.steps;
    // 数据渲染
    tableIns = table.render({
        elem: '#plan',
        headers: {token: localStorage.getItem('token')},
        url: baseUrl+'/plan/list/auth',
        url: baseUrl+'/plan/page/auth',
        page: true,
        limit: 15,
        limits: [15, 30, 50, 100, 200, 500],
@@ -24,17 +27,18 @@
        height: 'full-120',
        cols: [[
            {type: 'checkbox'}
            ,{field: 'id', align: 'center',title: 'ID'}
            ,{field: 'hostId$', align: 'center',title: '所属商户'}
            ,{field: 'deptId$', align: 'center',title: '所属部门'}
            ,{field: 'planType$', align: 'center',title: '业务类型'}
            // ,{field: 'id', align: 'center',title: 'ID'}
            // ,{field: 'hostId$', align: 'center',title: '所属商户'}
            ,{field: 'userId$', align: 'center',title: '业务员'}
            ,{field: 'planType$', align: 'center',title: '业务类型'}
            ,{field: 'name', align: 'center',title: '售前规划申请单名称'}
            ,{field: 'planNeed$', align: 'center',title: '所需'}
            ,{field: 'deptId$', align: 'center',title: '所属部门'}
            ,{field: 'orderId$', align: 'center',title: '跟踪项目'}
            ,{field: 'cstmrId$', align: 'center',title: '甲方单位'}
            ,{field: 'uuid', align: 'center',title: '规划单代号'}
            ,{field: 'name', align: 'center',title: '规划单名称'}
            ,{field: 'appleTime$', align: 'center',title: '申请日期'}
            ,{field: 'planNeed$', align: 'center',title: '方案所需'}
            ,{field: 'beItem$', align: 'center',title: '立项'}
            ,{field: 'planner', align: 'center',title: '规划员'}
            ,{field: 'finishTime$', align: 'center',title: '完成时间'}
@@ -44,13 +48,11 @@
            ,{field: 'changeReason', align: 'center',title: '更改方案原因'}
            ,{field: 'planBonus', align: 'center',title: '规格奖金'}
            ,{field: 'planLeaderBonus', align: 'center',title: '规格组长奖金'}
            ,{field: 'files', align: 'center',title: '附件'}
            ,{field: 'settle$', align: 'center',title: '进度'}
            ,{field: 'settleMsg', align: 'center',title: '审核进度'}
            ,{field: 'comment', align: 'center',title: '评论'}
            ,{field: 'status$', align: 'center',title: '状态'}
            ,{field: 'createBy$', align: 'center',title: '添加人员'}
            ,{field: 'createTime$', align: 'center',title: '添加时间'}
            // ,{field: 'files', align: 'center',title: '附件'}
            // ,{field: 'settle$', align: 'center',title: '进度'}
            // ,{field: 'settleMsg', align: 'center',title: '审核进度'}
            // ,{field: 'comment', align: 'center',title: '评论'}
            // ,{field: 'status$', align: 'center',title: '状态'}
            ,{field: 'updateBy$', align: 'center',title: '修改人员'}
            ,{field: 'updateTime$', align: 'center',title: '修改时间'}
            ,{field: 'memo', align: 'center',title: '注释'}
@@ -277,34 +279,6 @@
    }
    layDateRender();
    window.loadHostSel = function () {
        return xmSelect.render({
            el: '#hostXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/host/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200) {
                            cb(res.data)
                        } else {
                            cb([]);
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                });
            }
        });
    }
    window.loadDeptSel = function () {
        return xmSelect.render({
            el: '#deptXmlSel',
@@ -343,62 +317,6 @@
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/planType/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200) {
                            cb(res.data)
                        } else {
                            cb([]);
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                });
            }
        });
    }
    window.loadUserSel = function () {
        return xmSelect.render({
            el: '#userXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/user/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200) {
                            cb(res.data)
                        } else {
                            cb([]);
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                });
            }
        });
    }
    window.loadUserSel = function () {
        return xmSelect.render({
            el: '#userXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/user/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
@@ -500,35 +418,6 @@
            }
        });
    }
    window.loadUserSel = function () {
        return xmSelect.render({
            el: '#userXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/user/all/get/kv",
                    headers: {'token': localStorage.getItem('token')},
                    data: {
                        condition: val
                    },
                    method: 'POST',
                    success: function (res) {
                        if (res.code === 200) {
                            cb(res.data)
                        } else {
                            cb([]);
                            layer.msg(res.msg, {icon: 2});
                        }
                    }
                });
            }
        });
    }
});