diff --git a/member/src/main/resources/template/js/member/allMemberList.js b/member/src/main/resources/template/js/member/allMemberList.js deleted file mode 100644 index 1f773447249abe938c238461c8134580157c58b5..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/js/member/allMemberList.js +++ /dev/null @@ -1,97 +0,0 @@ -var rowId = ""; - -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; - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: shopBasePath + 'member001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' }, - { field: 'contacts', title: '会员称呼', align: 'left', width: 140, fixed: 'left', templet: function (d) { - return '' + d.contacts + ''; - }}, - { field: 'phone', title: '联系电话', align: 'center', width: 100}, - { field: 'email', title: '电子邮箱', align: 'left', width: 120}, - { field: 'address', title: '地址', align: 'left', width: 100}, - { field: 'enabled', title: '状态', align: 'center', width: 80, templet: function (d) { - if(d.enabled == '1'){ - return "启用"; - } else if (d.enabled == '2'){ - return "禁用"; - } else { - return "参数错误"; - } - }}, - { field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 140 } - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if(layEvent == 'select'){ //详情 - selectMember(data) - } - }); - - // 详情 - function selectMember(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/member/memberInfo.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "memberinfo", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}) - } - return false; - }); - - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - // 刷新 - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - return { - contacts: $("#contacts").val(), - phone: $("#phone").val(), - email: $("#email").val(), - enabled: $("#enabled").val(), - vinCode: $("#vinCode").val() - }; - } - - exports('allMemberList', {}); -}); diff --git a/member/src/main/resources/template/js/member/memberAdd.js b/member/src/main/resources/template/js/member/memberAdd.js deleted file mode 100644 index 487017ea0c63c5f71ae6639f343566e8f901e35c..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/js/member/memberAdd.js +++ /dev/null @@ -1,129 +0,0 @@ -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'textool'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - textool = layui.textool; - - textool.init({eleId: 'description', maxlength: 200}); - - // 加载我所在的门店 - shopUtil.queryStaffBelongStoreList(function (json){ - $("#storeId").html(getDataUseHandlebars($("#selectTemplate").html(), json)); - }); - - // 加载行政区划-省 - loadChildProvinceArea(); - - matchingLanguage(); - form.render(); - form.on('submit(formAddBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - contacts: $("#contacts").val(), - phone: $("#phone").val(), - email: $("#email").val(), - provinceId: $("#provinceId").val(), - provinceName: $("#provinceId").find("option:selected").text(), - cityId: $("#cityId").val(), - cityName: $("#cityId").find("option:selected").text(), - addressAreaId: $("#addressAreaId").val(), - addressAreaName: $("#addressAreaId").find("option:selected").text(), - townshipId: $("#townshipId").val(), - townshipName: $("#townshipId").find("option:selected").text(), - address: $("#address").val(), - description: $("#description").val(), - storeId: $("#storeId").val() - }; - AjaxPostUtil.request({url: shopBasePath + "member002", params: params, type: 'json', method: "POST", callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - - form.on('select(areaProvince)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildCityArea(); - } - }); - form.on('select(areaCity)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildArea(); - } - }); - form.on('select(area)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildAreaTownShip(); - } - }); - - // 省级行政区划 - function loadChildProvinceArea(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) { - var str = '
'; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - // 市级行政区划 - function loadChildCityArea(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - // 县级行政区划 - function loadChildArea(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - // 镇级行政区划 - function loadChildAreaTownShip(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/member/src/main/resources/template/js/member/memberEdit.js b/member/src/main/resources/template/js/member/memberEdit.js deleted file mode 100644 index c5e9982c5e94f15391e70bd34815e878d6f04350..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/js/member/memberEdit.js +++ /dev/null @@ -1,185 +0,0 @@ -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window' -}).define(['window', 'table', 'jquery', 'winui', 'textool'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$, - textool = layui.textool; - showGrid({ - id: "showForm", - url: shopBasePath + "member003", - params: {rowId: parent.rowId}, - pagination: false, - method: "GET", - template: $("#beanTemplate").html(), - ajaxSendLoadBefore: function(hdb) {}, - ajaxSendAfter:function (json) { - - textool.init({eleId: 'description', maxlength: 200}); - - // 家庭地址 - initArea(json.bean);//加载省级行政区划 - - matchingLanguage(); - form.render(); - form.on('submit(formEditBean)', function (data) { - if (winui.verifyForm(data.elem)) { - var params = { - rowId: parent.rowId, - contacts: $("#contacts").val(), - phone: $("#phone").val(), - email: $("#email").val(), - provinceId: $("#provinceId").val(), - cityId: $("#cityId").val(), - addressAreaId: $("#addressAreaId").val(), - townshipId: $("#townshipId").val(), - address: $("#address").val(), - description: $("#description").val() - }; - AjaxPostUtil.request({url: shopBasePath + "member005", params: params, type: 'json', method: "PUT", callback: function (json) { - parent.layer.close(index); - parent.refreshCode = '0'; - }}); - } - return false; - }); - } - }); - - //初始化行政区划-省 - function initArea(bean){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: 0}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - if (!isNull(bean.provinceId)){ - $("#provinceId").val(bean.provinceId); - initAreaCity(bean); - } - form.render('select'); - }}); - } - - //初始化行政区划-市 - function initAreaCity(bean){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - if (!isNull(bean.cityId)){ - $("#cityId").val(bean.cityId); - initAreaChildArea(bean); - } - form.render('select'); - }}); - } - - //初始化行政区划-县 - function initAreaChildArea(bean){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - if (!isNull(bean.addressAreaId)){ - $("#addressAreaId").val(bean.addressAreaId); - initAreaTownShip(bean); - } - form.render('select'); - }}); - } - - //初始化行政区划-镇 - function initAreaTownShip(bean){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - if (!isNull(bean.townshipId)){ - $("#townshipId").val(bean.townshipId); - } - form.render('select'); - }}); - } - - form.on('select(areaProvince)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildCityArea(); - } - }); - form.on('select(areaCity)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildArea(); - } - }); - form.on('select(area)', function(data) { - layui.$(data.elem).parent('dd').nextAll().remove(); - if(isNull(data.value) || data.value == '请选择'){ - } else { - loadChildAreaTownShip(); - } - }); - - //市级行政区划 - function loadChildCityArea(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#provinceId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - //县级行政区划 - function loadChildArea(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#cityId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - //镇级行政区划 - function loadChildAreaTownShip(){ - AjaxPostUtil.request({url: reqBasePath + "queryAreaListByPId", params: {pId: $("#addressAreaId").val()}, type: 'json', method: "POST", callback: function (json) { - var str = ''; - $("#lockParentSel").append(str); - form.render('select'); - }}); - } - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/member/src/main/resources/template/js/member/memberInfo.js b/member/src/main/resources/template/js/member/memberInfo.js deleted file mode 100644 index c66bdd3536cfb47b260c00cfad4e3d3f26d316c3..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/js/member/memberInfo.js +++ /dev/null @@ -1,90 +0,0 @@ - -layui.config({ - base: basePath, - version: skyeyeVersion -}).extend({ - window: 'js/winui.window', -}).define(['window', 'table', 'jquery', 'winui'], function (exports) { - winui.renderColor(); - layui.use(['form'], function (form) { - var index = parent.layer.getFrameIndex(window.name); - var $ = layui.$; - var simpleTemplate = $("#simpleTemplate").html(); - - showGrid({ - id: "showForm", - url: shopBasePath + "member008", - params: {rowId: parent.rowId}, - pagination: false, - method: "GET", - template: simpleTemplate, - ajaxSendAfter:function (json) { - $("#enabled").html(json.bean.enabled == "1" ? "启用" : "禁用"); - - // 加载车辆信息 - loadCarMation(); - // 加载套餐信息 - loadMealMation(); - // 加载套餐订单信息 - loadMealOrderMation(); - // 加载保养订单信息 - loadKeepFitOrderMation(); - - matchingLanguage(); - form.render(); - } - }); - - function loadCarMation(){ - AjaxPostUtil.request({url: shopBasePath + "memberCar001", params: {memberId: parent.rowId}, type: 'json', method: "POST", callback: function (json) { - $.each(json.rows, function (i, item) { - if(item.insure == '1'){ - item.insure = "已购买"; - } else if (item.insure == '2'){ - item.insure = "未购买"; - } - item.stateName = shopUtil.getMemberCarEnableStateName(item.enabled); - }); - $("#showForm").append(getDataUseHandlebars($("#memberCarTemplate").html(), json)); - }, async: false}); - } - - function loadMealMation(){ - AjaxPostUtil.request({url: shopBasePath + "queryMealMationByMemberId", params: {memberId: parent.rowId}, type: 'json', method: "GET", callback: function (json) { - $("#showForm").append(getDataUseHandlebars($("#memberMealTemplate").html(), json)); - }, async: false}); - } - - function loadMealOrderMation(){ - var params = { - memberId: parent.rowId, - limit: 500, - page: 1 - }; - AjaxPostUtil.request({url: shopBasePath + "mealOrder001", params: params, type: 'json', method: "POST", callback: function (json) { - $.each(json.rows, function (i, item) { - item.state = shopUtil.getMealOrderStateName(item); - }); - $("#showForm").append(getDataUseHandlebars($("#memberMealOrderTemplate").html(), json)); - }, async: false}); - } - - function loadKeepFitOrderMation(){ - var params = { - memberId: parent.rowId, - limit: 500, - page: 1 - }; - AjaxPostUtil.request({url: shopBasePath + "keepFitOrder001", params: params, type: 'json', method: "POST", callback: function (json) { - $.each(json.rows, function (i, item) { - item.state = shopUtil.getKeepFitOrderStateName(item); - }); - $("#showForm").append(getDataUseHandlebars($("#memberKeepFitOrderTemplate").html(), json)); - }, async: false}); - } - - $("body").on("click", "#cancle", function() { - parent.layer.close(index); - }); - }); -}); \ No newline at end of file diff --git a/member/src/main/resources/template/js/member/memberList.js b/member/src/main/resources/template/js/member/memberList.js deleted file mode 100644 index 093517e458a37a56a6c597daa2d0d6a74504ddcc..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/js/member/memberList.js +++ /dev/null @@ -1,197 +0,0 @@ -var rowId = ""; - -var memberMation = {}; - -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('1569133228443'); - - table.render({ - id: 'messageTable', - elem: '#messageTable', - method: 'post', - url: shopBasePath + 'member001', - where: getTableParams(), - even: true, - page: true, - limits: getLimits(), - limit: getLimit(), - cols: [[ - { title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' }, - { field: 'contacts', title: '会员称呼', align: 'left', width: 140, fixed: 'left', templet: function (d) { - return '' + d.contacts + ''; - }}, - { field: 'phone', title: '联系电话', align: 'center', width: 100}, - { field: 'email', title: '电子邮箱', align: 'left', width: 120}, - { field: 'address', title: '地址', align: 'left', width: 100}, - { field: 'enabled', title: '状态', align: 'center', width: 80, templet: function (d) { - return shopUtil.getEnableStateName(d.enabled); - }}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'} - ]], - done: function(json) { - matchingLanguage(); - } - }); - - table.on('tool(messageTable)', function (obj) { - var data = obj.data; - var layEvent = obj.event; - if (layEvent === 'edit') { //编辑 - editmember(data); - } else if (layEvent === 'delete') { //删除 - deletemember(data); - } else if (layEvent === 'enabled') { //启用 - editEnabled(data); - } else if (layEvent == 'unenabled'){ //禁用 - editNotEnabled(data) - } else if (layEvent == 'select'){ //详情 - selectMember(data) - } else if (layEvent == 'memberCar'){ //车辆信息 - memberCar(data) - } else if (layEvent == 'mealList'){ //套餐购买信息 - mealList(data) - } - }); - - // 编辑 - function editmember(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/member/memberEdit.html", - title: "编辑会员", - pageId: "memberEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 删除会员 - function deletemember(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: shopBasePath + "member004", params: {rowId: data.id}, type: 'json', method: "POST", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 设置启用状态 - function editEnabled(data) { - layer.confirm('确认要更改该会员为启用状态吗?', { icon: 3, title: '状态变更' }, function (index) { - AjaxPostUtil.request({url: shopBasePath + "member006", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("设置成功。", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 设置禁用状态 - function editNotEnabled(data) { - layer.confirm('确认要更改该会员为禁用状态吗?', { icon: 3, title: '状态变更' }, function (index) { - AjaxPostUtil.request({url: shopBasePath + "member007", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("设置成功。", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 详情 - function selectMember(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/member/memberInfo.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "memberinfo", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 车辆信息 - function memberCar(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/memberCar/memberCarList.html", - title: '车辆信息', - pageId: "memberCarList", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 套餐购买信息 - function mealList(data) { - rowId = data.id; - memberMation = data; - _openNewWindows({ - url: "../../tpl/mealOrder/memberMealOrderList.html", - title: '套餐购买信息', - pageId: "memberMealOrderList", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - //添加会员 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/member/memberAdd.html", - title: "新增会员", - pageId: "memberAdd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}) - } - return false; - }); - - $("body").on("click", "#reloadTable", function() { - loadTable(); - }); - - // 刷新 - function loadTable() { - table.reloadData("messageTable", {where: getTableParams()}); - } - - function getTableParams() { - var contacts = $("#contacts").val(); - var phone = $("#phone").val(); - var email = $("#email").val(); - var vinCode = $("#vinCode").val() - if(isNull(contacts) && isNull(phone) && isNull(email) && isNull(vinCode)){ - contacts = "!-!!@#$%^&*"; - } - return { - contacts: contacts, - phone: phone, - email: email, - vinCode: vinCode - }; - } - - exports('memberList', {}); -}); diff --git a/member/src/main/resources/template/js/member/myWriteMemberList.js b/member/src/main/resources/template/js/member/myWriteMemberList.js index 1d07cef67b3887b651ddc6d4b78a9f1ea94fa0e9..c848467740020a56ab16234c1d53c9fd8a80e11e 100644 --- a/member/src/main/resources/template/js/member/myWriteMemberList.js +++ b/member/src/main/resources/template/js/member/myWriteMemberList.js @@ -1,6 +1,5 @@ -var rowId = ""; -var memberMation = {}; +var rowId = ""; layui.config({ base: basePath, @@ -12,7 +11,6 @@ layui.config({ var $ = layui.$, form = layui.form, table = layui.table; - authBtn('1645535320880'); table.render({ id: 'messageTable', @@ -26,165 +24,31 @@ layui.config({ limit: getLimit(), cols: [[ { title: systemLanguage["com.skyeye.serialNumber"][languageType], fixed: 'left', type: 'numbers' }, - { field: 'contacts', title: '会员称呼', align: 'left', width: 140, fixed: 'left', templet: function (d) { - return '' + d.contacts + ''; - }}, + { field: 'name', title: '会员称呼', align: 'left', width: 140, fixed: 'left' }, { field: 'phone', title: '联系电话', align: 'center', width: 100}, { field: 'email', title: '电子邮箱', align: 'left', width: 120}, - { field: 'address', title: '地址', align: 'left', width: 100}, { field: 'enabled', title: '状态', align: 'center', width: 80, templet: function (d) { return shopUtil.getEnableStateName(d.enabled); - }}, - { title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 300, toolbar: '#tableBar'} + }} ]], 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') { //编辑 - editmember(data); - } else if (layEvent === 'delete') { //删除 - deletemember(data); - } else if (layEvent === 'enabled') { //启用 - editEnabled(data); - } else if (layEvent == 'unenabled'){ //禁用 - editNotEnabled(data) - } else if (layEvent == 'select'){ //详情 - selectMember(data) - } else if (layEvent == 'memberCar'){ //车辆信息 - memberCar(data) - } else if (layEvent == 'mealList'){ //套餐购买信息 - mealList(data) - } - }); - - // 编辑 - function editmember(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/member/memberEdit.html", - title: "编辑会员", - pageId: "memberEdit", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - } - - // 删除会员 - function deletemember(data) { - layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) { - layer.close(index); - AjaxPostUtil.request({url: shopBasePath + "member004", params: {rowId: data.id}, type: 'json', method: "POST", callback: function (json) { - winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 设置启用状态 - function editEnabled(data) { - layer.confirm('确认要更改该会员为启用状态吗?', { icon: 3, title: '状态变更' }, function (index) { - AjaxPostUtil.request({url: shopBasePath + "member006", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("设置成功。", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 设置禁用状态 - function editNotEnabled(data) { - layer.confirm('确认要更改该会员为禁用状态吗?', { icon: 3, title: '状态变更' }, function (index) { - AjaxPostUtil.request({url: shopBasePath + "member007", params: {rowId: data.id}, type: 'json', method: "PUT", callback: function (json) { - winui.window.msg("设置成功。", {icon: 1, time: 2000}); - loadTable(); - }}); - }); - } - - // 详情 - function selectMember(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/member/memberInfo.html", - title: systemLanguage["com.skyeye.detailsPageTitle"][languageType], - pageId: "memberinfo", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 车辆信息 - function memberCar(data) { - rowId = data.id; - _openNewWindows({ - url: "../../tpl/memberCar/memberCarList.html", - title: '车辆信息', - pageId: "memberCarList", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 套餐购买信息 - function mealList(data) { - rowId = data.id; - memberMation = data; - _openNewWindows({ - url: "../../tpl/mealOrder/memberMealOrderList.html", - title: '套餐购买信息', - pageId: "memberMealOrderList", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - } - }); - } - - // 添加会员 - $("body").on("click", "#addBean", function() { - _openNewWindows({ - url: "../../tpl/member/memberAdd.html", - title: "新增会员", - pageId: "memberAdd", - area: ['90vw', '90vh'], - callBack: function (refreshCode) { - winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000}); - loadTable(); - }}); - }); - form.render(); - form.on('submit(formSearch)', function (data) { - if (winui.verifyForm(data.elem)) { - table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()}) - } - return false; - }); - $("body").on("click", "#reloadTable", function() { loadTable(); }); - - // 刷新 function loadTable() { table.reloadData("messageTable", {where: getTableParams()}); } function getTableParams() { - return { - contacts: $("#contacts").val(), - phone: $("#phone").val(), - email: $("#email").val(), - enabled: $("#enabled").val(), - vinCode: $("#vinCode").val() - }; + return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable")); } exports('myWriteMemberList', {}); diff --git a/member/src/main/resources/template/js/memberCar/memberCarList.js b/member/src/main/resources/template/js/memberCar/memberCarList.js index 01ffc7c2d42b2dcd3f1f6d4d7c4ebe4acbc306ed..96a78424c59e8fd226aae59e9d5831f66ce69cb7 100644 --- a/member/src/main/resources/template/js/memberCar/memberCarList.js +++ b/member/src/main/resources/template/js/memberCar/memberCarList.js @@ -14,7 +14,7 @@ layui.config({ table = layui.table; authBtn('1644234244354'); - memberId = parent.rowId; + memberId = GetUrlParam("id"); table.render({ id: 'messageTable', diff --git a/member/src/main/resources/template/tpl/member/allMemberList.html b/member/src/main/resources/template/tpl/member/allMemberList.html deleted file mode 100644 index 8a34ace88dd81535eab3d9e22cab39e11127dd16..0000000000000000000000000000000000000000 --- a/member/src/main/resources/template/tpl/member/allMemberList.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - -