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

CRM商机来源整改

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