<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ## 訂單信息 >[info]功能: 1,顯示數據:查詢 `wp_order` 訂單表 顯示訂單信息 訂單由前臺用戶購買商品生成 /* *@desc 根據登錄賬號信息獲取數據列表 */ public function scopeDefaultWhere($query) { parent::scopeDefaultWhere($query); /* *@desc 根據訂單編號查詢 */ $wq = request_data('wq'); if($wq){ $query->where(function($q)use($wq){ $q->where('order_id', 'like', "%".$wq."%"); }); } /* *@desc 根據訂單狀態查詢 */ $status = request_data('status'); if($status){ if($status == 6){ $query->where('order_status','>',1); }else{ $query->where('order_status',$status); } } /* *@desc 根據訂單時間查詢 */ $start_time = request_data('start_time')?:date('Y-m-d 00:00:00', time()); $end_time = request_data('end_time')?date('Y-m-d 23:59:59', strtotime(request_data('end_time'))):date('Y-m-d 23:59:59', time()); $query->where('ended','>=',strtotime($start_time))->where('ended','<=',strtotime($end_time)); $in = \cs\login::login_user(1); if($in){ $query->whereIn('shop_id',$in); } } >[info] 2,關聯`wp_order_value` 訂單詳情表 查看此訂單下詳細的購買商品情況 ; /* * *@desc 關聯訂單詳情 */ public function wp_order_value(){ return $this->hasMany('models\wp_order_value','order_id','order_id'); } >[info]3, 通過`wp_order_value`關聯`wp_order_return` 可以進行退貨操作; /** * 獲取退貨訂單信息 */ public function wp_order_return() { return $this->hasMany('models\wp_order_return','order_id','order_id'); } /* * 退貨處理 * */ static public function saveForm(){ try{ DB::transaction(function() { $data = get_data(); if($data){ foreach($data['goods_id'] as $k=>$v){ if($data['goods_num'][$k] != 0 && $data['goods_price'][$k] != 0){ $arr[$k]['goods_id'] = $v; $arr[$k]['goods_num'] = $data['goods_num'][$k]; $arr[$k]['goods_price'] = $data['goods_price'][$k]; } } } if($arr){ foreach($arr as $k=>$v){ $li = yf_goods_common::where('id',$v['goods_id'])->first(); $date['common_stock'] = $li->common_stock + $v['goods_num']; $li->where('id',$v['goods_id'])->update($date); if($li->common_goods_from == 1){ order::getGoodscommon($li->goods_id,'add',$v['goods_num']); } $list['num'] = $v['goods_num']; $list['order_id'] = $data['order_id']; $list['goods_id'] = $v['goods_id']; $list['goods_name'] = $li->common_name; $list['goods_values'] = $li->common_spec_name; $list['shop_id'] = cookie('shop_id'); $list['shop_name'] = cookie('shop_name'); $list['status'] = 2; $list['return_payid'] = config('payment.cash'); $list['good_price_ori'] = $v['goods_price']; $list['goods_price'] = $v['goods_price']; $list['shop_users_id'] = cookie('id'); $list['created'] = time(); $model = new self; if($v['goods_num'] == 0) continue; $model->insert($list); } }else{ exit(json_encode(['status'=>0,'msg'=>__('請選擇退貨商品') ])); } }); }catch(Exception $e){ return false; } return true; }
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看