Browse Source

报备单优化

wufeng 2 years ago
parent
commit
1f383f286e
2 changed files with 10 additions and 1 deletions
  1. 9 1
      app/abutment/controller/Sale.php
  2. 1 0
      app/abutment/logic/Filing.php

+ 9 - 1
app/abutment/controller/Sale.php

@@ -759,7 +759,15 @@ class Sale extends HomeBaseController
 
         if (!$val->check($param)) return json_show(1004, $val->getError());
 
-        $order = Db::name('consult_bids')
+
+        $rs=Db::name('good_zixun')
+            ->field(true)
+            ->where(['is_del'=>0,'spuCode'=>$param['spuCode']])
+            ->findOrEmpty();
+        if (empty($rs)) return json_show(1003, "商品数据未找到");
+
+        if ($rs['order_type'] == 4) $order = $rs;
+        else  $order = Db::name('consult_bids')
             ->field(true)
             ->where(['spuCode' => $param['spuCode'], 'is_del' => 0])
             ->find();

+ 1 - 0
app/abutment/logic/Filing.php

@@ -248,6 +248,7 @@ class Filing
                     'companyNo' => $filing['customerCode'],
                     'proof_type' => '',
                     'proof_url' => '',
+                    'order_type' => $order_type
                 ]);
 
             $orderCode = makeNo('QR');