提交 0da39d31 编写于 作者: doc_wei's avatar doc_wei

联系人管理整改为低代码

上级 1b10d3ea
// 已经选择的客户信息
var customerMation = {};
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -17,13 +14,10 @@ layui.config({
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
if(isNull(customerMation.id)){
winui.window.msg('请选择客户.', {icon: 2, time: 2000});
return false;
}
var params = {
customerId: customerMation.id,
contacts: $("#contacts").val(),
objectId: parent.objectId,
objectKey: parent.objectKey,
name: $("#name").val(),
department: $("#department").val(),
job: $("#job").val(),
workPhone: $("#workPhone").val(),
......@@ -33,7 +27,7 @@ layui.config({
wechat: $("#wechat").val(),
isDefault: $("input[name='isDefault']:checked").val()
};
AjaxPostUtil.request({url: flowableBasePath + "customercontact002", params: params, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "writeContactsMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
......@@ -41,18 +35,6 @@ layui.config({
return false;
});
// 客户选择
$("body").on("click", "#customMationSel", function (e) {
_openNewWindows({
url: "../../tpl/customerManage/customerChoose.html",
title: "选择客户",
pageId: "customerChoose",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
$("#customName").val(customerMation.customName);
}});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
// 已经选择的客户信息
var customerMation = {};
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -15,31 +12,25 @@ layui.config({
showGrid({
id: "showForm",
url: flowableBasePath + "customercontact003",
params: {contactId: parent.rowId},
url: flowableBasePath + "queryContactsMationById",
params: {id: parent.rowId},
pagination: false,
template: getFileContent('tpl/crmCustomerContact/crmCustomerContactEditTemplate.tpl'),
method: 'GET',
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter: function (json) {
// 客户信息赋值
customerMation = {
id: json.bean.customerId,
customName: json.bean.customerName
}
$("input:radio[name=isDefault][value=" + json.bean.isDefault + "]").attr("checked", true);
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
if(isNull(customerMation.id)){
winui.window.msg('请选择客户.', {icon: 2, time: 2000});
return false;
}
var params = {
contactId: parent.rowId,
customerId: customerMation.id,
id: parent.rowId,
objectId: parent.objectId,
objectKey: parent.objectKey,
name: $("#name").val(),
contacts: $("#contacts").val(),
department: $("#department").val(),
job: $("#job").val(),
......@@ -50,7 +41,7 @@ layui.config({
wechat: $("#wechat").val(),
isDefault: $("input[name='isDefault']:checked").val()
};
AjaxPostUtil.request({url: flowableBasePath + "customercontact004", params: params, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "writeContactsMation", params: params, type: 'json', method: 'POST', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
......@@ -60,18 +51,6 @@ layui.config({
}
});
// 客户选择
$("body").on("click", "#customMationSel", function (e) {
_openNewWindows({
url: "../../tpl/customerManage/customerChoose.html",
title: "选择客户",
pageId: "customerChoose",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
$("#customName").val(customerMation.customName);
}});
});
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
......
var rowId = "";
var objectKey = "";
var objectId = "";
layui.config({
base: basePath,
version: skyeyeVersion
......@@ -11,12 +14,19 @@ layui.config({
form = layui.form,
table = layui.table;
objectKey = GetUrlParam("objectKey");
objectId = GetUrlParam("id");
if (isNull(objectKey) || isNull(objectId)) {
winui.window.msg("请传入适用对象信息", {icon: 2, time: 2000});
return false;
}
authBtn('1596375844035');
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'customercontact001',
url: reqBasePath + 'queryContactsList',
where: getTableParams(),
even: true,
page: true,
......@@ -24,8 +34,7 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'contacts', title: '联系人', align: 'left', width: 100 },
{ field: 'customerName', title: '所属客户', align: 'left', width: 180 },
{ field: 'name', title: '名称', align: 'left', width: 100 },
{ field: 'department', title: '部门', align: 'left', width: 100 },
{ field: 'job', title: '职位', align: 'left', width: 100 },
{ field: 'workPhone', title: '办公电话', align: 'left', width: 100 },
......@@ -41,15 +50,18 @@ layui.config({
]],
done: function(json) {
matchingLanguage();
initTableSearchUtil.initAdvancedSearch(this, json.searchFilter, form, "请输入名称,移动电话", function () {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
});
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
if (layEvent === 'edit') {
edit(data);
} else if (layEvent === 'delete'){ //删除
} else if (layEvent === 'delete') {
del(data);
}
});
......@@ -58,9 +70,9 @@ layui.config({
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/crmCustomerContact/crmCustomerContactAdd.html",
url: "../../tpl/contacts/contactsAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "crmCustomerContactAdd",
pageId: "contactsAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -72,9 +84,9 @@ layui.config({
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/crmCustomerContact/crmCustomerContactEdit.html",
url: "../../tpl/contacts/contactsEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "crmCustomerContactEdit",
pageId: "contactsEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
......@@ -86,7 +98,7 @@ layui.config({
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customercontact005", params: {contactId: data.id}, type: 'json', callback: function (json) {
AjaxPostUtil.request({url: reqBasePath + "deleteContactsMationById", params: {id: data.id}, type: 'json', method: 'DELETE', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
......@@ -94,33 +106,16 @@ layui.config({
}
form.render();
$("body").on("click", "#formSearch", function() {
refreshTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return {
customerName: $("#customerName").val(),
contacts: $("#contacts").val(),
mobilePhone: $("#mobilePhone").val(),
email: $("#email").val(),
qq: $("#qq").val(),
wechat: $("#wechat").val()
};
return $.extend(true, {objectKey: objectKey, objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable"));
}
exports('crmCustomerContactList', {});
exports('contactsList', {});
});
\ No newline at end of file
......@@ -98,11 +98,11 @@ layui.config({
}
function loadAuthList(objectType) {
var data = $.extend(true, [], treeTableData);
// 加载该受用类型的团队可以设置哪些权限
var colsList = teamObjectPermissionUtil.getAuthColsDetails(objectType);
$('#authList').html(getDataUseHandlebars($('#authTableTemplate').html(), {list: colsList}));
$.each(colsList, function (i, item) {
var data = $.extend(true, [], treeTableData);
// 给数据设置权限组的key,
$.each(data, function (j, bean) {
bean.authGroupKey = item.id;
......
......@@ -221,12 +221,12 @@ layui.config({
}
function loadAuthList() {
var data = $.extend(true, [], treeTableData);
var objectType = $('#objectType').val();
// 加载该受用类型的团队可以设置哪些权限
var colsList = teamObjectPermissionUtil.getAuthCols(objectType);
$('#authList').html(getDataUseHandlebars($('#authTableTemplate').html(), {list: colsList}));
$.each(colsList, function (i, item) {
var data = $.extend(true, [], treeTableData);
// 给数据设置权限组的key,
$.each(data, function (j, bean) {
bean.authGroupKey = item.id;
......
......@@ -9,17 +9,13 @@
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="customName" name="customName" placeholder="请选择客户" class="layui-input" readonly="readonly"/>
<i class="fa fa-plus-circle input-icon" id="customMationSel"></i>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系人<i class="red">*</i></label>
<label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="contacts" name="contacts" win-verify="required" placeholder="请输入联系人" class="layui-input" maxlength="10"/>
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input" maxlength="10"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
......@@ -82,7 +78,7 @@
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/crmCustomerContact/'}).use('crmCustomerContactAdd');
layui.config({base: '../../js/contacts/'}).use('contactsAdd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="name" name="name" win-verify="required" placeholder="请输入名称" class="layui-input" maxlength="10" value="{{name}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">部门</label>
<div class="layui-input-block">
<input type="text" id="department" name="department" placeholder="请输入部门" class="layui-input" maxlength="25" value="{{department}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">职务</label>
<div class="layui-input-block">
<input type="text" id="job" name="job" placeholder="请输入职务" class="layui-input" maxlength="25" value="{{job}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">移动电话</label>
<div class="layui-input-block">
<input type="text" id="mobilePhone" name="mobilePhone" win-verify="phone" placeholder="请输入移动电话" class="layui-input" maxlength="20" value="{{mobilePhone}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">办公电话</label>
<div class="layui-input-block">
<input type="text" id="workPhone" name="workPhone" win-verify="tel" placeholder="请输入办公电话" class="layui-input" maxlength="20" value="{{workPhone}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">邮件</label>
<div class="layui-input-block">
<input type="text" id="email" name="email" win-verify="email" placeholder="请输入邮件" class="layui-input" maxlength="25" value="{{email}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">QQ</label>
<div class="layui-input-block">
<input type="text" id="qq" name="qq" placeholder="请输入QQ" class="layui-input" maxlength="15" value="{{qq}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">微信</label>
<div class="layui-input-block">
<input type="text" id="wechat" name="wechat" placeholder="请输入微信" class="layui-input" maxlength="50" value="{{wechat}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">是否默认<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="isDefault" value="1" title=""/>
<input type="radio" name="isDefault" value="2" title="" />
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/contacts/'}).use('contactsEdit');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn search-table-btn-right"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn search-table-btn-right" auth="1596375844035"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1596375844035')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1596375863370')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/contacts/'}).use('contactsList');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="customName" name="customName" placeholder="请选择客户" class="layui-input" readonly="readonly" value="{{customerName}}"/>
<i class="fa fa-plus-circle input-icon" id="customMationSel"></i>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">联系人<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="contacts" name="contacts" win-verify="required" placeholder="请输入联系人" class="layui-input" maxlength="10" value="{{contacts}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">部门</label>
<div class="layui-input-block">
<input type="text" id="department" name="department" placeholder="请输入部门" class="layui-input" maxlength="25" value="{{department}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">职务</label>
<div class="layui-input-block">
<input type="text" id="job" name="job" placeholder="请输入职务" class="layui-input" maxlength="25" value="{{job}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">移动电话</label>
<div class="layui-input-block">
<input type="text" id="mobilePhone" name="mobilePhone" win-verify="phone" placeholder="请输入移动电话" class="layui-input" maxlength="20" value="{{mobilePhone}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">办公电话</label>
<div class="layui-input-block">
<input type="text" id="workPhone" name="workPhone" win-verify="tel" placeholder="请输入办公电话" class="layui-input" maxlength="20" value="{{workPhone}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">邮件</label>
<div class="layui-input-block">
<input type="text" id="email" name="email" win-verify="email" placeholder="请输入邮件" class="layui-input" maxlength="25" value="{{email}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">QQ</label>
<div class="layui-input-block">
<input type="text" id="qq" name="qq" placeholder="请输入QQ" class="layui-input" maxlength="15" value="{{qq}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">微信</label>
<div class="layui-input-block">
<input type="text" id="wechat" name="wechat" placeholder="请输入微信" class="layui-input" maxlength="50" value="{{wechat}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">是否默认<i class="red">*</i></label>
<div class="layui-input-block winui-radio">
<input type="radio" name="isDefault" value="1" title="是"/>
<input type="radio" name="isDefault" value="2" title="否" />
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formEditBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div class="txtcenter" style="margin:0 auto;padding-top:10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">客户名称</label>
<div class="layui-input-inline">
<input type="text" id="customerName" name="customerName" placeholder="请输入客户名称" class="layui-input" />
</div>
<label class="layui-form-label">联系人</label>
<div class="layui-input-inline">
<input type="text" id="contacts" name="contacts" placeholder="请输入联系人" class="layui-input" />
</div>
<label class="layui-form-label">移动电话</label>
<div class="layui-input-inline">
<input type="text" id="mobilePhone" name="mobilePhone" placeholder="请输入移动电话" class="layui-input" />
</div>
<label class="layui-form-label">邮箱</label>
<div class="layui-input-inline">
<input type="text" id="email" name="email" placeholder="请输入邮箱" class="layui-input" />
</div>
<label class="layui-form-label">QQ</label>
<div class="layui-input-inline">
<input type="text" id="qq" name="qq" placeholder="请输入QQ" class="layui-input" />
</div>
<label class="layui-form-label">微信</label>
<div class="layui-input-inline">
<input type="text" id="wechat" name="wechat" placeholder="请输入微信" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1596375844035"><i class="fa fa-plus" aria-hidden="true"></i><language showName="com.skyeye.addBtn"></language></button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(auth('1596375854738')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1596375863370')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/crmCustomerContact/'}).use('crmCustomerContactList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -40,9 +40,7 @@ layui.config({
}},
{ field: 'typeName', title: '客户分类', align: 'left', width: 120 },
{ field: 'fromName', title: '客户来源', align: 'left', width: 120 },
{ field: 'industryName', title: '所属行业', align: 'left', width: 180 },
{ field: 'estimatePrice', title: '预计成交金额(元)', align: 'left', width: 150 },
{ field: 'contractPrice', title: '合同金额(元)', align: 'left', width: 120 }
{ field: 'industryName', title: '所属行业', align: 'left', width: 180 }
]],
done: function(res, curr, count){
matchingLanguage();
......@@ -110,9 +108,8 @@ layui.config({
// 详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/customerManage/customerDetails.html",
url: "../../tpl/customerManage/customerDetails.html?id=" + data.id,
title: "客户详情",
pageId: "customerDetails",
area: ['90vw', '90vh'],
......
......@@ -15,7 +15,7 @@ layui.config({
table = layui.table,
element = layui.element;
var customerId = parent.rowId;
var customerId = GetUrlParam("id");
var tabTable = {
tab0: {load: true, initMethod: opportunityList}, // 商机列表
......
......@@ -68,9 +68,8 @@ layui.config({
// 详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/customerManage/customerDetails.html",
url: "../../tpl/customerManage/customerDetails.html?id=" + data.id,
title: "客户详情",
pageId: "customerDetails",
area: ['90vw', '90vh'],
......
......@@ -11,6 +11,7 @@ layui.config({
var $ = layui.$,
form = layui.form,
table = layui.table;
var serviceClassName = sysServiceMation["crmCustomer"]["key"];
// 新增
authBtn('1570454924611');
// 加载列表数据权限
......@@ -57,6 +58,8 @@ layui.config({
del(data);
} else if (layEvent === 'details'){ // 详情
details(data);
} else if (layEvent === 'manage'){ // 服务
manage(data);
}
});
......@@ -89,9 +92,8 @@ layui.config({
// 详情
function details(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/customerManage/customerDetails.html",
url: "../../tpl/customerManage/customerDetails.html?id=" + data.id,
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "customerDetails",
area: ['90vw', '90vh'],
......@@ -99,6 +101,17 @@ layui.config({
}});
}
// 服务
function manage(data) {
_openNewWindows({
url: "../../tpl/customerManage/customerManage.html?id=" + data.id + "&objectKey=" + serviceClassName,
title: '服务',
pageId: "customerManage",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
}});
}
// 删除
function del(data, obj) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
......
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
form = layui.form,
element = layui.element;
var objectType = "1";
var id = GetUrlParam("id");
var objectKey = GetUrlParam("objectKey");
var pageList = teamObjectPermissionUtil.getPageUrl(objectType);
pageList.unshift({
title: '详情',
pageUrl: '../../tpl/customerManage/customerDetails.html'
});
$("#manageTab").find(".layui-tab-title").html(getDataUseHandlebars($('#headerTemplate').html(), {rows: pageList}));
$("#manageTab").find(".layui-tab-title").find('li').eq(0).addClass('layui-this');
$("#manageTab").find(".layui-tab-content").html(getDataUseHandlebars($('#contentTemplate').html(), {rows: pageList}));
$("#manageTab").find(".layui-tab-content").find('.layui-tab-item').eq(0).addClass('layui-show');
setPageUrl(pageList[0]);
element.on('tab(manageTab)', function (obj) {
var mation = pageList[obj.index];
if (!isNull(mation)) {
setPageUrl(mation);
}
});
function setPageUrl(mation) {
var url = mation.pageUrl + "?id=" + id + "&objectKey=" + objectKey;
$("#manageTab").find(".layui-tab-content").find('.layui-show').find('iframe').attr('src', url);
}
form.render();
});
\ No newline at end of file
......@@ -22,6 +22,7 @@
{{# if(auth('1570454956511')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delete"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="manage">服务</a>
</script>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
......
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
......@@ -7,15 +7,37 @@
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="padding:20px; margin:0 auto;">
<form class="layui-form" action="" id="showForm">
<div class="body-box">
<div class="layui-col-xs12" style="height: 100%">
<div class="layui-tab layui-tab-brief" lay-filter="manageTab" id="manageTab">
<ul class="layui-tab-title">
</form>
</ul>
<div class="layui-tab-content">
</div>
</div>
</div>
</div>
<script type="text/x-handlebars-template" id="headerTemplate">
{{#rows}}
<li class="">{{title}}</li>
{{/rows}}
</script>
<script type="text/x-handlebars-template" id="contentTemplate">
{{#rows}}
<div class="layui-tab-item" style="height: 100%">
<iframe id="showBean" style="width: 100%; border: 0px; height: 100%" scrolling="no"></iframe>
</div>
{{/rows}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/crmCustomerContact/'}).use('crmCustomerContactEdit');
layui.config({base: '../../js/customerManage/'}).use('customerManage');
</script>
</body>
</html>
\ No newline at end of file
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户名称:</label>
<div class="layui-input-block ver-center">
{{name}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">拼音:</label>
<div class="layui-input-block ver-center">
{{combine}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">分类:</label>
<div class="layui-input-block ver-center">
{{typeId}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户来源:</label>
<div class="layui-input-block ver-center">
{{fromId}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户分组:</label>
<div class="layui-input-block ver-center">
{{groupName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所属行业:</label>
<div class="layui-input-block ver-center">
{{industryId}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户网址:</label>
<div class="layui-input-block ver-center">
{{cusUrl}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">国家/地区:</label>
<div class="layui-input-block ver-center">
{{country}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">所在城市:</label>
<div class="layui-input-block ver-center">
{{city}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">详细地址:</label>
<div class="layui-input-block ver-center">
{{detailAddress}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">邮政编码:</label>
<div class="layui-input-block ver-center">
{{postalCode}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">传真:</label>
<div class="layui-input-block ver-center">
{{fax}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">客户负责人:</label>
<div class="layui-input-block ver-center">
{{chargeUserName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">操机工:</label>
<div class="layui-input-block ver-center">
{{mechanicName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">操机工电话:</label>
<div class="layui-input-block ver-center">
{{mechanicPhone}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">法人代表:</label>
<div class="layui-input-block ver-center">
{{corRepresentative}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">注册资本:</label>
<div class="layui-input-block ver-center">
{{regCapital}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附加说明:</label>
<div class="layui-input-block ver-center">
{{addDesc}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">附件资料:</label>
<div class="layui-input-block ver-center" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">财务信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">银行账户:</label>
<div class="layui-input-block ver-center">
{{bankAccount}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">开户名称:</label>
<div class="layui-input-block ver-center">
{{accountName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">开户银行:</label>
<div class="layui-input-block ver-center">
{{bankName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">银行地址:</label>
<div class="layui-input-block ver-center">
{{bankAddress}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">税号:</label>
<div class="layui-input-block ver-center">
{{dutyParagraph}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">电话:</label>
<div class="layui-input-block ver-center">
{{financePhone}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-tab layui-tab-brief" lay-filter="customerOtherDetail">
<ul class="layui-tab-title">
<li class="layui-this">商机</li>
<li class="">合同</li>
<li class="">售后服务</li>
<li class="">跟单记录</li>
<li class="">联系人</li>
<li class="">讨论板</li>
</ul>
<div class="layui-tab-content" style="min-height: 500px;">
<div class="layui-tab-item layui-show">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">商机名称</label>
<div class="layui-input-inline">
<input type="text" id="opportunityTitle" name="opportunityTitle" placeholder="请输入商机名称" class="layui-input" />
</div>
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select id="opportunityState">
<option value="">全部</option>
<option value="0">草稿</option>
<option value="1">审核中</option>
<option value="2">初期沟通</option>
<option value="3">方案与报价</option>
<option value="4">竞争与投标</option>
<option value="5">商务谈判</option>
<option value="6">成交</option>
<option value="7">丢单</option>
<option value="8">搁置</option>
<option value="11">审核通过</option>
<option value="12">审核不通过</option>
</select>
</div>
<label class="layui-form-label">新增时间</label>
<div class="layui-input-inline">
<select id="opportunityTime">
<option value="">全部</option>
<option value="0">本周新增</option>
<option value="1">上周新增</option>
<option value="2">本月新增</option>
<option value="3">上月新增</option>
<option value="4">本季度新增</option>
<option value="5">上季度新增</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="opportunitySearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
<div style="margin:0 auto;">
<table id="opportunityTable" lay-filter="opportunityTable"></table>
</div>
</div>
<div class="layui-tab-item">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">合同名称</label>
<div class="layui-input-inline">
<input type="text" id="contractTitle" name="contractTitle" placeholder="请输入合同名称" class="layui-input" />
</div>
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select id="contractState">
<option value="">全部</option>
<option value="0">草稿</option>
<option value="1">审核中</option>
<option value="2">执行中</option>
<option value="3">已关闭</option>
<option value="4">已撤销</option>
<option value="5">已搁置</option>
<option value="11">审核通过</option>
<option value="12">审核不通过</option>
</select>
</div>
<label class="layui-form-label">新增时间</label>
<div class="layui-input-inline">
<select id="contractTime">
<option value="">全部</option>
<option value="0">本周新增</option>
<option value="1">上周新增</option>
<option value="2">本月新增</option>
<option value="3">上月新增</option>
<option value="4">本季度新增</option>
<option value="5">上季度新增</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="contractSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
<div style="margin:0 auto;">
<table id="contractTable" lay-filter="contractTable"></table>
</div>
</div>
<div class="layui-tab-item">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">单号</label>
<div class="layui-input-inline">
<input type="text" id="serviceTitle" name="serviceTitle" placeholder="请输入单号" class="layui-input" />
</div>
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select id="serviceState">
<option value="">全部</option>
<option value="1">待派工</option>
<option value="2">待接单</option>
<option value="3">待签到</option>
<option value="4">待完工</option>
<option value="5">待评价</option>
<option value="6">待审核</option>
<option value="7">已完工</option>
</select>
</div>
<label class="layui-form-label">新增时间</label>
<div class="layui-input-inline">
<select id="serviceTime">
<option value="">全部</option>
<option value="0">本周新增</option>
<option value="1">上周新增</option>
<option value="2">本月新增</option>
<option value="3">上月新增</option>
<option value="4">本季度新增</option>
<option value="5">上季度新增</option>
</select>
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="serviceSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
<div style="margin:0 auto;">
<table id="serviceTable" lay-filter="serviceTable"></table>
</div>
</div>
<div class="layui-tab-item">
<div style="margin:0 auto;">
<table id="documentaryTable" lay-filter="documentaryTable"></table>
</div>
</div>
<div class="layui-tab-item">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">联系人</label>
<div class="layui-input-inline">
<input type="text" id="contactsTitle" name="contactsTitle" placeholder="请输入联系人" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="contactsSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
<div style="margin:0 auto;">
<table id="contactsTable" lay-filter="contactsTable"></table>
</div>
</div>
<div class="layui-tab-item">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">标题</label>
<div class="layui-input-inline">
<input type="text" id="contactsTitle" name="contactsTitle" placeholder="请输入标题" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" type="button" id="discussSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
<div style="margin:0 auto;">
<table id="discussTable" lay-filter="discussTable"></table>
</div>
</div>
</div>
</div>
</div>
{{/bean}}
\ No newline at end of file
......@@ -93,9 +93,8 @@ layui.config({
// 客户详情
$("body").on("click", ".customerNameMation", function() {
rowId = $(this).attr("rowid");
_openNewWindows({
url: "../../tpl/customerManage/customerDetails.html",
url: "../../tpl/customerManage/customerDetails.html?id=" +$(this).attr("rowid"),
title: "客户详情",
pageId: "customerDetails",
area: ['90vw', '90vh'],
......
......@@ -93,6 +93,32 @@ var teamObjectPermissionUtil = {
});
return result;
}
},
/**
* 根据受用类型获取需要展示个tab页
*
* @param objectType
* @returns {*[]}
*/
getPageUrl: function (objectType) {
if (isNull(objectType)) {
return [];
} else {
var teamObjectType = skyeyeClassEnumUtil.getEnumDataListByClassName("teamObjectType").rows;
var pageAuthList = getInPoingArr(teamObjectType, "id", objectType, "pageAuth");
if (pageAuthList == null) {
return [];
}
var result = [];
$.each(pageAuthList, function(i, enumKey) {
result.push({
title: skyeyeClassEnum[enumKey].name,
pageUrl: skyeyeClassEnum[enumKey].pageUrl
});
});
return result;
}
}
}
......@@ -22,6 +22,12 @@
bottom: 0;
}
.body-box {
margin: 10px;
height: calc(100% - 20px);
width: calc(100% - 20px);
}
.winui-desktop-item {
width: 70px;
height: 95px;
......
......@@ -24,7 +24,7 @@
"skyeyeView": {"name": "视图枚举", "className": "skyeye-pro#com.skyeye.common.SkyeyeViewEnum"},
"teamObjectType": {"name": "团队适用对象枚举", "className": "skyeye-pro#com.skyeye.team.classenum.TeamObjectTypeEnum"},
"contactsAuthEnum": {"name": "联系人", "className": "skyeye-pro#com.skyeye.contacts.classenum.ContactsAuthEnum"},
"contactsAuthEnum": {"name": "联系人", "className": "skyeye-pro#com.skyeye.contacts.classenum.ContactsAuthEnum", "pageUrl": "../../tpl/contacts/contactsList.html"},
"documentAuthEnum": {"name": "文档", "className": "skyeye-pro#com.skyeye.document.classenum.DocumentAuthEnum"}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册