中扬CRM客户关系管理系统
#
luxiaotao1123
2022-09-12 e5de4e24fa0f9d1a133c613243fbb4c68fb3a3b8
src/main/webapp/static/js/cstmr/cstmr.js
@@ -22,8 +22,8 @@
        limits: [15, 30, 50, 100, 200, 500],
        cellMinWidth: 100,
        height: 'full-120',
        size: 'sm',
        skin: 'nob',
        // size: 'sm',
        skin: 'line',
        cols: [[
            {type: 'checkbox'}
            // ,{field: 'id', align: 'center',title: 'ID'}
@@ -79,6 +79,24 @@
        }
    });
    // 添加
    $("#cstmrAddBtn").click(function () {
        showEditModel();
    });
    // 删除
    form.on('submit(cstmrDel)', function (data) {
        let checkStatus = layui.table.checkStatus('cstmr').data;
        if (checkStatus.length === 0) {
            layer.msg('请选择要删除的数据', {icon: 2});
            return;
        }
        del(checkStatus.map(function (d) {
            return d.id;
        }));
    });
    // 监听排序事件
    table.on('sort(cstmr)', function (obj) {
        var searchData = {};
@@ -93,24 +111,6 @@
        });
    });
    // 监听头工具栏事件
    table.on('toolbar(cstmr)', function (obj) {
        var checkStatus = table.checkStatus(obj.config.id).data;
        switch(obj.event) {
            case 'addData':
                showEditModel();
                break;
            case 'deleteData':
               if (checkStatus.length === 0) {
                   layer.msg('请选择要删除的数据', {icon: 2});
                   return;
               }
               del(checkStatus.map(function (d) {
                   return d.id;
               }));
               break;
        }
    });
    // 监听行工具事件
    table.on('tool(cstmr)', function(obj){
@@ -129,8 +129,8 @@
    function showEditModel(mData) {
        admin.open({
            type: 1,
            area: '600px',
            title: (mData ? '修改' : '添加') + '订单状态',
            area: '1500px',
            title: (mData ? '修改' : '添加') + '甲方单位',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                layDateRender(mData);