Commit fc2af01a by 胡悦

合并

2 parents 4b5c1894 76a46481
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head>
<head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta content="IE=edge" /> <meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
...@@ -74,6 +75,7 @@ ...@@ -74,6 +75,7 @@
margin-bottom: 100px; margin-bottom: 100px;
} }
.edit-box .grayLine { .edit-box .grayLine {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -92,12 +94,15 @@ ...@@ -92,12 +94,15 @@
color: #333333; color: #333333;
font-weight: 600; font-weight: 600;
} }
.hide { .hide {
display: none; display: none;
} }
.show { .show {
display: block; display: block;
} }
.pageTitle { .pageTitle {
background-color: #fff; background-color: #fff;
height: 78px; height: 78px;
...@@ -107,17 +112,20 @@ ...@@ -107,17 +112,20 @@
line-height: 78px; line-height: 78px;
padding-left: 20px; padding-left: 20px;
} }
.Wrap { .Wrap {
margin: 8px 20px 0; margin: 8px 20px 0;
/* height: 100%; */ /* height: 100%; */
} }
.xm-select-demo, .xm-select-demo,
xm-select > .xm-body .scroll-body { xm-select>.xm-body .scroll-body {
width: 360px; width: 360px;
} }
</style> </style>
</head> </head>
<body>
<body>
<div id="app"> <div id="app">
<main> <main>
<div class="Wrap"> <div class="Wrap">
...@@ -143,19 +151,22 @@ ...@@ -143,19 +151,22 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label required">员工姓名:</label> <label class="layui-form-label required">员工姓名:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="staffName" maxlength="15" required lay-verify="required" placeholder="请输入员工姓名" autocomplete="off" class="layui-input" /> <input type="text" name="staffName" maxlength="15" required lay-verify="required" placeholder="请输入员工姓名"
autocomplete="off" class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label required">登录手机号:</label> <label class="layui-form-label required">登录手机号:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="staffPhone" maxlength="11" required lay-verify="required|phone" placeholder="请输入您有效的手机号作为登录账户" autocomplete="off" class="layui-input" /> <input type="text" name="staffPhone" maxlength="11" required lay-verify="required|phone"
placeholder="请输入您有效的手机号作为登录账户" autocomplete="off" class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label required">登录密码:</label> <label class="layui-form-label required">登录密码:</label>
<div class="layui-input-block" style="position: relative"> <div class="layui-input-block" style="position: relative">
<input type="password" name="password" id="password" maxlength="15" required lay-verify="required|pass" placeholder="请输入登录密码" autocomplete="off" class="layui-input" /> <input type="password" name="password" id="password" maxlength="15" required lay-verify="required|pass"
placeholder="请输入登录密码" autocomplete="off" class="layui-input" />
<button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button> <button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button>
</div> </div>
</div> </div>
...@@ -163,7 +174,8 @@ ...@@ -163,7 +174,8 @@
<label class="layui-form-label required">可见商户:</label> <label class="layui-form-label required">可见商户:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input class="layui-input" placeholder="可见商户" id="searchMerchant" /> <input class="layui-input" placeholder="可见商户" id="searchMerchant" />
<ul id="visibleInferiorMerTree" style="max-height: 200px; overflow-y: auto" class="ztree wrapper-tree"></ul> <ul id="visibleInferiorMerTree" style="max-height: 200px; overflow-y: auto" class="ztree wrapper-tree">
</ul>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -182,16 +194,9 @@ ...@@ -182,16 +194,9 @@
<div class="upload-img-box"> <div class="upload-img-box">
<div class="icon-add img-add show">+</div> <div class="icon-add img-add show">+</div>
<img class="upload-img upload-img-wh hide" id="img" /> <img class="upload-img upload-img-wh hide" id="img" />
<input <input type="file" id="upload" name="merhcnatImg" ref="file"
type="file" class="upload upload-img-box upload-img-wh" accept="image/png, image/jpeg, image/gif, image/jpg"
id="upload" data-idx="0" style="opacity: 0" />
name="merhcnatImg"
ref="file"
class="upload upload-img-box upload-img-wh"
accept="image/png, image/jpeg, image/gif, image/jpg"
data-idx="0"
style="opacity: 0"
/>
</div> </div>
<span class="tips">图片格式仅支持JPG,PNG格式,大小1M以内</span> <span class="tips">图片格式仅支持JPG,PNG格式,大小1M以内</span>
</div> </div>
...@@ -199,14 +204,16 @@ ...@@ -199,14 +204,16 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">邮箱:</label> <label class="layui-form-label">邮箱:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="staffEmail" maxlength="30" lay-verify="" placeholder="请输入邮箱" autocomplete="off" class="layui-input" /> <input type="text" name="staffEmail" maxlength="30" lay-verify="" placeholder="请输入邮箱" autocomplete="off"
class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label">主要职务:</label> <label class="layui-form-label">主要职务:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="staffJob" maxlength="10" placeholder="请输入主要职务" autocomplete="off" class="layui-input" /> <input type="text" name="staffJob" maxlength="10" placeholder="请输入主要职务" autocomplete="off"
class="layui-input" />
</div> </div>
</div> </div>
<div class="footer-close"> <div class="footer-close">
...@@ -247,6 +254,20 @@ ...@@ -247,6 +254,20 @@
// merchantAccountLevel: 1, // merchantAccountLevel: 1,
// merchantId: 81 // merchantId: 81
// } // }
// 禁用所有input框的回车事件
var inputs = document.getElementsByTagName('input')
for (let i = 0; i < inputs.length; i++) {
var input = inputs[i]
input.onkeydown = function (event) {
if (event.keyCode == 13) {
event.keyCode = 0;
event.returnValue = false;
}
}
}
var merchantNameSelect = xmSelect.render({ var merchantNameSelect = xmSelect.render({
el: '#merchantNameSelect', el: '#merchantNameSelect',
prop: { prop: {
...@@ -265,7 +286,7 @@ ...@@ -265,7 +286,7 @@
clickClose: true, clickClose: true,
radio: true, radio: true,
data: [], data: [],
on: function(data) { on: function (data) {
console.log(data) console.log(data)
merchantId = data.change[0].id merchantId = data.change[0].id
getList(merchantId) getList(merchantId)
...@@ -298,7 +319,7 @@ ...@@ -298,7 +319,7 @@
$('#addUpdateTitle').text('修改员工') $('#addUpdateTitle').text('修改员工')
$('#merchantNameSelect').addClass('hide') $('#merchantNameSelect').addClass('hide')
} }
findAllMerchant(function (result) {}) findAllMerchant(function (result) { })
} }
...@@ -559,5 +580,6 @@ ...@@ -559,5 +580,6 @@
} }
}) })
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head>
<head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta content="IE=edge" /> <meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
...@@ -12,9 +13,11 @@ ...@@ -12,9 +13,11 @@
.h20 { .h20 {
height: 20px; height: 20px;
} }
.mb5 { .mb5 {
margin-bottom: 5px; margin-bottom: 5px;
} }
.merchant .layui-table { .merchant .layui-table {
margin: 0; margin: 0;
width: 100%; width: 100%;
...@@ -28,6 +31,7 @@ ...@@ -28,6 +31,7 @@
.layui-btn-xs { .layui-btn-xs {
cursor: pointer; cursor: pointer;
} }
.layui-form-label { .layui-form-label {
width: 130px; width: 130px;
} }
...@@ -38,11 +42,13 @@ ...@@ -38,11 +42,13 @@
.mode { .mode {
margin-left: 30px; margin-left: 30px;
} }
.input-before-name { .input-before-name {
width: 80px; width: 80px;
text-align: right; text-align: right;
display: inline-block; display: inline-block;
} }
.commonInput { .commonInput {
width: 260px; width: 260px;
} }
...@@ -51,17 +57,21 @@ ...@@ -51,17 +57,21 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.relevancyImg { .relevancyImg {
width: 20px; width: 20px;
height: 20px; height: 20px;
margin-right: 5px; margin-right: 5px;
} }
.hide { .hide {
display: none; display: none;
} }
.show { .show {
display: inline-block; display: inline-block;
} }
.merchantTable .layui-table-cell { .merchantTable .layui-table-cell {
/* height: auto; */ /* height: auto; */
/* line-height: 88px; */ /* line-height: 88px; */
...@@ -74,9 +84,9 @@ ...@@ -74,9 +84,9 @@
} }
</style> </style>
<title>商户管理</title> <title>商户管理</title>
</head> </head>
<body> <body>
<div class="merchant" id="app"> <div class="merchant" id="app">
<main> <main>
<div class="context-block"> <div class="context-block">
...@@ -93,7 +103,6 @@ ...@@ -93,7 +103,6 @@
<div id="relevancyEl" class="layui-inline hide"> <div id="relevancyEl" class="layui-inline hide">
<button class="layui-btn mb5" id="relevancyBtn"> <button class="layui-btn mb5" id="relevancyBtn">
<img class="relevancyImg" src="../../css/img/relevancy.png" alt="" /> <img class="relevancyImg" src="../../css/img/relevancy.png" alt="" />
<!-- <i class="layui-icon layui-icon-addition"></i> -->
门店账户关联企微 门店账户关联企微
</button> </button>
</div> </div>
...@@ -148,7 +157,9 @@ ...@@ -148,7 +157,9 @@
</div> </div>
<!-- margin-left: -5px --> <!-- margin-left: -5px -->
<div class="layui-input-inline" style="width: 286px; margin-left: -4px"> <div class="layui-input-inline" style="width: 286px; margin-left: -4px">
<input class="layui-input" type="text" placeholder="请输入" name="merchantLoginAccount" id="updateCircleAngle" /> <input class="layui-input" type="text" placeholder="请输入" name="merchantLoginAccount"
id="updateCircleAngle"
onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" />
</div> </div>
</div> </div>
<div id="model"> <div id="model">
...@@ -174,7 +185,9 @@ ...@@ -174,7 +185,9 @@
<div style="display: flex; justify-content: space-between"> <div style="display: flex; justify-content: space-between">
<div class="layui-inline customerStatus"> <div class="layui-inline customerStatus">
<div class="layui-input-inline"> <div class="layui-input-inline">
<input class="layui-input" type="text" style="width: 404px" name="merchantName" placeholder="请输入商户名称/关联的企业微信名" /> <input class="layui-input" type="text" style="width: 404px" name="merchantName"
placeholder="请输入商户名称/关联的企业微信名"
onkeydown="if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}" />
</div> </div>
</div> </div>
<div class="layui-inline searchInputBtn"> <div class="layui-inline searchInputBtn">
...@@ -373,8 +386,8 @@ ...@@ -373,8 +386,8 @@
{ {
field: 'merchantName', field: 'merchantName',
title: '商户名称', title: '商户名称',
align: 'center' align: 'center',
// width: 150 width: 150
}, },
{ {
field: 'entmicroName', field: 'entmicroName',
...@@ -385,7 +398,7 @@ ...@@ -385,7 +398,7 @@
{ {
field: 'accountTypeNames', field: 'accountTypeNames',
title: '账户类型', title: '账户类型',
align: 'left', align: 'center',
width: 150, width: 150,
templet: '#accountTypeTpl' templet: '#accountTypeTpl'
}, },
...@@ -478,7 +491,7 @@ ...@@ -478,7 +491,7 @@
table.on('tool(merchant-table-filter)', function (obj) { table.on('tool(merchant-table-filter)', function (obj) {
var eventName = obj.event var eventName = obj.event
var row = obj.data var row = obj.data
console.log(row) console.log(row.merchantAccountLevel)
switch (eventName) { switch (eventName) {
// 查看 // 查看
case 'handleDetail': case 'handleDetail':
...@@ -581,11 +594,10 @@ ...@@ -581,11 +594,10 @@
}) })
init() init()
document.onkeypress = function(e) {
e.preventDefault() $('#addBtn').on('click', function (e) {
}
$('#addBtn').on('click', function () {
// 1-创建新商户;2-创建子商户;3-修改 // 1-创建新商户;2-创建子商户;3-修改
// e.target.blur()
go('merchant', 'add', { go('merchant', 'add', {
editLevel: 1, editLevel: 1,
step: 1, step: 1,
...@@ -860,5 +872,6 @@ ...@@ -860,5 +872,6 @@
} }
}) })
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh"> <html lang="zh">
<head>
<head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta content="IE=edge" /> <meta content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
...@@ -14,6 +15,7 @@ ...@@ -14,6 +15,7 @@
margin: 8px 0 0; margin: 8px 0 0;
padding-bottom: 100px; padding-bottom: 100px;
} }
.show { .show {
display: inline-block; display: inline-block;
width: 360px; width: 360px;
...@@ -22,6 +24,7 @@ ...@@ -22,6 +24,7 @@
.hide { .hide {
display: none; display: none;
} }
.tabmutiple-content-wrap { .tabmutiple-content-wrap {
background-color: #f4f6fc; background-color: #f4f6fc;
/* padding-top: 10px; */ /* padding-top: 10px; */
...@@ -32,22 +35,27 @@ ...@@ -32,22 +35,27 @@
/* margin: 0 10px; */ /* margin: 0 10px; */
background-color: #fff; background-color: #fff;
} }
.contentGrayBg { .contentGrayBg {
/* background-color: #fff; */ /* background-color: #fff; */
/* border: 2px solid red; */ /* border: 2px solid red; */
} }
.layui-tab-title { .layui-tab-title {
background-color: #f4f6fc; background-color: #f4f6fc;
box-sizing: border-box; box-sizing: border-box;
} }
.contentGrayBg .layui-this { .contentGrayBg .layui-this {
background-color: #fff; background-color: #fff;
border: 2px solid #fff; border: 2px solid #fff;
margin-left: -3px; margin-left: -3px;
} }
.contentGrayBg .layui-tab { .contentGrayBg .layui-tab {
border: 10px solid #f4f6fc; border: 10px solid #f4f6fc;
} }
.edit-box { .edit-box {
padding: 0 20px 20px; padding: 0 20px 20px;
color: #333333; color: #333333;
...@@ -56,6 +64,7 @@ ...@@ -56,6 +64,7 @@
position: relative; position: relative;
/* height: 100%; */ /* height: 100%; */
} }
.edit-box .grayLine { .edit-box .grayLine {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -64,6 +73,7 @@ ...@@ -64,6 +73,7 @@
width: 100%; width: 100%;
height: 1px; height: 1px;
} }
.edit-title { .edit-title {
height: 78px; height: 78px;
line-height: 78px; line-height: 78px;
...@@ -74,6 +84,7 @@ ...@@ -74,6 +84,7 @@
color: #333333; color: #333333;
background-color: #fff; background-color: #fff;
} }
.baseInfo { .baseInfo {
height: 48px; height: 48px;
line-height: 48px; line-height: 48px;
...@@ -91,10 +102,12 @@ ...@@ -91,10 +102,12 @@
.layui-tab-content { .layui-tab-content {
position: relative; position: relative;
} }
.layui-no-data { .layui-no-data {
width: 100%; width: 100%;
height: 500px; height: 500px;
} }
.layui-no-data .no-data { .layui-no-data .no-data {
position: absolute; position: absolute;
top: 50%; top: 50%;
...@@ -104,17 +117,19 @@ ...@@ -104,17 +117,19 @@
font-size: 14px; font-size: 14px;
line-height: 22px; line-height: 22px;
} }
.layui-no-data .no-data div { .layui-no-data .no-data div {
margin-top: 12px; margin-top: 12px;
} }
.xm-select-demo, .xm-select-demo,
xm-select > .xm-body .scroll-body { xm-select>.xm-body .scroll-body {
width: 360px; width: 360px;
} }
</style> </style>
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<main> <main>
<div class="Wrap"> <div class="Wrap">
...@@ -140,7 +155,8 @@ ...@@ -140,7 +155,8 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label required">角色名称:</label> <label class="layui-form-label required">角色名称:</label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="text" name="roleName" maxlength="15" lay-verify="required" placeholder="请输入角色名称" class="layui-input" /> <input type="text" name="roleName" maxlength="15" lay-verify="required" placeholder="请输入角色名称"
class="layui-input" />
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -178,7 +194,7 @@ ...@@ -178,7 +194,7 @@
<script src="https://www.layuicdn.com/layui/layui.js"></script> <script src="https://www.layuicdn.com/layui/layui.js"></script>
<script src="/js/load.js"></script> <script src="/js/load.js"></script>
<script> <script>
layui.use(['form', 'element', 'request', 'laytpl', 'xmSelect', 'gtree', 'helper', 'xmSelect'], function() { layui.use(['form', 'element', 'request', 'laytpl', 'xmSelect', 'gtree', 'helper', 'xmSelect'], function () {
// var merchantId = qs('merchantId') // var merchantId = qs('merchantId')
var roleid = qs('id') var roleid = qs('id')
var element = layui.element var element = layui.element
...@@ -188,6 +204,17 @@ ...@@ -188,6 +204,17 @@
var xmSelect = layui.xmSelect var xmSelect = layui.xmSelect
var request = layui.request var request = layui.request
var merchantId = '' var merchantId = ''
// 禁用所有input框的回车事件
var inputs = document.getElementsByTagName('input')
for (let i = 0; i < inputs.length; i++) {
var input = inputs[i]
input.onkeydown = function (event) {
if (event.keyCode == 13) {
event.keyCode = 0;
event.returnValue = false;
}
}
}
var merchantNameSelect = xmSelect.render({ var merchantNameSelect = xmSelect.render({
el: '#merchantNameSelect', el: '#merchantNameSelect',
prop: { prop: {
...@@ -206,7 +233,7 @@ ...@@ -206,7 +233,7 @@
radio: true, radio: true,
clickClose: true, clickClose: true,
data: [], data: [],
on: function(data) { on: function (data) {
console.log(data) console.log(data)
merchantId = data.change[0].id merchantId = data.change[0].id
findMenuFunTreeByMerId(merchantId) findMenuFunTreeByMerId(merchantId)
...@@ -257,7 +284,7 @@ ...@@ -257,7 +284,7 @@
* productList:复选下拉框的list,修改过的数据{name: '', value: ''} * productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用 * products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
*/ */
tabAdd: function(item, productList) { tabAdd: function (item, productList) {
// 渠道的id,一层选项卡的id // 渠道的id,一层选项卡的id
var id = item.value var id = item.value
// roleAuth 一层选项卡过滤器的名称 // roleAuth 一层选项卡过滤器的名称
...@@ -291,7 +318,7 @@ ...@@ -291,7 +318,7 @@
// '<div id="select{{d.id}}"></div> <div class="layui-tab layui-tab-brief" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></div>' // '<div id="select{{d.id}}"></div> <div class="layui-tab layui-tab-brief" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></div>'
view = document.getElementById('role' + id) view = document.getElementById('role' + id)
templateData.id = id // 渲染模版的数据 templateData.id = id // 渲染模版的数据
laytpl(getTpl).render(templateData, function(html) { laytpl(getTpl).render(templateData, function (html) {
view.innerHTML = html view.innerHTML = html
}) })
// var productList = [] // var productList = []
...@@ -348,11 +375,11 @@ ...@@ -348,11 +375,11 @@
// console.log(selectEl[id]) // console.log(selectEl[id])
}, },
// tab删除 // tab删除
tabDelete: function(name, id) { tabDelete: function (name, id) {
element.tabDelete(name, id) element.tabDelete(name, id)
}, },
// tab Change // tab Change
tabChange: function(name, id) { tabChange: function (name, id) {
console.log(name, id) console.log(name, id)
element.tabChange(name, id) element.tabChange(name, id)
if (name == 'roleAuth') { if (name == 'roleAuth') {
...@@ -391,7 +418,7 @@ ...@@ -391,7 +418,7 @@
* products:产品list数组 * products:产品list数组
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3]) * defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/ */
treeTabAdd: function(item, id, treeListData, defaultList) { treeTabAdd: function (item, id, treeListData, defaultList) {
console.log(item, id, treeListData, defaultList) console.log(item, id, treeListData, defaultList)
var productId = 'tab_' + id + '_' + item.value var productId = 'tab_' + id + '_' + item.value
var filterName = 'treeTab' + id // 过滤器的名称 lay-filter var filterName = 'treeTab' + id // 过滤器的名称 lay-filter
...@@ -406,7 +433,7 @@ ...@@ -406,7 +433,7 @@
treeData[id][item.value] = treeData[id][item.value] || {} treeData[id][item.value] = treeData[id][item.value] || {}
treeData[id][item.value].id = productId // 渲染模版的数据 treeData[id][item.value].id = productId // 渲染模版的数据
treeData[id][item.value].productId = item.value treeData[id][item.value].productId = item.value
laytpl(getTreeTpl).render(treeData[id][item.value], function(html) { laytpl(getTreeTpl).render(treeData[id][item.value], function (html) {
console.log(treeView) console.log(treeView)
treeView.innerHTML = html treeView.innerHTML = html
}) })
...@@ -438,7 +465,7 @@ ...@@ -438,7 +465,7 @@
} }
} }
// 产品复选框change事件 // 产品复选框change事件
form.on('checkbox(filter)', function(data) { form.on('checkbox(filter)', function (data) {
console.log(data, '33333333333') console.log(data, '33333333333')
var roleId = +data.elem.dataset.id var roleId = +data.elem.dataset.id
var projectId = data.value var projectId = data.value
...@@ -479,7 +506,7 @@ ...@@ -479,7 +506,7 @@
}) })
// 复选框的change事件 // 复选框的change事件
form.on('checkbox(switch)', function(data) { form.on('checkbox(switch)', function (data) {
console.log(data, '111111111', treeData) console.log(data, '111111111', treeData)
if (data.elem.checked) { if (data.elem.checked) {
var obj = { title: data.elem.title, value: data.elem.value } var obj = { title: data.elem.title, value: data.elem.value }
...@@ -508,7 +535,7 @@ ...@@ -508,7 +535,7 @@
// end // end
// 表单提交 // 表单提交
form.on('submit(roleSubmit)', function(data) { form.on('submit(roleSubmit)', function (data) {
console.log(data.value, check_arr, treeData) console.log(data.value, check_arr, treeData)
if (check_arr.length == 0) { if (check_arr.length == 0) {
layer.msg('请选择角色权限', { layer.msg('请选择角色权限', {
...@@ -522,7 +549,7 @@ ...@@ -522,7 +549,7 @@
}) })
// select 选择触发 // select 选择触发
form.on('select(merchants)', function(data) { form.on('select(merchants)', function (data) {
console.log(data.value, check_arr, treeData) console.log(data.value, check_arr, treeData)
check_arr.forEach(item => { check_arr.forEach(item => {
active.tabDelete('roleAuth', item.accounttypeId) active.tabDelete('roleAuth', item.accounttypeId)
...@@ -534,10 +561,10 @@ ...@@ -534,10 +561,10 @@
}) })
// 存草稿 // 存草稿
$('#draft').on('click', function() { $('#draft').on('click', function () {
var formVal = form.val('roleForm') var formVal = form.val('roleForm')
console.log(formVal) console.log(formVal)
if (!formVal.merchantId ) { if (!formVal.merchantId) {
layer.msg('请选择所属商户', { layer.msg('请选择所属商户', {
icon: 2 icon: 2
}) })
...@@ -555,7 +582,7 @@ ...@@ -555,7 +582,7 @@
}) })
// 返回上个页面 // 返回上个页面
$('#return').on('click', function() { $('#return').on('click', function () {
window.history.back() window.history.back()
}) })
...@@ -607,7 +634,7 @@ ...@@ -607,7 +634,7 @@
var params = helper.clone(true, formVal, otherParams) var params = helper.clone(true, formVal, otherParams)
delete params.select delete params.select
console.log(params) console.log(params)
request(params, function(res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
layer.msg('操作成功', { layer.msg('操作成功', {
icon: 1 icon: 1
...@@ -623,7 +650,7 @@ ...@@ -623,7 +650,7 @@
method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId', method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId',
id: merchantId id: merchantId
} }
request(params, function(res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
// callback(res.data) // callback(res.data)
menuFunTreeData = res.data menuFunTreeData = res.data
...@@ -729,7 +756,7 @@ ...@@ -729,7 +756,7 @@
method: 'org.ore.api.role.getById', method: 'org.ore.api.role.getById',
id: id id: id
} }
request(params, function(res) { request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
var data = res.data var data = res.data
var accounttypeId = '' var accounttypeId = ''
...@@ -766,7 +793,7 @@ ...@@ -766,7 +793,7 @@
var functionValueIdLists = [] var functionValueIdLists = []
if (productObj.treeObj) { if (productObj.treeObj) {
var nodes = productObj.treeObj.getCheckedNodes(true) var nodes = productObj.treeObj.getCheckedNodes(true)
$.each(nodes, function(index, item) { $.each(nodes, function (index, item) {
if (item.logo == 'function') { if (item.logo == 'function') {
functionIdLists.push(item) functionIdLists.push(item)
} else if (item.logo == 'functionValue') { } else if (item.logo == 'functionValue') {
...@@ -777,10 +804,10 @@ ...@@ -777,10 +804,10 @@
} }
} }
}) })
$.each(functionValueIdLists, function(idx, m) { $.each(functionValueIdLists, function (idx, m) {
// m.parentId // m.parentId
var findIdx = -1 var findIdx = -1
$.each(functionIdList, function(idn, n) { $.each(functionIdList, function (idn, n) {
if (n.id == m.parentId) { if (n.id == m.parentId) {
findIdx = idn findIdx = idn
} }
...@@ -795,7 +822,7 @@ ...@@ -795,7 +822,7 @@
}) })
} }
}) })
$.each(functionIdLists, function(idx, m) { $.each(functionIdLists, function (idx, m) {
// console.log(m) // console.log(m)
functionIdList.push({ functionIdList.push({
id: m.parentId, id: m.parentId,
...@@ -834,7 +861,7 @@ ...@@ -834,7 +861,7 @@
// 查询所有商户 // 查询所有商户
function findAllMerchant() { function findAllMerchant() {
var params = { method: 'cn.com.glsx.merchants.menu.findAllMerchant' } var params = { method: 'cn.com.glsx.merchants.menu.findAllMerchant' }
request(params, function(result) { request(params, function (result) {
if (result.code == '0') { if (result.code == '0') {
console.log(result) console.log(result)
merchantNameSelect.update({ merchantNameSelect.update({
...@@ -874,5 +901,6 @@ ...@@ -874,5 +901,6 @@
</div> </div>
</div> </div>
</script> </script>
</body> </body>
</html> </html>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!