...
|
...
|
@@ -40,7 +40,7 @@ |
|
|
<p class="de_topTxt1_1">¥<span>{$vo.price0}.{$vo.price1}</span></p>
|
|
|
<div class="order_newsNum">
|
|
|
<div class="order_newsJian" onclick="jian({$vo.carid})">-</div>
|
|
|
<input class="order_newsnum" type="text" readonly="readonly" value="{$vo.book_num}" />
|
|
|
<input class="order_newsnum" type="text" value="{$vo.book_num}" data-id="{$vo.carid}" oninput="var v=this.value||'';v=v.replace(/[^\d]/g,'');if(v.length==1 && v==0){v=''};this.value=v.substr(0,3);"/>
|
|
|
<div class="order_newsJia" onclick="jia({$vo.carid})">+</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -222,6 +222,21 @@ |
|
|
$(".zoji span").html(totalPrice.toFixed(2));
|
|
|
}
|
|
|
$(function() {
|
|
|
// 输入框修改数量
|
|
|
$('.order_newsnum').change(function () {
|
|
|
var id = $(this).data('id');
|
|
|
var num = $(this).val();
|
|
|
if(num > 999) {
|
|
|
alert('商品数量不能大于999');
|
|
|
}
|
|
|
$.post("{:url('Shopcart/shop_cart_numchange')}",{id:id,num:num},function(data){
|
|
|
if(data.code == 1) {
|
|
|
calcTotal();
|
|
|
} else {
|
|
|
alert(data.msg);
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
$(".order_newsNum div").on("click", function(evt) {
|
|
|
if ($(this).text() == "-") {
|
|
|
var count = parseInt($(this).next().val());
|
...
|
...
|
|