您好 ,  欢迎来到59598晟江工业品 登录后可利用更多便捷功能 会员中心  | 新会员注册 [退出]
    = shoppingCarScrollTop) { //var left = $(".detailDiv .detail").offset().left; topShoppingCarDivObj.css("position","fixed"); //topShoppingCarDivObj.css("left",0); topShoppingCarDivObj.show(); } else { //shoppingCarDivObject.removeAttr("style"); topShoppingCarDivObj.hide(); } }); //设置产品table宽度 var tableObj = $(".productList .list table"); if (tableObj.width() < 960) { tableObj.css("width", 960); } $addCartItemTip = $("#addCartItemTip"); $tipClose = $("#addCartItemTip .tipClose"); $addCartItemTipMessageIcon = $("#addCartItemTipMessageIcon"); $addCartItemTipMessage = $("#addCartItemTipMessage"); $addCartItemTipInfo = $("#addCartItemTipInfo"); //绑定表格搜索下拉框 //bindSelectSeach(); //添加进入购物车 $(".shoppingCarLink").click(function(){ var shoppingCarObj = $(this); var quantityObj = $(".productList .listDiv .list .productTable .quantity"); var array = new Array(); quantityObj.each(function(i){ var obj = $(this); quantity = obj.val(); if (parseFloat(quantity) == 0 || quantity == "" || isNaN(quantity) || parseFloat(quantity) < 0) { return true; } var productId = obj.attr("productId"); array.push(productId + "_" + quantity); }); if (array.length <= 0) { $.message("message", "请选择商品!"); return false; } var $this = $(this); var x = $this.offset().left - 50; var y = $this.offset().top + $this.height() + 6; $addCartItemTip.css({"left" :x, "top" :y}); $.ajax({ url: shoppingCarObj.attr("url"), data:{productListStr: array.join(",")}, dataType: "json", async: false, success: function(data) { if (data.status == "success") { $addCartItemTipMessageIcon.removeClass("errorIcon").addClass("successIcon"); $addCartItemTipMessage.html(data.message); $addCartItemTipInfo.empty(); // $addCartItemTipInfo.text("共计商品:" + data.totalQuantity + "件,总计金额:" + data.totalPrice); } else if (data.status == "error") { $addCartItemTipMessageIcon.removeClass("successIcon").addClass("errorIcon"); $addCartItemTipMessage.html(data.message); $addCartItemTipInfo.empty(); } $addCartItemTip.fadeIn(); } }); }); $(".shoppingCartLink2").click(function(){ var shoppingCarObj = $(this); var quantityObj = $(".productList .listDiv .list .productTable .quantity"); var array = new Array(); quantityObj.each(function(i){ var obj = $(this); quantity = obj.val(); if (parseFloat(quantity) == 0 || quantity == "" || isNaN(quantity) || parseFloat(quantity) < 0) { return true; } var productId = obj.attr("productId"); array.push(productId + "_" + quantity); }); if (array.length <= 0) { $.message("message", "请选择商品!"); return false; } $.ajax({ url: shoppingCarObj.attr("url"), data:{productListStr: array.join(",")}, dataType: "json", async: false, success: function(data) { $.message(data.status, data.message); } }); }); //设置“其他类似产品”div的样式:用于滚动特效 otherCategoryScroll(); //固定表格头 fixedTableTitle(100); //询价 $(".bagProduct").click(function(){ $.ajax({ url: $(this).attr("url"), dataType: "json", async: false, success: function(data) { if (data.status=="success") { if (confirm("添加至询价单成功;是否要立即进入查看询价单?")) { window.open('/bagItemList.do'); } } else $.message(data.status, data.message); } }); }); });

     

     

    您好 ,  欢迎来到59598晟江工业品 登录后可利用更多便捷功能 会员中心  | 新会员注册 [退出]