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

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

上级 5e5df8b0
......@@ -18,26 +18,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selOption, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selOption, data));
form.render('select');
customerIndustry();
});
//行业
function customerIndustry(){
showGrid({
......
......@@ -16,26 +16,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......
......@@ -23,26 +23,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectMust, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectMust, data));
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......
......@@ -32,25 +32,16 @@ layui.config({
$("#typeId").html(getDataUseHandlebars(selectMust, data));
$("#typeId").val(json.bean.typeId);
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
$("#fromId").val(json.bean.fromId);
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectMust, data));
$("#fromId").val(json.bean.fromId);
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......@@ -79,7 +70,7 @@ layui.config({
template: selectMust,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
ajaxSendAfter:function(data){
$("#groupId").val(json.bean.groupId);
form.render('select');
}
......
......@@ -19,26 +19,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......
......@@ -17,26 +17,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......
......@@ -19,26 +19,15 @@ layui.config({
sysCustomerUtil.queryCustomerTypeIsUpList(function (data){
$("#typeId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerFrom();
});
// 来源
function customerFrom(){
showGrid({
id: "fromId",
url: flowableBasePath + "crmcustomerfrom008",
params: {},
pagination: false,
template: selectOption,
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(j){
form.render('select');
customerIndustry();
}
});
}
// 获取已上线的客户来源类型
sysCustomerUtil.queryCustomerFromIsUpList(function (data){
$("#fromId").html(getDataUseHandlebars(selectOption, data));
form.render('select');
customerIndustry();
});
// 行业
function customerIndustry(){
showGrid({
......
......@@ -46,4 +46,21 @@ var sysCustomerUtil = {
}, 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.
先完成此消息的编辑!
想要评论请 注册