Commit 6408c4fc by 孙龙

up

parent 04d38872
......@@ -460,8 +460,11 @@ class BomService {
//自营
$ziying[$k]["id"] = $item["match_goods_id"];
$ziying[$k]["num"] = $item["match_number"];
$ziying[$k]["delivery_place"] = $delivery_type;
$ziying[$k]["matching_id"] = $item["matching_id"];
}else{
//联营
$lianying[$k]["matching_id"] = $item['matching_id'];
$lianying[$k]["goods_name"] = $item['match_goods_name'];
$lianying[$k]["brand_name"] = $item['match_brand_name'];
$lianying[$k]["num"] = $item['match_number'];
......@@ -546,7 +549,6 @@ class BomService {
protected function zyOrder($user_id,$ziying,$extend,&$err_msg){
//请求 api接口 加入购物车
$addZYShopCart = $this->createZYOrderToShopCart($user_id,$ziying,$extend);
if(!empty($addZYShopCart) && $addZYShopCart['err_code'] == 0){//加入购物车成功
//获取自营购物车
$car_ids = $this->getShopCart($user_id,3);
......@@ -578,7 +580,6 @@ class BomService {
*/
protected function createOrder($user_id,$car_ids,$extend,$type=2){
$url = Config('website.api_create_order');
$data['bom_id'] = $extend["bom_id"];
$data['uid'] = intval($user_id) ? intval($user_id) : 0;
$data["type"] = $type;//订单类型:1.联营, 2.自营线上, 3.自营线下, 4.自营其他业务订单
$data["cart_id"] = implode(",",$car_ids);
......@@ -602,8 +603,8 @@ class BomService {
//联营
$goodsType = [1,2];
}
$query = DB::connection("order")->table("lie_shopping_cart")->where(["user_id"=>$user_id,"status"=>1])
->where("bom_id","!=",0)->whereIn("goods_type",$goodsType)->select("cart_id")->pluck("cart_id");
$query = DB::connection("order")->table("lie_shopping_cart")->where(["user_id"=>$user_id,"status"=>1,"extend_type"=>5])
->whereIn("goods_type",$goodsType)->select("cart_id")->pluck("cart_id");
return $query;
}
......@@ -613,8 +614,7 @@ class BomService {
*/
protected function createZYOrderToShopCart($user_id,$ziying,$extend){
$url = Config('website.addzyorder_url');
$data['type'] = 2;
$data['bom_id'] = $extend["bom_id"];
$data['type'] = 2;//后台加入购物车
$data['delivery_place'] = $extend['delivery_type'];
$data["data"] = array_merge($ziying);
$data['uid'] = intval($user_id) ? intval($user_id) : 0;
......
......@@ -111,40 +111,40 @@
<div class="layui-card" style="">
<h3>用户数据</h3>
<hr>
<form class="layui-form layui-box" id="test5" method="post">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">创建日期:</label>
<div class="layui-input-inline">
<input type="text" name="begin_time" value="" autocomplete="off" placeholder="选择开始时间" class="layui-input" id="begin_time" readonly>
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="end_time" value="" autocomplete="off" placeholder="选择结束时间" class="layui-input" id="end_time" readonly>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">客服</label>
<div class="layui-input-inline">
<select name="is_kefu" lay-verify="" lay-search>
<option value="all">全部</option>
<option value="1"></option>
<option value="0"></option>
</select>
</div>
</div>
<div class="layui-inline" style="text-align: center;">
<button class="layui-btn" data-type="search">搜索</button>
<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> -->
</div>
</div>
</form>
</div>
{{--<div class="layui-card" style="">--}}
{{--<h3>用户数据</h3>--}}
{{--<hr>--}}
{{--<form class="layui-form layui-box" id="test5" method="post">--}}
{{--<div class="layui-form-item">--}}
{{--<div class="layui-inline">--}}
{{--<label class="layui-form-label">创建日期:</label>--}}
{{--<div class="layui-input-inline">--}}
{{--<input type="text" name="begin_time" value="" autocomplete="off" placeholder="选择开始时间" class="layui-input" id="begin_time" readonly>--}}
{{--</div>--}}
{{--<div class="layui-form-mid">-</div>--}}
{{--<div class="layui-input-inline">--}}
{{--<input type="text" name="end_time" value="" autocomplete="off" placeholder="选择结束时间" class="layui-input" id="end_time" readonly>--}}
{{--</div>--}}
{{--</div>--}}
{{--<div class="layui-inline">--}}
{{--<label class="layui-form-label">客服</label>--}}
{{--<div class="layui-input-inline">--}}
{{--<select name="is_kefu" lay-verify="" lay-search>--}}
{{--<option value="all">全部</option>--}}
{{--<option value="1"></option>--}}
{{--<option value="0"></option>--}}
{{--</select>--}}
{{--</div>--}}
{{--</div>--}}
{{--<div class="layui-inline" style="text-align: center;">--}}
{{--<button class="layui-btn" data-type="search">搜索</button>--}}
{{--<!-- <button type="button" class="layui-btn layui-btn-normal export">导出</button> -->--}}
{{--</div>--}}
{{--</div>--}}
{{--</form>--}}
{{--</div>--}}
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