Commit ed221479 by 胡悦

Merge branch 'master' of 192.168.3.233:h5/account

2 parents dcdd3318 0ef9f594
......@@ -158,6 +158,11 @@
skin: 'nob',
cols: [
[{
field: 'index',
title: '序号',
align: 'center',
width: 60
}, {
field: 'operator',
title: '登录账户',
align: 'center'
......@@ -270,6 +275,7 @@
request(params, function (res) {
var data = res.data
$.each(data.data, function(index, item) {
item.index = index + 1 + recordPage.pageSize * (recordPage.pageNum - 1)
data.data[index].modifyContent = item.module + '-' + item.action
})
var options = {
......
......@@ -98,15 +98,27 @@
.bg-detail {
background-color: #fff !important;
padding-bottom: 62px;
}
.tabmutiple-content {
margin: 0 20px;
}
.fixed-btn {
.fixed-btn-block {
position: fixed;
bottom: 30px;
bottom: 0;
padding: 14px;
width: 100%;
border-top: 1px solid #eee;
background-color: #ffffff;
}
.fixed-btn {
width: 140px;
height: 28px;
line-height: 28px;
font-size: 12px;
}
</style>
</head>
......@@ -235,7 +247,7 @@
</div>
<div class="merchant-right">
<div>
<span class="companyName"> <span id="merchantNameTable"></span>员工列表</span>
<span class="companyName">员工列表</span>
<div class="layui-input-inline">
<input class="layui-input" placeholder="请输入员工姓名/手机号" id="tableSearchForm" />
</div>
......@@ -251,7 +263,7 @@
<!-- <span class="no-data"> 暂无记录</span> -->
</div>
</div>
<div class="footer-close">
<div class="footer-close fixed-btn-block">
<button class="layui-btn fixed-btn" id="closeEl">关闭</button>
</div>
</div>
......@@ -317,6 +329,11 @@
skin: 'nob',
cols: [
[{
field: 'index',
title: '序号',
align: 'center',
width: 60
}, {
field: 'operator',
title: '登录账户',
align: 'center'
......@@ -427,8 +444,6 @@
$('#secondmerchantId').text(data.merchantNo)
$('#numberOfSubMerchants').text(data.numberOfSubMerchants)
$('#numberOfStores').text(data.numberOfStores)
$('#merchantNameTable').text(data.merchantName)
$('#merchantNameTable').attr('title', data.merchantName + '员工列表');
})
}
......@@ -557,7 +572,8 @@
}
request(params, function (res) {
var data = res.data
$.each(data.data, function(index, item) {
$.each(data.data, function (index, item) {
item.index = index + 1 + recordPage.pageSize * (recordPage.pageNum - 1)
data.data[index].modifyContent = item.module + '-' + item.action
})
var options = {
......
......@@ -130,7 +130,8 @@
<form class="layui-form" lay-filter="merchantForm">
<div class="layui-form-item edit-title" style="position: relative;">
<div class="layui-input-inline">企业基本信息</div>
<div class="layui-input-item" style="position: absolute; right: 0; top: 5px; font-size: normal;">
<div id="createMerchantEl" class="layui-input-item hide"
style="position: absolute; right: 0; top: 5px; font-size: normal;">
<label class="layui-form-label">渠道:</label>
<div class="layui-input-inline">
<select id="channelEl" name="channelId"></select>
......@@ -384,6 +385,7 @@
var isFactory = true
var parentInfo = {}
var isFreshSecond = true
var scopeNum = 1
var merchantForm = {
channelId: '',
......@@ -564,7 +566,9 @@
var elList = $('.business-scope-cust')
var tempList = []
$.each(elList, function (index, item) {
tempList.push(item.value)
if (item.value) {
tempList.push(item.value)
}
})
merchantForm.businessScopeCustomize = tempList.join(',')
params.businessScopeCustomize = tempList.join(',')
......@@ -690,39 +694,44 @@
},
// 添加范围
handleAddScope: function (txt) {
var parent = $('#custom-scope')
var subParent = $('<div class="layui-form-item"><label class="layui-form-label"></label></div>')
var child1 = $(
'<div class="layui-input-inline"></div>'
)
var inputEl = $(
'<input class="layui-input business-scope-cust" maxlength="15" placeholder="请自定义营业范围,建议不超过10个">')
var child2 = $(
'<div class="layui-input-inline"></div>'
)
var addBtn = $(
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-add-circle"></i></button>'
)
var deleteBtn = $(
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-reduce-circle"></i></button>'
)
if (txt) {
inputEl.val(txt)
if (scopeNum < 10) {
scopeNum = scopeNum + 1
var parent = $('#custom-scope')
var subParent = $('<div class="layui-form-item"><label class="layui-form-label"></label></div>')
var child1 = $(
'<div class="layui-input-inline"></div>'
)
var inputEl = $(
'<input class="layui-input business-scope-cust" maxlength="15" placeholder="请自定义营业范围,建议不超过10个">'
)
var child2 = $(
'<div class="layui-input-inline"></div>'
)
var addBtn = $(
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-add-circle"></i></button>'
)
var deleteBtn = $(
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-reduce-circle"></i></button>'
)
if (txt) {
inputEl.val(txt)
}
addBtn.bind('click', function (e) {
btnHandle.handleAddScope()
})
deleteBtn.bind('click', function (e) {
scopeNum = scopeNum - 1
var el = $(this).parent().parent()
el.remove()
})
child1.append(inputEl)
child2.append(addBtn)
child2.append(deleteBtn)
subParent.append(child1)
subParent.append(child2)
parent.append(subParent)
}
addBtn.bind('click', function (e) {
btnHandle.handleAddScope()
})
deleteBtn.bind('click', function (e) {
var el = $(this).parent().parent()
el.remove()
})
child1.append(inputEl)
child2.append(addBtn)
child2.append(deleteBtn)
subParent.append(child1)
subParent.append(child2)
parent.append(subParent)
},
handleCancel: function () {
go('merchant', 'index')
......@@ -794,8 +803,6 @@
// }); //又换了种风格,并且设定最长等待10秒
//关闭
// layer.close(index);
getChannel()
getPeriod()
if (step == 1) {
......@@ -809,7 +816,10 @@
// 创建商户
if (editLevel == 1) {
if (!merchantId) {
getChannel()
$('#accountLevelEl').attr('disabled', true)
$('#createMerchantEl').removeClass('hide')
$('#createMerchantEl').addClass('show')
getBusiScope()
getCarBrandTree()
getAccountLevel()
......@@ -817,6 +827,9 @@
} else {
$('#validPeriodEl').attr('disabled', true)
$('#merchantLoginAccountEl').attr('disabled', true)
$('#createMerchantEl').removeClass('show')
$('#createMerchantEl').addClass('hide')
// $('#channelEl').attr('disabled', true)
}
} else {
if (!merchantId) {
......@@ -845,7 +858,7 @@
parentMerchantId = qs('parentId')
}
$('#validPeriodEl').attr('disabled', true)
$('#channelEl').attr('disabled', true)
// $('#channelEl').attr('disabled', true)
if (editLevel == 3 || (editLevel == 2 && !merchantId)) {
getParentInfo()
} else {
......@@ -1076,6 +1089,7 @@
$('#scopeCus').val(item)
}
})
scopeNum = scopeCusList.length
}
}
......@@ -1283,7 +1297,8 @@
}
})
var treedom = 'tree_' + productId
if (!merchantId) {
// if (!merchantId) {
if (editLevel == 1 || editLevel == 2) {
treeData[id][item.value].treeObj = tree.create(treedom, treeListData)
treeData[id][item.value].treeObj.checkAllNodes(true)
} else {
......@@ -1294,40 +1309,6 @@
}
}
// 复选框的change事件
// form.on('checkbox(switch)', function (data) {
// var arr = []
// if (data.elem.checked) {
// var obj = {
// title: data.elem.title,
// value: data.elem.value
// }
// arr.push({
// accounttypeId: data.elem.value
// })
// active.tabAdd(obj)
// } else {
// for (var i in arr) {
// var id = arr[i].accounttypeId
// if (arr[i].accounttypeId == data.elem.value) {
// active.tabDelete('roleAuth', id)
// arr.splice(i, 1)
// }
// }
// }
// if (arr.length != 0) {
// active.tabChange('roleAuth', arr[0].accounttypeId)
// }
// })
// end
// function toInt(str) {
// var arr = str.split(',')
// $.each(arr, function (index, item) {
// arr[index] = parseInt(item)
// })
// return arr
// }
// 查询商户的菜单权限树
function findMenuFunTreeByMerId() {
// console.log(merchantForm, '查询商户菜单权限树')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!