|
@@ -121,32 +121,44 @@ class OrderClearController extends BaseController
|
|
|
$ghsId = $clear->ghsId ?? 0;
|
|
$ghsId = $clear->ghsId ?? 0;
|
|
|
$ghs = GhsClass::getLockById($ghsId);
|
|
$ghs = GhsClass::getLockById($ghsId);
|
|
|
if ($ghs->shopId != $this->shopId) {
|
|
if ($ghs->shopId != $this->shopId) {
|
|
|
- util::fail('没有权限');
|
|
|
|
|
|
|
+ util::fail('没有获得授权');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ $staff = $this->shopAdmin;
|
|
|
|
|
+ if (isset($staff->finance) == false || $staff->finance == 0) {
|
|
|
|
|
+ util::fail('不能销单...');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ //多个地方需要同步修改clear_order_power
|
|
|
if (getenv('YII_ENV') == 'production') {
|
|
if (getenv('YII_ENV') == 'production') {
|
|
|
//花样年华只有总控才能结账
|
|
//花样年华只有总控才能结账
|
|
|
if (in_array($this->shopId, [1585, 1596])) {
|
|
if (in_array($this->shopId, [1585, 1596])) {
|
|
|
if ($this->adminId != 2876) {
|
|
if ($this->adminId != 2876) {
|
|
|
- util::fail('暂不能操作');
|
|
|
|
|
|
|
+ util::fail('不能销单!');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
//花大苪 洋桔梗,只有叶荷姐才能销账
|
|
//花大苪 洋桔梗,只有叶荷姐才能销账
|
|
|
if (in_array($this->shopId, [16070])) {
|
|
if (in_array($this->shopId, [16070])) {
|
|
|
if (!in_array($this->adminId, [9303, 4])) {
|
|
if (!in_array($this->adminId, [9303, 4])) {
|
|
|
- util::fail('暂不能操作');
|
|
|
|
|
|
|
+ util::fail('不能销单。');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- //天天鲜花,只有阿东才能结账
|
|
|
|
|
|
|
+ //天天鲜花 陈江店
|
|
|
if (in_array($this->shopId, [763])) {
|
|
if (in_array($this->shopId, [763])) {
|
|
|
if (!in_array($this->adminId, [2094, 5959])) {
|
|
if (!in_array($this->adminId, [2094, 5959])) {
|
|
|
- util::fail('暂不能操作');
|
|
|
|
|
|
|
+ util::fail('不能销单哦');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ //花儿好仙
|
|
|
|
|
+ if (in_array($this->shopId, [22666])) {
|
|
|
|
|
+ if (!in_array($this->adminId, [12869, 23174])) {
|
|
|
|
|
+ util::fail('不能充值销单哈');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
if (in_array($this->shopId, [36523])) {
|
|
if (in_array($this->shopId, [36523])) {
|
|
|
if ($this->adminId != 919) {
|
|
if ($this->adminId != 919) {
|
|
|
- util::fail('暂不能操作');
|
|
|
|
|
|
|
+ util::fail('不能销单哈');
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|