sunhao 5 gadi atpakaļ
vecāks
revīzija
d34bfe210a

+ 5 - 0
app/Http/Controllers/Admin/GoodsController.php

155
                     $erp = Order::mjErpGoodsAdd($erpArr);
155
                     $erp = Order::mjErpGoodsAdd($erpArr);
156
                 }
156
                 }
157
                 //2.商品同步
157
                 //2.商品同步
158
+
158
                 $mj = Order::mjGoodsAdd($mjArr);
159
                 $mj = Order::mjGoodsAdd($mjArr);
160
+                var_dump($mjArr, $mj);
161
+               
162
+             
159
                 /* 同步卖家云商品code等信息 */
163
                 /* 同步卖家云商品code等信息 */
160
 
164
 
161
                 /* end */
165
                 /* end */
169
                 Oplog::addLog($self_id, $self_name, $context, $type, $tables, $data_id);
173
                 Oplog::addLog($self_id, $self_name, $context, $type, $tables, $data_id);
170
             } 
174
             } 
171
             DB::commit();
175
             DB::commit();
176
+            exit;
172
         }catch (Exception $e){
177
         }catch (Exception $e){
173
             DB::rollback();
178
             DB::rollback();
174
         }
179
         }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 103 - 5
app/Http/Controllers/Admin/OrderController.php


+ 36 - 0
app/Order.php

39
    	}
39
    	}
40
 
40
 
41
     /**
41
     /**
42
+     * 更新订单
43
+     */
44
+    public static function mjOrderUpdate($orderList){
45
+      $goods["method"] = "maijiayun.order.update";
46
+      $staus_arr = array(
47
+        0 => '待付款',
48
+        1 => '已付款待审核',
49
+        2 => '已审核待发货',
50
+        3 => '已发货',
51
+      );
52
+      $orderList['status'] = $staus_arr[$orderList['status']];
53
+      $result = self::mjApi($orderList);
54
+      return $result;
55
+    }
56
+
57
+    /**
58
+     * 取消订单
59
+     */
60
+    public static function mjOrderDel($orderList){
61
+      $goods["method"] = "maijiayun.order.update"; 
62
+      $orderList['status'] = '已取消';
63
+      $result = self::mjApi($orderList);
64
+      return $result;
65
+    }
66
+    
67
+
68
+    /**
69
+     * 获取订单
70
+     */
71
+    public static function mjOrderGet($order){
72
+      $order["method"] = "maijiayun.order.get";
73
+      $result = self::mjApi($order);
74
+      return $result;
75
+    }
76
+
77
+    /**
42
      * 添加Erp商品
78
      * 添加Erp商品
43
      */
79
      */
44
     public static function mjErpGoodsAdd($goods){
80
     public static function mjErpGoodsAdd($goods){

+ 18 - 0
app/OrderGoodsSkus.php

1
+<?php
2
+/**
3
+ * Created by PhpStorm.
4
+ * User: Administrator
5
+ * Date: 2019/9/29
6
+ * Time: 15:07
7
+ */
8
+
9
+namespace App;
10
+use Illuminate\Database\Eloquent\Model;
11
+
12
+class OrderGoodsSkus extends Model
13
+{
14
+    public $timestamps = false;
15
+    protected $table = "order_goods_skus";
16
+    protected $fillable = ['order_id','sku_id','goods_id','is_del','num','price'];
17
+   
18
+}

+ 5 - 5
resources/views/goods/index.blade.php

13
                 <thead>
13
                 <thead>
14
                 <tr class="text-c">
14
                 <tr class="text-c">
15
                     {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
15
                     {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
16
-                    <th width="8%">商品编号</th>
16
+                    <th width="5%">商品编号</th>
17
                     <th width="10%">商品标题</th>
17
                     <th width="10%">商品标题</th>
18
-                    <th width="10%">商品分类</th>
19
-                    <th width="10%">商品图片</th>
20
-                    <th width="10%">商品货号</th>
18
+                    <th width="8%">商品分类</th>
19
+                    <th width="8%">商品图片</th>
20
+                    <th width="8%">商品货号</th>
21
                     <th width="25%">商品规格</th>
21
                     <th width="25%">商品规格</th>
22
                     <th width="15%">商品描述</th>
22
                     <th width="15%">商品描述</th>
23
                     <th width="10%">创建时间</th>
23
                     <th width="10%">创建时间</th>
36
                         <td class="text-c">{{$a['productCode']}}</td>
36
                         <td class="text-c">{{$a['productCode']}}</td>
37
                         <td class="text-c">
37
                         <td class="text-c">
38
                             @foreach($a['sku_list'] as $item)
38
                             @foreach($a['sku_list'] as $item)
39
-                                sku编码:{{$item['id']}}&nbsp;&nbsp;  规格:{{$item['propsName']}}&nbsp;&nbsp;  价格:{{$item['price']}}<br>
39
+                                sku编码:{{$item['code']}}&nbsp;&nbsp;  规格:{{$item['propsName']}}&nbsp;&nbsp;  价格:{{$item['price']}}<br>
40
                             @endforeach
40
                             @endforeach
41
                         </td>
41
                         </td>
42
                         <td class="text-c">{{$a['description']}}</td>
42
                         <td class="text-c">{{$a['description']}}</td>

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 60 - 8
resources/views/order/ordercreate.blade.php


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 157 - 1
resources/views/order/orderedit.blade.php