|
@@ -1300,8 +1300,19 @@ class PurchaseController extends BaseController
|
|
|
{
|
|
{
|
|
|
$get = Yii::$app->request->get();
|
|
$get = Yii::$app->request->get();
|
|
|
$id = $get['id'] ?? 0;
|
|
$id = $get['id'] ?? 0;
|
|
|
|
|
+ $salt = $get['salt'] ?? '';
|
|
|
$info = GhsClass::getGhsInfo($id);
|
|
$info = GhsClass::getGhsInfo($id);
|
|
|
- GhsClass::valid($info, $this->shopId);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if (!empty($salt)) {
|
|
|
|
|
+ if (!isset($info['salt']) || $info['salt'] != $salt) {
|
|
|
|
|
+ util::fail('供货商出错了');
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (!isset($info['ownShopId']) || $info['ownShopId'] != $this->shopId) {
|
|
|
|
|
+ util::fail('错误的供货商.');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$where = ['ghsId' => $id, 'debt' => PurchaseClass::DEBT_YES];
|
|
$where = ['ghsId' => $id, 'debt' => PurchaseClass::DEBT_YES];
|
|
|
$searchTime = $get['searchTime'] ?? '';
|
|
$searchTime = $get['searchTime'] ?? '';
|
|
|
if (!empty($searchTime)) {
|
|
if (!empty($searchTime)) {
|