|
@@ -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);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|