提交 1f45ad16 编写于 作者: Skyeye云's avatar Skyeye云

CRM商机来源整改

上级 95571ac2
...@@ -26,9 +26,6 @@ layui.config({ ...@@ -26,9 +26,6 @@ layui.config({
textool = layui.textool; textool = layui.textool;
var selOption = getFileContent('tpl/template/select-option.tpl'); var selOption = getFileContent('tpl/template/select-option.tpl');
var partId = ""; // 商机参与人id
var followId = ""; // 商机关注人id
textool.init({ textool.init({
eleId: 'businessNeed', eleId: 'businessNeed',
maxlength: 1000, maxlength: 1000,
...@@ -40,32 +37,18 @@ layui.config({ ...@@ -40,32 +37,18 @@ layui.config({
elem: '#estimateEndTime', elem: '#estimateEndTime',
range: false range: false
}); });
fromSelect(); // 获取已经上线的商机来源信息
// 商机来源选择 sysCustomerUtil.queryCustomerOpportunityFromIsUpList(function(data){
function fromSelect(){ $("#fromId").html(getDataUseHandlebars(selOption, data));
showGrid({ form.render('select');
id: "fromId", });
url: flowableBasePath + "crmopportunityfrom008",
params: {}, // 获取当前登录用户所属企业的所有部门信息
pagination: false, systemCommonUtil.queryDepartmentListByCurrentUserBelong(function(data){
template: getFileContent('tpl/template/select-option.tpl'), $("#subDepartments").html(getDataUseHandlebars(selOption, data));
ajaxSendLoadBefore: function(hdb){ form.render('select');
}, });
ajaxSendAfter: function(json){
departmentsSelect();
form.render('select');
}
});
}
function departmentsSelect(){
// 获取当前登录用户所属企业的所有部门信息
systemCommonUtil.queryDepartmentListByCurrentUserBelong(function(data){
$("#subDepartments").html(getDataUseHandlebars(selOption, data));
form.render('select');
});
}
skyeyeEnclosure.init('enclosureUpload'); skyeyeEnclosure.init('enclosureUpload');
matchingLanguage(); matchingLanguage();
...@@ -127,6 +110,7 @@ layui.config({ ...@@ -127,6 +110,7 @@ layui.config({
if(partIdList.length == 0 || isNull($('#partId').tagEditor('getTags')[0].tags)){ if(partIdList.length == 0 || isNull($('#partId').tagEditor('getTags')[0].tags)){
params.partId = ""; params.partId = "";
}else{ }else{
var partId = "";
$.each(partIdList, function (i, item) { $.each(partIdList, function (i, item) {
partId += item.id + ','; partId += item.id + ',';
}); });
...@@ -136,6 +120,7 @@ layui.config({ ...@@ -136,6 +120,7 @@ layui.config({
if(followIdList.length == 0 || isNull($('#followId').tagEditor('getTags')[0].tags)){ if(followIdList.length == 0 || isNull($('#followId').tagEditor('getTags')[0].tags)){
params.followId = ""; params.followId = "";
}else{ }else{
var followId = "";
$.each(followIdList, function (i, item) { $.each(followIdList, function (i, item) {
followId += item.id + ','; followId += item.id + ',';
}); });
......
...@@ -56,36 +56,21 @@ layui.config({ ...@@ -56,36 +56,21 @@ layui.config({
}else{ }else{
$(".typeOne").removeClass("layui-hide"); $(".typeOne").removeClass("layui-hide");
} }
fromSelect(); // 获取已经上线的商机来源信息
// 商机来源选择 sysCustomerUtil.queryCustomerOpportunityFromIsUpList(function(data){
function fromSelect(){ $("#fromId").html(getDataUseHandlebars(selOption, data));
showGrid({ $("#fromId").val(json.bean.fromId);
id: "fromId", form.render('select');
url: flowableBasePath + "crmopportunityfrom008", });
params: {},
pagination: false, // 获取当前登录用户所属企业的所有部门信息
template: getFileContent('tpl/template/select-option.tpl'), systemCommonUtil.queryDepartmentListByCurrentUserBelong(function(data){
ajaxSendLoadBefore: function(hdb){ $("#subDepartments").html(getDataUseHandlebars(selOption, data));
}, $("#subDepartments").val(json.bean.subDepartments);
ajaxSendAfter: function(j){ form.render('select');
$("#fromId").val(json.bean.fromId); });
departmentsSelect();
form.render('select');
}
});
}
// 商机所属部门选择
function departmentsSelect(){
// 获取当前登录用户所属企业的所有部门信息
systemCommonUtil.queryDepartmentListByCurrentUserBelong(function(data){
$("#subDepartments").html(getDataUseHandlebars(selOption, data));
$("#subDepartments").val(json.bean.subDepartments);
form.render('select');
});
}
// 选择入职时间 // 选择入职时间
laydate.render({ laydate.render({
elem: '#estimateEndTime', elem: '#estimateEndTime',
......
...@@ -6,7 +6,6 @@ layui.config({ ...@@ -6,7 +6,6 @@ layui.config({
window: 'js/winui.window' window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) { }).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor(); winui.renderColor();
var $ = layui.$, var $ = layui.$,
form = layui.form, form = layui.form,
table = layui.table; table = layui.table;
...@@ -20,8 +19,8 @@ layui.config({ ...@@ -20,8 +19,8 @@ layui.config({
where: {typeName: $("#typeName").val(), state: $("#state").val()}, where: {typeName: $("#typeName").val(), state: $("#state").val()},
even: true, even: true,
page: true, page: true,
limits: [8, 16, 24, 32, 40, 48, 56], limits: getLimits(),
limit: 8, limit: getLimit(),
cols: [[ cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'}, { title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'typeName', title: '类型名称', align: 'center', width: 120 }, { field: 'typeName', title: '类型名称', align: 'center', width: 120 },
...@@ -36,7 +35,7 @@ layui.config({ ...@@ -36,7 +35,7 @@ layui.config({
return "参数错误"; return "参数错误";
} }
}}, }},
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 200}, { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 250, toolbar: '#tableBar'} { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 250, toolbar: '#tableBar'}
]], ]],
done: function(){ done: function(){
......
...@@ -29,6 +29,23 @@ var sysCustomerUtil = { ...@@ -29,6 +29,23 @@ var sysCustomerUtil = {
}}); }});
}, },
/**
* 获取已经上线的商机来源信息
*
* @param callback 回执函数
*/
queryCustomerOpportunityFromIsUpList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "crmopportunityfrom008", 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});
},
/** /**
* 获取客户类型状态为上线的所有记录 * 获取客户类型状态为上线的所有记录
* *
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册