diff --git a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactAdd.js b/base-server/src/main/resources/template/js/contacts/contactsAdd.js similarity index 57% rename from base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactAdd.js rename to base-server/src/main/resources/template/js/contacts/contactsAdd.js index 0647be6f84aa4781f191fde4a286282eec20c3ec..130412652c6239951e8f1f42035b247e0ac436eb 100644 --- a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactAdd.js +++ b/base-server/src/main/resources/template/js/contacts/contactsAdd.js @@ -1,7 +1,4 @@ -// 已经选择的客户信息 -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); }); diff --git a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactEdit.js b/base-server/src/main/resources/template/js/contacts/contactsEdit.js similarity index 56% rename from base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactEdit.js rename to base-server/src/main/resources/template/js/contacts/contactsEdit.js index bf77ee4d7aa2543de7815b1164fcbcbdb49b63ed..f6606e72e095a32af5694ff0ff6e0f731a3dcb2b 100644 --- a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactEdit.js +++ b/base-server/src/main/resources/template/js/contacts/contactsEdit.js @@ -1,7 +1,4 @@ -// 已经选择的客户信息 -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); }); diff --git a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactList.js b/base-server/src/main/resources/template/js/contacts/contactsList.js similarity index 69% rename from base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactList.js rename to base-server/src/main/resources/template/js/contacts/contactsList.js index 5ea80eba9cb04950e0664c3224cce6fd9efe06bd..dd43b586cbdb101e0ab66fc3f6d61d6d607034e2 100644 --- a/base-server/src/main/resources/template/js/crmCustomerContact/crmCustomerContactList.js +++ b/base-server/src/main/resources/template/js/contacts/contactsList.js @@ -1,5 +1,8 @@ var rowId = ""; +var objectKey = ""; +var objectId = ""; + layui.config({ base: basePath, version: skyeyeVersion @@ -10,13 +13,20 @@ layui.config({ var $ = layui.$, 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,26 +50,29 @@ 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') { //编辑 - edit(data); - } else if (layEvent === 'delete'){ //删除 - del(data); - } + if (layEvent === 'edit') { + edit(data); + } else if (layEvent === 'delete') { + del(data); + } }); // 新增 $("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,41 +98,24 @@ 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(); }}); }); } - + 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() - }; - } + loadTable(); + }); + function loadTable() { + table.reloadData("messageTable", {where: getTableParams()}); + } + + function getTableParams() { + return $.extend(true, {objectKey: objectKey, objectId: objectId}, initTableSearchUtil.getSearchValue("messageTable")); + } - exports('crmCustomerContactList', {}); + exports('contactsList', {}); }); \ No newline at end of file diff --git a/common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js similarity index 100% rename from common/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js rename to base-server/src/main/resources/template/js/teamTemplate/teamTemplateAdd.js diff --git a/common/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js similarity index 98% rename from common/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js rename to base-server/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js index 957b313992969cb5dbb9dbd8a8bc6c6eed90f9bb..a683fc6cf60c9dc1b091bf74d960e1f76e45112e 100644 --- a/common/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js +++ b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateDetails.js @@ -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; diff --git a/common/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js similarity index 99% rename from common/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js rename to base-server/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js index d058eea141e3048b74ea1ff5f9b54bf91d01493d..222405e03b1e6bebc00701373b7930e2d2e4d1a3 100644 --- a/common/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js +++ b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateEdit.js @@ -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; diff --git a/common/src/main/resources/template/js/teamTemplate/teamTemplateList.js b/base-server/src/main/resources/template/js/teamTemplate/teamTemplateList.js similarity index 100% rename from common/src/main/resources/template/js/teamTemplate/teamTemplateList.js rename to base-server/src/main/resources/template/js/teamTemplate/teamTemplateList.js diff --git a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactAdd.html b/base-server/src/main/resources/template/tpl/contacts/contactsAdd.html similarity index 83% rename from base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactAdd.html rename to base-server/src/main/resources/template/tpl/contacts/contactsAdd.html index 5c9b531abb9c3e843db32ecaa4a8de1939ac38e0..a12d48d52959e7123b2a9cc0f2bfea4f74913aba 100644 --- a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactAdd.html +++ b/base-server/src/main/resources/template/tpl/contacts/contactsAdd.html @@ -9,17 +9,13 @@
-
- -
- - -
-
+
+ 基本信息
+
- +
- +
@@ -82,7 +78,7 @@ \ No newline at end of file diff --git a/base-server/src/main/resources/template/tpl/contacts/contactsEdit.html b/base-server/src/main/resources/template/tpl/contacts/contactsEdit.html new file mode 100644 index 0000000000000000000000000000000000000000..60bb38e09bb305d7627d9f0016647b06c1cb0d9a --- /dev/null +++ b/base-server/src/main/resources/template/tpl/contacts/contactsEdit.html @@ -0,0 +1,91 @@ + + + + + + + + + +
+ + + +
+ + + + + + + + \ No newline at end of file diff --git a/base-server/src/main/resources/template/tpl/contacts/contactsList.html b/base-server/src/main/resources/template/tpl/contacts/contactsList.html new file mode 100644 index 0000000000000000000000000000000000000000..651b993f28eaa8aa1e4a80d07faeccec5ab4ee17 --- /dev/null +++ b/base-server/src/main/resources/template/tpl/contacts/contactsList.html @@ -0,0 +1,33 @@ + + + + + + + + + +
+
+ + +
+
+
+
+ +
+ + + + + \ No newline at end of file diff --git a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEdit.html b/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEdit.html deleted file mode 100644 index 4f49296e4a88d696257de4e95fa16fbac278dbb1..0000000000000000000000000000000000000000 --- a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEdit.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - -
-
- -
-
- - - - - \ No newline at end of file diff --git a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEditTemplate.tpl b/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEditTemplate.tpl deleted file mode 100644 index c1d1dd070059e477ad2973bb6bd0b349b62f449c..0000000000000000000000000000000000000000 --- a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactEditTemplate.tpl +++ /dev/null @@ -1,70 +0,0 @@ -{{#bean}} -
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - -
-
-
-
- - -
-
-{{/bean}} \ No newline at end of file diff --git a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactList.html b/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactList.html deleted file mode 100644 index 16d258ed7bc0ec802e3e37106339f7b527e14055..0000000000000000000000000000000000000000 --- a/base-server/src/main/resources/template/tpl/crmCustomerContact/crmCustomerContactList.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - -
-
-
-
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - -
-
-
-
-
-
- - -
-
-
-
- -
- - - - - \ No newline at end of file diff --git a/common/src/main/resources/template/tpl/teamTemplate/teamTemplateAdd.html b/base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateAdd.html similarity index 100% rename from common/src/main/resources/template/tpl/teamTemplate/teamTemplateAdd.html rename to base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateAdd.html diff --git a/common/src/main/resources/template/tpl/teamTemplate/teamTemplateDetails.html b/base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateDetails.html similarity index 100% rename from common/src/main/resources/template/tpl/teamTemplate/teamTemplateDetails.html rename to base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateDetails.html diff --git a/common/src/main/resources/template/tpl/teamTemplate/teamTemplateEdit.html b/base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateEdit.html similarity index 100% rename from common/src/main/resources/template/tpl/teamTemplate/teamTemplateEdit.html rename to base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateEdit.html diff --git a/common/src/main/resources/template/tpl/teamTemplate/teamTemplateList.html b/base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateList.html similarity index 100% rename from common/src/main/resources/template/tpl/teamTemplate/teamTemplateList.html rename to base-server/src/main/resources/template/tpl/teamTemplate/teamTemplateList.html diff --git a/crm/src/main/resources/template/js/customerManage/customerChoose.js b/crm/src/main/resources/template/js/customerManage/customerChoose.js index 1b674c2872d56d51c27a3e65b8b11a3f9915ca7a..a1f0658ce85b052e3f011f86dbcf1a1fa0de73ad 100644 --- a/crm/src/main/resources/template/js/customerManage/customerChoose.js +++ b/crm/src/main/resources/template/js/customerManage/customerChoose.js @@ -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'], diff --git a/crm/src/main/resources/template/js/customerManage/customerDetails.js b/crm/src/main/resources/template/js/customerManage/customerDetails.js index 8699d38bd3da066db391fde27fd1a5c8d69f9e25..76a6e7bd910ad8dfa85aa4b560235a12c8d67fcd 100644 --- a/crm/src/main/resources/template/js/customerManage/customerDetails.js +++ b/crm/src/main/resources/template/js/customerManage/customerDetails.js @@ -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}, // 商机列表 diff --git a/crm/src/main/resources/template/js/customerManage/customerInternationalList.js b/crm/src/main/resources/template/js/customerManage/customerInternationalList.js index 619073b63e5ad173bbf6e88c9fb1ec5ffbf3b244..fe10a5cccc82aa9952a464dfa7d5f8f4a29796c2 100644 --- a/crm/src/main/resources/template/js/customerManage/customerInternationalList.js +++ b/crm/src/main/resources/template/js/customerManage/customerInternationalList.js @@ -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'], diff --git a/crm/src/main/resources/template/js/customerManage/customerList.js b/crm/src/main/resources/template/js/customerManage/customerList.js index f82cbf44f225e582a9b8eab9ceaf6cd1b7f43086..493293503ba5fd5cc259317c0d59d9e993ed0e13 100644 --- a/crm/src/main/resources/template/js/customerManage/customerList.js +++ b/crm/src/main/resources/template/js/customerManage/customerList.js @@ -11,6 +11,7 @@ layui.config({ var $ = layui.$, form = layui.form, table = layui.table; + var serviceClassName = sysServiceMation["crmCustomer"]["key"]; // 新增 authBtn('1570454924611'); // 加载列表数据权限 @@ -57,7 +58,9 @@ layui.config({ del(data); } else if (layEvent === 'details'){ // 详情 details(data); - } + } else if (layEvent === 'manage'){ // 服务 + manage(data); + } }); // 新增 @@ -89,15 +92,25 @@ 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'], callBack: function (refreshCode) { }}); } + + // 服务 + 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) { diff --git a/crm/src/main/resources/template/js/customerManage/customerManage.js b/crm/src/main/resources/template/js/customerManage/customerManage.js new file mode 100644 index 0000000000000000000000000000000000000000..33907a5a89f100ced1288f35315159b7f292797b --- /dev/null +++ b/crm/src/main/resources/template/js/customerManage/customerManage.js @@ -0,0 +1,44 @@ + +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 diff --git a/crm/src/main/resources/template/tpl/customerManage/customerList.html b/crm/src/main/resources/template/tpl/customerManage/customerList.html index 259474aaa2fb2b8cf2ae984ed7fac03bb66f7724..315c728f0ddb225fc141e4e277ae47549e412447 100644 --- a/crm/src/main/resources/template/tpl/customerManage/customerList.html +++ b/crm/src/main/resources/template/tpl/customerManage/customerList.html @@ -22,6 +22,7 @@ {{# if(auth('1570454956511')){ }} {{# } }} + 服务
diff --git a/crm/src/main/resources/template/tpl/customerManage/customerManage.html b/crm/src/main/resources/template/tpl/customerManage/customerManage.html new file mode 100644 index 0000000000000000000000000000000000000000..5f132a9761d7cba7339077b631dfab9a948e3124 --- /dev/null +++ b/crm/src/main/resources/template/tpl/customerManage/customerManage.html @@ -0,0 +1,43 @@ + + + + + + + + + +
+
+
+
    + +
+
+ +
+
+
+
+ + + + + + + + + + \ No newline at end of file diff --git a/crm/src/main/resources/template/tpl/customerManage/customerdetailsTemplate.tpl b/crm/src/main/resources/template/tpl/customerManage/customerdetailsTemplate.tpl deleted file mode 100644 index b27f29db6f1a55877f918fe91a94c59ad9951b0a..0000000000000000000000000000000000000000 --- a/crm/src/main/resources/template/tpl/customerManage/customerdetailsTemplate.tpl +++ /dev/null @@ -1,344 +0,0 @@ -{{#bean}} -
- 基本信息
-
-
- -
- {{name}} -
-
-
- -
- {{combine}} -
-
-
- -
- {{typeId}} -
-
-
- -
- {{fromId}} -
-
-
- -
- {{groupName}} -
-
-
- -
- {{industryId}} -
-
-
- -
- {{cusUrl}} -
-
-
- -
- {{country}} -
-
-
- -
- {{city}} -
-
-
- -
- {{detailAddress}} -
-
-
- -
- {{postalCode}} -
-
-
- -
- {{fax}} -
-
-
- -
- {{chargeUserName}} -
-
-
- -
- {{mechanicName}} -
-
-
- -
- {{mechanicPhone}} -
-
-
- -
- {{corRepresentative}} -
-
-
- -
- {{regCapital}} -
-
-
- -
- {{addDesc}} -
-
-
- -
- -
-
-
- 财务信息
-
-
- -
- {{bankAccount}} -
-
-
- -
- {{accountName}} -
-
-
- -
- {{bankName}} -
-
-
- -
- {{bankAddress}} -
-
-
- -
- {{dutyParagraph}} -
-
-
- -
- {{financePhone}} -
-
-
-
-
    -
  • 商机
  • -
  • 合同
  • -
  • 售后服务
  • -
  • 跟单记录
  • -
  • 联系人
  • -
  • 讨论板
  • -
-
-
- -
-
- -
- -
- -
- -
- -
- -
- - -
-
-
-
-
- -
-
- -
-
- -
- -
- -
- -
- -
- -
- - -
-
-
-
-
- -
-
- -
-
- -
- -
- -
- -
- -
- -
- - -
-
-
-
-
- -
-
- -
-
-
- -
-
- -
-
- -
- -
- - -
-
-
-
-
- -
-
- -
-
- -
- -
- - -
-
-
-
-
- -
-
-
-
-{{/bean}} \ No newline at end of file diff --git a/seal-service/src/main/resources/template/js/sealseservice/sealseservicedetails.js b/seal-service/src/main/resources/template/js/sealseservice/sealseservicedetails.js index 9105a14a3051ac061ff454a5cd702425e61ca133..fd92363beb645896c94686e254da478b9c3cde12 100644 --- a/seal-service/src/main/resources/template/js/sealseservice/sealseservicedetails.js +++ b/seal-service/src/main/resources/template/js/sealseservice/sealseservicedetails.js @@ -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'], diff --git a/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js index 4a09e7d2232f4cd4ac4da316ef2a874ae28198cc..5d3761d87643e381d744f721c2416b1261cc4270 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/teamObjectPermissionUtil.js @@ -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; + } } } diff --git a/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-wins.css b/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-wins.css index 69b94dfdfb37c30c699ce15bf958de36383b7a72..73c8f41f423be322c6ca2a85dc26516bdbc8033c 100644 --- a/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-wins.css +++ b/web/src/main/resources/template/assets/lib/winui/css/customer/skyeye-wins.css @@ -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; diff --git a/web/src/main/resources/template/json/skyeyeClassEnum.json b/web/src/main/resources/template/json/skyeyeClassEnum.json index c1b165e6ce27acfc2bffb34da336f980db00145b..5b093fff53f26e800ec93ea643dfcddc7c8130da 100644 --- a/web/src/main/resources/template/json/skyeyeClassEnum.json +++ b/web/src/main/resources/template/json/skyeyeClassEnum.json @@ -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