Authored by weiqingting

Merge branch 'release/shop_supplier_v' of http://git.dev.yoho.cn/platform/yohobu…

…y-portal-fe into release/shop_supplier_v
@@ -150,13 +150,20 @@ g.init($("#gridurl").val()); @@ -150,13 +150,20 @@ g.init($("#gridurl").val());
150 //单个变价 150 //单个变价
151 $('#basicTable').on('click', '.modify-btn', function() { 151 $('#basicTable').on('click', '.modify-btn', function() {
152 var skn = $(this).data('skn'), 152 var skn = $(this).data('skn'),
153 - that = this; 153 + that = this,
  154 + $detail = $(that).parents('tr').next('.product-detail');
  155 +
  156 + if ($detail.size() == 0) {
  157 + $(that).addClass('disabled');
  158 + }
154 159
155 if ($(that).data('detail')) { 160 if ($(that).data('detail')) {
156 - $(that).parents('tr').next('.product-detail').toggle(); 161 + $detail.toggle();
157 return; 162 return;
158 } 163 }
159 164
  165 +
  166 +
160 $.ajax({ 167 $.ajax({
161 type: 'POST', 168 type: 'POST',
162 url: '/goods/getPrice', 169 url: '/goods/getPrice',
@@ -166,6 +173,7 @@ $('#basicTable').on('click', '.modify-btn', function() { @@ -166,6 +173,7 @@ $('#basicTable').on('click', '.modify-btn', function() {
166 } 173 }
167 }).then(function(res) { 174 }).then(function(res) {
168 var data = res.data.data; 175 var data = res.data.data;
  176 + $(that).removeClass('disabled');
169 177
170 $(that).data('detail', true).parents('tr') 178 $(that).data('detail', true).parents('tr')
171 .after($(common.util.__template($("#template").html(), data))) 179 .after($(common.util.__template($("#template").html(), data)))