Selaa lähdekoodia

售后退货工单详情

wufeng 2 vuotta sitten
vanhempi
commit
4bd8a9c700

+ 24 - 1
app/admin/controller/AfterChild.php

@@ -473,7 +473,7 @@ class AfterChild extends Base
 
                     //维护商品层面的库存数
                     Db::name('good')
-                        ->where(['is_del' => 0, 'spuCode' => $spuCode])
+                        ->where(['is_del' => 0, 'spuCode' => $order_return['good_code']])
                         ->inc('usable_stock', $info['return_num'] - $param['loss_num'])
                         ->update(['updatetime' => $date]);
 
@@ -523,4 +523,27 @@ class AfterChild extends Base
 
     }
 
+    //详情
+    public function info()
+    {
+
+        $param = $this->request->only(['id'], 'post', 'trim');
+
+        $val = Validate::rule([
+            'id|退货工单id' => 'require|number|gt:0',
+        ]);
+
+        if ($val->check($param) == false) return json_show(1004, $val->getError());
+
+        $info = Db::name('order_return_child')
+            ->alias('a')
+            ->where(['a,is_del' => 0, 'a.id' => $param['id']])
+            ->findOrEmpty();
+
+        if (empty($info)) return json_show(1004, '该退货工单不存在');
+
+        return empty($info) ? json_show(1004, '该退货工单不存在') : json_show(0, '获取退货工单详情成功', $info);
+
+    }
+
 }

+ 1 - 1
app/admin/controller/OrderOutChild.php

@@ -335,7 +335,7 @@ class OrderOutChild extends Base
         $is_reurn = Db::name("sale_return")
             ->field('id,orderCode')
             ->where(['orderCode' => array_column($child, 'orderCode'), 'is_del' => 0])
-            ->where("status", "in", [1, 2, 3, 7, 9, 10])
+            ->where("status", "in", [1, 2, 3, 7,8, 9, 10,11,12])
             ->findOrEmpty();
         if (!empty($is_reurn)) return json_show(1004, $is_reurn['orderCode'] . "存在退货未处理完成");
 

+ 3 - 2
app/admin/route/app.php

@@ -301,10 +301,11 @@ Route::rule('afterwsm', 'admin/After/GetWsm');
 Route::rule('aftercancel', 'admin/After/Cancel');
 Route::rule('createSaleAndCgdByAfter', 'admin/After/createSaleAndCgdByAfter');
 Route::rule('afterExport', 'admin/After/export');
-Route::rule('after_child_list', 'admin/AfterChild/getList');//退货工单列表
+Route::rule('order_return_child_list', 'admin/AfterChild/getList');//退货工单列表
 Route::rule('set_order_return_child', 'admin/AfterChild/setOrderReturnChild');//设置退货工单
 Route::rule('delivery_order_return_child', 'admin/AfterChild/deliveryOrderReturnChild');//库管收货
-Route::rule('set_after_child_record', 'admin/AfterChild/setRecord');//设置退货工单标记
+Route::rule('set_order_return_child_record', 'admin/AfterChild/setRecord');//设置退货工单标记
+Route::rule('order_return_child_info', 'admin/AfterChild/info');//设置退货工单详情
 //Route::rule('aftersetwsm','admin/After/setWsm');
 
 Route::rule('processolist', 'admin/Proorder/list');//我的已办