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