|
|
@@ -1088,7 +1088,7 @@ class OrderController extends BaseController
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//小向花卉开单售后控制
|
|
|
if ($this->mainId == 23390) {
|
|
|
- if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115, 23960, 28456, 31105, 28456, 31105, 52528, 25011, 61449,77951])) {
|
|
|
+ if (!in_array($this->adminId, [24043, 24585, 24586, 24654, 24115, 23960, 28456, 31105, 28456, 31105, 52528, 25011, 61449, 77951])) {
|
|
|
util::fail('你不能开单哦');
|
|
|
}
|
|
|
}
|
|
|
@@ -1361,7 +1361,7 @@ class OrderController extends BaseController
|
|
|
|
|
|
//跑腿订单生产者创建订单
|
|
|
// TODO
|
|
|
- if($sendType == dict::getDict('sendType', 'thirdSend') && $post['callErrand'] == 1){ // $post 中有 pickupTime,则说明是要立即发跑腿 或者 callErrand == 1
|
|
|
+ if ($order->payStatus == 1 && $sendType == dict::getDict('sendType', 'thirdSend') && $post['callErrand'] == 1) { // $post 中有 pickupTime,则说明是要立即发跑腿 或者 callErrand == 1
|
|
|
$payWay = $post['payWay'];
|
|
|
if($hasPay != dict::getDict('hasPay', 'unPay')){
|
|
|
$platform = $post['deliveryPlatform'];
|
|
|
@@ -1370,6 +1370,7 @@ class OrderController extends BaseController
|
|
|
$deliveryBracketContent = $post['deliveryBracketContent'];
|
|
|
$pickupTime = $post['pickupTime'];
|
|
|
$allParams = $post['deliveryAllParams'];
|
|
|
+
|
|
|
$data = [
|
|
|
'orderId' => $saleId,
|
|
|
'mainId' => $this->mainId,
|
|
|
@@ -3025,6 +3026,12 @@ class OrderController extends BaseController
|
|
|
if ($order->mainId != $this->mainId) {
|
|
|
util::fail('不是你的订单,不能修改地址');
|
|
|
}
|
|
|
+ if ($order->status == 3) {
|
|
|
+ util::fail('订单已经在配送了,不能修改地址');
|
|
|
+ }
|
|
|
+ if ($order->status == 4) {
|
|
|
+ util::fail('订单已完成,不能修改地址');
|
|
|
+ }
|
|
|
$province = $post['province'] ?? '';
|
|
|
$city = $post['city'] ?? '';
|
|
|
$dist = $post['dist'] ?? '';
|
|
|
@@ -3044,6 +3051,22 @@ class OrderController extends BaseController
|
|
|
$order->lat = $lat;
|
|
|
$order->long = $long;
|
|
|
$order->save();
|
|
|
+ if ($post['syncDefaultAddress'] == 1) {
|
|
|
+ $customId = $order->customId ?? 0;
|
|
|
+ $custom = CustomClass::getById($customId, true);
|
|
|
+ if (!empty($custom)) {
|
|
|
+ $custom->province = $province;
|
|
|
+ $custom->city = $city;
|
|
|
+ $custom->dist = $dist;
|
|
|
+ $custom->address = $address;
|
|
|
+ $custom->floor = $floor;
|
|
|
+ $custom->showAddress = $showAddress;
|
|
|
+ $custom->fullAddress = $fullAddress;
|
|
|
+ $custom->lat = $lat;
|
|
|
+ $custom->long = $long;
|
|
|
+ $custom->save();
|
|
|
+ }
|
|
|
+ }
|
|
|
util::complete('修改成功');
|
|
|
}
|
|
|
|