|
@@ -3,8 +3,10 @@ webpackJsonp([88],{ |
|
@@ -3,8 +3,10 @@ webpackJsonp([88],{ |
3
|
/***/ 0:
|
3
|
/***/ 0:
|
4
|
/***/ function(module, exports, __webpack_require__) {
|
4
|
/***/ function(module, exports, __webpack_require__) {
|
5
|
|
5
|
|
6
|
- var $ = __webpack_require__(1),
|
|
|
7
|
- common = __webpack_require__(2);
|
6
|
+ var $ = __webpack_require__(1);
|
|
|
7
|
+ var common = __webpack_require__(2);
|
|
|
8
|
+ var edit = __webpack_require__(6);
|
|
|
9
|
+
|
8
|
|
10
|
|
9
|
var ZeroClipboard = __webpack_require__(32);
|
11
|
var ZeroClipboard = __webpack_require__(32);
|
10
|
ZeroClipboard.config({swfPath: "http://cdn.yoho.cn/yohobuy-portal/assets/images/ZeroClipboard.swf"});
|
12
|
ZeroClipboard.config({swfPath: "http://cdn.yoho.cn/yohobuy-portal/assets/images/ZeroClipboard.swf"});
|
|
@@ -21,12 +23,22 @@ webpackJsonp([88],{ |
|
@@ -21,12 +23,22 @@ webpackJsonp([88],{ |
21
|
columns: [
|
23
|
columns: [
|
22
|
{display: "商品池编号", name: "id"},
|
24
|
{display: "商品池编号", name: "id"},
|
23
|
{display: "商品池名称", name: "poolName"},
|
25
|
{display: "商品池名称", name: "poolName"},
|
|
|
26
|
+ {display: "头部banner", name: "bannerUrl",
|
|
|
27
|
+ render: function (item) {
|
|
|
28
|
+ if (item.bannerUrl) {
|
|
|
29
|
+ return '<a class="list-img" target="_blank" href="' + item.bannerUrl + '">' +
|
|
|
30
|
+ '<img src="' + item.bannerUrl + '"></a>';
|
|
|
31
|
+ } else {
|
|
|
32
|
+ return '';
|
|
|
33
|
+ }
|
|
|
34
|
+ }},
|
24
|
{display: "说明", name: "comment"},
|
35
|
{display: "说明", name: "comment"},
|
25
|
{display: "SKN个数", name: "total"},
|
36
|
{display: "SKN个数", name: "total"},
|
26
|
{display: "操作", name: "", render: function (item) {
|
37
|
{display: "操作", name: "", render: function (item) {
|
27
|
return '<a id="detailPool" class="btn btn-xs btn-info" data-index="'+item.__index+'">详情</a>' +
|
38
|
return '<a id="detailPool" class="btn btn-xs btn-info" data-index="'+item.__index+'">详情</a>' +
|
28
|
'<a id="editPool" class="btn btn-xs btn-primary" data-index="'+item.__index+'">编辑</a>' +
|
39
|
'<a id="editPool" class="btn btn-xs btn-primary" data-index="'+item.__index+'">编辑</a>' +
|
29
|
'<a id="emptyPool" class="btn btn-xs btn-warning" data-index="'+item.__index+'">清空</a>' +
|
40
|
'<a id="emptyPool" class="btn btn-xs btn-warning" data-index="'+item.__index+'">清空</a>' +
|
|
|
41
|
+ '<a id="emptyPoolImg" class="btn btn-xs btn-warning" data-index="'+item.__index+'">清空banner</a>' +
|
30
|
'<a id="deletePool" class="btn btn-xs btn-danger" data-index="'+item.__index+'">删除</a>'+
|
42
|
'<a id="deletePool" class="btn btn-xs btn-danger" data-index="'+item.__index+'">删除</a>'+
|
31
|
'<a id="viewUrl" class="btn btn-xs btn-danger" data-index="'+item.__index+'">查看链接</a>';
|
43
|
'<a id="viewUrl" class="btn btn-xs btn-danger" data-index="'+item.__index+'">查看链接</a>';
|
32
|
}}
|
44
|
}}
|
|
@@ -96,14 +108,16 @@ webpackJsonp([88],{ |
|
@@ -96,14 +108,16 @@ webpackJsonp([88],{ |
96
|
poolName: $("#poolName").val(),
|
108
|
poolName: $("#poolName").val(),
|
97
|
comment: $("#comment").val(),
|
109
|
comment: $("#comment").val(),
|
98
|
producttype: $("#producttype").val(),
|
110
|
producttype: $("#producttype").val(),
|
99
|
- productSkns: $("#sknVal").val().replace("[", "").replace("]", "")
|
111
|
+ productSkns: $("#sknVal").val().replace("[", "").replace("]", ""),
|
|
|
112
|
+ bannerUrl: document.getElementById("bannerUrl").defaultValue
|
100
|
}
|
113
|
}
|
101
|
}, function () {//局部刷新商品池名称,说明
|
114
|
}, function () {//局部刷新商品池名称,说明
|
102
|
if(type == 0){
|
115
|
if(type == 0){
|
103
|
g.reload(1);
|
116
|
g.reload(1);
|
104
|
}else{
|
117
|
}else{
|
105
|
- $('#product-pool .grid tbody tr').eq(index).find('td').eq(1).text($("#poolName").val()); //商品池名称
|
|
|
106
|
- $('#product-pool .grid tbody tr').eq(index).find('td').eq(2).text($("#comment").val()); //说明
|
118
|
+ //$('#product-pool .grid tbody tr').eq(index).find('td').eq(1).text($("#poolName").val()); //商品池名称
|
|
|
119
|
+ //$('#product-pool .grid tbody tr').eq(index).find('td').eq(2).text($("#comment").val()); //说明
|
|
|
120
|
+ g.reload(1);
|
107
|
}
|
121
|
}
|
108
|
});
|
122
|
});
|
109
|
}else{
|
123
|
}else{
|
|
@@ -113,6 +127,10 @@ webpackJsonp([88],{ |
|
@@ -113,6 +127,10 @@ webpackJsonp([88],{ |
113
|
);
|
127
|
);
|
114
|
if(type != 0) $("#producttype").val(obj.producttype);
|
128
|
if(type != 0) $("#producttype").val(obj.producttype);
|
115
|
|
129
|
|
|
|
130
|
+ var e = new edit('#productEdit',{
|
|
|
131
|
+ "bucket" : "brandBanner"
|
|
|
132
|
+ });
|
|
|
133
|
+ e.init();
|
116
|
//上传文件
|
134
|
//上传文件
|
117
|
common.edit.ajaxfileupload("#productSkn", {
|
135
|
common.edit.ajaxfileupload("#productSkn", {
|
118
|
params: {
|
136
|
params: {
|
|
@@ -181,7 +199,17 @@ webpackJsonp([88],{ |
|
@@ -181,7 +199,17 @@ webpackJsonp([88],{ |
181
|
});
|
199
|
});
|
182
|
});
|
200
|
});
|
183
|
},
|
201
|
},
|
184
|
-
|
202
|
+ //清空banner
|
|
|
203
|
+ emptyPoolImg: function (obj,index) {
|
|
|
204
|
+ common.dialog.confirm("清空商品池banner确认", "确认清空商品池banner:<font color='red'>【"+obj.poolName+"】</font>么?", function () {
|
|
|
205
|
+ common.util.__ajax({
|
|
|
206
|
+ url: '/market/productPool/clearProductPoolBanner',
|
|
|
207
|
+ data: {id: obj.id}
|
|
|
208
|
+ }, function () {
|
|
|
209
|
+ g.init('/market/productPool/queryProductPoolPage');
|
|
|
210
|
+ });
|
|
|
211
|
+ });
|
|
|
212
|
+ },
|
185
|
//删除商品池
|
213
|
//删除商品池
|
186
|
deletePool: function (obj,index) {
|
214
|
deletePool: function (obj,index) {
|
187
|
common.dialog.confirm("删除商品池确认", "确认删除商品池:<font color='red'>【"+obj.poolName+"】</font>么?", function () {
|
215
|
common.dialog.confirm("删除商品池确认", "确认删除商品池:<font color='red'>【"+obj.poolName+"】</font>么?", function () {
|
|
@@ -249,6 +277,12 @@ webpackJsonp([88],{ |
|
@@ -249,6 +277,12 @@ webpackJsonp([88],{ |
249
|
var item = g.rows[index];
|
277
|
var item = g.rows[index];
|
250
|
Bll.emptyPool(item,index);
|
278
|
Bll.emptyPool(item,index);
|
251
|
});
|
279
|
});
|
|
|
280
|
+ //清空banner
|
|
|
281
|
+ $(document).on("click", "#emptyPoolImg", function () {
|
|
|
282
|
+ var index = $(this).data("index");
|
|
|
283
|
+ var item = g.rows[index];
|
|
|
284
|
+ Bll.emptyPoolImg(item,index);
|
|
|
285
|
+ });
|
252
|
|
286
|
|
253
|
//删除商品池
|
287
|
//删除商品池
|
254
|
$(document).on("click", "#deletePool", function () {
|
288
|
$(document).on("click", "#deletePool", function () {
|