Commit 31f33419 by 胡悦

合并样式

2 parents 41deb6a5 2b4b020e
...@@ -79,3 +79,18 @@ ...@@ -79,3 +79,18 @@
.layui-tab-brief>.layui-tab-title .layui-this:after { .layui-tab-brief>.layui-tab-title .layui-this:after {
border-bottom: 2px solid #1989FA; border-bottom: 2px solid #1989FA;
} }
.layui-tab-content xm-select {
border-color: #E6E6E6!important;
}
.xm-label-block {
background-color: #1989FA!important;
}
.selected i.xm-icon-duox{
color: #1989FA!important;
}
.xm-option-icon, .xm-iconfont, .xm-icon-duox{
border-color:#1989FA!important;
}
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,9 @@ header { ...@@ -16,7 +16,9 @@ header {
height: 48px; height: 48px;
flex-shrink: 0; flex-shrink: 0;
} }
main::-webkit-scrollbar {
display: none;
}
.header { .header {
height: 100%; height: 100%;
background: #fff; background: #fff;
......
...@@ -140,7 +140,7 @@ ...@@ -140,7 +140,7 @@
</div> </div>
</div> </div>
<div class="layui-tab-item"> <div class="layui-tab-item">
<ul class="layui-timeline"> <!-- <ul class="layui-timeline">
<li class="layui-timeline-item"> <li class="layui-timeline-item">
<i class="layui-icon layui-timeline-axis">&#xe63f;</i> <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
<div class="layui-timeline-content layui-text"> <div class="layui-timeline-content layui-text">
...@@ -193,11 +193,12 @@ ...@@ -193,11 +193,12 @@
<div class="layui-timeline-title">过去</div> <div class="layui-timeline-title">过去</div>
</div> </div>
</li> </li>
</ul> </ul> -->
</div> </div>
</div> </div>
<div class="footer-close">
<button class="layui-btn" id="closeEl">关闭</button></div>
</div> </div>
<div></div>
</main> </main>
</div> </div>
<script src="https://www.layuicdn.com/layui/layui.js"></script> <script src="https://www.layuicdn.com/layui/layui.js"></script>
...@@ -213,7 +214,8 @@ ...@@ -213,7 +214,8 @@
var laytpl = layui.laytpl var laytpl = layui.laytpl
var element = layui.element var element = layui.element
var merchantId = qs('merchantId') var merchantId = qs('merchantId')
var merchantInfo = {} var parentId = ''
var merchantForm = {}
var templateData = {} var templateData = {}
var treeData = {} var treeData = {}
var menuFunTreeData = [] var menuFunTreeData = []
...@@ -243,8 +245,6 @@ ...@@ -243,8 +245,6 @@
getSecondTable(subMerchantTable) getSecondTable(subMerchantTable)
} }
// 查询角色详情 // 查询角色详情
function getFirstInfo(callback) { function getFirstInfo(callback) {
var params = { var params = {
...@@ -265,17 +265,35 @@ ...@@ -265,17 +265,35 @@
// 获取功能权限基础数据 // 获取功能权限基础数据
function findMenuFunTreeByMerId() { function findMenuFunTreeByMerId() {
var params = { request({
method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId', method: 'cn.com.glsx.merchants.merchant.findMerchantDetail',
id: merchantId id: merchantId
}, function (res) {
merchantForm = res.data
parentId = merchantForm.parentId
var params = {}
if (parentId) {
params = {
method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId',
id: merchantId,
parentId: parentId,
accountLevel: merchantForm.merchantAccountLevel
}
} else {
params = {
method: 'cn.com.glsx.merchants.merchant.accountTypeSearchRequest',
ids: merchantForm.accountType,
merchantId: merchantId,
accountLevel: merchantForm.merchantAccountLevel
} }
request(params, function(res) { }
request(params, function (res) {
if (res.code == '0') { if (res.code == '0') {
menuFunTreeData = res.data menuFunTreeData = res.data
getFirstInfo(function(responseList) { getFirstInfo(function (responseList) {
console.log('responseList:', responseList) console.log('responseList:', responseList)
if (responseList && responseList.length != 0) { if (responseList && responseList.length != 0) {
$.each(menuFunTreeData, function(index, item) { $.each(menuFunTreeData, function (index, item) {
for (var i = 0; i < responseList.length; i++) { for (var i = 0; i < responseList.length; i++) {
var productData = responseList[i] var productData = responseList[i]
if (item.accounttypeId == productData.accounttypeId) { if (item.accounttypeId == productData.accounttypeId) {
...@@ -284,7 +302,7 @@ ...@@ -284,7 +302,7 @@
value: item.accounttypeId value: item.accounttypeId
}) })
var menuData = [] var menuData = []
for(var j = 0; j < productData.products.length; j++) { for (var j = 0; j < productData.products.length; j++) {
menuData = productData.products[j] menuData = productData.products[j]
var idList = menuData.menuIds.concat(menuData.functionIds) var idList = menuData.menuIds.concat(menuData.functionIds)
active.treeTabAdd({ active.treeTabAdd({
...@@ -293,7 +311,8 @@ ...@@ -293,7 +311,8 @@
}, item.accounttypeId, item.products, idList) }, item.accounttypeId, item.products, idList)
} }
var filterName = 'treeTab' + item.accounttypeId var filterName = 'treeTab' + item.accounttypeId
var productId = 'tab_' + item.accounttypeId + '_' + item.products[0].productId var productId = 'tab_' + item.accounttypeId + '_' + item.products[0]
.productId
active.tabChange(filterName, productId) active.tabChange(filterName, productId)
} }
} }
...@@ -303,6 +322,7 @@ ...@@ -303,6 +322,7 @@
}) })
} }
}) })
})
} }
// 上下级商户 - 信息 // 上下级商户 - 信息
...@@ -382,10 +402,16 @@ ...@@ -382,10 +402,16 @@
}) })
// table搜索 // table搜索
$('#tableSearch').on('click', function() { $('#tableSearch').on('click', function () {
search = $('#tableSearchForm').val() var search = $('#tableSearchForm').val()
console.log(search) console.log(search)
getSecondTable(subMerchantTable, { keyword: search }) getSecondTable(subMerchantTable, {
keyword: search
})
})
$('#closeEl').on('click', function() {
go('merchant', 'index')
}) })
// 获取table列表接口 // 获取table列表接口
...@@ -402,8 +428,7 @@ ...@@ -402,8 +428,7 @@
data: data data: data
} }
subMerchantTable.reload(options) subMerchantTable.reload(options)
} })
)
} }
var active = { var active = {
...@@ -420,7 +445,7 @@ ...@@ -420,7 +445,7 @@
* productList:复选下拉框的list,修改过的数据{name: '', value: ''} * productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用 * products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
*/ */
tabAdd: function(item) { tabAdd: function (item) {
// 渠道的id,一层选项卡的id // 渠道的id,一层选项卡的id
var id = item.value var id = item.value
// roleAuth 一层选项卡过滤器的名称 // roleAuth 一层选项卡过滤器的名称
...@@ -431,20 +456,21 @@ ...@@ -431,20 +456,21 @@
// 选项卡标题的lay-id属性值 // 选项卡标题的lay-id属性值
id: id id: id
}) })
var getTpl ='<div id="select{{d.id}}"></div> <div class="layui-tab layui-tab-brief" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></div>' var getTpl =
'<div id="select{{d.id}}"></div> <div class="layui-tab layui-tab-brief" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></div>'
// var getTpl = tpl//rolesAuth.innerHTML, // 模板内容 // var getTpl = tpl//rolesAuth.innerHTML, // 模板内容
view = document.getElementById('role' + id) view = document.getElementById('role' + id)
templateData.id = id // 渲染模版的数据 templateData.id = id // 渲染模版的数据
laytpl(getTpl).render(templateData, function(html) { laytpl(getTpl).render(templateData, function (html) {
view.innerHTML = html view.innerHTML = html
}) })
}, },
// tab删除 // tab删除
tabDelete: function(name, id) { tabDelete: function (name, id) {
element.tabDelete(name, id) element.tabDelete(name, id)
}, },
// tab Change // tab Change
tabChange: function(name, id) { tabChange: function (name, id) {
element.tabChange(name, id) element.tabChange(name, id)
}, },
/** /**
...@@ -457,7 +483,7 @@ ...@@ -457,7 +483,7 @@
* products:产品list数组 * products:产品list数组
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3]) * defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/ */
treeTabAdd: function(item, id, products, defaultList) { treeTabAdd: function (item, id, products, defaultList) {
console.log(defaultList) console.log(defaultList)
var productId = 'tab_' + id + '_' + item.value var productId = 'tab_' + id + '_' + item.value
var filterName = 'treeTab' + id // 过滤器的名称 lay-filter var filterName = 'treeTab' + id // 过滤器的名称 lay-filter
...@@ -473,17 +499,20 @@ ...@@ -473,17 +499,20 @@
treeData[id][item.value] = treeData[id][item.value] || {} treeData[id][item.value] = treeData[id][item.value] || {}
treeData[id][item.value].id = productId // 渲染模版的数据 treeData[id][item.value].id = productId // 渲染模版的数据
treeData[id][item.value].productId = item.value treeData[id][item.value].productId = item.value
laytpl(getTreeTpl).render(treeData[id][item.value], function(html) { laytpl(getTreeTpl).render(treeData[id][item.value], function (html) {
treeView.innerHTML = html treeView.innerHTML = html
}) })
var treeListData = [] var treeListData = []
$.each(products, function(index, i) { $.each(products, function (index, i) {
if (item.value == i.productId) { if (item.value == i.productId) {
treeListData = i.merchantProTreeResponses treeListData = i.merchantProTreeResponses
} }
}) })
var treedom = 'tree_' + productId var treedom = 'tree_' + productId
treeData[id][item.value].treeObj = tree.create(treedom, treeListData, {checkedList: defaultList, chkDisabled: true}) treeData[id][item.value].treeObj = tree.create(treedom, treeListData, {
checkedList: defaultList,
chkDisabled: true
})
} }
} }
}) })
......
...@@ -295,8 +295,8 @@ ...@@ -295,8 +295,8 @@
</div> </div>
</div> </div>
<div class="layui-form-item" style="text-align: center;"> <div class="layui-form-item" style="text-align: center;">
<button class="layui-btn" lay-submit lay-filter="handleFirstSubmit">下一步</button> <button id="firstBtn" class="layui-btn" lay-submit lay-filter="handleFirstSubmit">下一步</button>
<button class="layui-btn" data-type="handleCancel">取消</button> <button class="layui-btn" data-type="handleFirstCancel">取消</button>
</div> </div>
</form> </form>
</div> </div>
...@@ -531,10 +531,6 @@ ...@@ -531,10 +531,6 @@
getById() getById()
}) })
} }
} else {
// layer.msg('操作成功', {
// icon: 1
// })
} }
}) })
return false return false
...@@ -624,8 +620,13 @@ ...@@ -624,8 +620,13 @@
subParent.append(child2) subParent.append(child2)
parent.append(subParent) parent.append(subParent)
}, },
handleFirstCancel() {
go('merchant', 'index')
return false
},
handleCancel() { handleCancel() {
go('merchant', 'index') go('merchant', 'index')
return false
} }
} }
...@@ -705,7 +706,9 @@ ...@@ -705,7 +706,9 @@
getAccountType() getAccountType()
} else { } else {
merchantId = qs('id') merchantId = qs('id')
$('#preStep').remove()
if (editLevel == 3) { if (editLevel == 3) {
$('#firstBtn').text('确定')
$('#accountLevelEl').attr('disabled', true) $('#accountLevelEl').attr('disabled', true)
} else { } else {
getBusiScope() getBusiScope()
...@@ -797,6 +800,9 @@ ...@@ -797,6 +800,9 @@
getMerchantApi(merchantId, function (res) { getMerchantApi(merchantId, function (res) {
form.val('merchantForm', res.data) form.val('merchantForm', res.data)
merchantForm = res.data merchantForm = res.data
if(merchantForm.status != 1) {
$('#draft').remove()
}
console.log(merchantForm) console.log(merchantForm)
getBusiScope() getBusiScope()
getCarBrandTree() getCarBrandTree()
......
...@@ -20,14 +20,14 @@ ...@@ -20,14 +20,14 @@
} }
.merchant .layui-table-cell { .merchant .layui-table-cell {
/* height: auto; height: auto;
overflow: visible; overflow: visible;
text-overflow: inherit; text-overflow: inherit;
white-space: normal; */ white-space: normal;
height: auto; /* height: auto;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap; */
} }
.merchant #searchForm .layui-inline { .merchant #searchForm .layui-inline {
...@@ -238,10 +238,10 @@ ...@@ -238,10 +238,10 @@
title: '更新时间', title: '更新时间',
align: 'center' align: 'center'
}, { }, {
align: 'center', align: 'left',
title: '操作', title: '操作',
toolbar: '#merchantBtns', toolbar: '#merchantBtns',
width: 485 width: 220
// fixed: 'right' // fixed: 'right'
}] }]
] ]
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* @Author: limin * @Author: limin
* @Date: 2021-07-15 15:46:53 * @Date: 2021-07-15 15:46:53
* @LastEditors: limin * @LastEditors: limin
* @LastEditTime: 2021-08-09 14:07:12 * @LastEditTime: 2021-08-09 18:08:19
* @FilePath: \account\js\load.js * @FilePath: \account\js\load.js
*/ */
;(function load() { ;(function load() {
...@@ -35,8 +35,7 @@ function loadHeaderFooter() { ...@@ -35,8 +35,7 @@ function loadHeaderFooter() {
if(isExternal){ //运营平台外部系统 if(isExternal){ //运营平台外部系统
append() append()
}else{//嵌入运营平台 }else{//嵌入运营平台
var token = store.get('token') if(isLoginPage()){
if(token || isLoginPage()){
return return
} }
var t = qs('t') var t = qs('t')
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!