Commit 98094069 by 施宇

Merge branch 'master' of http://119.23.72.7/shiyu/icsales

# Conflicts:
#	dist/js/goodmanage/index.js
#	dist/js/goodmanage/uploadsingle.js
11
parents c1edea95 676b5c8b
...@@ -6,8 +6,9 @@ class BaseController extends Controller ...@@ -6,8 +6,9 @@ class BaseController extends Controller
{ {
public function _initialize() public function _initialize()
{ {
$datas['logo'] = $this->apiBaseCache('pc_logo_set'); // logo $datas['logo'] = $this->apiBaseCache('pc_logo_set'); // logo
$datas['bottom_qrcode'] = $this->apiBaseCache('pc_bottom_qrcode'); // 底部二维码 $datas['bottom_qrcode'] = $this->apiBaseCache('pc_bottom_qrcode'); // 底部二维码
$datas['hot_goods'] = $this->apiBaseCache('pc_hot_goods', '', 5); // 热门商品
foreach ($datas as $k => $v) { foreach ($datas as $k => $v) {
$this->assign($k, $v['data']); $this->assign($k, $v['data']);
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
上传商品 上传商品
</div> </div>
<div class="xz fr boxsiz btn btn_border"> <div class="xz fr boxsiz btn btn_border">
下载商品模板 <a href="__PUBLIC__/ic_templet.xls">下载商品模板</a>
</div> </div>
<div class="plsc fr btn btn_green"> <div class="plsc fr btn btn_green">
<span class="icon iconfont iconjuxing16 "></span> <span class="icon iconfont iconjuxing16 "></span>
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
{{# if(item['audit_status'] == 1){ }} {{# if(item['audit_status'] == 1){ }}
<a class="edit fr" href="/uploadsingle?id={{item.goods_id}}">编辑</a> <a class="edit fr" href="/uploadsingle?id={{item.goods_id}}">编辑</a>
{{# } else { }} {{# } else { }}
<a class="edit fr disabled" href="/uploadsingle?id={{item.goods_id}}">编辑</a> <a class="edit fr disabled">编辑</a>
{{# } }} {{# } }}
</div> </div>
{{# }); }} {{# }); }}
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<script type="text/html" id="msgHtml"> <script type="text/html" id="msgHtml">
<div class="notice_list"> <div class="notice_list">
{{# layui.each(d, function(index, item){ }} {{# layui.each(d, function(index, item){ }}
<div class="notice_item clr" data-status="{{item.status}}"> <div class="notice_item clr" data-id="{{item.log_id}}" data-type="{{item.msg_type}}">
<div class="item_right fr"> <div class="item_right fr">
<p>{{item.create_time}}</p> <p>{{item.create_time}}</p>
</div> </div>
......
...@@ -229,6 +229,7 @@ ...@@ -229,6 +229,7 @@
} }
.good_manage_content .good_data .data_list .data_item .edit.disabled { .good_manage_content .good_data .data_list .data_item .edit.disabled {
cursor: not-allowed; cursor: not-allowed;
opacity: 0.5;
} }
.good_manage_content .good_data .data_list .data_item .xj_status { .good_manage_content .good_data .data_list .data_item .xj_status {
color: #686E73; color: #686E73;
...@@ -237,6 +238,7 @@ ...@@ -237,6 +238,7 @@
} }
.good_manage_content .good_data .data_list .data_item .xj_status.disabled { .good_manage_content .good_data .data_list .data_item .xj_status.disabled {
cursor: not-allowed; cursor: not-allowed;
opacity: 0.5;
} }
.good_manage_content .good_data .data_list .data_item .xj_status.fb { .good_manage_content .good_data .data_list .data_item .xj_status.fb {
color: #0D84D1; color: #0D84D1;
......
{"version":3,"sources":["goodmanage.less"],"names":[],"mappings":"AAAA;EACI,eAAA;;AADJ,oBAGI;EACI,eAAA;;AAJR,oBAOI;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;;AAVR,oBAOI,YAKI;EACI,aAAA;EACA,kBAAA;;AAdZ,oBAOI,YAKI,IAII;EACI,eAAA;EACA,gBAAA;;AAlBhB,oBAOI,YAKI,IASI;EACI,eAAA;EACA,cAAA;;AAGJ,oBAnBR,YAKI,IAcK,QACG;EACI,cAAA;;AAIR,oBAzBR,YAKI,IAoBK,UACG;EACI,cAAA;;AAIR,oBA/BR,YAKI,IA0BK,QACG;EACI,cAAA;;AAxCpB,oBAOI,YAsCI;EACI,kBAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,yBAAA;;AAEA,oBA7CR,YAsCI,aAOK;EACG,YAAA;;AAIJ,oBAlDR,YAsCI,a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AZR,oBAlGZ,WACI,WAGI,WA6GQ;IACI,aAAA;;;AAnSxB,oBAiLI,WACI,WAGI,WAkHI;EACI,cAAA;EACA,eAAA;;AACA,oBAzHhB,WACI,WAGI,WAkHI,MAGK;EACG,mBAAA;;AA3SxB,oBAiLI,WACI,WAGI,WA0HI;EACI,cAAA;EACA,eAAA;EACA,iBAAA;;AACA,oBAlIhB,WACI,WAGI,WA0HI,WAIK;EACG,mBAAA;;AAEJ,oBArIhB,WACI,WAGI,WA0HI,WAOK;EACG,cAAA","file":"goodmanage.css"} {"version":3,"sources":["goodmanage.less"],"names":[],"mappings":"AAAA;EACI,eAAA;;AADJ,oBAGI;EACI,eAAA;;AAJR,oBAOI;EACI,sBAAA;EACA,aAAA;EACA,kBAAA;;AAVR,oBAOI,YAKI;EACI,aAAA;EACA,kBAAA;;AAdZ,oBAOI,YAKI,IAII;EACI,eAAA;EACA,gBAAA;;AAlBhB,oBAOI,YAKI,IASI;EACI,eAAA;EACA,cAAA;;AAGJ,oBAnBR,YAKI,IAcK,QACG;EACI,cAAA;;AAIR,oBAzBR,YAKI,IAoBK,UACG;EACI,cAAA;;AAIR,oBA/BR,YAKI,IA0BK,QACG;EACI,cAAA;;AAxCpB,oBAOI,YAsCI;EACI,kBAAA;EACA,SAAA;EACA,YAAA;EACA,UAAA;EACA,yBAAA;;AAEA,oBA7CR,YAsCI,aAOK;EACG,YAAA;;AAIJ,oBAlDR,YAsCI,aAYK;EACG,YAAA;;AA1DhB,oBAgEI;EACI,YAAA;EACA,sBAAA;EACA,gBAAA;EACA,eAAA;EACA,cAAA;EACA,eAAA;EACA,iBAAA;;AAvER,oBAgEI,gBASI;EACI,mBAAA;EACA,kBAAA;;AA3EZ,oBAgEI,gBASI,WAII;EACI,UAAA;EACA,QAAA;EACA,kBAAA;EACA,QAAA;;AAjFhB,oBAgEI,gBASI,WAWI;EACI,YAAA;EACA,kBAAA;EACA,yBAAA;EACA,eAAA;EACA,UAAA;EACA,iBAAA;;AAIJ,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;EACG,cAAA","file":"goodmanage.css"}
\ No newline at end of file \ No newline at end of file
...@@ -298,6 +298,7 @@ ...@@ -298,6 +298,7 @@
cursor: pointer; cursor: pointer;
&.disabled{ &.disabled{
cursor: not-allowed; cursor: not-allowed;
opacity: 0.5;
} }
} }
...@@ -307,6 +308,7 @@ ...@@ -307,6 +308,7 @@
margin-left: 20px; margin-left: 20px;
&.disabled{ &.disabled{
cursor: not-allowed; cursor: not-allowed;
opacity: 0.5;
} }
&.fb { &.fb {
color: #0D84D1; color: #0D84D1;
......
...@@ -177,7 +177,11 @@ ...@@ -177,7 +177,11 @@
/** /**
* 获取会员活动通知 * 获取会员活动通知
*/ */
userActmsg: user_url + '/user/actmsg' userActmsg: user_url + '/user/actmsg',
/**
* 标记会员通知(已读)
*/
userMarkmsg: user_url + '/user/markmsg'
}; };
if (typeof define === "function" && define.amd) { if (typeof define === "function" && define.amd) {
return apis; return apis;
......
! function () { !function () {
window.GoodManageController = { window.GoodManageController = {
token: Util.getCookie('token') || '', token: Util.getCookie('token') || '',
init: function () { init: function () {
...@@ -9,57 +9,57 @@ ...@@ -9,57 +9,57 @@
}, 1).handleBind(this); }, 1).handleBind(this);
}, },
created: function (opt) { created: function (opt) {
//日期控件初始化 //日期控件初始化
layui.laydate.render({ layui.laydate.render({
elem: '#start_time', elem: '#start_time',
theme: '#0D84D1' theme: '#0D84D1'
}); });
layui.laydate.render({ layui.laydate.render({
elem: '#end_time', elem: '#end_time',
theme: '#0D84D1' theme: '#0D84D1'
}); });
return this; return this;
}, },
mounted: function (opt) { mounted: function (opt) {
//商品数量获取 //商品数量获取
IcController.getData(apis.goodsCount, 'GET', { IcController.getData(apis.goodsCount, 'GET', {
token: opt.token token: opt.token
}, function (res) { }, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
var getTpl = countHtml.innerHTML; var getTpl = countHtml.innerHTML;
layui.laytpl(getTpl).render(res.count, function (html) { layui.laytpl(getTpl).render(res.count, function (html) {
$(".good_total").empty().html(html); $(".good_total").empty().html(html);
}); });
} }
}); });
return this; return this;
}, },
render: function (opt, params, curr) { render: function (opt, params, curr) {
//商品列表初始化 //商品列表初始化
IcController.getData(apis.goodsInfo, 'GET', params, function (res) { IcController.getData(apis.goodsInfo, 'GET', params, function (res) {
var getTpl = listHtml.innerHTML; var getTpl = listHtml.innerHTML;
if (res.errcode === 0) { if (res.errcode === 0) {
layui.laytpl(getTpl).render(res.goods_list, function (html) { layui.laytpl(getTpl).render(res.goods_list, function (html) {
$("#listData").empty().html(html); $("#listData").empty().html(html);
layui.laypage.render({ layui.laypage.render({
elem: 'pagination', elem: 'pagination',
theme: '#1080d0', theme: '#1080d0',
...@@ -68,35 +68,35 @@ ...@@ -68,35 +68,35 @@
curr: curr, curr: curr,
layout: ['prev', 'page', 'next', 'refresh'], layout: ['prev', 'page', 'next', 'refresh'],
jump: function (obj, first) { jump: function (obj, first) {
if (!first) { if (!first) {
//分页回调调用 //分页回调调用
var json = { var json = {
p: obj.curr p: obj.curr
} }
var param = $.extend({}, params, json); var param = $.extend({}, params, json);
GoodManageController.render(opt, param, obj.curr); GoodManageController.render(opt, param, obj.curr);
} }
} }
}); });
}); });
} else if (res.errcode === 110001 || res.errcode === 103001) { } else if (res.errcode === 110001 || res.errcode === 103001) {
layui.laytpl(getTpl).render([], function (html) { layui.laytpl(getTpl).render([], function (html) {
$("#listData").empty().html(html); $("#listData").empty().html(html);
}); });
} }
}); });
return this; return this;
}, },
sxj: function (id, type) { sxj: function (id, type) {
//上下架 1上架 2下架 //上下架 1上架 2下架
...@@ -115,59 +115,86 @@ ...@@ -115,59 +115,86 @@
}); });
} else { } else {
layer.msg('操作失败') layer.msg('操作失败')
} }
}) })
}, },
handleBind: function (opt) { handleBind: function (opt) {
//搜索 //搜索
layui.form.on('submit(search)', function (data) { layui.form.on('submit(search)', function (data) {
var param = { var param = {
token: opt.token, token: opt.token,
offset: 10, offset: 10,
p: 1 p: 1
}; };
var params = $.extend({}, data.field, param); var params = $.extend({}, data.field, param);
opt.render(this, params, 1) opt.render(this, params, 1)
}); });
//上架 //上架
$('#listData').on('click', '.fb', function (e) { $('#listData').on('click', '.fb', function (e) {
e.stopPropagation(); e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid'); var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) { if ($(this).hasClass('disabled')) {
return
return;
} else { } else {
opt.sxj(goodId, 1)
opt.sxj(goodId, 1);
} }
}); });
//下架 //下架
$('#listData').on('click', '.xj', function (e) { $('#listData').on('click', '.xj', function (e) {
e.stopPropagation(); e.stopPropagation();
var goodId = $(this).parent('.data_item').attr('goodid'); var goodId = $(this).parent('.data_item').attr('goodid');
if ($(this).hasClass('disabled')) { if ($(this).hasClass('disabled')) {
return
return;
} else { } else {
opt.sxj(goodId, 2) opt.sxj(goodId, 2)
} }
}); });
$('.xz').on('click',function(){
window.location.href="http://icsales-files-2019.oss-cn-shenzhen.aliyuncs.com/files/templates/ic_templet.xls"
}) //进入详情
$('#listData').on('click', '.data_item', function (e) { $(document).on('click', '#listData .data_item', function (e) {
e.stopPropagation();
var goodId = $(this).attr('goodid'); var goodId = $(this).attr('goodid');
window.location.href="/gooddetail?type=1&id="+goodId window.location.href="/gooddetail?type=1&id="+goodId
}); });
//阻止默认事件
$(document).on('click','.data_list .disabled',function (e) {
e.stopPropagation();
});
return this; return this;
}, },
}, $(function () { }, $(function () {
......
...@@ -26,21 +26,16 @@ ...@@ -26,21 +26,16 @@
//编辑 //编辑
if (id) { if (id) {
IcController.getData(apis.goodsInfo, 'GET', {token: opt.token, 'goods_id/eq': id}, function (res) {
IcController.getData(apis.goodsInfo, 'GET', {
token: opt.token,
'goods_id/eq': id
}, function (res) {
if (res.errcode === 0) { if (res.errcode === 0) {
layui.form.val("goodsave", { layui.form.val("goodsave", {
"goods_name": res['goods_list'][id].goods_name, "goods_name": res['goods_list'][id].goods_name,
"brand_name": res['goods_list'][id].brand_name, "brand_name": res['goods_list'][id].brand_name,
"encap": res['goods_list'][id].encap, "encap": res['goods_list'][id].encap,
"stock": res['goods_list'][id].stock, "stock": res['goods_list'][id].stock,
"price": res['goods_list'][id].price, "price": res['goods_list'][id].price,
"day": res['goods_list'][id].delivery_time,
"currency": res['goods_list'][id].currency, "currency": res['goods_list'][id].currency,
"delivery_time": res['goods_list'][id].delivery_time "delivery_time": res['goods_list'][id].delivery_time
}); });
...@@ -51,12 +46,27 @@ ...@@ -51,12 +46,27 @@
$('.upload_result').show(); $('.upload_result').show();
$('.upload_result img').attr('src',res['goods_list'][id].goods_images) $('.upload_result img').attr('src',res['goods_list'][id].goods_images)
} }
setTimeout(function () {
setTimeout(function () {
$('.hq').find('.layui-form-radioed').trigger('click'); $('.hq').find('.layui-form-radioed').trigger('click');
}, 500) }, 500);
setTimeout(function () {
layui.form.val("goodsave", {
"day": res['goods_list'][id].delivery_time
});
}, 1000);
layui.form.render();
} }
}); });
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
return this; return this;
}, },
render: function (opt, params, curr, url) { render: function (opt, params, curr, url, flag) {
var getTpl = msgHtml.innerHTML; var getTpl = msgHtml.innerHTML;
...@@ -40,35 +40,38 @@ ...@@ -40,35 +40,38 @@
} }
if (flag == undefined) {
layui.laytpl(getTpl).render(data.data, function (html) {
$("#notice").empty().html(html);
layui.laypage.render({ layui.laytpl(getTpl).render(data.data, function (html) {
elem: 'pagination',
theme: '#1080d0', $("#notice").empty().html(html);
count: data.count,
limit: 10, layui.laypage.render({
curr: curr, elem: 'pagination',
jump: function (obj, first) { theme: '#1080d0',
count: data.count,
if (!first) { limit: 10,
curr: curr,
//分页回调调用 jump: function (obj, first) {
var json = {
page: obj.curr
};
var param = $.extend({}, params, json);
NoticeController.render(opt, param, obj.curr, url);
if (!first) {
//分页回调调用
var json = {
page: obj.curr
};
var param = $.extend({}, params, json);
NoticeController.render(opt, param, obj.curr, url);
}
} }
} });
}); });
}); }
} else { } else {
...@@ -101,6 +104,44 @@ ...@@ -101,6 +104,44 @@
} }
}); });
//活动标记
$(document).on('click', '.notice_list .notice_item', function () {
var id = $(this).attr('data-id');
var type = $(this).attr('data-type');
IcController.getData(apis.userMarkmsg, 'GET', {token: opt.token, log_id: id}, function (res) {
if (res.errcode === 0) {
if (type === 2) {
opt.render(opt, {token: opt.token, page: 1, limit: 10}, 1, apis.userActmsg, false);
} else {
opt.render(opt, {token: opt.token, page: 1, limit: 10}, 1, apis.userSysmsg, false);
}
//顶部信息数量恭喜
IcController.getData(apis.userInfo, 'GET', {token: opt.token}, function (res) {
if (res.errcode === 0) {
//消息数量
$("#count_num").empty().html(res.data['msg_notification']);
}
});
}
});
});
return this; return this;
}, },
......
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