Commit 3f8c72bf by 胡悦

修复bug

1 parent 9a37a2ba
......@@ -329,8 +329,8 @@
// 创建角色
$('#addRole').on('click', function () {
// go('role', 'add', null, true)
$messenger.emit('route-to', { path: '/settings/role/add' })
go('role', 'add')
// $messenger.emit('route-to', { path: '/settings/role/add' })
})
// 提交表单
......@@ -477,7 +477,7 @@
staffPhone: data.staffPhone,
password: data.password,
// visibleInferiorMer: "1",
roleIds: +data.roleIds.join(''),
roleIds: data.roleIds ? +data.roleIds.join('') : '',
staffEmail: data.staffEmail,
staffJob: data.staffJob
}
......
......@@ -119,8 +119,8 @@
{ field: 'entmicroName', title: '员工企微号', align: 'center', width: 125 },
{ field: 'roleName', title: '角色', align: 'center' },
{ field: 'staffPhone', title: '登录手机号', align: 'center', width: 125 },
{ field: 'entmicroName', title: '所属门店', align: 'center', width: 125 },
{ field: 'entmicroName', title: '所属企微', align: 'center', width: 125 },
{ field: 'merchantName', title: '所属门店', align: 'center', width: 125 },
{ field: 'merchantUserResponse', title: '所属企微', align: 'center', width: 125 },
{ field: 'statusName', title: '状态', align: 'center' },
{ field: 'updatedTime', title: '更新时间', align: 'center', width: 180 },
{ title: '操作', width: 220, align: 'left', toolbar: '#employeeBar' },
......
......@@ -408,7 +408,7 @@
</div>
</div>
<div class="layui-form-item hide" id="effectiveShowEl">
<label class="layui-form-label">账户有效期:</label>
<label class="layui-form-label required">账户有效期:</label>
<div class="layui-inline">
<div class="layui-input-inline">
<input type="text" id="effectiveStarttime" class="layui-input" name="effectiveStarttime" placeholder="开始时间" />
......@@ -459,7 +459,7 @@
<div class="layui-form-item">
<label class="layui-form-label required">账户等级:</label>
<div class="layui-input-inline">
<select id="accountLevelEl" name="merchantAccountLevel" required lay-vertify="required" lay-search></select>
<select id="accountLevelEl" name="merchantAccountLevel" lay-filter="accountLevel" required lay-vertify="required" lay-search></select>
</div>
</div>
<!-- <div class="layui-form-item" id="effectiveShowEl">
......@@ -682,6 +682,21 @@
}
})
// select 选择触发
form.on('select(accountLevel)', function (data) {
console.log(data.value)
if (data.value == 4) {
$('#effectiveShowEl').removeClass('hide')
$('#effectiveShowEl').addClass('show')
$('#effectiveStarttime').attr('lay-verify', 'required')
} else {
console.log('jinlai')
$('#effectiveShowEl').removeClass('show')
$('#effectiveShowEl').addClass('hide')
$('#effectiveStarttime').removeAttr('lay-verify')
}
})
form.on('submit(handleFirstSubmit)', function (data) {
console.log(data)
var formData = data.field
......@@ -1067,10 +1082,6 @@
parentMerchantId = qs('parentId')
}
$('#validPeriodEl').attr('disabled', true)
if (merchantAccountLevel == 4) {
$('#effectiveShowEl').removeClass('hide')
$('#effectiveShowEl').addClass('show')
}
// $('#channelEl').attr('disabled', true)
if (editLevel == 3 || (editLevel == 2 && !merchantId)) {
getParentInfo()
......
......@@ -201,13 +201,13 @@
{{# if((d.btn.edit)){ }}
<!-- <a class="layui-btn-xs" lay-event="handleEdit">修改基本信息</a> -->
<a class="layui-btn-xs" lay-event="handleEdit">修改</a>
{{# } }} {{# if((d.btn.createStaff && window.isDxternal !=1) ){ }}
<a class="layui-btn-xs" lay-event="handleAddStaff">创建员工</a>
{{# } }}
</div>
<div>
{{# if((d.btn.createStaff && window.isDxternal !=1) ){ }}
<a class="layui-btn-xs" lay-event="handleAddStaff">创建员工</a>
{{# } }} {{# if((d.btn.createSubMerchant)){ }}
<a class="layui-btn-xs" lay-event="handleAddMerchant">创建子商户/门店</a>
{{# if((d.btn.createSubMerchant)){ }}
<a class="layui-btn-xs" lay-event="handleAddMerchant">创建子商户</a>
{{# } }} {{# if((d.btn.editPeriod && window.isDxternal !=1)){ }}
<a class="layui-btn-xs" lay-event="handleVaildPeriod">修改账户有效期</a>
{{# } }}
......@@ -341,7 +341,7 @@
align: 'left',
title: '操作',
toolbar: '#merchantBtns',
width: 220,
width: 230,
fixed: 'right'
// },
// {
......
......@@ -100,13 +100,18 @@ function loadConfig() {
})
}
function goLogin() {
if(!isAppend()) return
layui.use(['store'], function () {
layui.store.remove('external')
layui.store.remove('token')
layui.store.remove('user')
window.location.href = '/login.html'
})
var store = layui.store
if (store.get('accountInfo')) {
$messenger.emit('route-to', { path: '/login' })
} else {
if (!isAppend()) return
layui.use(['store'], function () {
layui.store.remove('external')
layui.store.remove('token')
layui.store.remove('user')
window.location.href = '/login.html'
})
}
}
function genurl(param, key, encode) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!