Commit dca58d10 by cwq0219

Merge branch 'master' of http://192.168.3.233:8090/h5/account

2 parents be650206 a52cdeef
...@@ -217,6 +217,7 @@ ...@@ -217,6 +217,7 @@
if (qs('channel')) { if (qs('channel')) {
$('#merchantIdText').text(qs('merchantName')) $('#merchantIdText').text(qs('merchantName'))
getList(qs('merchantId')) getList(qs('merchantId'))
merchantId = qs('merchantId')
$('#merchantIdText').removeClass('hide') $('#merchantIdText').removeClass('hide')
$('#merchantIdText').addClass('show') $('#merchantIdText').addClass('show')
} else { } else {
...@@ -340,17 +341,19 @@ ...@@ -340,17 +341,19 @@
if (id) { if (id) {
getById(function(checkedList) { getById(function(checkedList) {
visibleMerchant = tree.create('visibleInferiorMerTree', res.data, { checkedList: checkedList }) visibleMerchant = tree.create('visibleInferiorMerTree', res.data, { checkedList: checkedList })
var node = visibleMerchant.getNodesByParam('id', merchantId) // var node = visibleMerchant.getNodesByParam('id', merchantId)
visibleMerchant.checkNode(node, true, true) // visibleMerchant.checkNode(node, true, true)
all_nodes = visibleMerchant.getNodes() all_nodes = visibleMerchant.getNodes()
bindEvent() bindEvent()
}) })
} else { } else {
console.log(11) console.log(11)
const arr = []
arr.push(merchantId)
visibleMerchant = tree.create('visibleInferiorMerTree', res.data) visibleMerchant = tree.create('visibleInferiorMerTree', res.data)
var node = visibleMerchant.getNodesByParam('id', merchantId) var node = visibleMerchant.getNodesByParam('id', merchantId, {checkedList: arr})
console.log(node, visibleMerchant) // console.log(node, visibleMerchant)
// node.checked = true // node.checked = true
visibleMerchant.checkNode(node, true, true) visibleMerchant.checkNode(node, true, true)
// visibleMerchant.updateNode(node) // visibleMerchant.updateNode(node)
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<title>员工管理</title> <title>员工管理</title>
</head> </head>
<style> <style>
.merchantNames,.searchInputBtn{ .searchInputBtn{
margin-left: 20px; margin-left: 20px;
} }
...@@ -32,10 +32,12 @@ ...@@ -32,10 +32,12 @@
<div class="search-block"> <div class="search-block">
<form action="" class="layui-form layui-form-pane" lay-filter="employeeForm"> <form action="" class="layui-form layui-form-pane" lay-filter="employeeForm">
<div class="layui-form-item" > <div class="layui-form-item" >
<button type="button" class="layui-btn layui-btn-normal" id="addEmployee"> <div class="layui-inline merchantNames" pane id="addEl">
<i class="layui-icon layui-icon-add-circle"></i> <button type="button" class="layui-btn layui-btn-normal" id="addEmployee">
创建员工 <i class="layui-icon layui-icon-add-circle"></i>
</button> 创建员工
</button>
</div>
<div class="layui-inline merchantNames" pane> <div class="layui-inline merchantNames" pane>
<label class="layui-form-label">商户名称</label> <label class="layui-form-label">商户名称</label>
<div class="layui-input-block"> <div class="layui-input-block">
...@@ -93,6 +95,10 @@ ...@@ -93,6 +95,10 @@
var helper = layui.helper var helper = layui.helper
var laypage = layui.laypage var laypage = layui.laypage
var $ = layui.$ var $ = layui.$
var isDxternal = isAppend()
if (isDxternal) {
$('#addEl').remove()
}
// 商户名称列表 // 商户名称列表
var merchantName = $("#merchantName") var merchantName = $("#merchantName")
var status = $('#status') var status = $('#status')
......
...@@ -347,6 +347,7 @@ ...@@ -347,6 +347,7 @@
var str = $('<input lay-filter="switch" type="checkbox" name="accounttypeId" value="' + item.accounttypeId + '" title="' + item.accounttypeName + '" />') var str = $('<input lay-filter="switch" type="checkbox" name="accounttypeId" value="' + item.accounttypeId + '" title="' + item.accounttypeName + '" />')
accountType.append(str) accountType.append(str)
if (roleid) { if (roleid) {
console.log(check_arr)
// 角色权限的check // 角色权限的check
for (var i = 0; i < check_arr.length; i++) { for (var i = 0; i < check_arr.length; i++) {
if (check_arr[i].accounttypeId == item.accounttypeId) { if (check_arr[i].accounttypeId == item.accounttypeId) {
...@@ -356,25 +357,21 @@ ...@@ -356,25 +357,21 @@
active.tabAdd(obj) active.tabAdd(obj)
var selectArr = [] var selectArr = []
var menuData = [] var menuData = []
for (var j = 0; j < productData.productList.length; j++) { if (productData.productList) {
for (var j = 0; j < productData.productList.length; j++) {
menuData = productData.productList[j] menuData = productData.productList[j]
selectArr.push(menuData.productId) selectArr.push(menuData.productId)
active.treeTabAdd( active.treeTabAdd({
{
name: menuData.productName, name: menuData.productName,
value: menuData.productId value: menuData.productId
}, }, item.accounttypeId, item.products, menuData.idList
item.accounttypeId, )}
item.products, selectEl[item.accounttypeId].setValue(selectArr)
menuData.idList var filterName = 'treeTab' + item.accounttypeId
) var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId
console.log(filterName, productId)
active.tabChange(filterName, productId)
} }
// // 产品的回显
selectEl[item.accounttypeId].setValue(selectArr)
var filterName = 'treeTab' + item.accounttypeId
var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId
active.tabChange(filterName, productId)
// 树的回显
} }
} }
if (check_arr.length != 0) { if (check_arr.length != 0) {
...@@ -396,15 +393,17 @@ ...@@ -396,15 +393,17 @@
request(params, function(res) { request(params, function(res) {
if (res.code == '0') { if (res.code == '0') {
console.log(res.data, '详情') console.log(res.data, '详情')
var data = res.data
var accounttypeId = '' var accounttypeId = ''
if (res.data.responseList) { if (data.responseList) {
check_arr = res.data.responseList check_arr = data.responseList
} }
console.log(check_arr, 'jklj') console.log(check_arr, 'jklj')
// findMenuFunTreeByMerId() findMenuFunTreeByMerId(data.merchantId)
form.val('roleForm', { form.val('roleForm', {
roleName: res.data.roleName, roleName: data.roleName,
roleDescription: res.data.roleDescription roleDescription: data.roleDescription,
merchantId: data.merchantId
}) })
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!