|
@@ -3959,6 +3959,9 @@ class Sale extends Base
|
|
|
if ($outinfo == false) {
|
|
|
return error_show(1004, "发货数据未找到");
|
|
|
}
|
|
|
+ if($outinfo['status']!=1){
|
|
|
+ return error_show(1004, "发货状态有误");
|
|
|
+ }
|
|
|
$einfo = Db::name('sale')->where(['orderCode' => $outinfo['orderCode'], 'is_del' => 0])->find();
|
|
|
if (empty($einfo)) {
|
|
|
return error_show(1002, "未找到销售订单数据");
|
|
@@ -3990,7 +3993,7 @@ class Sale extends Base
|
|
|
}
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
- $up = Db::name("order_out")->save($outinfo);
|
|
|
+ $up = Db::name("order_out")->where(["outCode"=>$outCode,"status"=>1,"is_del"=>0])->update($outinfo);
|
|
|
|
|
|
$user_info = GetUserInfo($this->post['token']);
|
|
|
$uid = isset($user_info['data']['id']) ? $user_info['data']['id'] : 0;
|