Commit 86201862 by 前端

Merge branch 'v3.22.1' of http://192.168.3.233:8090/h5/account into v3.22.0

2 parents e4bd3831 a11e3c84
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="utf-8" />
......@@ -18,14 +17,12 @@
border: 1px dashed #d9d9d9;
cursor: pointer;
}
.upload-img-box .upload-img {
position: absolute;
width: 80px;
top: 0;
left: 0;
}
.icon-add {
position: absolute;
top: 50%;
......@@ -33,37 +30,30 @@
left: 50%;
transform: translate3d(-50%, -50%, 0);
}
.upload-img-wh {
width: 80px !important;
height: 80px;
}
.show {
display: inline-block;
/* width: 360px; */
}
.hide {
display: none;
}
.tips {
font-size: 14px;
color: #999;
}
.form-right {
position: absolute;
right: 0;
top: 0;
transform: translateX(110%);
}
.sub-bg-white {
background-color: #fff;
}
.edit-box {
padding: 0 20px 20px;
box-sizing: border-box;
......@@ -71,10 +61,8 @@
background-color: #ffffff;
margin: 15px auto;
position: relative;
margin-bottom: 100px;
}
.edit-box .grayLine {
position: absolute;
left: 0;
......@@ -83,7 +71,6 @@
width: 100%;
height: 1px;
}
.edit-title {
height: 48px;
line-height: 48px;
......@@ -93,15 +80,12 @@
color: #333333;
font-weight: 600;
}
.hide {
display: none;
}
.show {
display: block;
}
.pageTitle {
background-color: #fff;
height: 78px;
......@@ -111,23 +95,19 @@
line-height: 78px;
padding-left: 20px;
}
.Wrap {
margin: 8px 20px 0;
/* height: 100%; */
}
.xm-select-demo,
xm-select > .xm-body .scroll-body {
width: 360px;
}
xm-select:hover {
border: 1px solid #5850ff !important;
}
</style>
</head>
<body>
<div id="app">
<main>
......@@ -175,9 +155,7 @@
<input id="mesVerifyFlag" type="checkbox" name="mesVerifyFlag" lay-filter="encrypt" lay-skin="primary" title="开启短信验证登录" />
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label required">登录密码:</label>
<div class="layui-input-block" style="position: relative">
......@@ -242,14 +220,12 @@
<input type="text" name="staffEmail" maxlength="30" lay-verify="" placeholder="请输入邮箱" autocomplete="off" class="layui-input" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">主要职务:</label>
<div class="layui-input-block">
<input type="text" name="staffJob" maxlength="10" placeholder="请输入主要职务" autocomplete="off" class="layui-input" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">所属部门:</label>
<div class="layui-input-block">
......@@ -274,7 +250,6 @@
</select> -->
</div>
</div>
<div class="layui-form-item hide" id="wechatNick">
<label class="layui-form-label">微信昵称:</label>
<div class="layui-input-block">
......@@ -293,7 +268,6 @@
<input type="text" name="weChatOpenId" readonly class="layui-input" />
</div>
</div>
<div class="footer-close">
<button class="layui-btn" lay-submit lay-filter="employeeSubmit">确定</button>
<button type="reset" class="layui-btn" id="return">取消</button>
......@@ -344,7 +318,6 @@
}
}
}
// 员工标签
var tagAuth = xmSelect.render({
el: '#tagAuth',
......@@ -378,7 +351,6 @@
name: '会员权益/升级',
value: '0'
},
{
name: '膨胀金活动',
value: '2'
......@@ -392,7 +364,6 @@
staffLabel = data.change[0].value
}
})
var merchantNameSelect = xmSelect.render({
el: '#merchantNameSelect',
prop: {
......@@ -461,7 +432,6 @@
}
})
}
/** 手动触发事件 */
// 上传图片
$('.upload').on('change', function (e) {
......@@ -497,12 +467,10 @@
}
reader.onload()
})
// 返回上个页面
$('#return').on('click', function () {
window.history.back()
})
// 重置密码
resetpsw.on('click', function () {
pwd.attr('readonly', false)
......@@ -524,7 +492,6 @@
}
}
})
// 刷新
$('#refresh').on('click', function () {
if (!merchantId) {
......@@ -533,13 +500,11 @@
findRoleList(merchantId)
}
})
// 创建角色
$('#addRole').on('click', function () {
go('role', 'add')
// $messenger.emit('route-to', { path: '/settings/role/add' })
})
// 提交表单
form.on('submit(employeeSubmit)', function (data) {
if (specialVisible != '-1' && visibleMerchant.getCheckedNodes(true).length == 0) {
......@@ -548,7 +513,6 @@
})
return false
}
var visibleInferiorMer = ''
if (specialVisible == '-1') {
visibleInferiorMer = '-1'
......@@ -560,7 +524,6 @@
})
.join(',')
}
var otherParams = {
visibleInferiorMer: visibleInferiorMer,
merchantId: merchantId
......@@ -588,7 +551,6 @@
})
return false
})
// 表单验证
form.verify({
merchantLoginPassword: function (value) {
......@@ -602,21 +564,17 @@
}
}
})
// select 选择触发
form.on('select(merchants)', function (data) {
merchantId = data.value
getList(merchantId)
})
/** 定义方法 */
function getList(merchantId) {
getVisibleMerchant(merchantId)
findRoleList(merchantId)
findAllDepartment()
}
// 可见商户
function getVisibleMerchant(merchantId) {
var visibleMerchantParams = { id: merchantId, method: 'merchants.api.merchant.findMerchantTree' }
......@@ -656,7 +614,6 @@
}
})
}
function createMerchant(arr, data) {
visibleMerchant = tree.create('visibleInferiorMerTree', data, null, {
check: {
......@@ -671,12 +628,12 @@
all_nodes = visibleMerchant.transformToArray(visibleMerchant.getNodes())
bindEvent()
}
// 查询所属部门
function findAllDepartment(){
var params = { dictType:'staff_department',
method:'merchants.api.menu.findAllDictData'}
request(params, function (res) {
console.log(res)
if (res.code == '0') {
var list = res.data
departmentSelect.empty()
......@@ -688,7 +645,6 @@
}
})
}
// 查询所有商户
function findAllMerchant(callback) {
var params = { method: 'merchants.api.menu.findAllMerchant' }
......@@ -710,7 +666,6 @@
}
})
}
// 查询角色权限列表
function findRoleList(merchantId) {
var params = { method: 'merchants.api.role.list', id: merchantId, delFlag: 0 }
......@@ -726,7 +681,6 @@
}
})
}
function getById(callback) {
// 查询员工详情
var params = { id: id, method: 'merchants.api.staff.staffSearchRequest' }
......@@ -750,7 +704,6 @@
weChatPhone: data.weChatPhone,
weChatOpenId: data.weChatOpenId
}
if (data.staffLabel) {
var item = data.staffLabel.split(','.toString())
tagAuth.setValue(item)
......@@ -777,7 +730,6 @@
}
})
}
function bindEvent() {
$('#searchMerchant').on(
'input',
......@@ -796,4 +748,4 @@
}
})
</script>
</body>
</body>
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!