Commit 04e37d8b by 施宇

商品批量删除

parent 2bbad10c
......@@ -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;
}
......@@ -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
!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');
})
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment