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

【CRM】删除我创建的客户信息,删除我负责的客户信息

上级 a2d68425
......@@ -42,9 +42,9 @@ layui.config({
{ field: 'fromName', title: '客户来源', align: 'left', width: 120 },
{ field: 'industryName', title: '所属行业', align: 'left', width: 180 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 100 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 100 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 100},
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(json) {
......
var rowId = "";
var searchType = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
// 客户分类
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerType"]["key"], 'select', "typeId", '', form);
// 客户来源
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerFrom"]["key"], 'select', "fromId", '', form);
// 客户所属行业
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerIndustry"]["key"], 'select', "industryId", '', form);
// 获取我负责的客户管理列表
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'customer010',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'name', title: '客户名称', align: 'left', width: 300, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.name + '</a>';
}},
{ field: 'typeName', title: '客户分类', align: 'left', width: 120 },
{ field: 'fromName', title: '客户来源', align: 'left', width: 120 },
{ field: 'industryName', title: '所属行业', align: 'left', width: 180 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 100 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 100 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 100},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(){
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details'){ //详情
details(data);
}
});
form.render();
// 详情
function details(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/customermanage/customerdetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "customerdetails",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
}});
}
$("body").on("click", "#formSearch", function() {
refreshTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable(){
table.reload("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams(){
return {
name: $("#customerName").val(),
typeId: $("#typeId").val(),
fromId: $("#fromId").val(),
industryId: $("#industryId").val()
};
}
exports('myConscientiousList', {});
});
\ No newline at end of file
var rowId = "";
var searchType = "";
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
authBtn('1586179447152');
// 客户分类
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerType"]["key"], 'select', "typeId", '', form);
// 客户来源
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerFrom"]["key"], 'select', "fromId", '', form);
// 客户所属行业
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerIndustry"]["key"], 'select', "industryId", '', form);
// 获取我创建的客户管理列表
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'customer011',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'name', title: '客户名称', align: 'left', width: 300, templet: function (d) {
return '<a lay-event="details" class="notice-title-click">' + d.name + '</a>';
}},
{ field: 'typeName', title: '客户分类', align: 'left', width: 120 },
{ field: 'fromName', title: '客户来源', align: 'left', width: 120 },
{ field: 'industryName', title: '所属行业', align: 'left', width: 180 },
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 100 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 100 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 100},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
]],
done: function(){
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { // 编辑
edit(data);
}else if (layEvent === 'delete'){ // 删除
del(data);
}else if (layEvent === 'details'){ // 详情
details(data);
}
});
form.render();
// 新增
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/customermanage/customeradd.html",
title: "新增客户",
pageId: "customeradd",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 编辑
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/customermanage/customeredit.html",
title: "编辑客户",
pageId: "customeredit",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
}
// 详情
function details(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/customermanage/customerdetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "customerdetails",
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){
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "customer006", params: {rowId: data.id}, type: 'json', callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
$("body").on("click", "#formSearch", function() {
refreshTable();
});
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable(){
table.reload("messageTable", {where: getTableParams()});
}
function refreshTable(){
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams(){
return {
name: $("#customerName").val(),
typeId: $("#typeId").val(),
fromId: $("#fromId").val(),
industryId: $("#industryId").val()
};
}
exports('myCreateList', {});
});
\ 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">
<select id="typeId" name="typeId" lay-filter="typeId" lay-search="">
</select>
</div>
<label class="layui-form-label">客户来源</label>
<div class="layui-input-inline">
<select id="fromId" name="fromId" lay-filter="fromId" lay-search="">
</select>
</div>
<label class="layui-form-label">所属行业</label>
<div class="layui-input-inline">
<select id="industryId" name="industryId" lay-filter="industryId" lay-search="">
</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="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>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
</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/customermanage/'}).use('myConscientiousList');
</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="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">
<select id="typeId" name="typeId" lay-filter="typeId" lay-search="">
</select>
</div>
<label class="layui-form-label">客户来源</label>
<div class="layui-input-inline">
<select id="fromId" name="fromId" lay-filter="fromId" lay-search="">
</select>
</div>
<label class="layui-form-label">所属行业</label>
<div class="layui-input-inline">
<select id="industryId" name="industryId" lay-filter="industryId" lay-search="">
</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="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="1586179447152"><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('1586179456397')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1586179465079')){ }}
<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/customermanage/'}).use('myCreateList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -207,6 +207,14 @@ var initTableSearchUtil = {
getVirtualSelectData: function (searchParam) {
var url = "";
eval('url = ' + searchParam.virtualDataFrom.service + ' + "' + searchParam.virtualDataFrom.url + '"');
var paramsStr = "";
if (!isNull(searchParam.virtualDataFrom.params)) {
$.each(searchParam.virtualDataFrom.params, function (key, value) {
paramsStr += key + '=' + eval(value) + '&';
});
}
// 加上参数
url += '?' + paramsStr;
var dataFrom = [];
AjaxPostUtil.request({url: url, params: {}, type: 'json', method: searchParam.virtualDataFrom.method, callback: function(json) {
dataFrom = [].concat(json.rows);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册