Commit 14d48b28 by 胡悦

Merge branch 'master' of 192.168.3.233:h5/account

2 parents 48f908ee 42792c82

10.9 KB | W: | H:

11.5 KB | W: | H:

css/img/zTreeStandard.png
css/img/zTreeStandard.png
css/img/zTreeStandard.png
css/img/zTreeStandard.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -11,4 +11,50 @@
display: inline-block;
color: red;
margin-right: 5px;
}
.layui-btn{
background-color: #1989FA!important;
}
/* .layui-btn, .add-circle, .btn-no-border{
background-color: #1989FA!important;
height: 16px !important;
width: 16px !important;
border-radius: 50% !important;
} */
.layui-laypage-em{
background-color: #1989FA!important;
}
.layui-btn-xs{
color:#1989FA;
font-size: 14px;
height: 14px;
font-weight: 400;
line-height: 14px;
}
.layui-btn-xs:hover{
color:#1989FA;
}
.layui-form-select dl dd.layui-this{
background-color: #1989FA;
}
.layui-form-checked[lay-skin=primary] i{
border-color: #1989FA!important;
background-color: #1989FA;
color: #fff;
}
.layui-form-checkbox[lay-skin=primary]:hover i{
border-color: #1989FA!important;
color: #fff;
}
.layui-form-checked span, .layui-form-checked:hover span {
background-color: #1989FA;
}
.layui-form-checked i, .layui-form-checked:hover i {
color: #1989FA;
}
.layui-laydate .layui-laydate-content .layui-this{
background-color: #1989FA!important;
color:#fff!important;
}
\ No newline at end of file
@import url(https://www.layuicdn.com/layui/css/layui.css);
@import url('./layui.css');
html, body {
html,
body {
height: 100%;
}
......@@ -15,16 +17,55 @@ main {
height: 100%;
}
.bgwrap {
height: 353px;
position: relative;
}
.bgwrap img {
width: 100%;
height: 100%;
}
.bgwrap .systemName {
position: absolute;
left: 226px;
bottom: 29px;
}
.bgwrap .systemName h2 {
height: 56px;
font-size: 40px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 56px;
text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}
.bgwrap .systemName p {
height: 28px;
font-size: 20px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(255, 255, 255, 0.7);
line-height: 28px;
text-shadow: 0px 2px 8px rgba(0, 0, 0, 0.2);
}
.wrap {
display: flex;
/* display: flex;
justify-content: center;
align-items: center;
height: 100%;
align-items: center; */
/* height: 100%; */
}
.wrap form {
width: 400px;
height: 419px;
position: fixed;
top: 240px;
right: 269px;
background: #FFFFFF;
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.1);
border-radius: 4px;
......@@ -36,12 +77,28 @@ main {
display: flex;
justify-content: center;
align-items: center;
font-size: 18px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
line-height: 24px;
}
.wrap form .items {
padding-top: 40px;
}
.wrap form .items .accountName,
.pwd {
height: 16px;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #333333;
padding: 9px 10px 9px 22px;
line-height: 16px;
}
.wrap form .items .layui-form-item {
margin-bottom: 25px;
}
......
......@@ -127,7 +127,7 @@
<div class="layui-form-item">
<div class="layui-input-block">
<button class="layui-btn" lay-submit lay-filter="employeeSubmit">确定</button>
<button type="reset" class="layui-btn layui-btn-primary" id="return">取消</button>
<button type="reset" class="layui-btn" id="return">取消</button>
</div>
</div>
</form>
......
......@@ -18,7 +18,7 @@
<form action="" class="layui-form layui-form-pane" lay-filter="employeeForm">
<div class="layui-form-item" pane>
<button type="button" class="layui-btn layui-btn-normal" id="addEmployee">
<i class="layui-icon">&#xe654;</i>
<i class="layui-icon layui-icon-add-circle"></i>
创建员工
</button>
<div class="layui-inline" pane>
......
......@@ -52,7 +52,7 @@
top: 0;
left: 0;
}
.edit-box .icon-add {
position: absolute;
top: 45%;
......@@ -73,6 +73,20 @@
.hide {
display: none;
}
.option-btns{
height: 38px;
}
.wrap-add-signal{
margin-top: 11px;
background-color: #1989FA;
color: #fff;
height: 16px;
line-height: 16px;
text-align: center;
width: 16px;
border-radius: 50%;
}
</style>
<title>商户编辑</title>
</head>
......@@ -81,7 +95,8 @@
<div id="app">
<main>
<div class="edit-box">
<div>
<!-- 基本信息 -->
<div id="basicForm">
<form class="layui-form" lay-filter="merchantForm">
<div class="layui-form-item edit-title" style="position: relative;">
<div class="layui-input-inline">企业基本信息</div>
......@@ -179,13 +194,15 @@
<label class="layui-form-label"></label>
<div>
<div class="layui-input-inline">
<input class="layui-input business-scope-cust" name="businessScopeCustomize"
placeholder="请自定义营业范围,建议不超过10个">
<input id="scopeCus" class="layui-input business-scope-cust" placeholder="请自定义营业范围,建议不超过10个">
</div>
<div class="layui-input-inline">
<button type="button" class="layui-btn layui-btn-primary btn-no-border" data-type="handleAddScope">
<div class="layui-input-inline option-btns">
<button type="button" class="layui-btn btn-no-border" data-type="handleAddScope">
<i class="layui-icon layui-icon-add-circle scope-btn"></i>
</button>
<!-- <div class="wrap-add-signal" data-type="handleAddScope">
<i class="layui-icon">&#xe654</i>
</div> -->
</div>
</div>
</div>
......@@ -267,6 +284,10 @@
</div>
</form>
</div>
<!-- 权限树 -->
<div id="authorityTree">
树--
</div>
</div>
</main>
</div>
......@@ -281,7 +302,6 @@
var $ = layui.$
var helper = layui.helper
var editData = {}
var scopeIdx = 1
var treeObj = null
var all_nodes = []
// 1-创建新商户;2-创建子商户;3-修改
......@@ -433,7 +453,7 @@
} else {
params.status = 1
}
// console.log(merchantForm)
console.log(editLevel)
console.log(params)
request(params, function (res) {
console.log(res)
......@@ -495,24 +515,26 @@
})
},
// 添加范围
handleAddScope() {
scopeIdx = scopeIdx + 1
handleAddScope(txt) {
var parent = $('#custom-scope')
var subParent = $('<div class="layui-form-item"><label class="layui-form-label"></label></div>')
var child1 = $(
'<div class="layui-input-inline"><input class="layui-input business-scope-cust" name="businessScopeCustomize' +
scopeIdx + '" placeholder="请自定义营业范围,建议不超过10个"></div>'
'<div class="layui-input-inline"></div>'
)
var inputEl = $('<input class="layui-input business-scope-cust" placeholder="请自定义营业范围,建议不超过10个">')
var child2 = $(
'<div class="layui-input-inline"></div>'
)
var addBtn = $(
'<button type="button" class="layui-btn layui-btn-primary btn-no-border"><i class="layui-icon layui-icon-add-circle"></i></button>'
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-add-circle"></i></button>'
)
var deleteBtn = $(
'<button type="button" class="layui-btn layui-btn-primary btn-no-border"><i class="layui-icon layui-icon-reduce-circle"></i></button>'
'<button type="button" class="layui-btn btn-no-border"><i class="layui-icon layui-icon-reduce-circle"></i></button>'
)
if (txt) {
inputEl.val(txt)
}
addBtn.bind('click', function (e) {
btnHandle.handleAddScope()
})
......@@ -520,6 +542,7 @@
var el = $(this).parent().parent()
el.remove()
})
child1.append(inputEl)
child2.append(addBtn)
child2.append(deleteBtn)
subParent.append(child1)
......@@ -588,18 +611,20 @@
getPeriod()
bindEvent()
}
function bindEvent(){
$('#brand').on('input',helper.debounce(function(){
function bindEvent() {
$('#brand').on('input', helper.debounce(function () {
var txt = $(this).val()
if(!txt){
if (!txt) {
treeObj.showNodes(all_nodes)
}else{
var show_nodes = treeObj.getNodesByParamFuzzy('label',txt)
} else {
var show_nodes = treeObj.getNodesByParamFuzzy('label', txt)
treeObj.hideNodes(all_nodes)
treeObj.showNodes(show_nodes)
}
},500))
}, 500))
}
function setCheckbox(checkedStr, attr) {
if (!checkedStr || !checkedStr.length) {
return false
......@@ -610,7 +635,7 @@
} else {
list = checkedStr.split(',')
}
console.log(list)
// console.log(list)
$.each(list, function (index, item) {
$('input[class=' + attr + ']').attr("checked", true)
})
......@@ -628,6 +653,8 @@
getBusiScope()
getCarBrandTree()
getAccountType()
recoveryBusiScopeCus()
recoveryFile()
})
}
......@@ -644,24 +671,17 @@
request({
method: 'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
}, function (res) {
// console.log(res.data)
baseData.carBrandTreeList = res.data
treeObj = tree.create('carBrandTree', res.data)
all_nodes = treeObj.getNodes()
var checkedList = []
if (editLevel == 3) {
if (editLevel == 3 && merchantForm.merchantBrand) {
checkedList = merchantForm.merchantBrand.split(',')
$.each(checkedList, function (index, item) {
checkedList[index] = parseInt(item)
})
}
treeObj = tree.create('carBrandTree', res.data, {
checkedList: checkedList
})
// 修改-回显
// if (editLevel == 3) {
// checkedList = merchantForm.merchantBrand.split(',')
// for (var i = 0; i <= checkedList.length; i++) {
// treeObj.checkNode(treeObj.getNodeByParam("id", checkedList[i]), true)
// }
// }
})
}
// 获取字典数据
......@@ -709,7 +729,7 @@
getDictData('business_scope', function (res) {
baseData.busiScopeList = res.data
var checkedList = []
if (editLevel == 3) {
if (editLevel == 3 && merchantForm.businessScope) {
checkedList = merchantForm.businessScope.split(',')
}
var el = $('#busiScopeEl')
......@@ -732,13 +752,48 @@
})
}
// 恢复自定义营业范围
function recoveryBusiScopeCus() {
// console.log(merchantForm.businessScopeCustomize)
if (merchantForm.businessScopeCustomize) {
var scopeCusList = merchantForm.businessScopeCustomize.split(',')
$.each(scopeCusList, function (index, item) {
if (index != 0) {
btnHandle.handleAddScope(item)
} else {
$('#scopeCus').val(item)
}
})
}
}
// 恢复图片
function recoveryFile() {
console.log(merchantForm.merchantFileResponses)
merchantForm.merchantFiles = []
$.each(merchantForm.merchantFileResponses, function (index, item) {
var imgEl = $('#img' + index)
var el = $('#upload' + index)
var addEl = $('.img-add' + index)
merchantForm.merchantFiles[index] = {
fileUrl: item.fileUrl,
fileName: item.fileName
}
imgEl.attr('src', item.fileUrl)
imgEl.removeClass('hide')
imgEl.addClass('show')
addEl.removeClass('show')
addEl.addClass('hide')
})
}
// 账户类型
function getAccountType() {
getDictData('account_type', function (res) {
// console.log(res.data)
baseData.accountTypeList = res.data
var checkedList = []
if (editLevel == 3) {
if (editLevel == 3 && merchantForm.accountType) {
checkedList = merchantForm.accountType.split(',')
}
var el = $('#accountTypeEl')
......
......@@ -45,7 +45,8 @@
<div class="search-block">
<form class="layui-form" lay-filter="searchFilter" id="searchForm">
<div class="layui-inline" id="operateEl">
<button class="layui-btn" id="addBtn">创建商户</button>
<button class="layui-btn" id="addBtn">
<i class="layui-icon layui-icon-add-circle"></i> 创建商户</button>
<div class="layui-inline">
<label class="layui-form-label">渠道:</label>
<div class="layui-input-inline">
......@@ -131,7 +132,7 @@
var $ = layui.$
var helper = layui.helper
var user = helper.store.get('user')
var isDxternal = helper.store.get('isDxternal')
var isDxternal = isAppend()
var baseData = {
statusList: [],
......@@ -439,8 +440,7 @@
function init() {
// 运营系统
// if (!isDxternal) {
if (isDxternal) {
if (!isDxternal) {
getChannel()
getAccountLevel()
getAccountType()
......
......@@ -42,7 +42,7 @@
<div class="layui-input-block">
<button class="layui-btn" id="draft">存草稿</button>
<button class="layui-btn" lay-submit lay-filter="roleSubmit">确定</button>
<button type="reset" class="layui-btn layui-btn-primary" id="return">取消</button>
<button type="reset" class="layui-btn " id="return">取消</button>
</div>
</div>
</form>
......
......@@ -16,8 +16,8 @@
<div class="bg-white">
<form action="" class="layui-form layui-form-pane" lay-filter="roleForm">
<div class="layui-form-item" pane>
<button type="button" class="layui-btn layui-btn-normal" id="addRole">
<i class="layui-icon">&#xe654;</i>
<button type="button" class="layui-btn layui-btn-normal" id="addRole" style="padding: 0 15px;">
<i class="layui-icon layui-icon-add-circle"></i>
创建角色
</button>
<div class="layui-inline" pane>
......
......@@ -23,6 +23,7 @@ function go(module, page, params) {
function goLogin() {
window.location.href = '/login.html'
}
function loadLayConfig() {
layui.config({
base: '/js/'
......@@ -45,11 +46,6 @@ function append() {
function isAppend() {
var _href = location.href.split('/')
var _path = _href.slice(_href.length - 1, _href.length).toString()
layui.use(['store'], function () {
var store = layui.store
// isDxternal: true - 外部独立系统;false - 运营平台
store.set('isDxternal', _path.split('?')[0] !== 'login.html' && self == top)
})
return _path.split('?')[0] !== 'login.html' && self == top
}
......
......@@ -13,18 +13,25 @@
<body>
<div id="app">
<main>
<div class="bgwrap">
<img src="./css/img/loginBg.png" alt="">
<div class="systemName">
<h2>账户管理中心</h2>
<p>Account Management Center</p>
</div>
</div>
<div class="wrap">
<form class="layui-form" action="">
<div class="title">登录</div>
<div class="title">登 录</div>
<div class="items">
<div class="layui-form-item">
<label class="layui-form-label">帐户名:</label>
<label class="layui-form-label accountName" >帐户名:</label>
<div class="layui-input-inline">
<input type="text" name="userName" required lay-verify="required" placeholder="请输入帐户名" autocomplete="off" class="layui-input" />
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
<label class="layui-form-label pwd">密&nbsp;&nbsp;&nbsp;&nbsp;码:</label>
<div class="layui-input-inline">
<input type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input" />
</div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!