Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 4b5c1894
authored
Nov 04, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
运营平台编辑添加模式修改
1 parent
cde4b150
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
html/merchant/edit.html
html/merchant/index.html
html/merchant/edit.html
View file @
4b5c189
...
@@ -530,6 +530,7 @@
...
@@ -530,6 +530,7 @@
var
scopeNum
=
1
var
scopeNum
=
1
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
var
model
=
qs
(
'model'
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
// 上级是市代,子商户为门店,显示 有效期
// 上级是市代,子商户为门店,显示 有效期
...
@@ -677,6 +678,28 @@
...
@@ -677,6 +678,28 @@
},
},
hasModify
:
function
(
value
)
{
hasModify
:
function
(
value
)
{
console
.
log
(
value
,
'=================----------==========='
)
console
.
log
(
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
.
first
()
.
attr
(
'tabIndex'
,
'1'
)
.
css
(
'outline'
,
'0'
)
.
blur
(
function
()
{
focusElem
.
css
(
verifyType
==
'radio'
?
{
color
:
''
}
:
{
'border-color'
:
''
})
})
.
focus
()
return
'必填项不能为空'
}
}
}
})
})
...
@@ -1121,10 +1144,14 @@
...
@@ -1121,10 +1144,14 @@
// baseIsShow(false)
// baseIsShow(false)
// treeIsShow(true)
// treeIsShow(true)
}
}
console
.
log
(
helper
.
store
.
get
(
'accountInfo'
),
qs
(
'status'
),
isFactory
)
if
(
!
accountInfo
&&
isFactory
)
{
if
(
qs
(
'status'
)
==
1
&&
!
helper
.
store
.
get
(
'accountInfo'
)
&&
isFactory
)
{
if
(
qs
(
'status'
)
==
1
)
{
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
addClass
(
'show'
)
$
(
'#merchantModel'
).
addClass
(
'show'
)
}
else
if
(
qs
(
'model'
)
==
'-'
)
{
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
addClass
(
'show'
)
}
}
}
// 创建商户
// 创建商户
...
...
html/merchant/index.html
View file @
4b5c189
...
@@ -478,7 +478,7 @@
...
@@ -478,7 +478,7 @@
table
.
on
(
'tool(merchant-table-filter)'
,
function
(
obj
)
{
table
.
on
(
'tool(merchant-table-filter)'
,
function
(
obj
)
{
var
eventName
=
obj
.
event
var
eventName
=
obj
.
event
var
row
=
obj
.
data
var
row
=
obj
.
data
console
.
log
(
row
.
merchantAccountLevel
)
console
.
log
(
row
)
switch
(
eventName
)
{
switch
(
eventName
)
{
// 查看
// 查看
case
'handleDetail'
:
case
'handleDetail'
:
...
@@ -497,6 +497,7 @@
...
@@ -497,6 +497,7 @@
parentId
:
row
.
parentId
,
parentId
:
row
.
parentId
,
isFactory
:
row
.
merchantAccountLevel
==
1
,
isFactory
:
row
.
merchantAccountLevel
==
1
,
step
:
1
,
step
:
1
,
model
:
row
.
merchantModel
,
status
:
row
.
status
,
status
:
row
.
status
,
merchantAccountLevel
:
row
.
merchantAccountLevel
merchantAccountLevel
:
row
.
merchantAccountLevel
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment