Commit d828902a by 杨树贤

Merge branch 'dev/ver/1.0.0' of http://git.ichunt.net/semour/semour_web into dev/ver/1.0.0

parents b08ae5a4 07cb5345
Showing with 908 additions and 288 deletions
......@@ -63,5 +63,10 @@ class OrderApiController extends Controller
return $this->setSuccessData($result);
}
//单个订单售后列表
public function orderServiceDetail(Request $request){
$result = OrderService::orderServiceDetail($request->user->id,$request->input("order_id"));
return $this->setSuccessData($result);
}
}
......@@ -7,7 +7,7 @@ use Closure;
class CheckApiLogin
{
public $no_login_url = ["api/cart/cartLists","api/cart/cartMyCount"];
public $no_login_url = ["api/cart/saveCart","api/cart/cartLists","api/cart/cartMyCount"];
/**
* Handle an incoming request.
......@@ -20,7 +20,7 @@ class CheckApiLogin
{
if (!\Auth::check() ) {
if (in_array($request->path(),$this->no_login_url)){ //一些接口可以登录或者不登录都可以通行
request()->offsetSet("user",(object)["id"=>0,"gid"=>$request->cookie('sem_gid')]);
request()->offsetSet("user",(object)["id"=>0,"gid"=>\Arr::get($_COOKIE,"sem_gid")]);
return $next($request);
}else{
$response = [
......
......@@ -93,6 +93,11 @@ class CartService
$te = [
"cart_id"=>$cart_id,
"goods_id"=>$goods_id,
"goods_name"=>$skuInfo["goods_name"],
"brand_id"=>$skuInfo["brand_id"],
"brand_name"=>$skuInfo["brand_name"],
"supplier_id"=>$skuInfo["supplier_id"],
"supplier_name"=>$skuInfo["supplier_name"],
"buy_price"=>$buy_price,
"buy_number"=>$buy_number,
"ext_price"=>round($buy_price*$buy_number,2),
......
......@@ -8,6 +8,7 @@ use App\Models\OrderAddressModel;
use App\Models\OrderItemsModel;
use App\Models\OrderModel;
use App\Models\OrderPriceModel;
use App\Models\OrderReturnItemsModel;
use App\Models\UserAddressModel;
use App\Models\UserModel;
use Illuminate\Support\Facades\DB;
......@@ -230,10 +231,11 @@ class OrderService
'order_sn',
'order_amount',
'status',
'create_time',
])
->orderBy('order_id', 'desc');
$param["user_id"] = $user_id;
$query->where("user_id",$user_id);
#拼接搜索
foreach ($param as $a => $b) {
$b = trim($b);
......@@ -260,6 +262,7 @@ class OrderService
if (!$res){
return false;
}
$result = $res["data"];
$orderAddressArr = OrderAddressModel::where("order_address_type",1)->whereIn("order_id", array_column($result, "order_id"))->get()->keyBy("order_id")->toArray(); //地址信息
......@@ -296,11 +299,27 @@ class OrderService
"shipping"=>\Arr::get($priceArr,3,0), //运费
"payment_surcharge"=>\Arr::get($priceArr,5,0), //支付手续费
"merchandise_total"=>$merchandise_total, //商品总额
"sub_total "=>$v["order_amount"], //小计
"sub_total"=>$v["order_amount"], //小计
"create_time"=>date('Y-m-d H:i:s', $v['create_time']), //下单时间
"over_time"=> $v["status"] == OrderModel::status_waiting_pay ? date('Y-m-d H:i:s', $v['create_time']+48*3600):"", //截止时间
];
}
#统计当前用户各个状态数量
$orderCount = OrderModel::select(DB::raw('count(*) as num, status'))
->where("user_id",$user_id)
->groupBy('status')
->get()
->keyby("status")
->toArray();
$statusCount[0] = OrderModel::where(["user_id"=>$user_id])->count();
foreach (OrderModel::$status as $k=>$v){
$statusCount[$k] = \Arr::get(\Arr::get($orderCount,$k),"num",0);
}
return [
"order_count"=>$statusCount,
"bank_info"=>self::$bank_info,
"total"=> $res["total"], //返回总条数
"page"=>$res["current_page"], //第几页
......@@ -325,7 +344,7 @@ class OrderService
return [1003,"error:order status"];
}
$flag = OrderModel::where("order_id",$order_id)->update(["status"=>OrderModel::status_cancel,"update_time"=>time()]);
return $flag ? [0,"cancel order success"]:[1002,"error: cancel order"];
return $flag ? [0,"Cancel order success"]:[1002,"Cancel order failed"];
}
/*
......@@ -355,12 +374,12 @@ class OrderService
$goods_id = $v["goods_id"];
$oneInfo = \Arr::get($goodsInfoArr,$goods_id,[]);
$ext_price = round($v["goods_number"]*$v["goods_price"],2);
$itemsTemp = [
$itemsTemp[] = [
"id"=>$k+1,
"goods_id"=>$v["goods_id"],
"goods_name"=>$v["goods_name"],
"brand_name"=>$v["brand_name"],
"delivery_time"=>$v["delivery_time"],
"delivery_time"=>changeDeliverToEn($v["delivery_time"]),
"pdf"=>\Arr::get($oneInfo,"pdf"),
"goods_number"=>$v["goods_number"],
"goods_price"=>$v["goods_price"],
......@@ -379,12 +398,19 @@ class OrderService
"order_id"=>$order_id,
"order_sn"=>$orderInfo["order_sn"],
"order_amount"=>$orderInfo["order_amount"],
"sub_total "=>$orderInfo["order_amount"], //小计
"sub_total"=>$orderInfo["order_amount"], //小计
"created_time"=>timeToDate($orderInfo["create_time"]), //创建时间
"reviewed_time"=>timeToDate($orderInfo["confirm_time"]), //审核时间
"paid_time"=>timeToDate($orderInfo["pay_time"]), //支付时间
"delivered_time"=>timeToDate($orderInfo["shipping_time"]), //发货时间
"received_time"=>"", //收货时间
"cancel_time"=>timeToDate($orderInfo["cancel_time"]), //订单取消时间
"finish_time"=>"", //交易成功时间
"shipping"=>\Arr::get($priceArr,3,0), //运费
"payment_surcharge"=>\Arr::get($priceArr,5,0), //支付手续费
"merchandise_total"=>$merchandise_total, //商品总额
"status"=>$v["status"],
"status_en"=>\Arr::get(OrderModel::$status,$v["status"],""),
"status"=>$orderInfo["status"],
"status_en"=>\Arr::get(OrderModel::$status,$orderInfo["status"],""),
"shipping_address"=>\Arr::get($orderAddressArr,1,[]),
"billing_address"=>\Arr::get($orderAddressArr,2,[]),
"items"=>$itemsTemp,
......@@ -393,6 +419,39 @@ class OrderService
return $temp;
}
//订单售后详情
public static function orderServiceDetail($user_id,$order_id){
$returnItems = OrderReturnItemsModel::where("order_id",$order_id)->get()->toArray();
if (!$returnItems){
return false;
}
$orderItemsArr = OrderItemsModel::where(["order_id"=>$order_id])
->wherein("rec_id",array_column($returnItems,"rec_id"))
->get()
->keyby("rec_id")
->toArray();
$temp = [];
$return_amount_all = 0;
foreach ($returnItems as $k=>$v){
$orderGoodsInfo = \Arr::get($orderItemsArr,$v["rec_id"]);
$temp[] = [
"no"=>$k+1,
"part_no"=>$orderGoodsInfo["goods_name"], // 型号名称
"manufacturer"=>$orderGoodsInfo["brand_name"], // 品牌名称
"price_per_unit"=>$orderGoodsInfo["goods_price"], // 单价
"quantity"=>$orderGoodsInfo["goods_number"], // 购买数量
"subtotal"=>round($orderGoodsInfo["goods_price"]*$orderGoodsInfo["goods_number"],2), // 金额
"type"=>OrderReturnItemsModel::$types[$v["type"]], // 售后类型
"after_sale_quantity"=>$v["return_num"], // 售后数量
"after_sale_price"=>$v["return_price"], // 售后单价
"return_amount"=>$v["return_amount"], // 售后金额
];
$return_amount_all += $v["return_amount"];
}
return ["return_amount_all"=>$return_amount_all,"items"=>$temp];
}
}
......@@ -30,9 +30,9 @@ class OrderModel extends Model
self::status_cancel => "Cancelled",
self::status_waiting_approval => "Waiting for approval",
self::status_waiting_pay => "Waiting for payment",
self::status_waiting_end_pay => "",
//self::status_waiting_end_pay => "",
self::status_waiting_send => " Waiting for dispatch",
self::status_waiting_half_send => "",
// self::status_waiting_half_send => "",
self::status_waiting_delivery => "Waiting for delivery",
self::status_complete => "Transaction Complete",
];
......
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class OrderReturnItemsModel extends Model
{
protected $table = 'order_return_items';
protected $primaryKey = 'return_items_id';
public $timestamps = false;
//`type` '1退货退款 2仅退款',
const types_return_refund = 1;
const types_refund = 2;
static $types = [
self::types_refund => "Refund",
self::types_return_refund => "Return And Refund"
];
}
......@@ -109,3 +109,37 @@ function getRate($k = "美元")
$redis = Redis::connection();
return $redis->hget('erp_rate', $k);
}
/*
* 时间传换
*/
function timeToDate($timestr){
return $timestr >0 ? date("Y-m-d H:i:s",$timestr) : "";
}
/*
* 工作日或者周转换英文
*/
function changeDeliverToEn($delivery_time){
$day_filter = ["工作日","个工作日","日"];
$week_filter = ["周"];
//货区去掉工作日
$hk_delivery_time_origin = $delivery_time;
$delivery_time = str_replace("工作日","",$delivery_time);
$delivery_time = str_replace("个","",$delivery_time);
#工作日转换
foreach ($day_filter as $d){
if (strpos($hk_delivery_time_origin,$d) !== false){
$delivery_time = $delivery_time." workdays";
break;
}
}
#周转换
foreach ($week_filter as $d){
if (strpos($hk_delivery_time_origin,$d) !== false){
$delivery_time = $delivery_time." weeks";
break;
}
}
return $delivery_time;
}
......@@ -104,7 +104,7 @@
}
}
.pdf{color:#F68332;font-size: 20px;}
.pdf{color:#F68332;font-size: 20px;margin-left: 10px;}
.sx{
width: 100px;
height: 20px;
......@@ -142,7 +142,7 @@
padding-top: 20px;
.top{
width: 298px;
height: 180px;
height: 90px;
background: #DFEAFA;
border-radius: 8px;
padding:0 4px;
......
.carbox .cons{background:#fff;padding:19px}.carbox .cons .titles{border-bottom:3px solid #164D9A;border-radius:2px;font-size:16px;color:#222;font-weight:bold;padding-bottom:7px;padding-top:10px;width:134px;text-align:center}.carbox .cons .section .left{width:842px}.carbox .cons .section .left .list-table{width:842px;border-radius:0px 0px 8px 8px;margin-top:20px}.carbox .cons .section .left .list-table .w46{width:46px}.carbox .cons .section .left .list-table .w98{width:98px}.carbox .cons .section .left .list-table .w183{width:183px}.carbox .cons .section .left .list-table .w119{width:119px}.carbox .cons .section .left .list-table .w93{width:93px}.carbox .cons .section .left .list-table .w110{width:110px}.carbox .cons .section .left .list-table .w92{width:92px}.carbox .cons .section .left .list-table .check-group{color:#555;font-size:16px;cursor:pointer}.carbox .cons .section .left .list-table .check-group .check{width:14px;height:14px;border:1px solid #164D9A;border-radius:4px;text-align:center;line-height:14px}.carbox .cons .section .left .list-table .check-group .check i{color:#164D9A;font-size:12px;display:none}.carbox .cons .section .left .list-table .check-group span{color:#555;font-size:14px;margin-left:5px}.carbox .cons .section .left .list-table .check-group.act .check i{display:inline}.carbox .cons .section .left .list-table .thead{height:38px;background:#DFEAFA;line-height:38px;border-radius:8px 8px 0px 0px;padding:0 15px}.carbox .cons .section .left .list-table .thead .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.carbox .cons .section .left .list-table .tbody{font-size:14px;color:#555;background:#F7FAFF}.carbox .cons .section .left .list-table .tbody input{width:64px;height:26px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;line-height:26px;color:#333}.carbox .cons .section .left .list-table .tbody .tr{line-height:20px;border-bottom:1px solid #DFEAFA;padding:20px 15px;box-sizing:border-box}.carbox .cons .section .left .list-table .tbody .tr .td{word-break:break-all;box-sizing:border-box;padding-right:5px}.carbox .cons .section .left .list-table .tbody .tr:last-child{border:0px}.carbox .cons .section .left .list-table .tbody .tr.sxbox{background:rgba(51,51,51,0.2)}.carbox .cons .section .left .list-table .tbody .tr.sxbox input{background:none;border:1px solid #BCBCBC}.carbox .cons .section .left .list-table .tbody .pdf{color:#F68332;font-size:20px}.carbox .cons .section .left .list-table .tbody .sx{width:100px;height:20px;border:1px solid #EE1919;border-radius:14px;color:#EE1919;font-size:14px;text-align:center;line-height:20px;position:relative;top:1px}.carbox .cons .section .left .list-table .tfoot{width:842px;height:38px;line-height:38px;background:#DFEAFA;padding:0 15px;box-shadow:0 0 10px 0 rgba(0,0,0,0.15);border-radius:8px;font-size:13px;color:#555;margin-top:13px}.carbox .cons .section .left .list-table .tfoot .fw{font-weight:bold}.carbox .cons .section .left .list-table .tfoot .selectcount{margin-left:80px;margin-right:60px}.carbox .cons .section .left .list-table .tfoot .del{cursor:pointer}.carbox .cons .section .right{width:298px;padding-top:20px}.carbox .cons .section .right .top{width:298px;height:180px;background:#DFEAFA;border-radius:8px;padding:0 4px}.carbox .cons .section .right .top .itemsp{height:45px;line-height:45px;color:#333;font-size:14px;border-bottom:1px solid #fff;padding:0 17px}.carbox .cons .section .right .top .itemsp span{font-weight:bold}.carbox .cons .section .right .create{width:298px;height:32px;line-height:32px;background:#164D9A;text-align:center;border-radius:8px;font-size:14px;color:#fff;cursor:pointer;margin-top:20px}.carbox .cons .section .right .lgtips{font-size:14px;color:#555;margin-top:12px}.carbox .cons .section .right .lgtips a{color:#164D9A}.carbox .cons .section .right .bannerc img{width:298px;height:321px;margin-top:24px}
\ No newline at end of file
.carbox .cons{background:#fff;padding:19px}.carbox .cons .titles{border-bottom:3px solid #164D9A;border-radius:2px;font-size:16px;color:#222;font-weight:bold;padding-bottom:7px;padding-top:10px;width:134px;text-align:center}.carbox .cons .section .left{width:842px}.carbox .cons .section .left .list-table{width:842px;border-radius:0px 0px 8px 8px;margin-top:20px}.carbox .cons .section .left .list-table .w46{width:46px}.carbox .cons .section .left .list-table .w98{width:98px}.carbox .cons .section .left .list-table .w183{width:183px}.carbox .cons .section .left .list-table .w119{width:119px}.carbox .cons .section .left .list-table .w93{width:93px}.carbox .cons .section .left .list-table .w110{width:110px}.carbox .cons .section .left .list-table .w92{width:92px}.carbox .cons .section .left .list-table .check-group{color:#555;font-size:16px;cursor:pointer}.carbox .cons .section .left .list-table .check-group .check{width:14px;height:14px;border:1px solid #164D9A;border-radius:4px;text-align:center;line-height:14px}.carbox .cons .section .left .list-table .check-group .check i{color:#164D9A;font-size:12px;display:none}.carbox .cons .section .left .list-table .check-group span{color:#555;font-size:14px;margin-left:5px}.carbox .cons .section .left .list-table .check-group.act .check i{display:inline}.carbox .cons .section .left .list-table .thead{height:38px;background:#DFEAFA;line-height:38px;border-radius:8px 8px 0px 0px;padding:0 15px}.carbox .cons .section .left .list-table .thead .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.carbox .cons .section .left .list-table .tbody{font-size:14px;color:#555;background:#F7FAFF}.carbox .cons .section .left .list-table .tbody input{width:64px;height:26px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:4px;line-height:26px;color:#333}.carbox .cons .section .left .list-table .tbody .tr{line-height:20px;border-bottom:1px solid #DFEAFA;padding:20px 15px;box-sizing:border-box}.carbox .cons .section .left .list-table .tbody .tr .td{word-break:break-all;box-sizing:border-box;padding-right:5px}.carbox .cons .section .left .list-table .tbody .tr:last-child{border:0px}.carbox .cons .section .left .list-table .tbody .tr.sxbox{background:rgba(51,51,51,0.2)}.carbox .cons .section .left .list-table .tbody .tr.sxbox input{background:none;border:1px solid #BCBCBC}.carbox .cons .section .left .list-table .tbody .pdf{color:#F68332;font-size:20px;margin-left:10px}.carbox .cons .section .left .list-table .tbody .sx{width:100px;height:20px;border:1px solid #EE1919;border-radius:14px;color:#EE1919;font-size:14px;text-align:center;line-height:20px;position:relative;top:1px}.carbox .cons .section .left .list-table .tfoot{width:842px;height:38px;line-height:38px;background:#DFEAFA;padding:0 15px;box-shadow:0 0 10px 0 rgba(0,0,0,0.15);border-radius:8px;font-size:13px;color:#555;margin-top:13px}.carbox .cons .section .left .list-table .tfoot .fw{font-weight:bold}.carbox .cons .section .left .list-table .tfoot .selectcount{margin-left:80px;margin-right:60px}.carbox .cons .section .left .list-table .tfoot .del{cursor:pointer}.carbox .cons .section .right{width:298px;padding-top:20px}.carbox .cons .section .right .top{width:298px;height:90px;background:#DFEAFA;border-radius:8px;padding:0 4px}.carbox .cons .section .right .top .itemsp{height:45px;line-height:45px;color:#333;font-size:14px;border-bottom:1px solid #fff;padding:0 17px}.carbox .cons .section .right .top .itemsp span{font-weight:bold}.carbox .cons .section .right .create{width:298px;height:32px;line-height:32px;background:#164D9A;text-align:center;border-radius:8px;font-size:14px;color:#fff;cursor:pointer;margin-top:20px}.carbox .cons .section .right .lgtips{font-size:14px;color:#555;margin-top:12px}.carbox .cons .section .right .lgtips a{color:#164D9A}.carbox .cons .section .right .bannerc img{width:298px;height:321px;margin-top:24px}
\ No newline at end of file
......@@ -446,6 +446,7 @@
line-height: 40px;
margin:0 auto;
margin-top: 24px;
cursor: pointer;
}
}
......
......@@ -80,7 +80,7 @@
position: absolute;
width: 160px;
background: #FFFFFF;
top:19px;
top:17px;
left:0px;
box-shadow: 0px 0px 5px #ccc;
padding:15px 0px;
......@@ -855,7 +855,7 @@
&.lastitem{border:0px;}
p {
&.w150{width:150px;}
font-size : 14px;
font-size : 15px;
font-weight : bold;
margin-bottom: 26px;
}
......@@ -1002,5 +1002,42 @@
}
}
}
/**分页**/
.M-pagebox{
margin-top: 20px;
span,a{
width: 32px;
height: 32px;
background: #FAFAFA;
border: 1px solid #DFEAFA;
border-radius: 4px;
margin-left: 9px;
color:#555;
font-size: 14px;
cursor: pointer;
text-align: center;
box-sizing: border-box;
line-height: 32px;
text-align: center;
}
span.active{
background: #DFEAFA;
border: 1px solid #164D9A;
}
input{
width: 52px;
height: 32px;
background: #FAFAFA;
border: 1px solid #DFEAFA;
text-align: center;
line-height: 32px;
margin-left: 9px;
padding:0px;
box-sizing: border-box;
color:#555;
font-size: 14px;
}
}
}
.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
......@@ -70,12 +70,13 @@
.list-table{
.tr{
margin-bottom: 10px;
.w159{width:159px;}
.w98{width:98px;}
.w159{width:189px;}
.w98{width:108px;}
.w168{width:168px;}
.w189{width:189px;}
.w239{width:239px;}
.w189{width:239px;}
.w239{width:309px;}
.w150{width:150px;}
cursor: pointer;
.titletr{
height:48px;
background: #DFEAFA;
......@@ -107,7 +108,7 @@
}
.td-group{
padding:12px 19px;
line-height: 20px;
.td{
font-size: 14px;
color:#555;
......@@ -140,4 +141,16 @@
}
}
}
}
.paybox{
.pcons{
color:#fff;
font-size: 16px;
line-height: 30px;
padding-left:30px;
box-sizing: border-box;
.h6{color:#F68332;font-weight: bold;font-size: 18px;}
}
}
\ No newline at end of file
.orderbox .search-shit{width:230px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:8px;position:relative;top:-5px}.orderbox .search-shit span.icon{position:absolute;right:0px;top:-1px;width:50px;height:32px;background:#164D9A;text-align:center;line-height:32px;border-radius:0px 8px 8px 0px;cursor:pointer}.orderbox .search-shit span.icon i{font-size:18px;color:#fff}.orderbox .search-shit input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:15px;width:182px}.orderbox .user-right{width:1024px;min-height:500px;background:#FFFFFF;padding:18px 12px}.orderbox .user-right .nav{width:950px;border-bottom:1px solid #DFEAFA;margin-bottom:16px}.orderbox .user-right .nav .item{height:38px;font-size:14px;color:#555;text-align:center;box-sizing:border-box;padding:0px 20px;cursor:pointer}.orderbox .user-right .nav .item .tt{width:80px}.orderbox .user-right .nav .item span{height:34px;line-height:38px}.orderbox .user-right .nav .item:first-child{line-height:38px}.orderbox .user-right .nav .item:last-child{line-height:38px}.orderbox .user-right .nav .item.act{font-weight:bold;color:#222;border-bottom:4px solid #164D9A}.orderbox .user-right .list-table .tr{margin-bottom:10px}.orderbox .user-right .list-table .tr .w159{width:159px}.orderbox .user-right .list-table .tr .w98{width:98px}.orderbox .user-right .list-table .tr .w168{width:168px}.orderbox .user-right .list-table .tr .w189{width:189px}.orderbox .user-right .list-table .tr .w239{width:239px}.orderbox .user-right .list-table .tr .w150{width:150px}.orderbox .user-right .list-table .tr .titletr{height:48px;background:#DFEAFA;border-radius:4px 4px 0px 0px;font-size:14px;color:#555;padding:0 18px;line-height:48px}.orderbox .user-right .list-table .tr .titletr .ordersn{margin:0 40px}.orderbox .user-right .list-table .tr .titletr .fo{color:#F68332}.orderbox .user-right .list-table .tr .titletr .down{margin-left:30px;color:#555;cursor:pointer}.orderbox .user-right .list-table .tr .titletr .down:hover{color:#164D9A}.orderbox .user-right .list-table .tr .contr{background:#F7FAFF}.orderbox .user-right .list-table .tr .contr .th-group{height:39px;line-height:39px;padding:0 19px;border-bottom:1px solid #DFEAFA}.orderbox .user-right .list-table .tr .contr .th-group .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.orderbox .user-right .list-table .tr .contr .td-group{padding:12px 19px}.orderbox .user-right .list-table .tr .contr .td-group .td{font-size:14px;color:#555;box-sizing:border-box;padding-right:5px;word-break:break-all}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi{width:96px;height:30px;background:#164D9A;border-radius:4px;color:#fff;font-size:14px;line-height:30px;text-align:center;cursor:pointer;box-sizing:border-box;margin-bottom:6px}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi.paybtn{background:#F68332}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi.cancelbtn{background:#fff;color:#555;border:1px solid #DFEAFA}
\ No newline at end of file
.orderbox .search-shit{width:230px;height:32px;background:#FAFAFA;border:1px solid #DFEAFA;border-radius:8px;position:relative;top:-5px}.orderbox .search-shit span.icon{position:absolute;right:0px;top:-1px;width:50px;height:32px;background:#164D9A;text-align:center;line-height:32px;border-radius:0px 8px 8px 0px;cursor:pointer}.orderbox .search-shit span.icon i{font-size:18px;color:#fff}.orderbox .search-shit input{background:#fff;display:block;height:30px;line-height:30px;color:#333;padding-left:15px;width:182px}.orderbox .user-right{width:1024px;min-height:500px;background:#FFFFFF;padding:18px 12px}.orderbox .user-right .nav{width:950px;border-bottom:1px solid #DFEAFA;margin-bottom:16px}.orderbox .user-right .nav .item{height:38px;font-size:14px;color:#555;text-align:center;box-sizing:border-box;padding:0px 20px;cursor:pointer}.orderbox .user-right .nav .item .tt{width:80px}.orderbox .user-right .nav .item span{height:34px;line-height:38px}.orderbox .user-right .nav .item:first-child{line-height:38px}.orderbox .user-right .nav .item:last-child{line-height:38px}.orderbox .user-right .nav .item.act{font-weight:bold;color:#222;border-bottom:4px solid #164D9A}.orderbox .user-right .list-table .tr{margin-bottom:10px;cursor:pointer}.orderbox .user-right .list-table .tr .w159{width:189px}.orderbox .user-right .list-table .tr .w98{width:108px}.orderbox .user-right .list-table .tr .w168{width:168px}.orderbox .user-right .list-table .tr .w189{width:239px}.orderbox .user-right .list-table .tr .w239{width:309px}.orderbox .user-right .list-table .tr .w150{width:150px}.orderbox .user-right .list-table .tr .titletr{height:48px;background:#DFEAFA;border-radius:4px 4px 0px 0px;font-size:14px;color:#555;padding:0 18px;line-height:48px}.orderbox .user-right .list-table .tr .titletr .ordersn{margin:0 40px}.orderbox .user-right .list-table .tr .titletr .fo{color:#F68332}.orderbox .user-right .list-table .tr .titletr .down{margin-left:30px;color:#555;cursor:pointer}.orderbox .user-right .list-table .tr .titletr .down:hover{color:#164D9A}.orderbox .user-right .list-table .tr .contr{background:#F7FAFF}.orderbox .user-right .list-table .tr .contr .th-group{height:39px;line-height:39px;padding:0 19px;border-bottom:1px solid #DFEAFA}.orderbox .user-right .list-table .tr .contr .th-group .th{font-size:14px;color:#333;font-weight:bold;box-sizing:border-box;padding-right:5px}.orderbox .user-right .list-table .tr .contr .td-group{padding:12px 19px;line-height:20px}.orderbox .user-right .list-table .tr .contr .td-group .td{font-size:14px;color:#555;box-sizing:border-box;padding-right:5px;word-break:break-all}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi{width:96px;height:30px;background:#164D9A;border-radius:4px;color:#fff;font-size:14px;line-height:30px;text-align:center;cursor:pointer;box-sizing:border-box;margin-bottom:6px}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi.paybtn{background:#F68332}.orderbox .user-right .list-table .tr .contr .td-group .td .btnsi.cancelbtn{background:#fff;color:#555;border:1px solid #DFEAFA}.paybox .pcons{color:#fff;font-size:16px;line-height:30px;padding-left:30px;box-sizing:border-box}.paybox .pcons .h6{color:#F68332;font-weight:bold;font-size:18px}
\ No newline at end of file
......@@ -79,6 +79,9 @@
&.step6 {
background: url(../../images/user/step6.png) no-repeat;
}
&.step7 {
background: url(../../images/user/step7.png) no-repeat;
}
}
.staustime {
......
......@@ -8,14 +8,13 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
limit: 10,
init: function () {
brandlist.handle();
brandlist.pagehandle();
brandlist.getData()
},
getData: function () {
var data_ = {
page: brandlist.page,
page_size: brandlist.limit,
"brand_name/like":$("#brandvalxsp").text()
"brand_id/eq":$("#brandvalxsp").attr("guid")
}
if ($(".eqsort").hasClass("act")) {
data_["goods_name/eq"] = $(".mallbrandlistvalx").val()
......@@ -49,7 +48,9 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
return
}
var json_ = {
data: dataArr
data: dataArr,
brand_id:$("#brandvalxsp").attr("guid"),
brand_name:$("#brandvalxsp").text()
}
var html = template('DataTmp', json_);
$(".data-td").html(html);
......@@ -59,12 +60,21 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
})
//分页初始化
$('.M-pagebox').pagination({
coping: false,
homePage: '<<',
endPage: '>>',
totalData: res.data.total,
showData: res.data.page_size,
current: res.data.page
showData: Number(res.data.page_size),
coping: true,
prevContent: '<',
nextContent: '>',
jump: true,
jumpBtn:"Go",
keepShowPN:true,
current: Number(res.data.page),
isHide:true,
callback: function (api) {
brandlist.page=api.getCurrent()
brandlist.getData();
}
});
} else {
tool.NoData(".data-td")
......@@ -97,36 +107,49 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
}
brandlist.getData()
})
//copy
$("body").on("click", ".copyname", function () {
$("#domainxksearch").val($(this).attr("goods_name"));
var copyobject = document.getElementById("domainxksearch");
copyobject.select();
document.execCommand("Copy");
liexin_pop.Tip({ title: "Copy Success" })
})
//输入数量
$("body").on("input", '.valuepsearch', tool.debounce(function (e) {
$("body").on("input", '.valuepSearch', tool.debounce(function (e) {
var num = $(this).val();
var max_num=Number($(this).attr("maxNum"));
var min_num=Number($(this).attr("minNum"));
if(num>max_num){
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 })
liexin_pop.Tip({ title: "At Most " + max_num })
return
}
if(num<min_num){
if (num < min_num) {
$(this).val(min_num)
liexin_pop.Tip({ title: "At Least "+min_num })
liexin_pop.Tip({ title: "At Least " + min_num })
return
}
}, 300))
brandlist.onePriceRow($(this).parents(".td-group"))
}, 600))
//加购物车
$("body").on("click",".addCarsearch",function(){
var data_=[{
goods_id:$(this).attr("goods_id"),
buy_number:$(this).prev(".valuepsearch").val()
}]
$.liexin_ajax('/api/cart/saveCart', 'POST', {items:JSON.stringify(data_)}, function (res) {
$("body").on("click", ".addCarSearch", function () {
var data_ = {
goods_id: $(this).attr("goods_id"),
buy_number: $(this).prev(".valuepSearch").val()
}
$.liexin_ajax('/api/cart/saveCart', 'POST', data_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg })
tool.getCarNum()
} else {
liexin_pop.Tip({ title: res.msg })
}
})
......@@ -137,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");
......@@ -173,24 +196,9 @@ define('brandlist', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], functio
//计算合计价格
var ac_price = obj.find(".price-group.act").find(".jtpc").text().replace(/\s/g, "")
var ac_price = obj.find(".price-group.act").find(".jtpcval").text()
obj.find(".totalrow").text(((ac_price * value_) || 0).toFixed(2))
},
pagehandle: function () {
$("body").on("click", ".M-pagebox a", function () {
if ($(this).attr("data-page")) {
brandlist.page = $(this).attr("data-page");
} else {
if ($(this).hasClass("prev")) {
brandlist.page = brandlist.page - 1;
} else if ($(this).hasClass("next")) {
brandlist.page = brandlist.page + 1;
}
}
brandlist.getData();
})
},
}
module.exports = brandlist.init();
})
......
define('car', ['tool', 'liexin_pop', 'artTemplate'], function (require, exports, module) {
var tool = require("tool");
var liexin_pop = require("liexin_pop");
var artTemplate = require("artTemplate");
var car = {
init: function () {
car.handle();
car.getData()
},
getData: function () {
$.liexin_ajax('/api/cart/cartLists', 'POST', {}, function (res) {
if (res.code == 0) {
var dataArr = res.data.lists || [];
$(".selectcount b").html(res.data.total || 0)
if (dataArr.length == 0) {
tool.NoData(".tbody")
return
}
var json_ = {
data: dataArr
}
var html = template('DataTmp', json_);
$(".tbody").html(html);
//阶梯价格 合计价格初始化
car.priceInit();
} else {
tool.NoData(".tbody")
liexin_pop.Tip({ title: res.msg })
}
})
},
priceInit:function(){
var pr=0;
var leng=0;
$(".tbody .check-group.act").each(function(){
var parents=$(this).parents(".tr")
if(!parents.hasClass("sxbox")){
leng++;
pr+=Number(parents.find(".rowxj").text())
}
})
$(".selectcount b").text(leng)
$(".goods_total").text(pr.toFixed(2))
$(".pay_total").text(pr.toFixed(2))
},
handle: function () {
//选中
$(".carbox").on("click",".check-group",function(){
if($(this).hasClass("selectall")){
if($(this).hasClass("act")){
$(".carbox .check-group").removeClass("act")
}else{
$(".carbox .check-group").addClass("act")
}
}else{
$(this).toggleClass("act")
}
car.priceInit();
})
//修改数量
$("body").on("input", '.valuep', tool.debounce(function (e) {
var num = $(this).val();
var parents=$(this).parents(".tr")
var max_num=Number($(this).attr("maxNum"));
var min_num=Number($(this).attr("minNum"));
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
}
var data_={
goods_id:$(this).attr("goods_id"),
buy_number:$(this).val()
}
$.liexin_ajax('/api/cart/saveCart', 'POST', data_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg },function(){
parents.find(".rowdj").text(res.data.buy_price)
parents.find(".rowxj").text(res.data.ext_price)
car.priceInit();
})
} else {
liexin_pop.Tip({ title: res.msg })
}
})
}, 300))
//删除购物车
$(".delcarsd").click(function(){
var arr_=[]
$(".tbody .check-group.act").each(function(){
var parents=$(this).parents(".tr")
if(!parents.hasClass("sxbox")){
arr_.push(parents.attr("cart_id"))
}
})
if(arr_.length==0){
liexin_pop.Tip({ title: "No Selected" })
return
}
liexin_pop.Confirm({title:"Are you sure to delete the cars",success:function(ele){
$.liexin_ajax('/api/cart/cartDelete', 'POST', {cart_id:arr_.join(",")}, function (res) {
if (res.code === 0) {
liexin_pop.Tip({ title: res.msg },function(){
car.getData()
})
} else {
liexin_pop.Tip({ title: res.msg })
}
})
}})
})
//下单
$(".createcarbtn").click(function(){
if (!tool.isLogin()) {
liexin_pop.LoginPop({},function(){
car.createOrder()
})
return
}
car.createOrder()
})
},
createOrder:function(){
var arr_=[]
$(".tbody .check-group.act").each(function(){
var parents=$(this).parents(".tr")
if(!parents.hasClass("sxbox")){
arr_.push(parents.attr("cart_id"))
}
})
if(arr_.length==0){
liexin_pop.Tip({ title: "No Data" })
return
}
tool.setCookie("car_xk", arr_.join(","), 1)
window.location.href="/confirm"
}
}
module.exports = car.init();
})
seajs.use(['car'])
\ No newline at end of file
......@@ -3,28 +3,27 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
var liexin_pop = require("liexin_pop");
var artTemplate = require("artTemplate");
var pagination = require('pagination');
var class_p = {
page: 1,
limit: 10,
init: function () {
class_p.handle();
class_p.pagehandle();
class_p.getData()
},
getData: function () {
var data_ = {
page: class_p.page,
page_size: class_p.limit,
"class_id1/eq":$("#class_id_two").val(),
"brand_name/like":$(".brandvals").val()
"class_id1/eq": $("#class_id_two").val(),
"brand_name/like": $(".brandvals").val()
}
if ($(".eqsort").hasClass("act")) {
data_["goods_name/eq"] = $(".classsearchvals").val()
} else {
data_["goods_name/like"] = $(".classsearchvals").val()
}
if($("#class_id_three").val()){
if ($("#class_id_three").val()) {
data_["class_id2/eq"] = $("#class_id_three").val()
}
$.liexin_ajax(SO_URL + '/semour/skuLists', 'POST', data_, function (res) {
......@@ -46,12 +45,21 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
})
//分页初始化
$('.M-pagebox').pagination({
coping: false,
homePage: '<<',
endPage: '>>',
totalData: res.data.total,
showData: res.data.page_size,
current: res.data.page
showData: Number(res.data.page_size),
coping: true,
prevContent: '<',
nextContent: '>',
jump: true,
jumpBtn:"Go",
keepShowPN:true,
current: Number(res.data.page),
isHide:true,
callback: function (api) {
class_p.page=api.getCurrent()
class_p.getData();
}
});
} else {
tool.NoData(".data-td")
......@@ -61,36 +69,38 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
},
handle: function () {
//搜索BTN
$(".searchbq").click(function(){
$(".searchbq").click(function () {
class_p.page=1;
class_p.getData()
})
//重置
$(".resetst").click(function(){
$(".resetst").click(function () {
$(".classsearchvals").val("");
$(".eqsort").removeClass("act")
})
//排序操作
$(".checksearchsz").click(function () {
$(this).toggleClass("act")
class_p.page=1;
class_p.getData()
})
//品牌匹配
$("body").on("input", '.brandvals', tool.debounce(function (e) {
$(".brandvals").attr("guid","")
if(!$(this).val()){
$(".brandvals").attr("guid", "")
if (!$(this).val()) {
$(".brand-box .bcon").hide();
return
}
$.liexin_ajax('/api/brand/list', 'GET', { brand_name: $(this).val() }, function (res) {
if (res.code == 0) {
var arr_=res.data||[];
if(arr_.length==0){
var arr_ = res.data || [];
if (arr_.length == 0) {
$(".brand-box .bcon").hide();
return
}
var html_="";
for(var i=0;i<arr_.length;i++){
html_+='<p class="itembranssearch" guid="'+arr_[i].standard_brand_id+'">'+arr_[i].brand_name_en+'</p>'
var html_ = "";
for (var i = 0; i < arr_.length; i++) {
html_ += '<p class="itembranssearch" guid="' + arr_[i].standard_brand_id + '">' + arr_[i].brand_name_en + '</p>'
}
$(".brand-box .bcon").html(html_).show()
} else {
......@@ -101,15 +111,27 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
}, 300))
$("body").on("click",".itembranssearch",function(){
$(".brandvals").val($(this).text()).attr("guid",$(this).attr("guid"))
$("body").on("click", ".itembranssearch", function () {
$(".brandvals").val($(this).text()).attr("guid", $(this).attr("guid"))
$(".brand-box .bcon").hide();
})
//copy
$("body").on("click", ".copyname", function () {
$("#domainxksearch").val($(this).attr("goods_name"));
var copyobject = document.getElementById("domainxksearch");
copyobject.select();
document.execCommand("Copy");
liexin_pop.Tip({ title: "Copy Success" })
})
//输入数量
$("body").on("input", '.valuepSearch', 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 })
......@@ -121,14 +143,16 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
return
}
}, 300))
class_p.onePriceRow($(this).parents(".td-group"))
}, 600))
//加购物车
$("body").on("click", ".addCarSearch", function () {
var data_ = [{
var data_ = {
goods_id: $(this).attr("goods_id"),
buy_number: $(this).prev(".valuepSearch").val()
}]
$.liexin_ajax('/api/cart/saveCart', 'POST', { items: JSON.stringify(data_) }, function (res) {
}
$.liexin_ajax('/api/cart/saveCart', 'POST', data_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg })
tool.getCarNum()
......@@ -144,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");
......@@ -180,26 +204,12 @@ define('class_p', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function
//计算合计价格
var ac_price = obj.find(".price-group.act").find(".jtpc").text().replace(/\s/g, "")
var ac_price = obj.find(".price-group.act").find(".jtpcval").text()
obj.find(".totalrow").text(((ac_price * value_) || 0).toFixed(2))
},
pagehandle: function () {
$("body").on("click", ".M-pagebox a", function () {
if ($(this).attr("data-page")) {
class_p.page = $(this).attr("data-page");
} else {
if ($(this).hasClass("prev")) {
class_p.page = class_p.page - 1;
} else if ($(this).hasClass("next")) {
class_p.page = class_p.page + 1;
}
}
class_p.getData();
})
},
}
module.exports = class_p.init();
module.exports = class_p.init();
})
......
......@@ -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 () {
......
......@@ -8,9 +8,9 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
limit: 10,
init: function () {
search.handle();
search.pagehandle();
search.getData()
},
getData: function () {
var data_ = {
page: search.page,
......@@ -40,6 +40,7 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
}
}
$.liexin_ajax(SO_URL + '/semour/skuLists', 'POST', data_, function (res) {
console.log(res)
if (res.code == 0) {
var dataArr = res.data.lists || [];
$(".searchCount").html(res.data.total || 0)
......@@ -58,12 +59,21 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
})
//分页初始化
$('.M-pagebox').pagination({
coping: false,
homePage: '<<',
endPage: '>>',
totalData: res.data.total,
showData: res.data.page_size,
current: res.data.page
showData: Number(res.data.page_size),
coping: true,
prevContent: '<',
nextContent: '>',
jump: true,
jumpBtn:"Go",
keepShowPN:true,
current: Number(res.data.page),
isHide:true,
callback: function (api) {
search.page=api.getCurrent()
search.getData();
}
});
} else {
tool.NoData(".data-td")
......@@ -75,6 +85,7 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
//排序操作
$(".checksearchsz").click(function () {
$(this).toggleClass("act")
search.page=1;
search.getData()
})
......@@ -90,14 +101,27 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
$(this).removeClass("bottom")
}
}
search.page=1;
search.getData()
})
//copy
$("body").on("click",".copyname",function(){
$("#domainxksearch").val($(this).attr("goods_name"));
var copyobject = document.getElementById("domainxksearch");
copyobject.select();
document.execCommand("Copy");
liexin_pop.Tip({ title: "Copy Success"})
})
//输入数量
$("body").on("input", '.valuepSearch', 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 })
......@@ -109,14 +133,16 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
return
}
}, 300))
search.onePriceRow($(this).parents(".td-group"))
}, 600))
//加购物车
$("body").on("click",".addCarSearch",function(){
var data_=[{
var data_={
goods_id:$(this).attr("goods_id"),
buy_number:$(this).prev(".valuepSearch").val()
}]
$.liexin_ajax('/api/cart/saveCart', 'POST', {items:JSON.stringify(data_)}, function (res) {
}
$.liexin_ajax('/api/cart/saveCart', 'POST',data_, function (res) {
if (res.code == 0) {
liexin_pop.Tip({ title: res.msg })
tool.getCarNum()
......@@ -132,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");
......@@ -168,24 +194,9 @@ define('search', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (
//计算合计价格
var ac_price = obj.find(".price-group.act").find(".jtpc").text().replace(/\s/g, "")
var ac_price = obj.find(".price-group.act").find(".jtpcval").text();
obj.find(".totalrow").text(((ac_price * value_) || 0).toFixed(2))
},
pagehandle: function () {
$("body").on("click", ".M-pagebox a", function () {
if ($(this).attr("data-page")) {
search.page = $(this).attr("data-page");
} else {
if ($(this).hasClass("prev")) {
search.page = search.page - 1;
} else if ($(this).hasClass("next")) {
search.page = search.page + 1;
}
}
search.getData();
})
},
}
module.exports = search.init();
})
......
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
......@@ -199,7 +199,7 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi
if (guid_) {
//编辑逻辑
$(".addressPop").find(".addressPopBtn").attr("guid",guid_)
getAddressDetail(guid_)
account.getAddressDetail(guid_)
}
}
})
......@@ -287,7 +287,7 @@ define('account', ['tool', 'liexin_pop', 'form', 'artTemplate'], function (requi
}
$(".addressPop .email6").val(res.data.email)
$(".addressPop .telephone6").val(res.data.phone)
$(".addressPop .country6").val(res.data.country).attr(res.data.country)
$(".addressPop .country6").val(res.data.country).attr("guid",res.data.country_id)
$(".addressPop .last_name6").val(res.data.last_name)
$(".addressPop .first_name6").val(res.data.first_name)
$(".addressPop .company_name6").val(res.data.company_name)
......
define('order', ['tool', 'liexin_pop', 'artTemplate', 'pagination'], function (require, exports, module) {
var tool = require("tool");
var liexin_pop = require("liexin_pop");
var artTemplate = require("artTemplate");
var pagination = require('pagination');
var order = {
page: 1,
limit: 5,
bankInfo:"",
init: function () {
order.handle();
order.getData()
},
getData: function () {
var data_ = {
page: order.page,
page_size: order.limit,
status: $(".user-right .nav .item.act").attr("guid"),
goods_name: $(".userOrderS").val()
}
$.liexin_ajax('/api/order/orderLists', 'POST', data_, function (res) {
if (res.code == 0) {
var dataArr = res.data.lists || [];
var order_count_=res.data.order_count;
order.bankInfo=res.data.bank_info;
for(let key in order_count_){
$(".user-right .nav .item[guid='"+key+"'] span").text("("+order_count_[key]+")")
}
if (dataArr.length == 0) {
tool.NoData(".orderdataboxs")
return
}
var json_ = {
data: dataArr
}
var html = template('DataTmp', json_);
$(".orderdataboxs").html(html);
//分页初始化
$('.M-pagebox').pagination({
totalData: res.data.total,
showData: Number(res.data.page_size),
coping: true,
prevContent: '<',
nextContent: '>',
jump: true,
jumpBtn: "Go",
keepShowPN: true,
current: Number(res.data.page),
isHide: true,
callback: function (api) {
order.page = api.getCurrent()
order.getData();
}
});
} else {
tool.NoData(".orderdataboxs")
liexin_pop.Tip({ title: res.msg })
}
})
},
handle: function () {
$("body").on("click",".trgo",function(e){
e.stopPropagation()
window.location.href=$(this).attr("data-href")
})
//搜索BTN
$(".ordersearchbtnsas").click(function () {
order.page=1;
order.getData()
})
//tab
$(".user-right .nav .item").click(function(){
$(".user-right .nav .item").removeClass("act")
$(this).addClass("act")
order.page=1;
order.getData()
})
//取消
$("body").on("click",".cancelbtn",function(e){
e.stopPropagation()
var guid_=$(this).attr("guid")
liexin_pop.Confirm({
title: "Are you sure to cancel the order?", success: function (ele) {
$.liexin_ajax('/api/order/cancelOrder', 'POST', { order_id: guid_ }, function (res) {
if (res.code === 0) {
ele.fadeOut(300)
liexin_pop.Tip({ title: res.msg },function(){
order.getData()
})
} else {
liexin_pop.Tip({ title: res.msg })
}
})
}
})
})
$("body").on("click",".paybtn",function(e){
e.stopPropagation()
var self=$(this);
liexin_pop.Open({
title:"Payment",
width:766,
ele:".payDetailPop",
success:function(){
$(".paypal").text(order.bankInfo.paypal)
$(".ttl_bank_name").text(order.bankInfo.ttl_bank_name)
$(".ttl_bank_address").text(order.bankInfo.ttl_bank_address)
$(".ttl_swift_code").text(order.bankInfo.ttl_swift_code)
$(".ttl_company_name").text(order.bankInfo.ttl_company_name)
$(".ttl_account_no").text(order.bankInfo.ttl_account_no)
$(".merchandise_pay").text(self.attr("merchandise_pay"))
$(".shipping_pay").text(self.attr("shipping_pay"))
$(".ps_pay").text(self.attr("ps_pay"))
$(".goods_num_pay").text(self.attr("goods_num_pay"))
$(".subtotal_pay").text(self.attr("subtotal_pay"))
}
})
})
$("body").on("click",".check-group-payp",function(){
$(".check-group-payp").removeClass("act")
$(this).addClass("act")
$(".payDetailPop .zftai").hide();
if($(this).attr("guid")==1){
$(".payDetailPop .ppbox").show();
}else{
$(".payDetailPop .ttbox").show();
}
})
},
}
module.exports = order.init();
})
seajs.use(['order'])
define('orderDetail', ['liexin_pop','tool'], function (require, exports, module) {
define('orderDetail', ['liexin_pop','tool','artTemplate'], function (require, exports, module) {
var liexin_pop = require("liexin_pop");
var tool = require("tool");
var orderDetail = {
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_);
$(".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();
})
......
......@@ -4,6 +4,7 @@
@endsection
@section('body')
<textarea id="domainxksearch" style="position: fixed;right:9999px;"></textarea>
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
......@@ -78,7 +79,7 @@
</div>
<div class="M-pagebox"></div>
<div class="M-pagebox row rowCenter"></div>
</div>
</div>
</div>
......@@ -93,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}}" 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>
......@@ -109,13 +110,13 @@
<div> Min:{{value.moq}} <span class="mult">Mult:{{value.mult}} </span></div>
<div> Full Reel:{{value.mpq}} </div>
</div>
<div class="td w140">{{value.hk_delivery_time||"&nbsp;"}}</div>
<div class="td w140">{{value.hk_delivery_time||" "}}</div>
<div class="th w180">
<div class="price-jt">
{{each value['ladder_price'] val i}}
<div class="price-group row" purchases="{{val.purchases}}">
<div class="jtpr">{{val.purchases}}+</div>
<div class="jtpc">${{val.price_us}}</div>
<div class="jtpc">$<span class="jtpcval">{{val.price_us}}</span></div>
</div>
{{/each}}
{{if !value['ladder_price']|| value['ladder_price'].length==0}}
......@@ -125,7 +126,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{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">
......
......@@ -56,7 +56,7 @@
<div class="ttl">{{$key}}</div>
<div class="ttc row boxsiz">
@foreach ($item as $itemchild)
<a href="/brand/{{$itemchild['standard_brand_id']}}" target="_blank">{{$itemchild['brand_name_en']}}</a>
<a href="/brand/{{$itemchild['standard_brand_id']}}" >{{$itemchild['brand_name_en']}}</a>
@endforeach
</div>
</div>
......
......@@ -20,7 +20,7 @@
<div class="list-table">
<div class="thead row boxsiz">
<div class="th row verCenter w46">
<div class="check-group row verCenter act">
<div class="check-group selectall row verCenter act">
<div class="check">
<i class="icon iconfont icon-gou"></i>
</div>
......@@ -36,68 +36,23 @@
<div class="th">Ext. Price</div>
</div>
<div class="tbody boxsiz">
<div class="tr row">
<div class="td w46">
<div class="check-group row verCenter act">
<div class="check">
<i class="icon iconfont icon-gou"></i>
</div>
<span>1</span>
</div>
</div>
<div class="td w98">STTH1L06A</div>
<div class="td w183">Manufacturers:Yageo</div>
<div class="td w119">2-5 workdays</div>
<div class="td w93">
<input type="text" class="valuep" value="100">
</div>
<div class="td w110">10000</div>
<div class="td w92">$0.0011</div>
<div class="td">$0.11</div>
</div>
<div class="tr row sxbox">
<div class="td w46">
<div class="check-group row verCenter act">
<div class="check">
<i class="icon iconfont icon-gou"></i>
</div>
<span>2</span>
</div>
</div>
<div class="td w98">
STTH1L06A
<div class="pdf">
<i class="icon iconfont icon-PDF"></i>
</div>
</div>
<div class="td w183">
Manufacturers:Yageo
<div class="sx">Invalid Model</div>
</div>
<div class="td w119">2-5 workdays</div>
<div class="td w93">
<input type="text" class="valuep" value="100">
</div>
<div class="td w110">10000</div>
<div class="td w92">$0.0011</div>
<div class="td">$0.11</div>
</div>
</div>
<div class="tfoot boxsiz">
<div class="tr row">
<div class="td">
<div class="check-group row verCenter act">
<div class="check-group row verCenter selectall act">
<div class="check">
<i class="icon iconfont icon-gou"></i>
</div>
<span class="fw selectall">Select All</span>
<span class="fw ">Select All</span>
</div>
</div>
<div class="td selectcount">
<b class="fw">2 </b>Items Selected
<b class="fw">0 </b>Items Selected
</div>
<div class="td">
<div class="del">Delete</div>
<div class="del delcarsd">Delete</div>
</div>
</div>
</div>
......@@ -107,24 +62,24 @@
<div class="top boxsiz">
<div class="itemsp row bothSide">
<span>Merchandise Total</span>
<span>$509.71</span>
<span>$<span class="goods_total">0.00</span></span>
</div>
<div class="itemsp row bothSide">
<!-- <div class="itemsp row bothSide">
<span>Shipping</span>
<span>TBC</span>
</div>
<div class="itemsp row bothSide">
<span>Merchant Fee</span>
<span>TBC</span>
</div>
</div> -->
<div class="itemsp row bothSide">
<span>Subtotal</span>
<span>$559.71</span>
<span>$<span class="pay_total">0.00</span></span>
</div>
</div>
<div class="create">Place Order</div>
<div class="create createcarbtn">Place Order</div>
<div class="lgtips">
Already Registered? <a href="/login">Log In</a>
Already Registered? <a href="/login?referer={{\Illuminate\Support\Facades\URL::current()}}">Log In</a>
</div>
<a href="javascript:void(0)" class="bannerc">
<img src="{{$public}}/assets/images/car/carbanner.png" alt="">
......@@ -137,6 +92,44 @@
</div>
@endsection
@verbatim
<script id="DataTmp" type="text/html">
{{each data value index}}
<div class="tr row {{if value.status==-1}}sxbox{{/if}}" cart_id="{{value.cart_id}}">
<div class="td w46">
<div class="check-group row verCenter act">
<div class="check">
<i class="icon iconfont icon-gou"></i>
</div>
<span>{{index+1}}</span>
</div>
</div>
<div class="td w98">
{{value.goods_name}}
{{if value.pdf}}
<a class="pdf" href="{{value.pdf}}" target="_blank"><i class="icon iconfont icon-PDF"></i></a>
{{/if}}
</div>
<div class="td w183">
Manufacturers:{{value.brand_name}}
{{if value.status==-1}}
<div class="sx">Invalid Model</div>
{{/if}}
</div>
<div class="td w119">{{value.hk_delivery_time}}</div>
<div class="td w93">
<input type="text" class="valuep" goods_id="{{value.goods_id}}" minNum="{{value.moq}}" maxNum="{{value.max_buy_stock}}" value="{{value.buy_number}}" 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>
<div class="td w110">{{value.stock}}</div>
<div class="td w92">$<span class="rowdj">{{value.buy_price}}</span></div>
<div class="td">$<span class="rowxj">{{value.ext_price}}</span></div>
</div>
{{/each}}
</script>
@endverbatim
@section('js')
<script src="{{$public}}/assets/js/car/car.js?v={{time()}}"></script>
@endsection
\ No newline at end of file
......@@ -4,6 +4,7 @@
@endsection
@section('body')
<textarea id="domainxksearch" style="position: fixed;right:9999px;"></textarea>
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
......@@ -27,7 +28,7 @@
<div class="csec boxsiz clear">
@foreach($classification['children'] as $class)
<a href="/class/{{$class['class_id']}}">{{$class['class_name_en']}}({{$class['sku_number']}})</a>
<a href="/class/{{$class['class_id']}}" >{{$class['class_name_en']}}({{$class['sku_number']}})</a>
@endforeach
</div>
</div>
......@@ -77,7 +78,7 @@
</div>
<div class="data-td">
</div>
<div class="M-pagebox"></div>
<div class="M-pagebox row rowCenter"></div>
</div>
</div>
</div>
......@@ -108,13 +109,13 @@
<div> Min:{{value.moq}} <span class="mult">Mult:{{value.mult}} </span></div>
<div> Full Reel:{{value.mpq}} </div>
</div>
<div class="td w140">{{value.hk_delivery_time||"&nbsp;"}}</div>
<div class="td w140">{{value.hk_delivery_time||" "}}</div>
<div class="th w180">
<div class="price-jt">
{{each value['ladder_price'] val i}}
<div class="price-group row" purchases="{{val.purchases}}">
<div class="jtpr">{{val.purchases}}+</div>
<div class="jtpc">${{val.price_us}}</div>
<div class="jtpc">$<span class="jtpcval">{{val.price_us}}</span></div>
</div>
{{/each}}
{{if !value['ladder_price']|| value['ladder_price'].length==0}}
......@@ -124,7 +125,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{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">
......
......@@ -7,6 +7,7 @@
<div class="mallpage">
@include('common.mallHeaderTop')
@include('common.mallHeaderNav')
<textarea id="domainxksearch" style="position: fixed;right:9999px;"></textarea>
<div class="searchbox w1200">
<div class="bread-menu row boxsiz">
<a href="/mall">Home</a>
......@@ -71,7 +72,7 @@
</div>
<div class="M-pagebox"></div>
<div class="M-pagebox row rowCenter"></div>
</div>
</div>
</div>
......@@ -103,13 +104,13 @@
<div> Min:{{value.moq}} <span class="mult">Mult:{{value.mult}} </span></div>
<div> Full Reel:{{value.mpq}} </div>
</div>
<div class="td w140">{{value.hk_delivery_time||"&nbsp;"}}</div>
<div class="td w140">{{value.hk_delivery_time||" "}}</div>
<div class="th w180">
<div class="price-jt">
{{each value['ladder_price'] val i}}
<div class="price-group row" purchases="{{val.purchases}}">
<div class="jtpr">{{val.purchases}}+</div>
<div class="jtpc">${{val.price_us}}</div>
<div class="jtpc">$<span class="jtpcval">{{val.price_us}}</span></div>
</div>
{{/each}}
{{if !value['ladder_price']|| value['ladder_price'].length==0}}
......@@ -119,7 +120,7 @@
</div>
<div class="td">
<div class="input-box ">
<input type="text" class="valuep valuepSearch" minNum="{{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">
......
......@@ -29,17 +29,17 @@
<div class="nav row inuirynavs">
<div class="item act " guid="">
<div class="row rowCenter">
<div>All</div><span>(2)</span>
<div>All</div><span>({{$statusCount['all']}})</span>
</div>
</div>
<div class="item " guid="0">
<div class="row rowCenter">
<div>Pending</div><span>(2)</span>
<div>Pending</div><span>({{$statusCount['pending']}})</span>
</div>
</div>
<div class="item " guid="1">
<div class="row rowCenter">
<div>Replied</div><span>(2)</span>
<div>Replied</div><span>({{$statusCount['processed']}})</span>
</div>
</div>
</div>
......
......@@ -55,6 +55,7 @@ Route::middleware(['api', 'api.check'])->namespace('Api')->group(function () {
Route::POST('order/updateOrder', 'OrderApiController@updateOrder'); //更新订单状态
Route::POST('order/cancelOrder', 'OrderApiController@cancelOrder'); //取消订单
Route::POST('order/orderDetail', 'OrderApiController@orderDetail'); //订单详情
Route::POST('order/orderServiceDetail', 'OrderApiController@orderServiceDetail'); //订单售后详情
});
......
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