Commit cc9b0ce0 by 胡悦

修改角色

1 parent ed221479
......@@ -48,10 +48,11 @@
</div>
<div class="layui-form-item">
<label class="layui-form-label required">所属商户:</label>
<div class="layui-input-block">
<div id="merchantBox">
<div class="layui-input-block" id="merchantBox">
<div id="merchantSelect" class="hide">
<select id="merchantName" name="merchantId" lay-filter="merchants" lay-verify="required" autocomplete="off" placeholder="请选择商户名称" required></select>
</div>
<div class="hide" id="merchantIdText" style="line-height: 36px;"></div>
</div>
</div>
<div class="layui-form-item">
......@@ -102,9 +103,17 @@
var merchantId = ''
if (roleid) {
getById(roleid)
$('#merchantIdText').text(qs('merchantName'))
$('#merchantIdText').removeClass('hide')
$('#merchantIdText').addClass('show')
} else {
$('#draft').removeClass('hide')
$('#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()
}
var merchantName = $('#merchantName')
......
......@@ -157,7 +157,7 @@
if (layEvent === 'detail') {
go('role', 'detail', { id: data.id, merchantId: data.merchantId })
} 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)
} else if (layEvent === 'del') {
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!