Authored by 姜敏

尺码测量bug

... ... @@ -36,19 +36,18 @@ $(document).on('click', '#searchSku', function () {
var refName = item1.referenceName ? item1.referenceName : "";//非空判断
var a = refName.split(/[|/]/g);
var refName1 = a[0] || "", refName2 = a[1] || "";
return '<input class="col-sm-2 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-2 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
return '<input class="col-sm-5 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-5 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
}
});
for (var i = 0; i < dataList.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
var sizeAttributes = dataList.sizeRelationsList[0].prdSizeAttributeBoList[i];//参考尺码数组里的数据
var chkbox = '<label style="cursor: pointer;"><input type="checkbox" name="noMeasureIds" data-index="'+i+'" value="' + sizeAttributes.sizeAttributeId + '"/>无需测量</label>';
console.log("chkbox",chkbox);
headList.push({
display: sizeAttributes.sizeAttributeName + "<br>" + chkbox,
name: "sizeValue",
render: function (item1) {
var prdList = item1.prdSizeAttributeBoList;
if (j == prdList.length) j = 0;//防止越界
if (j >= prdList.length) j = 0;//防止越界
var sizeVal = prdList[j].sizeValue ? prdList[j].sizeValue : "";
return '<input class="form-control sizeInfo ' + prdList[j++].sizeAttributeId
+ '" data-index="' + item1.__index + '"' + 'value="' + sizeVal + '"/>';
... ...
... ... @@ -51,6 +51,7 @@ var g = new common.grid({
display: "尺码",
name: "sizeRelationsList",
render: function (item1) {
console.log("item1",item1);
return common.util.__template2($("#sizeinfo-template").html(), item1);
}
},
... ... @@ -163,7 +164,7 @@ var Bll = {
sizeInfoList: JSON.stringify(sizeInfoList),
productSizeReferList: JSON.stringify(productSizeReferList)
};
console.log("最终数据data", data);
//console.log("最终数据data", data);
common.util.__ajax({
url: url,
data: data
... ... @@ -194,7 +195,7 @@ var Bll = {
var refName = item1.referenceName ? item1.referenceName : "";//非空判断
var a = refName.split(/[,|/]/g);
var refName1 = a[0] || "", refName2 = a[1] || "";
return '<input class="col-sm-2 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-2 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
return '<input class="col-sm-5 refInfo refInfo1" data-index="' + item1.__index + '"' + 'value="' + refName1 + '"/>' + '<div class="col-sm-1">' + '/</div>' + '<input class="col-sm-5 refInfo refInfo2" data-index="' + item1.__index + '"' + 'value="' + refName2 + '"/>';
}
});
for (var i = 0; i < item.sizeRelationsList[0].prdSizeAttributeBoList.length; i++) {//尺码列
... ... @@ -205,7 +206,7 @@ var Bll = {
name: "sizeValue",
render: function (item1) {
var prdList = item1.prdSizeAttributeBoList;
if (j == prdList.length) j = 0;//防止越界
if (j >= prdList.length) j = 0;//防止越界
var sizeVal = prdList[j].sizeValue ? prdList[j].sizeValue : "";
//j++;//
return '<input class="form-control sizeInfo ' + prdList[j++].sizeAttributeId
... ...
/**
* Created by JiangMin on 2016/4/18.
*/
var common=require('../../common/common');
var Validate1 = {
"getCoupon": [
{
name: "couponID", fn: function (data) {
var a = "";
var b=false;
data.data.forEach(function (x) {
if (x.couponID) {
if (a == "") {
a = x.couponID;
}
else {
a = a + ',' + x.couponID;
}
}
});
common.util.__ajax({
url: "/coupon/batchCheckCoupons",
async:false,
data: {
params: a
}
}, function (res) {
if(res.code=='200'){
b=true;
}
});
return b;
}
}
]
};
module.exports=Validate1;
\ No newline at end of file
... ...
... ... @@ -3,6 +3,7 @@
* 测量尺码管理
*/
exports.domain = require('../config/common.js').domain;
//exports.domain ="http://172.16.6.189:8088/platform";
exports.res = [
... ...