Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
yohobuy-portal-fe
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Plain Diff
Browse Files
Authored by
姜敏
9 years ago
Commit
9d1b7b9db45cda3d6d186eb7f1200cdcb76e1131
2 parents
a7532651
6ef2cf76
Merge branch 'develop' of
http://git.dev.yoho.cn/platform/yohobuy-portal-fe
into develop
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
34 deletions
client/js/salecategory/index.js
client/js/salecategory/tag-mgmt.js
client/js/sourceManage/resourceContentManage.js
client/sass/module/_salecategory.scss
server/views/pages/salecategory/index.html
server/views/pages/salecategory/tag-mgmt.html
client/js/salecategory/index.js
View file @
9d1b7b9
...
...
@@ -107,11 +107,24 @@ var e = null,
editHtml
=
$
(
'#editTemp'
).
html
();
function
initForm
(
data
)
{
common
.
dialog
.
confirm
(
'销售类目编辑'
,
common
.
util
.
__template2
(
editHtml
,
data
),
function
(){
saveBrand
();
},
function
(){
}
);
$
(
".modal-dialog"
).
css
(
"width"
,
"900px"
);
/*
common.dialog.open({
title: '销售类目编辑',
content: common.util.__template2(editHtml, data),
width: 900
});
});*/
e
=
new
common
.
edit
(
'#basicForm'
,
{
bucket
:
'taobaocms'
});
...
...
@@ -172,7 +185,6 @@ $(document).on('click', '.edit-btn', function() {
},
function
(
res
)
{
res
.
data
.
action
=
'/sale/salesCategory/updateSC'
;
initForm
(
res
.
data
);
//渲染物理类目
var
selectedArr
=
[];
...
...
@@ -245,6 +257,28 @@ $(document).on('click', '.del-sort-btn', function() {
});
//保存销售类目
function
saveBrand
(){
e
.
submit
(
$
(
'#basicForm'
).
attr
(
'action'
),
function
(
option
)
{
var
selected
=
[];
$
.
each
(
tabTreeArr
,
function
(
i
,
item
){
if
(
item
.
selected
.
length
>
0
)
{
selected
.
push
(
item
.
selected
[
item
.
selected
.
length
-
1
].
id
);
}
});
option
.
data
.
relationParameter
=
selected
.
join
(
','
);
option
.
success
=
function
(
res
)
{
res
=
res
.
data
;
if
(
res
.
code
==
'200'
)
{
e
.
$tip
(
res
.
message
,
function
()
{
//location.reload();
},
'growl-success'
);
}
else
{
e
.
$tip
(
res
.
message
);
}
}
});
}
$
(
document
).
on
(
'click'
,
'#save_brand'
,
function
()
{
e
.
submit
(
$
(
'#basicForm'
).
attr
(
'action'
),
function
(
option
)
{
var
selected
=
[];
...
...
@@ -263,7 +297,6 @@ $(document).on('click', '#save_brand', function() {
}
else
{
e
.
$tip
(
res
.
message
);
}
return
false
;
}
});
});
...
...
client/js/salecategory/tag-mgmt.js
View file @
9d1b7b9
...
...
@@ -37,9 +37,9 @@ var g = new common.grid({
name
:
''
,
render
:
function
(
item
)
{
if
(
item
.
status
==
1
)
{
return
'<a class="btn btn-xs btn-danger close-btn" data-title="'
+
item
.
labelName
+
'"
data-label="'
+
item
.
labelI
d
+
'" href="javascript:;">关闭</a>'
;
return
'<a class="btn btn-xs btn-danger close-btn" data-title="'
+
item
.
labelName
+
'"
_id="'
+
item
.
i
d
+
'" href="javascript:;">关闭</a>'
;
}
else
{
return
'<a class="btn btn-xs btn-warning open-btn" data-title="'
+
item
.
labelName
+
'"
data-label="'
+
item
.
labelI
d
+
'" href="javascript:;">开启</a>'
;
return
'<a class="btn btn-xs btn-warning open-btn" data-title="'
+
item
.
labelName
+
'"
_id="'
+
item
.
i
d
+
'" href="javascript:;">开启</a>'
;
}
}
}]
...
...
@@ -98,12 +98,12 @@ $('input[name="state"]').on('change', function() {
$
(
document
).
on
(
'click'
,
'.close-btn'
,
function
()
{
var
labelId
=
$
(
this
).
data
(
'label
'
);
var
id
=
$
(
this
).
attr
(
'_id
'
);
common
.
dialog
.
confirm
(
"温馨提示"
,
"确定关闭("
+
$
(
this
).
data
(
'title'
)
+
")标签吗"
,
function
()
{
common
.
util
.
__ajax
({
url
:
'/sale/salesCategoryLabel/updateSCLabel'
,
data
:
{
labelId
:
labelI
d
,
id
:
i
d
,
status
:
0
}
},
function
(
res
){
...
...
@@ -115,12 +115,12 @@ $(document).on('click', '.close-btn', function() {
console
.
log
(
g
.
rows
);
});
$
(
document
).
on
(
'click'
,
'.open-btn'
,
function
()
{
var
labelId
=
$
(
this
).
data
(
'label
'
);
var
id
=
$
(
this
).
attr
(
'_id
'
);
common
.
dialog
.
confirm
(
"温馨提示"
,
"确定开启("
+
$
(
this
).
data
(
'title'
)
+
")标签吗"
,
function
()
{
common
.
util
.
__ajax
({
url
:
'/sale/salesCategoryLabel/updateSCLabel'
,
data
:
{
labelId
:
labelI
d
,
id
:
i
d
,
status
:
1
}
},
function
(
res
){
...
...
client/js/sourceManage/resourceContentManage.js
View file @
9d1b7b9
...
...
@@ -705,7 +705,7 @@ var goodsgird = new common.grid({
display
:
"产品图片"
,
render
:
function
(
item
)
{
if
(
item
.
images_url
)
{
item
.
images_url
=
common
.
util
.
__joinImg
(
"
yhb-img01
"
,
item
.
images_url
);
item
.
images_url
=
common
.
util
.
__joinImg
(
"
goodsimg
"
,
item
.
images_url
);
}
else
{
item
.
images_url
=
""
;
...
...
client/sass/module/_salecategory.scss
View file @
9d1b7b9
...
...
@@ -39,16 +39,19 @@
span
{
display
:
inline-block
;
width
:
12
.5%
;
font-size
:
1
3
px
;
font-size
:
1
4
px
;
border-left
:
1px
solid
#ddd
;
height
:
50px
;
line-height
:
50px
;
height
:
60px
;
line-height
:
60px
;
vertical-align
:
middle
;
text-align
:
center
;
font-family
:
'Microsoft YaHei'
;
img
{
max-height
:
78px
;
max-width
:
78px
;
max-height
:
56px
;
max-width
:
80%
;
display
:
block
;
margin
:
2px
auto
;
}
&
.orderby
{
...
...
@@ -57,7 +60,6 @@
&
.operate
{
width
:
20
.5%
;
line-height
:
42px
;
}
&
.status
{
...
...
@@ -74,11 +76,11 @@
border-bottom
:
1px
solid
#ddd
;
span
{
font-weight
:
bold
;
height
:
40px
;
line-height
:
40px
;
height
:
36px
;
line-height
:
36px
;
&
.operate
{
line-height
:
3
4
px
;
line-height
:
3
6
px
;
}
}
}
...
...
@@ -108,5 +110,5 @@
}
.level-wrap
input
.saleCategoryNumInput
{
margin
:
5
px
auto
;
margin
:
10
px
auto
;
}
...
...
server/views/pages/salecategory/index.html
View file @
9d1b7b9
...
...
@@ -52,7 +52,7 @@
<
div
class
=
"panel"
>
<
div
class
=
"panel-body nopadding"
>
<
form
id
=
"basicForm"
role
=
"form"
action
=
"[[action]]"
class
=
"form-horizontal form-bordered"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
style
=
"padding-top: 0"
>
<
label
class
=
"col-sm-2 control-label"
>
父分类
<
/label
>
<!--
<
div
class
=
"col-sm-8 height40"
>
{{
#
parentSC
}}{{
categoryName
}}{{
#
items
}}
-
{{
categoryName
}}{{
/ items}}{{/
parentSC
}}
<
/div> --
>
<
div
class
=
"col-sm-8 height40"
>
...
...
@@ -78,7 +78,7 @@
<
label
class
=
"col-sm-2 control-label"
>
分类图标
<
/label
>
<
div
class
=
"col-sm-8"
><
input
type
=
"file"
id
=
"icon"
name
=
"icon"
value
=
"[[icon]]"
placeholder
=
"分别图标"
><
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
style
=
"margin-bottom: 40px"
>
<
label
class
=
"col-sm-2 control-label"
>
物理类目关联
<
/label
>
<
div
class
=
"col-sm-8 sort-wrap"
>
<
div
class
=
"row"
>
...
...
@@ -97,10 +97,6 @@
<
input
id
=
"orderBy"
type
=
"hidden"
value
=
"[[orderBy]]"
>
<
/form
>
<
/div
>
<
div
class
=
"panel-footer"
>
<
a
id
=
"save_brand"
data
-
loading
-
text
=
"保存中..."
class
=
"btn btn-primary"
href
=
"javascript:;"
>
保存
<
/a
>
<
a
href
=
"javascript:;"
onclick
=
"history.go(-1);"
class
=
"btn btn-danger"
>
取消
<
/a
>
<
/div
>
<
/div
>
</script>
...
...
@@ -240,7 +236,7 @@
<
span
class
=
"operate"
data
-
id
=
"[[categoryId]]"
data
-
name
=
"[[categoryName]]"
>
<
a
class
=
"btn btn-info btn-xs edit-btn"
href
=
"javascript:;"
>
编辑
<
/a
>
<
a
class
=
"btn btn-success btn-xs tagmgmt-btn"
href
=
"/sale/category/tag/[[categoryId]]"
>
标签管理
<
/a
>
<
a
class
=
"btn btn-
info
btn-xs add-sub-category"
href
=
"javascript:;"
>
添加子分类
<
/a
>
<
a
class
=
"btn btn-
primary
btn-xs add-sub-category"
href
=
"javascript:;"
>
添加子分类
<
/a
>
[[
if
state
==
"1"
]]
<
a
class
=
"btn btn-danger btn-xs close-category"
href
=
"javascript:;"
>
关闭
<
/a>
[
[
/
if
]
]
[[
if
state
==
"0"
]]
<
a
class
=
"btn btn-warning btn-xs open-category"
href
=
"javascript:;"
>
开启
<
/a>
[
[
/
if
]
]
<
/span
>
...
...
server/views/pages/salecategory/tag-mgmt.html
View file @
9d1b7b9
...
...
@@ -27,8 +27,8 @@
<div
class=
"panel-body nopadding"
>
<div
class=
"state-select"
>
<strong>
状态:
</strong>
<label><input
type=
"radio"
name=
"state"
value=
""
>
全部
</label>
<label
class=
"current"
><input
type=
"radio"
name=
"state"
value=
"1"
>
开启
</label>
<label
class=
"current"
><input
type=
"radio"
name=
"state"
value=
""
>
全部
</label>
<label><input
type=
"radio"
name=
"state"
value=
"1"
>
开启
</label>
<label><input
type=
"radio"
name=
"state"
value=
"0"
>
关闭
</label>
</div>
</div>
...
...
@@ -41,11 +41,6 @@
<input
id=
"categoryId"
type=
"hidden"
value=
"{{categoryId}}"
>
{{/ data}}
</div>
<div
class=
"panel-footer"
>
<button
id=
"save_brand"
type=
"submit"
data-loading-text=
"保存中..."
class=
"btn btn-primary"
>
保存
</button>
<a
href=
"javascript:;"
onclick=
"history.go(-1);"
class=
"btn btn-danger"
>
取消
</a>
</div>
</div>
</div>
...
...
Please
register
or
login
to post a comment