sunhao vor 5 Jahren
Ursprung
Commit
d34bfe210a

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

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

Datei-Diff unterdrückt, da er zu groß ist
+ 103 - 5
app/Http/Controllers/Admin/OrderController.php


+ 36 - 0
app/Order.php

@@ -39,6 +39,42 @@ class Order extends Model
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 78
      * 添加Erp商品
43 79
      */
44 80
     public static function mjErpGoodsAdd($goods){

+ 18 - 0
app/OrderGoodsSkus.php

@@ -0,0 +1,18 @@
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,11 +13,11 @@
13 13
                 <thead>
14 14
                 <tr class="text-c">
15 15
                     {{--<th width="25"><input type="checkbox" name="" value=""></th>--}}
16
-                    <th width="8%">商品编号</th>
16
+                    <th width="5%">商品编号</th>
17 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 21
                     <th width="25%">商品规格</th>
22 22
                     <th width="15%">商品描述</th>
23 23
                     <th width="10%">创建时间</th>
@@ -36,7 +36,7 @@
36 36
                         <td class="text-c">{{$a['productCode']}}</td>
37 37
                         <td class="text-c">
38 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 40
                             @endforeach
41 41
                         </td>
42 42
                         <td class="text-c">{{$a['description']}}</td>

Datei-Diff unterdrückt, da er zu groß ist
+ 60 - 8
resources/views/order/ordercreate.blade.php


Datei-Diff unterdrückt, da er zu groß ist
+ 157 - 1
resources/views/order/orderedit.blade.php