|
@@ -639,8 +639,7 @@ class Reorder extends Base
|
|
|
return error_show(1004, "地址发货数量更新失败");
|
|
|
}
|
|
|
if ($value['outCode'] != "") {
|
|
|
- $out = Db::name("order_out")->where(["outCode" => $value['outCode'], "is_del" => 0])
|
|
|
- ->find();
|
|
|
+ $out = Db::name("order_out")->where(["outCode" => $value['outCode']])->find();
|
|
|
if ($out == false) {
|
|
|
Db::rollback();
|
|
|
return error_show(1004, "地址发货单数据未找到");
|
|
@@ -654,7 +653,7 @@ class Reorder extends Base
|
|
|
return error_show(1004, "地址发货单发货数量不足");
|
|
|
}
|
|
|
$out['send_num'] -= $value['return_num'];
|
|
|
- $out['is_del'] = $out['send_num'] <= 0 ? 1 : 0;
|
|
|
+ $out['status'] = $out['send_num'] <= 0 ? 4 : $out['status'];
|
|
|
$out['updatetime'] = date("Y-m-d H:i:s");
|
|
|
$outup = Db::name("order_out")->save($out);
|
|
|
if ($outup == false) {
|
|
@@ -929,9 +928,12 @@ class Reorder extends Base
|
|
|
$data=[
|
|
|
"orderCode"=>$info['orderCode'],
|
|
|
"th_type"=>1,
|
|
|
- "th_num"=>$info['return_num'],
|
|
|
+ "th_num"=>$info['num'],
|
|
|
"th_fee"=>round($info['num']*$orderinfo['sale_price'],2),
|
|
|
"thCode"=>$info['returnCode'],
|
|
|
+ "spuCode"=>$orderinfo['good_code'],
|
|
|
+ "good_name"=>$orderinfo['good_name'],
|
|
|
+ "cat_id"=>$orderinfo['cat_id'],
|
|
|
"apply_id"=>$info['apply_id'],
|
|
|
"apply_name"=>$info['apply_name'],
|
|
|
"addtime"=>date("Y-m-d H:i:s"),
|