Commit dca58d10 by cwq0219

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

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