|
@@ -610,6 +610,7 @@ function resetProductList(setData, ind) {
|
|
|
if (data.skuStr) {
|
|
|
var strings = data.skuStr.split("/");
|
|
|
var skuId = strings[0];
|
|
|
+ skuId = skuId * 1;
|
|
|
skuIds.push(skuId);
|
|
|
} else {
|
|
|
var skuId = "";
|
|
@@ -618,10 +619,12 @@ function resetProductList(setData, ind) {
|
|
|
} else {
|
|
|
skuId = data.skuId;
|
|
|
}
|
|
|
+ skuId = skuId * 1;
|
|
|
skuIds.push(skuId);
|
|
|
}
|
|
|
productIdList.push(data.productId);
|
|
|
});
|
|
|
+
|
|
|
$('.productTable').each(function (index, element) {
|
|
|
$(this).prev('.order-rows').remove();
|
|
|
$(this).remove();
|
|
@@ -635,6 +638,12 @@ function resetProductList(setData, ind) {
|
|
|
});
|
|
|
} else {
|
|
|
debugger;
|
|
|
+ if(ind){
|
|
|
+ productList.forEach(function (data) {
|
|
|
+ setProductList(data, false);
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
var skuId;
|
|
|
if (setData.skuStr) {
|
|
|
var strings = setData.skuStr.split("/");
|
|
@@ -643,10 +652,11 @@ function resetProductList(setData, ind) {
|
|
|
skuId = setData.skuList[0].skuId;
|
|
|
}
|
|
|
|
|
|
+ skuId = skuId * 1;
|
|
|
if (skuIds.indexOf(skuId) >= 0) {
|
|
|
//设置
|
|
|
productList.forEach(function (data) {
|
|
|
- if (setData.productId == data.productId) {
|
|
|
+ if (setData.skuId == data.skuId) {
|
|
|
setProductList(setData, false, ind);
|
|
|
} else {
|
|
|
setProductList(data, false, ind);
|
|
@@ -687,6 +697,7 @@ function editShopProduct(obj) {
|
|
|
data = JSON.parse(data);
|
|
|
var userId = $("#inputForm").find("[name*='bpOrderUserinfo.userId']").val();
|
|
|
var productID = (data.productId == undefined) ? data.productID : data.productId;
|
|
|
+ var skuId = (data.skuId == undefined) ? data.skuId : data.skuId;
|
|
|
var secondHandType = (data.secondHandType == undefined) ? 0 : data.secondHandType;
|
|
|
var discount = (data.discount == undefined) ? 100 : data.discount;
|
|
|
var productCategory = (data.productCategory == undefined) ? 1 : data.productCategory;
|
|
@@ -722,7 +733,7 @@ function editShopProduct(obj) {
|
|
|
return false;
|
|
|
} else {
|
|
|
console.log('设置:' + items[0]);
|
|
|
- resetProductList(items[0], 1); //设置商品列表
|
|
|
+ resetProductList(items[0], skuId); //设置商品列表
|
|
|
}
|
|
|
return true;
|
|
|
}
|
|
@@ -1000,9 +1011,8 @@ function appendProductList(str, data, cmPromotion, ind) {
|
|
|
skuId = data.skuId;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ skuId = skuId * 1;
|
|
|
$('.productTable tbody tr:not(.gift)').each(function (index, element) {
|
|
|
- console.log("看看" + $(this).find("td:nth-child(2)").html());
|
|
|
if ($(this).find("td:nth-child(2)").html() == skuId) {
|
|
|
removeEle = $(this).parent();
|
|
|
$(this).remove();
|