Commit fd72f558 by 李长胜

修改样式

1 parent 32f649df
......@@ -29,6 +29,10 @@ main::-webkit-scrollbar {
justify-content: space-between;
padding: 0 20px;
}
.upload-img-box{
margin-right: 10px;
background-color: #f7f7f7;
}
.header-nav {
display: flex;
......
......@@ -70,7 +70,9 @@
background-color: #ffffff;
margin: 15px auto;
position: relative;
height: 100%;
/* min-height: calc(100vh-182px); */
/* height: 100%; */
padding-bottom: 30px;
}
.edit-box .grayLine {
position: absolute;
......@@ -107,7 +109,7 @@
}
.Wrap {
margin: 8px 20px 0;
height: 100%;
/* height: 100%; */
}
</style>
</head>
......@@ -156,7 +158,7 @@
<label class="layui-form-label required">可见商户:</label>
<div class="layui-input-block">
<input class="layui-input" placeholder="可见商户" id="searchMerchant" />
<ul id="visibleInferiorMerTree" style="height: 200px; overflow-y: auto;" class="ztree wrapper-tree"></ul>
<ul id="visibleInferiorMerTree" style="height: 200px; overflow-y: auto" class="ztree wrapper-tree"></ul>
</div>
</div>
<div class="layui-form-item">
......@@ -328,7 +330,7 @@
// 创建角色
$('#addRole').on('click', function () {
// go('role', 'add', null, true)
$messenger.emit('route-to', { path: '/settings/role/add'})
$messenger.emit('route-to', { path: '/settings/role/add' })
})
// 提交表单
......@@ -396,7 +398,7 @@
request(visibleMerchantParams, function (res) {
if (res.code == '0') {
if (id) {
findAllMerchant(function(result) {
findAllMerchant(function (result) {
if (result) {
getById(function (checkedList) {
createMerchant(checkedList, res.data)
......
......@@ -9,7 +9,6 @@
<meta name="keywords" itemprop="keywords" content="广联,帐户管理,员工管理" />
<link rel="stylesheet" type="text/css" href="/css/main.css" />
<style>
.edit-box {
/* width: 1046px; */
padding: 20px 20px;
......@@ -83,6 +82,8 @@
.edit-box .upload-img-wh {
width: 120px !important;
height: 80px;
margin-right: 10px;
margin-bottom: 10px;
}
.show {
......@@ -125,15 +126,17 @@
.edit-box #accountTypeEl .layui-form-checked span,
#accountTypeEl .layui-form-checked:hover span {
background-color: #5850FF !important;
background-color: #5850ff !important;
}
.edit-box #accountTypeEl .layui-form-checked i,
#accountTypeEl .layui-form-checked:hover i {
color: #5850FF !important;
color: #5850ff !important;
}
.layui-form-radio:hover *, .layui-form-radioed, .layui-form-radioed>i {
color: #5850FF !important;
.layui-form-radio:hover *,
.layui-form-radioed,
.layui-form-radioed > i {
color: #5850ff !important;
}
.pageTitle {
background-color: #fff;
......@@ -254,8 +257,7 @@
<div class="layui-form-item">
<label class="layui-form-label">商户地址:</label>
<div class="layui-input-inline w-70">
<input style="color: #333333 !important;" name="merchantAddress" disabled
class="layui-input layui-btn-disabled" id="addrEl" placeholder="请选择商户地址">
<input style="color: #333333 !important" name="merchantAddress" disabled class="layui-input layui-btn-disabled" id="addrEl" placeholder="请选择商户地址" />
<!-- <div class="m-t-10" id="addrEl">请选择商户地址</div> -->
<button type="button" class="layui-btn" data-type="handleSelectAddr">选择地址</button>
</div>
......@@ -280,7 +282,7 @@
<label class="layui-form-label">联系人:</label>
<div class="layui-input-inline">
<input class="layui-input" maxlength="15" name="merchantLegalPerson" placeholder="请输入联系人姓名" />
<div style="width: 100%; height: 28px;"></div>
<div style="width: 100%; height: 28px"></div>
</div>
</div>
</div>
......@@ -667,21 +669,26 @@
return '请填入正确的驻店电话'
}
},
otherReq: function(value,item){
var verifyName=$(item).attr('name')
, verifyType=$(item).attr('type')
,formElem=$(item).parents('.layui-form')//获取当前所在的form元素,如果存在的话
,verifyElem=formElem.find('input[name='+verifyName+']')//获取需要校验的元素
,isTrue= verifyElem.is(':checked')//是否命中校验
,focusElem = verifyElem.next().find('i.layui-icon');//焦点元素
if(!isTrue || !value){
otherReq: function (value, item) {
var verifyName = $(item).attr('name'),
verifyType = $(item).attr('type'),
formElem = $(item).parents('.layui-form'), //获取当前所在的form元素,如果存在的话
verifyElem = formElem.find('input[name=' + verifyName + ']'), //获取需要校验的元素
isTrue = verifyElem.is(':checked'), //是否命中校验
focusElem = verifyElem.next().find('i.layui-icon') //焦点元素
if (!isTrue || !value) {
//定位焦点
focusElem.css(verifyType=='radio'?{"color":"#FF5722"}:{"border-color":"#FF5722"});
focusElem.css(verifyType == 'radio' ? { color: '#FF5722' } : { 'border-color': '#FF5722' })
//对非输入框设置焦点
focusElem.first().attr("tabIndex","1").css("outline","0").blur(function() {
focusElem.css(verifyType=='radio'?{"color":""}:{"border-color":""});
}).focus();
return '必填项不能为空';
focusElem
.first()
.attr('tabIndex', '1')
.css('outline', '0')
.blur(function () {
focusElem.css(verifyType == 'radio' ? { color: '' } : { 'border-color': '' })
})
.focus()
return '必填项不能为空'
}
}
})
......@@ -966,27 +973,27 @@
reader.onload()
})
$('#sevenday').on('click', function() {
var startTime = new Date(new Date().setHours(0,0,0,0))
$('#sevenday').on('click', function () {
var startTime = new Date(new Date().setHours(0, 0, 0, 0))
var endTime = startTime * 1 + 86400 * 7 * 1000
console.log(helper.dateFormat(startTime), endTime)
$('#effectiveStarttime').val(helper.dateFormat(startTime))
$('#expireDate').val(helper.dateFormat(endTime))
})
$('#oneyear').on('click', function() {
var startTime = new Date(new Date().setHours(0,0,0,0))
$('#oneyear').on('click', function () {
var startTime = new Date(new Date().setHours(0, 0, 0, 0))
var endTime = startTime.setFullYear(startTime.getFullYear() + 1)
console.log(helper.dateFormat(endTime))
$('#effectiveStarttime').val(helper.dateFormat(new Date(new Date().setHours(0,0,0,0))))
$('#effectiveStarttime').val(helper.dateFormat(new Date(new Date().setHours(0, 0, 0, 0))))
$('#expireDate').val(helper.dateFormat(endTime))
})
$('#twoyears').on('click', function() {
var startTime = new Date(new Date().setHours(0,0,0,0))
$('#twoyears').on('click', function () {
var startTime = new Date(new Date().setHours(0, 0, 0, 0))
var endTime = startTime.setFullYear(startTime.getFullYear() + 2)
console.log(helper.dateFormat(endTime))
$('#effectiveStarttime').val(helper.dateFormat(new Date(new Date().setHours(0,0,0,0))))
$('#effectiveStarttime').val(helper.dateFormat(new Date(new Date().setHours(0, 0, 0, 0))))
$('#expireDate').val(helper.dateFormat(endTime))
})
......@@ -1437,8 +1444,7 @@
// 选项卡标题的lay-id属性值
id: id
})
var getTpl =
`<form class="layui-form layui-form-pane layui-tab-form" action="">
var getTpl = `<form class="layui-form layui-form-pane layui-tab-form" action="">
<div class="layui-form-item" pane>
<label class="layui-form-label">选择产品:</label>
<div class="layui-input-block" id="project${id}">
......@@ -1521,12 +1527,11 @@
$(`#nodata${id}`).removeClass('hide')
$(`#nodata${id}`).addClass('show')
}
}
}
// 产品复选框change事件
form.on('checkbox(filter)', function(data) {
form.on('checkbox(filter)', function (data) {
console.log(data, '33333333333')
var roleId = +data.elem.dataset.id
var projectId = data.value
......
......@@ -49,6 +49,7 @@
}
.wrapper-merchant {
background-color: #f4f5fa;
display: flex;
}
.merchant-left {
padding-top: 15px;
......@@ -63,10 +64,12 @@
}
.merchant-right {
padding-top: 15px;
overflow-x: auto;
width: calc(100vw - 340px - 20px);
/* max-width: calc(100vw - 340px - 20px); */
background-color: #fff;
padding-left: 20px;
padding-right: 20px;
box-sizing: border-box;
}
......@@ -95,18 +98,19 @@
.merchant-right .layui-btn {
position: absolute;
right: 20px;
right: 0px;
}
.merchant-right .layui-input-inline {
position: absolute;
right: 90px;
right: 70px;
}
.updateRecord {
text-align: center;
color: #999;
background-color: #fff;
padding: 0 10px;
}
.mb21 {
......@@ -181,9 +185,9 @@
<main class="bg-white wrapper detail">
<div class="layui-tab layui-top-tab layui-tab-brief bg-detail">
<ul class="layui-tab-title">
<li class="layui-this" style="padding: 0;width: 90px;margin-right: 20px;">商户信息</li>
<li style="padding: 0;width: 90px;margin-right: 20px;">上级/下级商户</li>
<li style="padding: 0;width: 90px;">修改记录</li>
<li class="layui-this" style="padding: 0; width: 90px; margin-right: 20px">商户信息</li>
<li style="padding: 0; width: 90px; margin-right: 20px">上级/下级商户</li>
<li style="padding: 0; width: 90px">修改记录</li>
</ul>
<div class="layui-tab-content clearfix m-t-md">
<div class="layui-tab-item layui-show">
......@@ -267,7 +271,7 @@
</div>
</div>
</div>
<div class="MsgWrap clearfix" style="margin-bottom: 100px;">
<div class="MsgWrap clearfix" style="margin-bottom: 100px">
<div class="grayLine"></div>
<h3 class="content-title">企业信息</h3>
<div class="detail-content clearfix">
......@@ -410,7 +414,7 @@
<script src="https://www.layuicdn.com/layui/layui.js"></script>
<script src="/js/load.js"></script>
<script>
layui.use(['request', 'gtree', 'helper', 'table', 'form', 'treeTab', 'laypage'], function() {
layui.use(['request', 'gtree', 'helper', 'table', 'form', 'treeTab', 'laypage'], function () {
var $ = layui.$
var request = layui.request
var tree = layui.gtree
......@@ -453,7 +457,7 @@
elem: 'recordPage',
groups: 5,
layout: ['count', 'page', 'skip'],
jump: function(obj, first) {
jump: function (obj, first) {
recordPage.pageNum = obj.curr
recordPage.pageSize = obj.limit
//首次不执行
......@@ -532,7 +536,7 @@
id: merchantId,
method: 'cn.com.glsx.merchants.merchant.findMerchantDetail'
}
request(params, function(res) {
request(params, function (res) {
// businessScopeCustomize
if (res.code == '0') {
roleData = helper.clone(true, res.data)
......@@ -557,11 +561,11 @@
method: 'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId',
id: merchantId
}
request(params, function(res) {
request(params, function (res) {
if (res.code == '0' && res.data && res.data.length != 0) {
var authList = res.data
console.log(authList)
$.each(authList, function(index, item) {
$.each(authList, function (index, item) {
treeTab.tabAdd(
{
title: item.accounttypeName,
......@@ -573,7 +577,7 @@
$('#accountAuth').append('<span class="account-type-span">' + item.accounttypeName + '</span>')
var menuData = []
if (item.products && item.products.length != 0) {
$.each(item.products, function(idx, m) {
$.each(item.products, function (idx, m) {
treeTab.treeTabDetail(
{
name: m.productName,
......@@ -601,7 +605,7 @@
method: 'cn.com.glsx.merchants.menu.findSubordinateRelationship',
id: merchantId
},
function(res) {
function (res) {
console.log(res.data)
var data = res.data
$('#secondmerchantName').text(data.merchantName)
......@@ -621,7 +625,7 @@
id: merchantId,
method: 'cn.com.glsx.merchants.merchant.findMerchantTree'
}
request(treeParams, function(res) {
request(treeParams, function (res) {
console.log(res)
if (res.code == '0') {
treeObj = tree.create('merchantTree', res.data, null, {
......@@ -639,7 +643,7 @@
}
function bindEvent() {
$('#merchantBtn').on('click', function() {
$('#merchantBtn').on('click', function () {
var txt = $('#treeInput').val()
if (!txt) {
treeObj.showNodes(all_nodes)
......@@ -704,7 +708,7 @@
})
// table搜索
$('#tableSearch').on('click', function() {
$('#tableSearch').on('click', function () {
var search = $('#tableSearchForm').val()
console.log(search)
getSecondTable({
......@@ -713,7 +717,7 @@
return false
})
$('#closeEl').on('click', function() {
$('#closeEl').on('click', function () {
go('merchant', 'index')
})
......@@ -728,7 +732,7 @@
},
search
)
request(params, function(res) {
request(params, function (res) {
// console.log(res)
var data = res.data
var options = {
......@@ -748,9 +752,9 @@
pageSize: recordPage.pageSize,
method: 'cn.com.glsx.merchants.menu.findLog'
}
request(params, function(res) {
request(params, function (res) {
var data = res.data
$.each(data.data, function(index, item) {
$.each(data.data, function (index, item) {
item.index = index + 1 + recordPage.pageSize * (recordPage.pageNum - 1)
data.data[index].modifyContent = item.module + '-' + item.action
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!