提交 5299682a 编写于 作者: Skyeye云's avatar Skyeye云

获取已上线的客户来源类型代码优化

上级 5e5df8b0
...@@ -18,25 +18,14 @@ layui.config({ ...@@ -18,25 +18,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selOption, data)); $("#typeId").html(getDataUseHandlebars(selOption, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selOption, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
//行业 //行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -16,25 +16,14 @@ layui.config({ ...@@ -16,25 +16,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data)); $("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selectOption, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -23,25 +23,14 @@ layui.config({ ...@@ -23,25 +23,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectMust, data)); $("#typeId").html(getDataUseHandlebars(selectMust, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selectMust, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -32,25 +32,16 @@ layui.config({ ...@@ -32,25 +32,16 @@ layui.config({
$("#typeId").html(getDataUseHandlebars(selectMust, data)); $("#typeId").html(getDataUseHandlebars(selectMust, data));
$("#typeId").val(json.bean.typeId); $("#typeId").val(json.bean.typeId);
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源
function customerFrom(){ // 获取已上线的客户来源类型
showGrid({ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
id: "fromId", $("#fromId").html(getDataUseHandlebars(selectMust, data));
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
$("#fromId").val(json.bean.fromId); $("#fromId").val(json.bean.fromId);
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
...@@ -79,7 +70,7 @@ layui.config({ ...@@ -79,7 +70,7 @@ layui.config({
template: selectMust, template: selectMust,
ajaxSendLoadBefore: function(hdb){ ajaxSendLoadBefore: function(hdb){
}, },
ajaxSendAfter:function(json){ ajaxSendAfter:function(data){
$("#groupId").val(json.bean.groupId); $("#groupId").val(json.bean.groupId);
form.render('select'); form.render('select');
} }
......
...@@ -19,25 +19,14 @@ layui.config({ ...@@ -19,25 +19,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data)); $("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selectOption, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -17,25 +17,14 @@ layui.config({ ...@@ -17,25 +17,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data)); $("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selectOption, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -19,25 +19,14 @@ layui.config({ ...@@ -19,25 +19,14 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){ sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data)); $("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select'); form.render('select');
customerFrom();
}); });
// 来源 // 获取已上线的客户来源类型
function customerFrom(){ sysCustomerUtil.queryCustomerFromIsUpList(function (data){
showGrid({ $("#fromId").html(getDataUseHandlebars(selectOption, data));
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select'); form.render('select');
customerIndustry(); customerIndustry();
}
}); });
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
......
...@@ -46,4 +46,21 @@ var sysCustomerUtil = { ...@@ -46,4 +46,21 @@ var sysCustomerUtil = {
}, async: false}); }, async: false});
}, },
/**
* 获取已上线的客户来源类型
*
* @param callback 回执函数
*/
queryCustomerFromIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmcustomerfrom008", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) {
if(typeof(callback) == "function") {
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
},
} }
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册