Authored by 周少峰

Merge branch 'gray'

@@ -74,7 +74,7 @@ @@ -74,7 +74,7 @@
74 <select class="exchange-color" {{#if isLimitSkn}}disabled{{/if}}> 74 <select class="exchange-color" {{#if isLimitSkn}}disabled{{/if}}>
75 <option value="0">请选择颜色</option> 75 <option value="0">请选择颜色</option>
76 {{# colorSize}} 76 {{# colorSize}}
77 - <option value="{{skc}}">{{color}}</option> 77 + <option value="{{skc}}" data-goodsid="{{goodsId}}">{{color}}</option>
78 {{/ colorSize}} 78 {{/ colorSize}}
79 </select> 79 </select>
80 {{# colorSize}} 80 {{# colorSize}}
1 { 1 {
2 "name": "yohobuy-node", 2 "name": "yohobuy-node",
3 - "version": "5.6.17", 3 + "version": "5.6.18",
4 "private": true, 4 "private": true,
5 "description": "A New Yohobuy Project With Express", 5 "description": "A New Yohobuy Project With Express",
6 "repository": { 6 "repository": {
@@ -362,7 +362,7 @@ function packGoogsList() { @@ -362,7 +362,7 @@ function packGoogsList() {
362 $checkBox.each(function() { 362 $checkBox.each(function() {
363 var $par = $(this).parent().parent(), 363 var $par = $(this).parent().parent(),
364 $next = $par.next(), 364 $next = $par.next(),
365 - goodsInfo; 365 + goodsInfo, cskc;
366 366
367 if (verifyTip.length) { 367 if (verifyTip.length) {
368 return; 368 return;
@@ -382,9 +382,16 @@ function packGoogsList() { @@ -382,9 +382,16 @@ function packGoogsList() {
382 goodsInfo.returned_reason = goodsInfo.reason; 382 goodsInfo.returned_reason = goodsInfo.reason;
383 } else { 383 } else {
384 goodsInfo.exchange_reason = goodsInfo.reason; 384 goodsInfo.exchange_reason = goodsInfo.reason;
385 - goodsInfo.new_goods_id = $par.find('.exchange-color').val() * 1;  
386 goodsInfo.new_product_sku = $par.find('.exchange-size').val() * 1; 385 goodsInfo.new_product_sku = $par.find('.exchange-size').val() * 1;
387 386
  387 + cskc = $par.find('.exchange-color').val() * 1;
  388 +
  389 + $par.find('.exchange-color').children().each(function() {
  390 + if (cskc === +$(this).attr('value')) {
  391 + goodsInfo.new_goods_id = $(this).data('goodsid');
  392 + }
  393 + });
  394 +
388 if (!verifyTip && !goodsInfo.new_goods_id) { 395 if (!verifyTip && !goodsInfo.new_goods_id) {
389 verifyTip = '请选择要换的颜色'; 396 verifyTip = '请选择要换的颜色';
390 } 397 }