|
@@ -1069,7 +1069,23 @@ class After extends Base
|
|
|
}
|
|
|
|
|
|
}
|
|
|
-
|
|
|
+ $data=[
|
|
|
+ "orderCode"=>$info['orderCode'],
|
|
|
+ "th_type"=>3,
|
|
|
+ "th_num"=>$info['error_num'],
|
|
|
+ "th_fee"=>round($sale['sale_price']*$info["error_num"],2),
|
|
|
+ "thCode"=>$info['returnCode'],
|
|
|
+ "apply_id"=>$info['apply_id'],
|
|
|
+ "apply_name"=>$info['apply_name'],
|
|
|
+ "addtime"=>date("Y-m-d H:i:s"),
|
|
|
+ "status"=>1,
|
|
|
+ "is_del"=>0
|
|
|
+ ];
|
|
|
+ $inse=Db::name("th_data")->insert($data);
|
|
|
+ if($inse==false){
|
|
|
+ Db::rollback();
|
|
|
+ return error_show(1004,"退货单更新失败");
|
|
|
+ }
|
|
|
Db::commit();
|
|
|
return app_show(0,"退货单新建成功",["thNo"=>$thNo]);
|
|
|
}
|