Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
施宇
/
icsales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
04e37d8b
authored
Nov 08, 2019
by
施宇
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
商品批量删除
parent
2bbad10c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
154 additions
and
24 deletions
Application/Home/View/GoodManage/index.html
dist/css/goodmanage.css
dist/css/goodmanage.less
dist/images/wxz-icon.png
dist/images/xz-icon.png
dist/js/goodmanage/index.js
Application/Home/View/GoodManage/index.html
View file @
04e37d8b
...
...
@@ -2,15 +2,15 @@
<html
lang=
"zh-CN"
>
<head>
<include
file=
"Common@public/header"
/>
<include
file=
"Common@public/header"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"__PUBLIC__/css/goodmanage.css"
>
</head>
<body>
<div
class=
"wrapper"
>
<include
file=
"Common@public/navleft"
/>
<div
class=
"wrapper"
>
<include
file=
"Common@public/navleft"
/>
<div
class=
"wrapper_right"
>
<include
file=
"Common@public/top"
/>
<include
file=
"Common@public/top"
/>
<div
class=
"right_content good_manage_content"
>
<div
class=
"content"
>
<div
class=
"nav_title"
>
商品管理 > 商品列表
</div>
...
...
@@ -39,13 +39,15 @@
<span
class=
"fl"
>
日期选择:
</span>
<div
class=
"start_date_div fl"
>
<div
class=
"icon_div fl icon iconfont iconjuxing13"
></div>
<input
type=
"text"
name=
"start_time"
placeholder=
"开始日期"
class=
"fl boxsiz"
id=
"start_time"
>
<input
type=
"text"
name=
"start_time"
placeholder=
"开始日期"
class=
"fl boxsiz"
id=
"start_time"
>
</div>
<div
class=
"fl heng"
></div>
<div
class=
"end_date_div fl"
>
<div
class=
"icon_div fl icon iconfont iconjuxing13"
>
</div>
<input
type=
"text"
name=
"end_time"
placeholder=
"结束日期"
class=
"fl boxsiz"
id=
"end_time"
>
<input
type=
"text"
name=
"end_time"
placeholder=
"结束日期"
class=
"fl boxsiz"
id=
"end_time"
>
</div>
</div>
...
...
@@ -71,17 +73,25 @@
<span>
目前商品sku上限为2000条,超出部分将上传失败。
</span>
</div>
<div
class=
"btn_group clr"
>
<div
class=
"dgsc fl btn btn_blue"
>
<div
class=
"fl more-delete"
>
<span
class=
"gx-status wxz"
></span>
<span
class=
"plsc-text"
>
批量删除
</span>
</div>
<div
class=
"dgsc fr btn btn_blue"
>
<span
class=
"icon iconfont iconjuxing16"
></span>
上传商品
</div>
<div
class=
"xz fr boxsiz btn btn_border"
>
<a
href=
"__PUBLIC__/ic_templet.xls"
>
下载商品模板
</a>
</div>
<div
class=
"plsc fr btn btn_green"
>
<span
class=
"icon iconfont iconjuxing16 "
></span>
批量上传
</div>
<div
class=
"xz fr boxsiz btn btn_border"
>
<a
href=
"__PUBLIC__/ic_templet.xls"
>
下载商品模板
</a>
</div>
<div
class=
"cl fr boxsiz btn btn_yellow"
>
擦亮商品
</div>
</div>
<div
class=
"good_data"
id=
'listData'
>
<!-- <div class="data_list">
...
...
@@ -117,15 +127,18 @@
</div>
</div>
</div>
<include
file=
"Common@public/foot"
/>
<script
src=
"__PUBLIC__/js/goodmanage/index.js"
></script>
<script
type=
"text/html"
id=
"listHtml"
>
</div>
<include
file=
"Common@public/foot"
/>
<script
src=
"__PUBLIC__/js/goodmanage/index.js"
></script>
<script
type=
"text/html"
id=
"listHtml"
>
<
div
class
=
"data_list"
>
{{
#
layui
.
each
(
d
,
function
(
index
,
item
){
}}
<
div
class
=
"data_item"
goodid
=
"{{item.goods_id}}"
>
<
div
class
=
"data_detail"
>
<
div
class
=
"type fl boxsiz"
>
<
div
class
=
"gx-div lineBlock"
>
<
span
class
=
"gx-status wxz"
goodid
=
"{{item.goods_id}}"
><
/span
>
<
/div
>
<
span
class
=
"text lineBlock va-m bold ellipsis"
>
{{
item
.
goods_name
}}
<
/span
>
{{
#
if
(
item
[
'goods_images'
]){
}}
<
div
class
=
"icon iconfont iconjuxing17 lineBlock"
>
...
...
@@ -194,8 +207,8 @@
{{
#
}
}}
<
/div
>
<
div
class
=
"pagination-with"
id
=
"pagination"
style
=
"text-align: right;margin-top: 25px;"
><
/div
>
</script>
<script
type=
"text/html"
id=
"countHtml"
>
</script>
<script
type=
"text/html"
id=
"countHtml"
>
<
div
class
=
"fl my_good"
>
<
h3
>
{{
d
.
mygoods
}}
<
/h3
>
<
p
>
我的商品
<
/p
>
...
...
@@ -210,8 +223,8 @@
<
/div
>
<
div
class
=
"center_line line1"
><
/div
>
<
div
class
=
"center_line line2"
><
/div
>
</script>
<script>
</script>
<script>
$
(
'.dgsc'
).
click
(
function
()
{
window
.
location
.
href
=
'/uploadsingle'
})
...
...
@@ -224,7 +237,7 @@
$
(
'.data_item'
).
click
(
function
()
{
window
.
location
.
href
=
'/gooddetail'
})
</script>
</script>
</body>
</html>
\ No newline at end of file
dist/css/goodmanage.css
View file @
04e37d8b
...
...
@@ -131,7 +131,12 @@
.good_manage_content
.btn_group
div
{
padding
:
0
19px
;
}
.good_manage_content
.btn_group
div
.xz
{
.good_manage_content
.btn_group
div
.more-delete
{
padding
:
0
25px
;
}
.good_manage_content
.btn_group
div
.xz
,
.good_manage_content
.btn_group
div
.plsc
,
.good_manage_content
.btn_group
div
.dgsc
{
margin-left
:
20px
;
}
.good_manage_content
.gb
{
...
...
@@ -175,8 +180,11 @@
font-size
:
16px
;
width
:
25%
;
}
.good_manage_content
.good_data
.data_list
.data_item
.type
.gx-status
{
margin-right
:
12px
;
}
.good_manage_content
.good_data
.data_list
.data_item
.type
.text
{
max-width
:
80
%
;
max-width
:
68
%
;
}
.good_manage_content
.good_data
.data_list
.data_item
.type
.icon
{
position
:
relative
;
...
...
@@ -288,3 +296,31 @@
.good_manage_content
.good_data
.data_list
.data_item
.xj_status.fb
{
color
:
#0D84D1
;
}
.good_manage_content
.gx-div
{
height
:
100%
;
width
:
32px
;
}
.good_manage_content
.gx-status
{
display
:
inline-block
;
height
:
20px
;
width
:
20px
;
cursor
:
pointer
;
vertical-align
:
sub
;
}
.good_manage_content
.gx-status.wxz
{
background
:
url('../images/wxz-icon.png')
no-repeat
;
background-size
:
100%
100%
;
}
.good_manage_content
.gx-status.xz
{
background
:
url('../images/xz-icon.png')
no-repeat
;
background-size
:
100%
100%
;
}
.good_manage_content
.plsc-text
{
font-size
:
14px
;
color
:
#686E73
;
cursor
:
pointer
;
margin-left
:
17px
;
}
.good_manage_content
.plsc-text
:hover
{
color
:
#0D84D1
;
}
dist/css/goodmanage.less
View file @
04e37d8b
...
...
@@ -170,10 +170,15 @@
div {
padding: 0 19px;
&.more-delete{
padding:0 25px;
}
&.xz {
&.xz
, &.plsc, &.dgsc
{
margin-left: 20px;
}
}
}
.gb {
...
...
@@ -221,9 +226,11 @@
color: #2E3033;
font-size: 16px;
width: 25%;
.gx-status{
margin-right:12px;
}
.text {
max-width:
80
%;
max-width:
68
%;
}
.icon {
...
...
@@ -370,4 +377,33 @@
}
}
}
.gx-div{
height:100%;
width:32px;
}
.gx-status{
display: inline-block;
height:20px;
width:20px;
cursor: pointer;
vertical-align: sub;
&.wxz{
background: url('../images/wxz-icon.png') no-repeat;
background-size: 100% 100%;
}
&.xz{
background: url('../images/xz-icon.png') no-repeat;
background-size: 100% 100%;
}
}
.plsc-text{
font-size: 14px;
color:#686E73;
cursor: pointer;
margin-left:17px;
&:hover{
color:#0D84D1;
}
}
}
\ No newline at end of file
dist/images/wxz-icon.png
0 → 100644
View file @
04e37d8b
168 Bytes
dist/images/xz-icon.png
0 → 100644
View file @
04e37d8b
346 Bytes
dist/js/goodmanage/index.js
View file @
04e37d8b
!
function
()
{
window
.
GoodManageController
=
{
token
:
Util
.
getCookie
(
'token'
)
||
''
,
deleteGoods
:[],
init
:
function
()
{
this
.
created
(
this
).
mounted
(
this
).
render
(
this
,
{
offset
:
10
,
...
...
@@ -192,6 +193,48 @@
e
.
stopPropagation
();
});
$
(
document
).
on
(
'click'
,
'.gx-div'
,
function
(
e
)
{
//单个商品勾选
e
.
stopPropagation
();
var
goodid
=
$
(
this
).
find
(
'.gx-status'
).
attr
(
'goodid'
)
if
(
$
(
this
).
find
(
'.gx-status'
).
hasClass
(
'wxz'
)){
//未勾选时变成勾选
$
(
this
).
find
(
'.gx-status'
).
removeClass
(
'wxz'
).
addClass
(
'xz'
);
opt
.
deleteGoods
.
push
(
goodid
);
}
else
{
//勾选时变为未勾选
$
(
this
).
find
(
'.gx-status'
).
removeClass
(
'xz'
).
addClass
(
'wxz'
);
var
index
=
opt
.
deleteGoods
.
indexOf
(
goodid
);
if
(
index
!=-
1
){
opt
.
deleteGoods
.
splice
(
index
,
1
)
}
}
if
(
opt
.
deleteGoods
.
length
==
10
){
$
(
'.more-delete .gx-status'
).
removeClass
(
'wxz'
).
addClass
(
'xz'
);
}
else
{
$
(
'.more-delete .gx-status'
).
removeClass
(
'xz'
).
addClass
(
'wxz'
);
}
});
$
(
'.more-delete'
).
on
(
'click'
,
'.gx-status'
,
function
(){
//全选
opt
.
deleteGoods
=
[];
if
(
$
(
this
).
hasClass
(
'wxz'
)){
//未勾选时变成勾选
$
(
this
).
removeClass
(
'wxz'
).
addClass
(
'xz'
);
$
(
'#listData .gx-status'
).
each
(
function
(){
var
goodid
=
$
(
this
).
attr
(
'goodid'
)
$
(
this
).
removeClass
(
'wxz'
).
addClass
(
'xz'
);
opt
.
deleteGoods
.
push
(
goodid
)
})
}
else
{
//勾选时变为未勾选
$
(
this
).
removeClass
(
'xz'
).
addClass
(
'wxz'
);
$
(
'#listData .gx-status'
).
each
(
function
(){
$
(
this
).
removeClass
(
'xz'
).
addClass
(
'wxz'
);
})
}
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment