|
@@ -247,25 +247,26 @@ $('#editProductName').on('click', function() { |
|
@@ -247,25 +247,26 @@ $('#editProductName').on('click', function() { |
247
|
// });
|
247
|
// });
|
248
|
|
248
|
|
249
|
|
249
|
|
250
|
-var common_columns=[{
|
|
|
251
|
- display: "名称",
|
|
|
252
|
- width:'10%',
|
|
|
253
|
- name: "attributeName",
|
|
|
254
|
- render: function(item) {
|
|
|
255
|
- item.required = item.isMust == "Y" ? "required" : "";
|
|
|
256
|
- var arr = [];
|
|
|
257
|
- arr.push(item.attributeName);
|
|
|
258
|
- if (item.required) {
|
|
|
259
|
- arr.push("<span class='red'>*</span>");
|
|
|
260
|
- }
|
|
|
261
|
- return arr.join('');
|
250
|
+var common_columns = [{
|
|
|
251
|
+ display: "名称",
|
|
|
252
|
+ width: '10%',
|
|
|
253
|
+ name: "attributeName",
|
|
|
254
|
+ render: function(item) {
|
|
|
255
|
+ item.required = item.isMust == "Y" ? "required" : "";
|
|
|
256
|
+ var arr = [];
|
|
|
257
|
+ arr.push(item.attributeName);
|
|
|
258
|
+ if (item.required) {
|
|
|
259
|
+ arr.push("<span class='red'>*</span>");
|
262
|
}
|
260
|
}
|
263
|
- }]
|
261
|
+ return arr.join('');
|
|
|
262
|
+ }
|
|
|
263
|
+}]
|
264
|
|
264
|
|
265
|
/*陈超*/
|
265
|
/*陈超*/
|
266
|
|
266
|
|
267
|
var ag = new common.grid({
|
267
|
var ag = new common.grid({
|
268
|
el: "#attributeTable",
|
268
|
el: "#attributeTable",
|
|
|
269
|
+ hash: false,
|
269
|
columns: common_columns.concat([{
|
270
|
columns: common_columns.concat([{
|
270
|
display: "属性",
|
271
|
display: "属性",
|
271
|
render: function(item) {
|
272
|
render: function(item) {
|
|
@@ -281,7 +282,7 @@ var ag = new common.grid({ |
|
@@ -281,7 +282,7 @@ var ag = new common.grid({ |
281
|
}
|
282
|
}
|
282
|
}
|
283
|
}
|
283
|
|
284
|
|
284
|
- item.__name="attributeTable";
|
285
|
+ item.__name = "attributeTable";
|
285
|
return common.util.__template2($("#template33").html(), item);
|
286
|
return common.util.__template2($("#template33").html(), item);
|
286
|
}
|
287
|
}
|
287
|
}]),
|
288
|
}]),
|
|
@@ -310,6 +311,7 @@ common.util.__ajax({ |
|
@@ -310,6 +311,7 @@ common.util.__ajax({ |
310
|
console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne);
|
311
|
console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne);
|
311
|
var ag2 = new common.grid({
|
312
|
var ag2 = new common.grid({
|
312
|
el: "#goodsParamWrap",
|
313
|
el: "#goodsParamWrap",
|
|
|
314
|
+ hash: false,
|
313
|
columns: common_columns.concat([{
|
315
|
columns: common_columns.concat([{
|
314
|
display: "属性",
|
316
|
display: "属性",
|
315
|
render: function(item) {
|
317
|
render: function(item) {
|
|
@@ -324,7 +326,7 @@ var ag2 = new common.grid({ |
|
@@ -324,7 +326,7 @@ var ag2 = new common.grid({ |
324
|
}
|
326
|
}
|
325
|
}
|
327
|
}
|
326
|
}
|
328
|
}
|
327
|
- item.__name="goodsParamWrap";
|
329
|
+ item.__name = "goodsParamWrap";
|
328
|
return common.util.__template2($("#template33").html(), item);
|
330
|
return common.util.__template2($("#template33").html(), item);
|
329
|
}
|
331
|
}
|
330
|
}]),
|
332
|
}]),
|
|
@@ -353,21 +355,22 @@ common.util.__ajax({ |
|
@@ -353,21 +355,22 @@ common.util.__ajax({ |
353
|
|
355
|
|
354
|
var ag3 = new common.grid({
|
356
|
var ag3 = new common.grid({
|
355
|
el: "#goodsParamWrap2",
|
357
|
el: "#goodsParamWrap2",
|
|
|
358
|
+ hash: false,
|
356
|
columns: common_columns.concat([{
|
359
|
columns: common_columns.concat([{
|
357
|
display: "属性",
|
360
|
display: "属性",
|
358
|
render: function(item) {
|
361
|
render: function(item) {
|
359
|
item.required = item.isMust == "Y" ? "required" : "";
|
362
|
item.required = item.isMust == "Y" ? "required" : "";
|
360
|
item.id = item.parameterMakeId;
|
363
|
item.id = item.parameterMakeId;
|
361
|
var attrs = NETSALEDATA.specialAttrBo;
|
364
|
var attrs = NETSALEDATA.specialAttrBo;
|
362
|
- if (attrs&&attrs.materialList) {
|
|
|
363
|
- var _arr=[];
|
365
|
+ if (attrs && attrs.materialList) {
|
|
|
366
|
+ var _arr = [];
|
364
|
for (var i in attrs.materialList) {
|
367
|
for (var i in attrs.materialList) {
|
365
|
_arr.push(attrs.materialList[i].id);
|
368
|
_arr.push(attrs.materialList[i].id);
|
366
|
}
|
369
|
}
|
367
|
item.__val = _arr.join('|');
|
370
|
item.__val = _arr.join('|');
|
368
|
}
|
371
|
}
|
369
|
|
372
|
|
370
|
- item.__name="goodsParamWrap2";
|
373
|
+ item.__name = "goodsParamWrap2";
|
371
|
return common.util.__template2($("#template33").html(), item);
|
374
|
return common.util.__template2($("#template33").html(), item);
|
372
|
}
|
375
|
}
|
373
|
}]),
|
376
|
}]),
|
|
@@ -382,7 +385,7 @@ common.util.__ajax({ |
|
@@ -382,7 +385,7 @@ common.util.__ajax({ |
382
|
categoryId: basicInfo.maxSortId
|
385
|
categoryId: basicInfo.maxSortId
|
383
|
}
|
386
|
}
|
384
|
}, function(res) {
|
387
|
}, function(res) {
|
385
|
- console.log("接口queryMaterialList",res.data);
|
388
|
+ console.log("接口queryMaterialList", res.data);
|
386
|
ag3.init([res.data]);
|
389
|
ag3.init([res.data]);
|
387
|
}, true);
|
390
|
}, true);
|
388
|
|
391
|
|
|
@@ -427,13 +430,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
|
@@ -427,13 +430,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
427
|
if (ag.rows[i].val) {
|
430
|
if (ag.rows[i].val) {
|
428
|
var idNameList = ag.rows[i].idNameList;
|
431
|
var idNameList = ag.rows[i].idNameList;
|
429
|
for (var x in idNameList) {
|
432
|
for (var x in idNameList) {
|
430
|
- if (ag.rows[i].val == idNameList[x].id) {
|
|
|
431
|
- productStandardRelationStr.push({
|
|
|
432
|
- standardId: ag.rows[i].attributeId,
|
|
|
433
|
- standardVal: idNameList[x].text,
|
|
|
434
|
- parameterMakeId: idNameList[x].id
|
|
|
435
|
- });
|
|
|
436
|
- }
|
433
|
+ if (ag.rows[i].val == idNameList[x].id) {
|
|
|
434
|
+ productStandardRelationStr.push({
|
|
|
435
|
+ standardId: ag.rows[i].attributeId,
|
|
|
436
|
+ standardVal: idNameList[x].text,
|
|
|
437
|
+ parameterMakeId: idNameList[x].id
|
|
|
438
|
+ });
|
|
|
439
|
+ }
|
437
|
}
|
440
|
}
|
438
|
}
|
441
|
}
|
439
|
}
|
442
|
}
|
|
@@ -456,13 +459,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
|
@@ -456,13 +459,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
456
|
}
|
459
|
}
|
457
|
data.attributeProValuesOne = JSON.stringify(goodsParamArr);
|
460
|
data.attributeProValuesOne = JSON.stringify(goodsParamArr);
|
458
|
|
461
|
|
459
|
- data.productMaterial="";
|
462
|
+ data.productMaterial = "";
|
460
|
if (ag3.rows.length > 0) {
|
463
|
if (ag3.rows.length > 0) {
|
461
|
- data.productMaterial=ag3.rows[0].val;
|
464
|
+ data.productMaterial = ag3.rows[0].val;
|
462
|
}
|
465
|
}
|
463
|
|
466
|
|
464
|
data.productSkn = $('#productSkn').val();
|
467
|
data.productSkn = $('#productSkn').val();
|
465
|
- console.log("data",data);
|
468
|
+ console.log("data", data);
|
466
|
return data;
|
469
|
return data;
|
467
|
|
470
|
|
468
|
});
|
471
|
});
|