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

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

上级 5e5df8b0
...@@ -18,26 +18,15 @@ layui.config({ ...@@ -18,26 +18,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
//行业 //行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -16,26 +16,15 @@ layui.config({ ...@@ -16,26 +16,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -23,26 +23,15 @@ layui.config({ ...@@ -23,26 +23,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
customerIndustry();
}
});
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -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", $("#fromId").val(json.bean.fromId);
params: {}, form.render('select');
pagination: false, customerIndustry();
template: selectMust, });
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
$("#fromId").val(json.bean.fromId);
form.render('select');
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,26 +19,15 @@ layui.config({ ...@@ -19,26 +19,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -17,26 +17,15 @@ layui.config({ ...@@ -17,26 +17,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -19,26 +19,15 @@ layui.config({ ...@@ -19,26 +19,15 @@ 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", form.render('select');
url: flowableBasePath + "crmcustomerfrom008", customerIndustry();
params: {}, });
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 行业 // 行业
function customerIndustry(){ function customerIndustry(){
showGrid({ showGrid({
......
...@@ -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.
先完成此消息的编辑!
想要评论请 注册