Commit 9644b8da by 肖康

商品详情

parent 507711ea
.skubox{
.cons{
padding:20px;
.skubox {
.cons {
padding : 20px;
background: #fff;
.detailtop{
.left{
.imgbox{
width: 224px;
height: 224px;
.detailtop {
.left {
.imgbox {
width : 224px;
height : 224px;
background: #FFFFFF;
border: 1px solid #DFEAFA;
img{max-height:220px;max-width: 224px;display: block;margin:0 auto;}
border : 1px solid #DFEAFA;
img {
max-height: 220px;
max-width : 224px;
display : block;
margin : 0 auto;
}
.imgtips{
margin-top:9px;
font-size: 14px;
color:#555;
}
.imgtips {
margin-top: 9px;
font-size : 14px;
color : #555;
text-align: center;
}
.skuinfo{
width:465px;
.skuinfo {
width : 465px;
margin-left: 35px;
.h3{color:#222;font-weight: bold;font-size: 20px;border-bottom:1px solid #DFEAFA;padding-bottom: 10px;}
.group-info{
font-size: 14px;
margin-top: 20px;margin-bottom: 25px;
.label{color:#222;}
.contents{
color:#555;margin-left: 60px;
.pdf{
color:#F68332;
.h3 {
color : #222;
font-weight : bold;
font-size : 20px;
border-bottom : 1px solid #DFEAFA;
padding-bottom: 10px;
}
.group-info {
font-size : 14px;
margin-top : 20px;
margin-bottom: 25px;
.label {
color: #222;
}
.contents {
color : #555;
margin-left: 60px;
.pdf {
color : #F68332;
font-size: 20px;
}
}
......@@ -36,136 +60,214 @@
}
}
.right{
width:398px;
.stores{
color:#222;font-size: 20px;
font-weight: bold;
border-bottom:1px solid #DFEAFA;padding-bottom: 10px;
.right {
width: 398px;
.skufrqbtns {
width : 120px;
height : 32px;
background : #164D9A;
border-radius: 8px;
color : #fff;
font-size : 14px;
text-align : center;
line-height : 32px;
margin : 0 auto;
cursor : pointer;
margin-top: 30px;
}
.numtitle{
color:#222;font-size: 14px;
font-weight: bold;
margin-top:22px;
.stores {
color : #222;
font-size : 20px;
font-weight : bold;
border-bottom : 1px solid #DFEAFA;
padding-bottom: 10px;
}
.numtitle {
color : #222;
font-size : 14px;
font-weight : bold;
margin-top : 22px;
margin-bottom: 14px;
}
.inputval{
display: block;
width: 400px;
height: 32px;
background: #FAFAFA;
border: 1px solid #DFEAFA;
.inputval {
display : block;
width : 400px;
height : 32px;
background : #FAFAFA;
border : 1px solid #DFEAFA;
border-radius: 4px;
color:#222;
color : #222;
}
.pricebox{
.pricebox {
margin-top: 20px;
.group-tp{
flex-wrap: wrap;
color:#555;
font-size: 14px;
.group-tp {
flex-wrap : wrap;
color : #555;
font-size : 14px;
margin-bottom: 14px;
div{
flex:0 0 33.33%;
div {
flex : 0 0 33.33%;
text-align: right;
&.lt{text-align: left;}
&.lt {
text-align: left;
}
}
&.tt {
color: #222;
div {
font-weight: bold;
}
&.tt{
color:#222;
div{font-weight: bold;}
}
}
}
.totalMoney{font-size: 20px;color:#222;font-weight: bold;text-align: right;}
.butbox{
.totalMoney {
font-size : 20px;
color : #222;
font-weight: bold;
text-align : right;
}
.butbox {
margin-top: 20px;
.buts{
width: 120px;
height: 32px;
background: #164D9A;
.buts {
width : 120px;
height : 32px;
background : #164D9A;
border-radius: 8px;
color:#fff;
font-size: 14px;
text-align: center;
line-height: 32px;
margin-left: 36px;
cursor: pointer;
&.leftbut{
color : #fff;
font-size : 14px;
text-align : center;
line-height : 32px;
margin-left : 36px;
cursor : pointer;
&.leftbut {
position: relative;
left:100px;
left : 100px;
}
}
}
}
}
.detailbottom{
.detailbottom {
margin-top: 40px;
.left{
.model{
font-weight: bold;
color:#222;
font-size: 20px;
.left {
.model {
font-weight : bold;
color : #222;
font-size : 20px;
margin-bottom: 14px;
}
.more-sku{
width:704px;
.sku-group{
.skuimgbox{
width: 161px;
height: 161px;
.more-sku {
width: 704px;
.sku-group {
.skuimgbox {
width : 161px;
height : 161px;
background: #FFFFFF;
border: 1px solid #DFEAFA;
img{max-width: 159px;max-height: 159px;display: block;margin:0 auto;}
border : 1px solid #DFEAFA;
img {
max-width : 159px;
max-height: 159px;
display : block;
margin : 0 auto;
}
margin-bottom: 15px;
}
font-size: 14px;
color:#555;
font-size : 14px;
color :#555;
line-height: 24px;
div{width: 161px;}
.prc{color:#333;}
div {
width: 161px;
}
.prc {
color: #333;
}
}
}
}
.right{
width:398px;
.jttitle{
.right {
width: 398px;
.jttitle {
font-weight: bold;
font-size: 20px;
color:#222;
font-size : 20px;
color : #222;
}
.qm{font-size: 14px; color:#555;margin:20px 0;span{margin-right: 100px;}}
.jthead{
.qm {
font-size: 14px;
color:#555;
flex-wrap: wrap;
width: 398px;
line-height: 42px;
height: 42px;
background: #DFEAFA;
color : #555;
margin : 20px 0;
}
.jthead {
font-size : 14px;
color : #555;
flex-wrap : wrap;
box-sizing : border-box;
padding-right: 10px;
line-height : 42px;
height : 42px;
background : #DFEAFA;
border-radius: 8px 8px 0px 0px;
padding-left:25px;
div{
flex:0 0 33.33%;
padding-left : 25px;
div {
flex: 0 0 33.33%;
}
}
.jtcon{
width: 398px;
min-height: 210px;
background: #F7FAFF;
border-radius: 0px 0px 8px 8px;
padding-left: 25px;
padding-top: 20px;
.jtcon {
width : 398px;
min-height : 210px;
background : #F7FAFF;
border-radius : 0px 0px 8px 8px;
padding-left : 25px;
padding-top : 20px;
padding-bottom: 10px;
.jtpgroup{
flex-wrap: wrap;
width: 398px;
.jtpgroup {
flex-wrap : wrap;
margin-bottom: 20px;
div.item{
flex:0 0 33.33%;
color:#555;
box-sizing : border-box;
padding-right: 10px;
div.item {
flex : 0 0 33.33%;
color : #555;
font-size: 14px;
&.jti{color:#164D9A;}
}
&.act {
div.item {
color: #164D9A;
}
}
}
}
......
.skubox .cons{padding:20px;background:#fff}.skubox .cons .detailtop .left .imgbox{width:224px;height:224px;background:#FFFFFF;border:1px solid #DFEAFA}.skubox .cons .detailtop .left .imgbox img{max-height:220px;max-width:224px;display:block;margin:0 auto}.skubox .cons .detailtop .left .imgtips{margin-top:9px;font-size:14px;color:#555;text-align:center}.skubox .cons .detailtop .left .skuinfo{width:465px;margin-left:35px}.skubox .cons .detailtop .left .skuinfo .h3{color:#222;font-weight:bold;font-size:20px;border-bottom:1px solid #DFEAFA;padding-bottom:10px}.skubox .cons .detailtop .left .skuinfo .group-info{font-size:14px;margin-top:20px;margin-bottom:25px}.skubox .cons .detailtop .left .skuinfo .group-info .label{color:#222}.skubox .cons .detailtop .left .skuinfo .group-info .contents{color:#555;margin-left:60px}.skubox .cons .detailtop .left .skuinfo .group-info .contents .pdf{color:#F68332;font-size:20px}.skubox .cons .detailtop .right{width:398px}.skubox .cons .detailtop .right .stores{color:#222;font-size:20px;font-weight:bold;border-bottom:1px solid #DFEAFA;padding-bottom:10px}.skubox .cons .detailtop .right .numtitle{color:#222;font-size:14px;font-weight:bold;margin-top:22px;margin-bottom:14px}.skubox .cons .detailtop .right .inputval{display:block;width:400px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;color:#222}.skubox .cons .detailtop .right .pricebox{margin-top:20px}.skubox .cons .detailtop .right .pricebox .group-tp{flex-wrap:wrap;color:#555;font-size:14px;margin-bottom:14px}.skubox .cons .detailtop .right .pricebox .group-tp div{flex:0 0 33.33%;text-align:right}.skubox .cons .detailtop .right .pricebox .group-tp div.lt{text-align:left}.skubox .cons .detailtop .right .pricebox .group-tp.tt{color:#222}.skubox .cons .detailtop .right .pricebox .group-tp.tt div{font-weight:bold}.skubox .cons .detailtop .right .totalMoney{font-size:20px;color:#222;font-weight:bold;text-align:right}.skubox .cons .detailtop .right .butbox{margin-top:20px}.skubox .cons .detailtop .right .butbox .buts{width:120px;height:32px;background:#164D9A;border-radius:8px;color:#fff;font-size:14px;text-align:center;line-height:32px;margin-left:36px;cursor:pointer}.skubox .cons .detailtop .right .butbox .buts.leftbut{position:relative;left:100px}.skubox .cons .detailbottom{margin-top:40px}.skubox .cons .detailbottom .left .model{font-weight:bold;color:#222;font-size:20px;margin-bottom:14px}.skubox .cons .detailbottom .left .more-sku{width:704px}.skubox .cons .detailbottom .left .more-sku .sku-group{font-size:14px;color:#555;line-height:24px}.skubox .cons .detailbottom .left .more-sku .sku-group .skuimgbox{width:161px;height:161px;background:#FFFFFF;border:1px solid #DFEAFA;margin-bottom:15px}.skubox .cons .detailbottom .left .more-sku .sku-group .skuimgbox img{max-width:159px;max-height:159px;display:block;margin:0 auto}.skubox .cons .detailbottom .left .more-sku .sku-group div{width:161px}.skubox .cons .detailbottom .left .more-sku .sku-group .prc{color:#333}.skubox .cons .detailbottom .right{width:398px}.skubox .cons .detailbottom .right .jttitle{font-weight:bold;font-size:20px;color:#222}.skubox .cons .detailbottom .right .qm{font-size:14px;color:#555;margin:20px 0}.skubox .cons .detailbottom .right .qm span{margin-right:100px}.skubox .cons .detailbottom .right .jthead{font-size:14px;color:#555;flex-wrap:wrap;width:398px;line-height:42px;height:42px;background:#DFEAFA;border-radius:8px 8px 0px 0px;padding-left:25px}.skubox .cons .detailbottom .right .jthead div{flex:0 0 33.33%}.skubox .cons .detailbottom .right .jtcon{width:398px;min-height:210px;background:#F7FAFF;border-radius:0px 0px 8px 8px;padding-left:25px;padding-top:20px;padding-bottom:10px}.skubox .cons .detailbottom .right .jtcon .jtpgroup{flex-wrap:wrap;width:398px;margin-bottom:20px}.skubox .cons .detailbottom .right .jtcon .jtpgroup div.item{flex:0 0 33.33%;color:#555;font-size:14px}.skubox .cons .detailbottom .right .jtcon .jtpgroup div.item.jti{color:#164D9A}
\ No newline at end of file
.skubox .cons{padding:20px;background:#fff}.skubox .cons .detailtop .left .imgbox{width:224px;height:224px;background:#FFFFFF;border:1px solid #DFEAFA}.skubox .cons .detailtop .left .imgbox img{max-height:220px;max-width:224px;display:block;margin:0 auto}.skubox .cons .detailtop .left .imgtips{margin-top:9px;font-size:14px;color:#555;text-align:center}.skubox .cons .detailtop .left .skuinfo{width:465px;margin-left:35px}.skubox .cons .detailtop .left .skuinfo .h3{color:#222;font-weight:bold;font-size:20px;border-bottom:1px solid #DFEAFA;padding-bottom:10px}.skubox .cons .detailtop .left .skuinfo .group-info{font-size:14px;margin-top:20px;margin-bottom:25px}.skubox .cons .detailtop .left .skuinfo .group-info .label{color:#222}.skubox .cons .detailtop .left .skuinfo .group-info .contents{color:#555;margin-left:60px}.skubox .cons .detailtop .left .skuinfo .group-info .contents .pdf{color:#F68332;font-size:20px}.skubox .cons .detailtop .right{width:398px}.skubox .cons .detailtop .right .skufrqbtns{width:120px;height:32px;background:#164D9A;border-radius:8px;color:#fff;font-size:14px;text-align:center;line-height:32px;margin:0 auto;cursor:pointer;margin-top:30px}.skubox .cons .detailtop .right .stores{color:#222;font-size:20px;font-weight:bold;border-bottom:1px solid #DFEAFA;padding-bottom:10px}.skubox .cons .detailtop .right .numtitle{color:#222;font-size:14px;font-weight:bold;margin-top:22px;margin-bottom:14px}.skubox .cons .detailtop .right .inputval{display:block;width:400px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;color:#222}.skubox .cons .detailtop .right .pricebox{margin-top:20px}.skubox .cons .detailtop .right .pricebox .group-tp{flex-wrap:wrap;color:#555;font-size:14px;margin-bottom:14px}.skubox .cons .detailtop .right .pricebox .group-tp div{flex:0 0 33.33%;text-align:right}.skubox .cons .detailtop .right .pricebox .group-tp div.lt{text-align:left}.skubox .cons .detailtop .right .pricebox .group-tp.tt{color:#222}.skubox .cons .detailtop .right .pricebox .group-tp.tt div{font-weight:bold}.skubox .cons .detailtop .right .totalMoney{font-size:20px;color:#222;font-weight:bold;text-align:right}.skubox .cons .detailtop .right .butbox{margin-top:20px}.skubox .cons .detailtop .right .butbox .buts{width:120px;height:32px;background:#164D9A;border-radius:8px;color:#fff;font-size:14px;text-align:center;line-height:32px;margin-left:36px;cursor:pointer}.skubox .cons .detailtop .right .butbox .buts.leftbut{position:relative;left:100px}.skubox .cons .detailbottom{margin-top:40px}.skubox .cons .detailbottom .left .model{font-weight:bold;color:#222;font-size:20px;margin-bottom:14px}.skubox .cons .detailbottom .left .more-sku{width:704px}.skubox .cons .detailbottom .left .more-sku .sku-group{font-size:14px;color:#555;line-height:24px}.skubox .cons .detailbottom .left .more-sku .sku-group .skuimgbox{width:161px;height:161px;background:#FFFFFF;border:1px solid #DFEAFA;margin-bottom:15px}.skubox .cons .detailbottom .left .more-sku .sku-group .skuimgbox img{max-width:159px;max-height:159px;display:block;margin:0 auto}.skubox .cons .detailbottom .left .more-sku .sku-group div{width:161px}.skubox .cons .detailbottom .left .more-sku .sku-group .prc{color:#333}.skubox .cons .detailbottom .right{width:398px}.skubox .cons .detailbottom .right .jttitle{font-weight:bold;font-size:20px;color:#222}.skubox .cons .detailbottom .right .qm{font-size:14px;color:#555;margin:20px 0}.skubox .cons .detailbottom .right .jthead{font-size:14px;color:#555;flex-wrap:wrap;box-sizing:border-box;padding-right:10px;line-height:42px;height:42px;background:#DFEAFA;border-radius:8px 8px 0px 0px;padding-left:25px}.skubox .cons .detailbottom .right .jthead div{flex:0 0 33.33%}.skubox .cons .detailbottom .right .jtcon{width:398px;min-height:210px;background:#F7FAFF;border-radius:0px 0px 8px 8px;padding-left:25px;padding-top:20px;padding-bottom:10px}.skubox .cons .detailbottom .right .jtcon .jtpgroup{flex-wrap:wrap;margin-bottom:20px;box-sizing:border-box;padding-right:10px}.skubox .cons .detailbottom .right .jtcon .jtpgroup div.item{flex:0 0 33.33%;color:#555;font-size:14px}.skubox .cons .detailbottom .right .jtcon .jtpgroup.act div.item{color:#164D9A}
\ No newline at end of file
......@@ -49,7 +49,8 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
}
var json_ = {
data: dataArr,
brand_id:$("#brandvalxsp").attr("guid")
brand_id:$("#brandvalxsp").attr("guid"),
brand_name:$("#brandvalxsp").text()
}
var html = template('DataTmp', json_);
$(".data-td").html(html);
......@@ -120,6 +121,9 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
var num = $(this).val();
var max_num = Number($(this).attr("maxNum"));
var min_num = Number($(this).attr("minNum"));
var mult= Number($(this).attr("mult"));
num = Math.ceil(num / mult) * mult;
$(this).val(num)
if (num > max_num) {
$(this).val(max_num)
liexin_pop.Tip({ title: "At Most " + max_num })
......@@ -156,9 +160,9 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
var value_ = Number(obj.find(".valuep").val());//当前数量
//阶梯价格选中
obj.find(".price-group").each(function () {
var pus = $(this).attr("purchases")
var next_pus = $(this).next().attr("purchases")
var prev_pus = $(this).prev().attr("purchases")
var pus = Number($(this).attr("purchases"))
var next_pus = Number($(this).next().attr("purchases"))
var prev_pus = Number($(this).prev().attr("purchases"))
obj.find(".price-group").removeClass("act")
if (value_ == pus) {
$(this).addClass("act");
......
......@@ -129,6 +129,9 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
var num = $(this).val();
var max_num = Number($(this).attr("maxNum"));
var min_num = Number($(this).attr("minNum"));
var mult= Number($(this).attr("mult"));
num = Math.ceil(num / mult) * mult;
$(this).val(num)
if (num > max_num) {
$(this).val(max_num)
liexin_pop.Tip({ title: "At Most " + max_num })
......@@ -165,9 +168,9 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
var value_ = Number(obj.find(".valuep").val());//当前数量
//阶梯价格选中
obj.find(".price-group").each(function () {
var pus = $(this).attr("purchases")
var next_pus = $(this).next().attr("purchases")
var prev_pus = $(this).prev().attr("purchases")
var pus = Number($(this).attr("purchases"))
var next_pus = Number($(this).next().attr("purchases"))
var prev_pus = Number($(this).prev().attr("purchases"))
obj.find(".price-group").removeClass("act")
if (value_ == pus) {
$(this).addClass("act");
......
......@@ -15,8 +15,8 @@ define('mallUi', ['tool', 'liexin_pop'], function (require, exports, module) {
return
}
mallUi.openInquiry()
})
mallUi.inquiry()
//退出账号
$("body").on("click", ".logoutbtns", function () {
$.liexin_ajax('/api/auth/logout', 'GET', {}, function (res) {
......@@ -87,9 +87,10 @@ define('mallUi', ['tool', 'liexin_pop'], function (require, exports, module) {
top: 80,
ele: ".allInquiryPop",
success: function () {
mallUi.inquiry()
}
})
},
inquiry: function () {
$("body").on("click", ".addibts", function () {
......
......@@ -119,6 +119,9 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
var num = $(this).val();
var max_num=Number($(this).attr("maxNum"));
var min_num=Number($(this).attr("minNum"));
var mult= Number($(this).attr("mult"));
num = Math.ceil(num / mult) * mult;
$(this).val(num)
if(num>max_num){
$(this).val(max_num)
liexin_pop.Tip({ title: "At Most "+max_num })
......@@ -155,9 +158,9 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
var value_ = Number(obj.find(".valuep").val());//当前数量
//阶梯价格选中
obj.find(".price-group").each(function () {
var pus = $(this).attr("purchases")
var next_pus = $(this).next().attr("purchases")
var prev_pus = $(this).prev().attr("purchases")
var pus = Number($(this).attr("purchases"))
var next_pus = Number($(this).next().attr("purchases"))
var prev_pus = Number($(this).prev().attr("purchases"))
obj.find(".price-group").removeClass("act")
if (value_ == pus) {
$(this).addClass("act");
......
define('sku', ['liexin_pop', 'tool', 'artTemplate'], function (require, exports, module) {
var liexin_pop = require("liexin_pop");
var tool = require("tool");
var artTemplate = require("artTemplate");
var sku = {
init: function () {
sku.getData()
sku.handle()
},
getData: function () {
$.liexin_ajax(SO_URL + '/semour/goodsDetail', 'POST', { goods_id: $("#sku_goods_id").val() }, function (res) {
console.log(res)
if (res.code == 0) {
var json_ = res.data
json_.sku_brand_id=tool.getRequest("brand_id");
json_.sku_brand_name=tool.getRequest("brand_name");
var html = template('DataTmp', json_);
$(".skudetailboxs").html(html);
sku.onePriceRow();
console.log(json_)
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
handle: function () {
//输入数量
$("body").on("input", '.inputvalskudetail', tool.debounce(function (e) {
var num = $(this).val();
var max_num = Number($(this).attr("maxNum"));
var min_num = Number($(this).attr("minNum"));
var mult= Number($(this).attr("mult"));
num = Math.ceil(num / mult) * mult;
$(this).val(num)
if (num > max_num) {
$(this).val(max_num)
liexin_pop.Tip({ title: "At Most " + max_num })
return
}
if (num < min_num) {
$(this).val(min_num)
liexin_pop.Tip({ title: "At Least " + min_num })
return
}
sku.onePriceRow()
}, 600))
//加购物车
$("body").on("click",".skuaddcar",function(){
sku.addCar()
})
$("body").on("click",".skuconfirms",function(){
if (!tool.isLogin()) {
liexin_pop.LoginPop({},function(){
sku.addCar(1)
})
return
}
sku.addCar(1)
})
},
addCar:function(status){
var data_={
goods_id:$(".skuaddcar").attr("goods_id"),
buy_number:$(".inputvalskudetail").val()
}
$.liexin_ajax('/api/cart/saveCart', 'POST',data_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg })
tool.getCarNum()
if(status){
//下单
tool.setCookie("car_xk", res.data.cart_id, 1)
window.location.href="/confirm"
}
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
onePriceRow:function(){
var value_ = Number($(".inputvalskudetail").val())//当前数量
//阶梯价格选中
$(".jtpgroupxps").each(function () {
var pus = Number($(this).attr("purchases"))
var next_pus = Number($(this).next().attr("purchases"))
var prev_pus = Number($(this).prev().attr("purchases"))
$(".jtpgroupxps").removeClass("act")
if (value_ == pus) {
$(this).addClass("act");
return false;
}
if ($(this).index() == 0) {
//第一个阶梯
if (value_ > pus) {
$(this).addClass("act");
return false;
}
}
if ($(this).index() == $(".jtpgroupxps").length - 1) {
//最后一个阶梯
if (value_ < pus) {
$(this).addClass("act");
return false;
}
}
if (value_ < pus && value_ > next_pus) {
$(this).next().addClass("act")
return false;
}
if (value_ > pus && value_ < prev_pus) {
$(this).addClass("act")
return false;
}
})
//计算合计价格
var ac_price = Number($(".jtpgroupxps.act").find(".jtpcval").text());
$(".countskud").text(value_)
$(".skupriced").text(ac_price)
$(".skupricedtotal").text(((ac_price * value_) || 0).toFixed(2))
}
}
module.exports = sku.init();
})
seajs.use(['sku'])
\ No newline at end of file
......@@ -7,92 +7,47 @@ define('orderDetail', ['liexin_pop','tool','artTemplate'], function (require, ex
init: function () {
orderDetail.handle();
orderDetail.getData()
orderDetail.getDataSale()
},
getData:function(){
$.liexin_ajax('/api/order/orderDetail', 'POST', {order_id:tool.getRequest("order_id")}, function (res) {
if (res.code == 0) {
var json_=res.data
var html = template('DataTmp', json_);
console.log(json_)
$(".orderdetailboxs").html(html);
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
getDataSale:function(){
$.liexin_ajax('/api/order/orderServiceDetail', 'POST', {order_id:tool.getRequest("order_id")}, function (res) {
if (res.code == 0) {
var json_={
data:res.data.items
}
var html = template('DataTmp1', json_);
$(".subtotalsd").text(res.data.return_amount_all)
$(".shboxsd").html(html);
} else {
liexin_pop.Tip({ title: res.msg })
}
})
},
handle: function () {
$(".detailbox .sale").click(function(){
$("body").on("click",".salego",function(){
$(".user-right ").hide();
$(".salebox").show();
})
$(".salebox .icarrow").click(function(){
$("body").on("click",".icarrow",function(){
$(".user-right ").hide();
$(".detailbox").show();
})
//切换属性
$("body").on("click", ".check-group", function () {
$(".verifyBox").find(".check-group").removeClass("act")
$(this).addClass("act");
})
//国家操作
$("body").on("input", '.getCountry', tool.debounce(function (e) {
var str_ = $(this).val();
$(this).attr("guid", "")
var count_=0;
if (str_) {
$(".countryconent").show();
$(".countryconent .citem").each(function () {
if (($(this).text().toLocaleLowerCase()).indexOf((str_.toLocaleLowerCase())) != -1) {
$(this).show()
count_++;
} else {
$(this).hide()
}
})
if(count_==0){
$(".countryconent").hide();
}
} else {
$(".countryconent").hide();
}
}, 300))
$("body").on("click", ".citem", function () {
$(".getCountry").val($(this).text()).attr("guid", $(this).attr("guid"))
$(".countryconent").hide();
})
//获取国家
orderDetail.getCountry()
//新增编辑
$("body").on("click", ".edit-shipping-btn", function () {
liexin_pop.Open({
title: "Change Shipping Information",
width: 766,
height: 595,
class: "addressOpen",
ele: ".addressPop",
success: function () {
}
})
})
},
//获取国家
getCountry: function () {
$.liexin_ajax('/api/country/list', 'GET', {}, function (res) {
if (res.code === 0) {
var html_ = "";
for (var i = 0; i < res.data.length; i++) {
html_ += '<div class="citem" guid="' + res.data[i].id + '">' + res.data[i].name + '</div>'
}
$(".countryconent").html(html_)
} else {
}
}, 1)
},
}
module.exports = orderDetail.init();
})
......
......@@ -94,7 +94,7 @@
{{each data value index}}
<div class="td-group boxsiz row" goods_id="{{value.goods_id}}">
<div class="td w180">
<a href="/sku/{{value.goods_id}}?brand_id={{brand_id}}" class="goodsname">{{value.goods_name}}</a>
<a href="/sku/{{value.goods_id}}?brand_id={{brand_id}}&brand_name={{brand_name}}" class="goodsname">{{value.goods_name}}</a>
<div class="copyname" goods_name="{{value.goods_name}}">
<i class="icon iconfont icon-fuzhi"></i>
</div>
......@@ -126,7 +126,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<input type="text" class="valuep valuepSearch" mult="{{value.mult}}" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<div class="addCar addCarSearch" goods_id="{{value.goods_id}}">Add</div>
</div>
<div class="total-price">
......
......@@ -125,7 +125,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<input type="text" class="valuep valuepSearch" mult="{{value.mult}}" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<div class="addCar addCarSearch" goods_id="{{value.goods_id}}">Add</div>
</div>
<div class="total-price">
......
<div class="mall-footer">
<div class="floor1 w1200">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30+</b>sku</div>
<div class="itemf3 trl bgbts1"><b>300M+</b>sku</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div>
<div class="row">
......
......@@ -47,7 +47,7 @@
</div>
<div class="floor3">
<div class="row">
<div class="itemf3 trl bgbts1"><b>30+</b>sku</div>
<div class="itemf3 trl bgbts1"><b>300M+</b>sku</div>
<div class="itemf3 trr bgbts2"><b>5000+</b>Suppliers</div>
</div>
<div class="row">
......
......@@ -120,7 +120,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<input type="text" class="valuep valuepSearch" mult="{{value.mult}}" minNum="{{value.moq}}" value="{{value.moq}}" maxNum="{{value.max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<div class="addCar addCarSearch" goods_id="{{value.goods_id}}">Add</div>
</div>
<div class="total-price">
......
......@@ -7,51 +7,73 @@
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
<div class="skubox w1200">
<input type="hidden" id="sku_goods_id" value="{{request()->route('goods_id')}}">
<div class="skubox w1200 skudetailboxs" >
</div>
@include('common.mallFooter')
</div>
@endsection
@verbatim
<script id="DataTmp" type="text/html">
<div class="bread-menu row boxsiz">
<a href="">Home</a>
<a href="/mall">Home</a>
<i>></i>
{{if sku_brand_id}}
<a href="/brand/{{sku_brand_id}}">{{sku_brand_name}}</a>
{{else}}
<a href="/class/{{class_id1}}">{{class_id1_name}}</a>
{{if class_id2}}
<i>></i>
<a href="">Discrete Semiconductor Products</a>
<a href="/class/{{class_id2}}">{{class_id2_name}}</a>
{{/if}}
{{/if}}
<i>></i>
<span>RC0603JR-0710KL</span>
<span>{{goods_name}}</span>
</div>
<div class="cons ">
<div class="detailtop row bothSide">
<div class="left row">
<div>
<div class="imgbox row verCenter">
<img src="{{$public}}/assets/images/common/brand.png" alt="">
<img src="{{goods_images||'/assets/images/common/brand.png'}}">
</div>
<div class="imgtips">Pictures are for reference only.</div>
</div>
<div class="skuinfo">
<div class="h3">RC0603JR-0710KL</div>
<div class="h3">{{goods_name}}</div>
<div class="group-info row">
<div class="label">Manufacturer</div>
<div class="contents">Yageo</div>
<div class="contents">{{brand_name}}</div>
</div>
<div class="group-info row">
<div class="label">Mfr. Part</div>
<div class="contents">RC0603JR-0710KL</div>
<div class="label">Part NO.</div>
<div class="contents">{{goods_name}}</div>
</div>
<div class="group-info row">
<div class="label">Lead Time</div>
<div class="contents">25 Weeks</div>
<div class="contents">{{hk_delivery_time}}</div>
</div>
{{if pdf}}
<div class="group-info row">
<div class="label">Datasheet</div>
<div class="contents">
<a href="" class="pdf">
<a href="{{pdf}}" class="pdf" target="_blank">
<i class="icon iconfont icon-PDF"></i>
</a>
</div>
</div>
{{/if}}
</div>
</div>
<div class="right">
<div class="stores">12,929,452 In Stock</div>
<div class="stores">{{stock}} In Stock</div>
{{if is_buy==1}}
<div class="numtitle">QUANTITY</div>
<input type="text" class="valuep inputval" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<input type="text" class="valuep inputval inputvalskudetail" mult="{{mult}}" minNum="{{moq}}" value="{{moq}}" maxNum="{{max_buy_stock}}" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}">
<div class="pricebox ">
<div class="group-tp row tt">
<div class="lt">QTY</div>
......@@ -59,63 +81,45 @@
<div>TOTAL</div>
</div>
<div class="group-tp row">
<div class="lt">100</div>
<div>$0.613300</div>
<div>$61.33</div>
<div class="lt countskud">{{moq}}</div>
<div>$<span class="skupriced">0.00</span></div>
<div>$<span class="skupricedtotal">0.00</span></div>
</div>
<div class="totalMoney">
$<span>61.33</span>
$<span class="skupricedtotal">0.00</span>
</div>
<div class="butbox row bothSide">
<div class="buts leftbut">Place Order</div>
<div class="buts">ADD to Cart</div>
<div class="buts leftbut skuconfirms" goods_id="{{goods_id}}">Place Order</div>
<div class="buts skuaddcar" goods_id="{{goods_id}}">ADD to Cart</div>
</div>
</div>
{{else}}
<div class="frqbtnxs skufrqbtns">Real-time RFQ</div>
{{/if}}
</div>
</div>
<div class="detailbottom row bothSide">
<div class="left">
<div class="model">Models Suggestions</div>
<div class="more-sku row bothSide">
<div class="sku-group">
<div class="skuimgbox row verCenter">
<img src="{{$public}}/assets/images/common/brand.png" alt="">
</div>
<div>Yageo</div>
<div>RC0603JR-0710KL</div>
<div class="prc">$0.001100</div>
</div>
<div class="sku-group">
<div class="skuimgbox row verCenter">
<img src="{{$public}}/assets/images/common/brand.png" alt="">
</div>
<div>Yageo</div>
<div>RC0603JR-0710KL</div>
<div class="prc">$0.001100</div>
</div>
<div class="sku-group">
{{each push_goods value index}}
<a class="sku-group" href="/sku/{{value.goods_id}}">
<div class="skuimgbox row verCenter">
<img src="{{$public}}/assets/images/common/brand.png" alt="">
</div>
<div>Yageo</div>
<div>RC0603JR-0710KL</div>
<div class="prc">$0.001100</div>
</div>
<div class="sku-group">
<div class="skuimgbox row verCenter">
<img src="{{$public}}/assets/images/common/brand.png" alt="">
</div>
<div>Yageo</div>
<div>RC0603JR-0710KL</div>
<div class="prc">$0.001100</div>
<img src="{{value.goods_images||'/assets/images/common/brand.png'}}">
</div>
<div>{{value.brand_name}}</div>
<div>{{value.goods_name}}</div>
<div class="prc">${{value.price_us}}</div>
</a>
{{/each}}
</div>
</div>
<div class="right">
<div class="jttitle">Pricing(USD)</div>
<div class="qm">
<span>Sales Unit:1</span>
<span>Full Reel:1</span>
<div class="qm row bothSide">
<span>Sales Unit:{{moq}}</span>
<span>Full Reel:{{mult}}</span>
</div>
<div class="jthead row boxsiz">
<div>Qty.</div>
......@@ -123,49 +127,20 @@
<div>Ext. Price</div>
</div>
<div class="jtcon boxsiz boxsiz">
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
{{each ladder_price val i}}
<div class="jtpgroup row jtpgroupxps" purchases="{{val.purchases}}">
<div class="item jti">{{val.purchases}}+</div>
<div class="item">$<span class="jtpcval">{{val.price_us}}</span></div>
<div class="item">${{val.total_us}}</div>
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
{{/each}}
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
</div>
<div class="jtpgroup row ">
<div class="item jti">50000+</div>
<div class="item">$0.001100</div>
<div class="item">$ 0.11</div>
</div>
</div>
</div>
</div>
</div>
</div>
@include('common.mallFooter')
</div>
@endsection
</script>
@endverbatim
@section('js')
<script src="{{$public}}/assets/js/sku/sku.js?v={{time()}}"></script>
......
......@@ -28,7 +28,7 @@
<div class="user-right boxsiz detailbox orderdetailboxs">
</div>
<div class="user-right boxsiz salebox" style="display:none;">
<div class="user-right boxsiz salebox saleboxdata" style="display:none;">
<div class="sale-head row">
<span class="icarrow"><i class="icon iconfont icon-fanhui"></i></span>
<span>After-sales Record</span>
......@@ -38,47 +38,23 @@
<div class="thead row boxsiz">
<div class="th w43">NO.</div>
<div class="th w110">Part NO.</div>
<div class="th w110">Part NO.</div>
<div class="th w100">Manufacturer</div>
<div class="th w100">Price per Unit</div>
<div class="th w80">Quantity</div>
<div class="th w90">Subtotal</div>
<div class="th w130">Type</div>
<div class="th w130">After-sale quantity</div>
<div class="th w110">After-sale Price</div>
<div class="th w90">Amount</div>
</div>
<div class="tbody boxsiz">
<div class="tr row">
<div class="td w43">1</div>
<div class="td w110">STTH1L06A</div>
<div class="td w110">STTH1L06A</div>
<div class="td w100">STTH1L06A</div>
<div class="td w100">$0.011100</div>
<div class="td w80">1000</div>
<div class="td w90">$11.10</div>
<div class="td w130">Return and Refund</div>
<div class="td w130">100</div>
<div class="td w90">$1.10</div>
<div class="tbody boxsiz shboxsd">
</div>
<div class="tr row">
<div class="td w43">1</div>
<div class="td w110">STTH1L06A</div>
<div class="td w110">STTH1L06A</div>
<div class="td w100">STTH1L06A</div>
<div class="td w100">$0.011100</div>
<div class="td w80">1000</div>
<div class="td w90">$11.10</div>
<div class="td w130">Return and Refund</div>
<div class="td w130">100</div>
<div class="td w90">$1.10</div>
</div>
</div>
</div>
<div class="sale-total">Total Refund Amount:$<span>5.50</span></div>
<div class="h4">Shipping Information</div>
<div class="sale-total">Total Refund Amount:$<span class="subtotalsd">0.00</span></div>
<!-- <div class="h4">Shipping Information</div>
<div class="address-group ship">
<div class="info row">
<span class="name">Michael Jordan</span>
......@@ -91,101 +67,20 @@
<span class="defaults">Default address</span>
</div>
<div class="edit-shipping-btn">Edit</div>
</div>
</div> -->
</div>
</div>
</div>
@include('common.mallFooter')
</div>
@endsection
<!--修改地址弹窗-->
<div class="addressPop" style="display:none;">
<div class="inputboxp verifyBox">
<div class="checkbox row">
<div class="check-group row act">
<p class="row verCenter rowCenter">
<font></font>
</p>
<span>Company</span>
</div>
<div class="check-group row ">
<p class="row verCenter rowCenter">
<font></font>
</p>
<span>Personal</span>
</div>
</div>
<div class="input-con">
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>EMAIL</p>
<input type="text">
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>TELEPHONE</p>
<input type="text">
</div>
</div>
<div class="row">
<div class="input-group-auth sm ">
<p class="labelp"><span>*</span>FIRST NAME</p>
<input type="text">
</div>
<div class="input-group-auth sm ml30">
<p class="labelp"><span>*</span>LAST NAME</p>
<input type="text">
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>COMPANY NAME</p>
<input type="text">
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>ADDRESS</p>
<textarea name=""></textarea>
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>COUNTRY/REGIONL</p>
<div class="getCountryBox">
<input type="text" class="getCountry country3 verify" verifyTip='{"type":"null","text":"COUNTRY/REGION"}'>
<div class="conps scrollbar boxsiz countryconent">
<div class="citem">ddd</div>
<div class="citem">ttt</div>
</div>
</div>
</div>
<div class="input-group-auth ml30">
<p class="labelp">PROVINCE</p>
<input type="text">
</div>
</div>
<div class="row">
<div class="input-group-auth">
<p class="labelp"><span>*</span>CITY</p>
<input type="text">
</div>
<div class="input-group-auth ml30">
<p class="labelp"><span>*</span>POST CODE</p>
<input type="text">
</div>
</div>
<div class="tips">Wrong Email Address</div>
<div class="but gobtn gonext">SAVE</div>
</div>
</div>
</div>
@verbatim
<script id="DataTmp" type="text/html">
<div class="head row bothSide">
<div class="row">
<span class="ordersn">Order No#:{{order_sn}}</span>
<a href="javascript:void(0)" class="sale">After-sales Record</a>
<a href="javascript:void(0)" class="sale salego">After-sales Record</a>
</div>
<div class="row" style="display:none">
<a class="down">
......@@ -214,17 +109,17 @@
{{/if}}
<div class="staustime row avarage">
<div class="left8">2022-10-10 12:00:00</div>
<div class="left10">2022-10-10 12:00:00</div>
<div class="left5">2022-10-10 12:00:00</div>
<div class="left8">{{created_time}}</div>
<div class="left10">{{reviewed_time}}</div>
<div class="left5">{{paid_time}}</div>
{{if status==-1}}
<div>取消时间</div>
<div>{{cancel_time}}</div>
{{else}}
<div>2022-10-10 12:00:00</div>
<div>{{delivered_time}}</div>
{{/if}}
<div>2022-10-10 12:00:00</div>
<div class="left1">2022-10-10 12:00:00</div>
<div>{{received_time}}</div>
<div class="left1">{{finish_time}}</div>
</div>
</div>
<div class="h3">Items</div>
......@@ -242,49 +137,29 @@
<div class="th">Remark</div>
</div>
<div class="tbody boxsiz">
{{each items value index}}
<div class="tr row">
<div class="td w47">
1
</div>
<div class="td w155">
STTH1L06A
<div class="pdf">
<i class="icon iconfont icon-PDF"></i>
</div>
</div>
<div class="td w184">Manufacturers:Yageo</div>
<div class="td w120">2-5 workdays</div>
<div class="td w88">
100
</div>
<div class="td w103">10000</div>
<div class="td w100">$0.0011</div>
<div class="td">
<input type="text" value="55555">
</div>
</div>
<div class="tr row">
<div class="td w47">
1
{{index+1}}
</div>
<div class="td w155">
STTH1L06A
<div class="pdf">
{{value.goods_name}}
{{if value.pdf}}
<a class="pdf" href="{{value.pdf}}">
<i class="icon iconfont icon-PDF"></i>
</a>
{{/if}}
</div>
</div>
<div class="td w184">Manufacturers:Yageo</div>
<div class="td w120">2-5 workdays</div>
<div class="td w88">
100
</div>
<div class="td w103">10000</div>
<div class="td w100">$0.0011</div>
<div class="td">
<input type="text" value="55555">
</div>
<div class="td w184">Manufacturers:{{value.brand_name}}</div>
<div class="td w120">{{value.delivery_time}}</div>
<div class="td w88">{{value.goods_number}} </div>
<div class="td w103">${{value.goods_price}}</div>
<div class="td w100">${{value.ext_price}}</div>
<div class="td">{{value.remarks}}</div>
</div>
{{/each}}
</div>
</div>
<div class="bot ">
......@@ -317,6 +192,23 @@
</div>
</div>
</script>
<script id="DataTmp1" type="text/html">
{{each data value index}}
<div class="tr row">
<div class="td w43">{{index+1}}</div>
<div class="td w110">{{value.part_no}}</div>
<div class="td w100">{{value.manufacturer}}</div>
<div class="td w100">${{value.price_per_unit}}</div>
<div class="td w80">{{value.quantity}}</div>
<div class="td w90">${{value.subtotal}}</div>
<div class="td w130">{{value.type}}</div>
<div class="td w130">{{value.after_sale_quantity}}</div>
<div class="td w110">${{value.after_sale_price}}</div>
<div class="td w90">${{value.return_amount}}</div>
</div>
{{/each}}
</script>
@endverbatim
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment