Showing
1 changed file
with
20 additions
and
16 deletions
@@ -186,22 +186,26 @@ $(document).on('click', '.modify-btn', function() { | @@ -186,22 +186,26 @@ $(document).on('click', '.modify-btn', function() { | ||
186 | vipPrice($wrap); | 186 | vipPrice($wrap); |
187 | }); | 187 | }); |
188 | $submitBtn.on('click', function() { | 188 | $submitBtn.on('click', function() { |
189 | - common.util.__ajax({ | ||
190 | - url: '/goods/updatePrice', | ||
191 | - data: { | ||
192 | - product_skn: skn, | ||
193 | - sales_price: $price.val(), | ||
194 | - vip_discount_type: $select.val(), | ||
195 | - vip_price: $vipPrice.val(), | ||
196 | - vip1_price: $vip1Price.val(), | ||
197 | - vip2_price: $vip2Price.val(), | ||
198 | - vip3_price: $vip3Price.val(), | ||
199 | - cgpriceStartTime:$startDate.val(), | ||
200 | - cgpriceEndTime:$endDate.val() | ||
201 | - } | ||
202 | - }, function(res) { | ||
203 | - if (res.code == 200) {g.reload()} | ||
204 | - }) | 189 | + if($price.val() != 0){ |
190 | + common.util.__ajax({ | ||
191 | + url: '/goods/updatePrice', | ||
192 | + data: { | ||
193 | + product_skn: skn, | ||
194 | + sales_price: $price.val(), | ||
195 | + vip_discount_type: $select.val(), | ||
196 | + vip_price: $vipPrice.val(), | ||
197 | + vip1_price: $vip1Price.val(), | ||
198 | + vip2_price: $vip2Price.val(), | ||
199 | + vip3_price: $vip3Price.val(), | ||
200 | + cgpriceStartTime:$startDate.val(), | ||
201 | + cgpriceEndTime:$endDate.val() | ||
202 | + } | ||
203 | + }, function(res) { | ||
204 | + if (res.code == 200) {g.reload()} | ||
205 | + }) | ||
206 | + }else{ | ||
207 | + common.util.__tip("销售价不能为0!"); | ||
208 | + } | ||
205 | }); | 209 | }); |
206 | },true); | 210 | },true); |
207 | } | 211 | } |
-
Please register or login to post a comment