|
|
@@ -644,18 +644,18 @@ class PurchaseOrderController extends BaseController
|
|
|
}
|
|
|
$search = '';
|
|
|
$name1 = $get['search'] ?? '';
|
|
|
- if(!empty($name1)){
|
|
|
+ if (!empty($name1)) {
|
|
|
$search = $name1;
|
|
|
}
|
|
|
$name2 = $get['name'] ?? '';
|
|
|
- if(!empty($name2)){
|
|
|
+ if (!empty($name2)) {
|
|
|
$search = $name2;
|
|
|
}
|
|
|
if (!empty($search)) {
|
|
|
$ret = strstr($search, 'PH');
|
|
|
if (is_numeric($search) && strlen($search) == 4) {
|
|
|
$where['checkCode'] = $search;
|
|
|
- }elseif(!empty($ret)){
|
|
|
+ } elseif (!empty($ret)) {
|
|
|
$where['orderSn'] = $search;
|
|
|
} else {
|
|
|
$where['ghsName'] = ['like', $search];
|
|
|
@@ -737,8 +737,16 @@ class PurchaseOrderController extends BaseController
|
|
|
$orderSn = $get['orderSn'] ?? '';
|
|
|
$salt = $get['salt'] ?? '';
|
|
|
$adminId = $this->adminId ?? 0;
|
|
|
+ $onBooking = 0;
|
|
|
if (!empty($adminId) && empty($salt)) {
|
|
|
$orderData = PurchaseOrderClass::getOrderDetail($orderSn, $this->shopId);
|
|
|
+ $shop = $this->shop;
|
|
|
+ $bookSn = $orderData['bookSn'] ?? 0;
|
|
|
+ $shopBookSn = $shop->bookSn ?? 0;
|
|
|
+ if (!empty($shopBookSn) && $shopBookSn == $bookSn) {
|
|
|
+ $onBooking = 1;
|
|
|
+ }
|
|
|
+ $pfLevel = $shop->pfLevel ?? 0;
|
|
|
} else {
|
|
|
$info = PurchaseOrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
if (empty($info)) {
|
|
|
@@ -749,15 +757,11 @@ class PurchaseOrderController extends BaseController
|
|
|
}
|
|
|
$shopId = $info->shopId ?? 0;
|
|
|
$orderData = PurchaseOrderClass::getOrderDetail($orderSn, $shopId);
|
|
|
- }
|
|
|
- $shop = $this->shop;
|
|
|
- $bookSn = $orderData['bookSn']??0;
|
|
|
- $shopBookSn = $shop->bookSn??0;
|
|
|
- $onBooking = 0;
|
|
|
- if(!empty($shopBookSn) && $shopBookSn == $bookSn){
|
|
|
- $onBooking = 1;
|
|
|
+ $shop = ShopClass::getById($shopId, true);
|
|
|
+ $pfLevel = $shop->pfLevel ?? 0;
|
|
|
}
|
|
|
$orderData['onBooking'] = $onBooking;
|
|
|
+ $orderData['pfLevel'] = $pfLevel;
|
|
|
util::success($orderData);
|
|
|
}
|
|
|
|