|
|
@@ -21,6 +21,8 @@ use Yii;
|
|
|
class PurchaseOrderController extends BaseController
|
|
|
{
|
|
|
|
|
|
+ public $guestAccess = ['detail'];
|
|
|
+
|
|
|
//打印多联 ssh 2024509
|
|
|
public function actionPrintPaper()
|
|
|
{
|
|
|
@@ -583,8 +585,23 @@ class PurchaseOrderController extends BaseController
|
|
|
//订单详情
|
|
|
public function actionDetail()
|
|
|
{
|
|
|
- $orderSn = Yii::$app->request->get('orderSn', '');
|
|
|
- $orderData = PurchaseOrderClass::getOrderDetail($orderSn, $this->shopId);
|
|
|
+ $get = Yii::$app->request->get('');
|
|
|
+ $orderSn = $get['orderSn'] ?? '';
|
|
|
+ $salt = $get['salt'] ?? '';
|
|
|
+ $adminId = $this->adminId ?? 0;
|
|
|
+ if (!empty($adminId)) {
|
|
|
+ $orderData = PurchaseOrderClass::getOrderDetail($orderSn, $this->shopId);
|
|
|
+ } else {
|
|
|
+ $info = PurchaseOrderClass::getByCondition(['orderSn' => $orderSn], true);
|
|
|
+ if (empty($info)) {
|
|
|
+ util::fail('没有找到采购单');
|
|
|
+ }
|
|
|
+ if ($info->salt != $salt) {
|
|
|
+ util::fail('不是你的采购单');
|
|
|
+ }
|
|
|
+ $shopId = $info->shopId ?? 0;
|
|
|
+ $orderData = PurchaseOrderClass::getOrderDetail($orderSn, $shopId);
|
|
|
+ }
|
|
|
util::success($orderData);
|
|
|
}
|
|
|
|