...
|
...
|
@@ -247,25 +247,26 @@ $('#editProductName').on('click', function() { |
|
|
// });
|
|
|
|
|
|
|
|
|
var common_columns=[{
|
|
|
display: "名称",
|
|
|
width:'10%',
|
|
|
name: "attributeName",
|
|
|
render: function(item) {
|
|
|
item.required = item.isMust == "Y" ? "required" : "";
|
|
|
var arr = [];
|
|
|
arr.push(item.attributeName);
|
|
|
if (item.required) {
|
|
|
arr.push("<span class='red'>*</span>");
|
|
|
}
|
|
|
return arr.join('');
|
|
|
var common_columns = [{
|
|
|
display: "名称",
|
|
|
width: '10%',
|
|
|
name: "attributeName",
|
|
|
render: function(item) {
|
|
|
item.required = item.isMust == "Y" ? "required" : "";
|
|
|
var arr = [];
|
|
|
arr.push(item.attributeName);
|
|
|
if (item.required) {
|
|
|
arr.push("<span class='red'>*</span>");
|
|
|
}
|
|
|
}]
|
|
|
return arr.join('');
|
|
|
}
|
|
|
}]
|
|
|
|
|
|
/*陈超*/
|
|
|
|
|
|
var ag = new common.grid({
|
|
|
el: "#attributeTable",
|
|
|
hash: false,
|
|
|
columns: common_columns.concat([{
|
|
|
display: "属性",
|
|
|
render: function(item) {
|
...
|
...
|
@@ -281,7 +282,7 @@ var ag = new common.grid({ |
|
|
}
|
|
|
}
|
|
|
|
|
|
item.__name="attributeTable";
|
|
|
item.__name = "attributeTable";
|
|
|
return common.util.__template2($("#template33").html(), item);
|
|
|
}
|
|
|
}]),
|
...
|
...
|
@@ -310,6 +311,7 @@ common.util.__ajax({ |
|
|
console.log("attributeProValuesBosOne", NETSALEDATA.attributeProValuesBosOne);
|
|
|
var ag2 = new common.grid({
|
|
|
el: "#goodsParamWrap",
|
|
|
hash: false,
|
|
|
columns: common_columns.concat([{
|
|
|
display: "属性",
|
|
|
render: function(item) {
|
...
|
...
|
@@ -324,7 +326,7 @@ var ag2 = new common.grid({ |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
item.__name="goodsParamWrap";
|
|
|
item.__name = "goodsParamWrap";
|
|
|
return common.util.__template2($("#template33").html(), item);
|
|
|
}
|
|
|
}]),
|
...
|
...
|
@@ -353,21 +355,22 @@ common.util.__ajax({ |
|
|
|
|
|
var ag3 = new common.grid({
|
|
|
el: "#goodsParamWrap2",
|
|
|
hash: false,
|
|
|
columns: common_columns.concat([{
|
|
|
display: "属性",
|
|
|
render: function(item) {
|
|
|
item.required = item.isMust == "Y" ? "required" : "";
|
|
|
item.id = item.parameterMakeId;
|
|
|
var attrs = NETSALEDATA.specialAttrBo;
|
|
|
if (attrs&&attrs.materialList) {
|
|
|
var _arr=[];
|
|
|
if (attrs && attrs.materialList) {
|
|
|
var _arr = [];
|
|
|
for (var i in attrs.materialList) {
|
|
|
_arr.push(attrs.materialList[i].id);
|
|
|
}
|
|
|
item.__val = _arr.join('|');
|
|
|
}
|
|
|
|
|
|
item.__name="goodsParamWrap2";
|
|
|
item.__name = "goodsParamWrap2";
|
|
|
return common.util.__template2($("#template33").html(), item);
|
|
|
}
|
|
|
}]),
|
...
|
...
|
@@ -382,7 +385,7 @@ common.util.__ajax({ |
|
|
categoryId: basicInfo.maxSortId
|
|
|
}
|
|
|
}, function(res) {
|
|
|
console.log("接口queryMaterialList",res.data);
|
|
|
console.log("接口queryMaterialList", res.data);
|
|
|
ag3.init([res.data]);
|
|
|
}, true);
|
|
|
|
...
|
...
|
@@ -427,13 +430,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
|
|
if (ag.rows[i].val) {
|
|
|
var idNameList = ag.rows[i].idNameList;
|
|
|
for (var x in idNameList) {
|
|
|
if (ag.rows[i].val == idNameList[x].id) {
|
|
|
productStandardRelationStr.push({
|
|
|
standardId: ag.rows[i].attributeId,
|
|
|
standardVal: idNameList[x].text,
|
|
|
parameterMakeId: idNameList[x].id
|
|
|
});
|
|
|
}
|
|
|
if (ag.rows[i].val == idNameList[x].id) {
|
|
|
productStandardRelationStr.push({
|
|
|
standardId: ag.rows[i].attributeId,
|
|
|
standardVal: idNameList[x].text,
|
|
|
parameterMakeId: idNameList[x].id
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -456,13 +459,13 @@ GOLABDATA.on("TYgoodsParams", function() { |
|
|
}
|
|
|
data.attributeProValuesOne = JSON.stringify(goodsParamArr);
|
|
|
|
|
|
data.productMaterial="";
|
|
|
data.productMaterial = "";
|
|
|
if (ag3.rows.length > 0) {
|
|
|
data.productMaterial=ag3.rows[0].val;
|
|
|
data.productMaterial = ag3.rows[0].val;
|
|
|
}
|
|
|
|
|
|
data.productSkn = $('#productSkn').val();
|
|
|
console.log("data",data);
|
|
|
console.log("data", data);
|
|
|
return data;
|
|
|
|
|
|
});
|
...
|
...
|
|