Commit 7d6be5b7 by 施宇

11111

parent 9920d8c0
...@@ -119,7 +119,7 @@ ...@@ -119,7 +119,7 @@
<script type="text/html" id="listHtml"> <script type="text/html" id="listHtml">
<div class="data_list"> <div class="data_list">
{{# layui.each(d, function(index, item){ }} {{# layui.each(d, function(index, item){ }}
<div class="data_item"> <div class="data_item" goodid="{{item.goods_id}}">
<div class="data_detail"> <div class="data_detail">
<div class="type fl ellipsis boxsiz"> <div class="type fl ellipsis boxsiz">
<span class="bold">{{item.goods_name}}</span> <span class="bold">{{item.goods_name}}</span>
...@@ -132,14 +132,41 @@ ...@@ -132,14 +132,41 @@
<span>{{item.stock}}</span> <span>{{item.stock}}</span>
</div> </div>
<div class="price fl ellipsis boxsiz bold">{{item.price}}</div> <div class="price fl ellipsis boxsiz bold">{{item.price}}</div>
{{# if(item['audit_status'] == 1){ }}
{{# if(item['status'] == 1){ }}
<div class="data_status fl boxsiz zs"> <div class="data_status fl boxsiz zs">
<span class="mark lineBlock"></span> <span class="mark lineBlock"></span><span class="text">展示中</span>
<span class="text">展示中</span> </div>
{{# } else { }}
<div class="data_status fl boxsiz xj">
<span class="mark lineBlock"></span><span class="text">已下架</span>
</div>
{{# } }}
{{# } else { }}
<div class="data_status fl boxsiz jy">
<span class="mark lineBlock"></span><span class="text">禁用中</span>
</div> </div>
{{# } }}
<div class="time fr ellipsis boxsiz">{{ layui.util.toDateString(item.update_time * 1000)}}</div> <div class="time fr ellipsis boxsiz">{{ layui.util.toDateString(item.update_time * 1000)}}</div>
</div> </div>
<a class="xj fr">下架</a> {{# if(item['status'] == 1){ }}
{{# if(item['audit_status'] == 1){ }}
<a class="xj xj_status fr">下架</a>
{{# } else { }}
<a class="xj xj_status fr disabled">下架</a>
{{# } }}
{{# } else { }}
{{# if(item['audit_status'] == 1){ }}
<a class="fb xj_status fr">发布</a>
{{# } else { }}
<a class="fb xj_status fr disabled">发布</a>
{{# } }}
{{# } }}
{{# if(item['audit_status'] == 1){ }}
<a class="edit fr">编辑</a> <a class="edit fr">编辑</a>
{{# } else { }}
<a class="edit fr disabled">编辑</a>
{{# } }}
</div> </div>
{{# }); }} {{# }); }}
{{# if(d.length === 0){ }} {{# if(d.length === 0){ }}
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<span>服务时间<i>9:00-22:00</i></span> <span>服务时间<i>9:00-22:00</i></span>
<span>联系电话:<i>400-888-1688</i></span> <span>联系电话:<i>400-888-1688</i></span>
</p> </p>
<h5>copyright &#169 2019 www.ICsales.com</h5> <h5>copyright &#169; 2019 www.ICsales.com</h5>
</div> </div>
<div class="fl qrcode"> <div class="fl qrcode">
......
...@@ -196,6 +196,9 @@ ...@@ -196,6 +196,9 @@
.good_manage_content .good_data .data_list .data_item .data_status.xj .mark { .good_manage_content .good_data .data_list .data_item .data_status.xj .mark {
background-color: #D8DFE6; background-color: #D8DFE6;
} }
.good_manage_content .good_data .data_list .data_item .data_status.jy .mark {
background-color: #EA1717;
}
.good_manage_content .good_data .data_list .data_item .data_status .text { .good_manage_content .good_data .data_list .data_item .data_status .text {
color: #686E73; color: #686E73;
} }
...@@ -224,12 +227,17 @@ ...@@ -224,12 +227,17 @@
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
} }
.good_manage_content .good_data .data_list .data_item .xj { .good_manage_content .good_data .data_list .data_item .edit.disabled {
cursor: not-allowed;
}
.good_manage_content .good_data .data_list .data_item .xj_status {
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
margin-left: 20px; margin-left: 20px;
} }
.good_manage_content .good_data .data_list .data_item .xj.fb { .good_manage_content .good_data .data_list .data_item .xj_status.disabled {
cursor: not-allowed;
}
.good_manage_content .good_data .data_list .data_item .xj_status.fb {
color: #0D84D1; color: #0D84D1;
} }
/*# sourceMappingURL=goodmanage.css.map */
\ No newline at end of file
...@@ -252,6 +252,11 @@ ...@@ -252,6 +252,11 @@
background-color: #D8DFE6; background-color: #D8DFE6;
} }
} }
&.jy{
.mark {
background-color: #EA1717;
}
}
.text { .text {
color: #686E73; color: #686E73;
...@@ -291,13 +296,18 @@ ...@@ -291,13 +296,18 @@
.edit { .edit {
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
&.disabled{
cursor: not-allowed;
}
} }
.xj { .xj_status{
color: #686E73; color: #686E73;
cursor: pointer; cursor: pointer;
margin-left: 20px; margin-left: 20px;
&.disabled{
cursor: not-allowed;
}
&.fb { &.fb {
color: #0D84D1; color: #0D84D1;
} }
......
...@@ -461,9 +461,7 @@ $(function () { ...@@ -461,9 +461,7 @@ $(function () {
msg: 'template', msg: 'template',
to: userId, to: userId,
action: "template", action: "template",
ext: $.extend({}, templateObj, { ext: templateObj,
time: self.curentTime()
}),
success: function () { success: function () {
self.addChatMember(userId) self.addChatMember(userId)
$('#' + userId).find('.notice_item_content').append(self.messageHtml(1, $('#' + userId).find('.notice_item_content').append(self.messageHtml(1,
......
...@@ -89,6 +89,10 @@ ...@@ -89,6 +89,10 @@
* 商品修改 * 商品修改
*/ */
goodsSave: goods_url + '/goods/save', goodsSave: goods_url + '/goods/save',
/***
* 商品上下架
*/
goodsStatus: goods_url + "/goods/status",
/**** /****
* 询价搜索 不需要token * 询价搜索 不需要token
*/ */
...@@ -108,7 +112,7 @@ ...@@ -108,7 +112,7 @@
/*** /***
* 询价上下架 * 询价上下架
*/ */
inquirstatusysave: offer_url + "/inquiry/status/save", inquirystatussave: offer_url + "/inquiry/status/save",
/*** /***
* 询价统计 * 询价统计
*/ */
......
!function () { ! function () {
window.GoodManageController = { window.GoodManageController = {
token: Util.getCookie('token') || '', token: Util.getCookie('token') || '',
init: function () { init: function () {
this.created(this).mounted(this).render(this, {offset: 10, p: 1, token: this.token}, 1).handleBind(this); this.created(this).mounted(this).render(this, {
offset: 10,
p: 1,
token: this.token
}, 1).handleBind(this);
}, },
created: function (opt) { created: function (opt) {
...@@ -22,7 +26,9 @@ ...@@ -22,7 +26,9 @@
mounted: function (opt) { mounted: function (opt) {
//商品数量获取 //商品数量获取
IcController.getData(apis.goodsCount, 'GET', {token: opt.token}, function (res) { IcController.getData(apis.goodsCount, 'GET', {
token: opt.token
}, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
...@@ -60,6 +66,7 @@ ...@@ -60,6 +66,7 @@
count: res.total, count: res.total,
limit: 10, limit: 10,
curr: curr, curr: curr,
layout: ['prev', 'page', 'next', 'refresh'],
jump: function (obj, first) { jump: function (obj, first) {
if (!first) { if (!first) {
...@@ -91,6 +98,27 @@ ...@@ -91,6 +98,27 @@
return this; return this;
}, },
sxj: function (id, type) {
//上下架 1上架 2下架
var self = this;
IcController.getData(apis.goodsStatus, 'GET', {
"token": Util.getCookie('token') || "",
"goods_id": id,
"status": type
}, function (res) {
if (res.errcode === 0) {
layer.msg('操作成功', {
time: 600
}, function () {
self.mounted(self);
$('.layui-icon-refresh').click();
});
} else {
layer.msg('操作失败')
}
})
},
handleBind: function (opt) { handleBind: function (opt) {
...@@ -108,6 +136,28 @@ ...@@ -108,6 +136,28 @@
opt.render(this, params, 1) opt.render(this, params, 1)
}); });
//上架
$('#listData').on('click', '.fb', function (e) {
e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) {
return
} else {
opt.sxj(goodId, 1)
}
});
//下架
$('#listData').on('click', '.xj', function (e) {
e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) {
return
} else {
opt.sxj(goodId, 2)
}
});
return this; return this;
......
...@@ -99,7 +99,7 @@ $(function () { ...@@ -99,7 +99,7 @@ $(function () {
sxj: function (id, type) { sxj: function (id, type) {
//上下架 1上架 2下架 //上下架 1上架 2下架
var self = this; var self = this;
IcController.getData(apis.inquirstatusysave, 'GET', { IcController.getData(apis.inquirystatussave, 'GET', {
"token": Util.getCookie('token') || "", "token": Util.getCookie('token') || "",
"inquiry_items_id": id, "inquiry_items_id": id,
"status": type "status": type
......
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