Commit cc9b0ce0 by 胡悦

修改角色

1 parent ed221479
...@@ -48,10 +48,11 @@ ...@@ -48,10 +48,11 @@
</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" id="merchantBox">
<div id="merchantBox"> <div id="merchantSelect" class="hide">
<select id="merchantName" name="merchantId" lay-filter="merchants" lay-verify="required" autocomplete="off" placeholder="请选择商户名称" required></select> <select id="merchantName" name="merchantId" lay-filter="merchants" lay-verify="required" autocomplete="off" placeholder="请选择商户名称" required></select>
</div> </div>
<div class="hide" id="merchantIdText" style="line-height: 36px;"></div>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
...@@ -102,9 +103,17 @@ ...@@ -102,9 +103,17 @@
var merchantId = '' var merchantId = ''
if (roleid) { if (roleid) {
getById(roleid) getById(roleid)
$('#merchantIdText').text(qs('merchantName'))
$('#merchantIdText').removeClass('hide')
$('#merchantIdText').addClass('show')
} else { } else {
$('#draft').removeClass('hide') $('#draft').removeClass('hide')
$('#draft').addClass('show') $('#draft').addClass('show')
var str = '<div id="merchantSelect" class="hide"><select id="merchantName" name="merchantId" lay-filter="merchants" lay-verify="required" autocomplete="off" placeholder="请选择商户名称" required></select></div>'
$('#merchantBox').append(str)
findAllMerchant()
$('#merchantSelect').removeClass('hide')
$('#merchantSelect').addClass('show')
// findMenuFunTreeByMerId() // findMenuFunTreeByMerId()
} }
var merchantName = $('#merchantName') var merchantName = $('#merchantName')
......
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
if (layEvent === 'detail') { if (layEvent === 'detail') {
go('role', 'detail', { id: data.id, merchantId: data.merchantId }) go('role', 'detail', { id: data.id, merchantId: data.merchantId })
} else if (layEvent === 'edit') { } else if (layEvent === 'edit') {
var params = { id: data.id, merchantId: data.merchantId } var params = { id: data.id, merchantId: data.merchantId, merchantName: data.merchantName }
go('role', 'add', params) go('role', 'add', params)
} else if (layEvent === 'del') { } else if (layEvent === 'del') {
layer.confirm('真的删除行么', function(index) { layer.confirm('真的删除行么', function(index) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!