中扬CRM客户关系管理系统
#
luxiaotao1123
2022-11-14 e399048a22f9ff2037f075beedd1f5832a07af02
src/main/webapp/static/js/order/order.js
@@ -247,11 +247,15 @@
        admin.open({
            type: 1,
            area: '1500px',
            title: (mData ? '修改' : '添加') + '订单状态',
            title: (mData ? '修改' : '添加') + '跟踪项目',
            content: $('#editDialog').html(),
            success: function (layero, dIndex) {
                let cstmrSel = loadCstmrSel();
                let companySel = loadCompanySel();
                if (mData) {
                    $('#cascaderVal').val(mData.pcd);
                    cstmrSel.setValue({name: cstmrId$, value: cstmrId});
                    companySel.setValue({name: company$, value: company});
                }
                layDateRender(mData);
                cascaderRender();
@@ -278,6 +282,7 @@
                    })
                    return false;
                });
                $(layero).children('.layui-layer-content').css('overflow', 'visible');
                layui.form.render('select');
            }
@@ -356,6 +361,62 @@
        });
    }
    window.loadCstmrSel = function () {
        return xmSelect.render({
            el: '#cstmrXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/cstmr/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.loadCompanySel = function () {
        return xmSelect.render({
            el: '#companyXmlSel',
            autoRow: true,
            filterable: true,
            remoteSearch: true,
            radio: true,
            remoteMethod: function (val, cb, show) {
                $.ajax({
                    url: baseUrl + "/company/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});
                        }
                    }
                });
            }
        });
    }
});
// 关闭动作