Browse Source

order_type处理

wufeng 2 years ago
parent
commit
6786d59500

+ 3 - 3
app/admin/controller/After.php

@@ -60,7 +60,7 @@ class After extends Base
 //	        $cgderid =$wsm['contactor'] ??0;
 //		}
 
-        if ($oder['order_type'] == 3) {
+        if ($oder['order_type'] == 3||$oder['order_type'] == 4) {
             $goon = Db::name("good_zixun")->where(["spuCode" => $oder['good_code'], "is_del" => 0])->find();
         } else {
             $goon = Db::name('good_platform')->alias('a')->join('good b', 'b.spuCode=a.spuCode', 'left')
@@ -302,7 +302,7 @@ class After extends Base
         $info['order_type'] = $orderinfo['order_type'];
         $info['sale_price'] = $orderinfo['sale_price'];
         $info['total_price'] = sprintf("%1\$.2f", $orderinfo['sale_price'] * $info['error_num']);
-        if ($orderinfo['order_type'] == 3) {
+        if ($orderinfo['order_type'] == 3 || $orderinfo['order_type'] == 4) {
             $goon = Db::name("good_zixun")->where(["spuCode" => $orderinfo['good_code'], "is_del" => 0])->find();
         } else {
             $goon = Db::name('good_platform')->alias('a')->join('good b', 'b.spuCode=a.spuCode', 'left')
@@ -1416,7 +1416,7 @@ class After extends Base
 
 
         //根据是否咨询类商品,分别处理
-        if ($info['order_type'] == 3) return $this->createSaleZixun($info['id'], $info['good_code'], $info, $old_sale, $rm, $ri, $old_out['addrid'], $param['token']);
+        if ($info['order_type'] == 3||$info['order_type'] == 4) return $this->createSaleZixun($info['id'], $info['good_code'], $info, $old_sale, $rm, $ri, $old_out['addrid'], $param['token']);
         else return $this->createSaleNotZixun($info['id'], $info['good_code'], $info, $old_sale, $rm, $ri, $old_out, $param['token']);
 
     }

+ 4 - 4
app/admin/controller/Purch.php

@@ -179,7 +179,7 @@ class Purch extends Base
 //			$supplierCgder =Db::name("supplier")->where(["code"=>$value['supplierNo']])->findOrEmpty();
 //            $value['supplier_cgderid'] = $supplierCgder['personid'] ??'';
 //            $value['supplier_cgder'] = $supplierCgder['person'] ??'';
-            if($value['order_type']==3){
+            if($value['order_type']==3||$value['order_type']==4){
                 $goon = Db::name("good_zixun")->where(["spuCode"=>$value['spuCode'],"is_del"=>0])->find();
                 $value["speclist"]=isset($goon['specinfo'])&&$goon['specinfo']!=""? json_decode($goon['specinfo'],true):"";
             }else {
@@ -240,7 +240,7 @@ class Purch extends Base
         $im = Db::name('purchease_back')->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->select();
         $var=[];
         foreach ($im as $value){
-            if($data['order_type']==3){
+            if($data['order_type']==3||$data['order_type']==4){
                 $goo = Db::name("good_zixun")->where(["spuCode"=>$value['spuCode'],"is_del"=>0])->find();
             }else {
                 $goo =Db::name('good_basic')->where(['spuCode'=>$value['spuCode']])->find();
@@ -254,7 +254,7 @@ class Purch extends Base
         }
         //采购工差单
         $dom = Db::name("purchease_diff")->where(['cgdNo'=>$data['cgdNo'],'is_del'=>0])->find();
-        if($data['order_type']==3){
+        if($data['order_type']==3||$data['order_type']==4){
             $goon = Db::name("good_zixun")->where(["spuCode"=>$data['spuCode'],"is_del"=>0])->find();
         }else {
             $goon =Db::name('good_basic')->where(['spuCode'=>$data['spuCode']])->find();
@@ -772,7 +772,7 @@ class Purch extends Base
         if($cg==""){
             return error_show(1002,"未找到采购单数据");
         }
-        if($cg['order_type']==3){
+        if($cg['order_type']==3||$cg['order_type']==4){
             $gd = Db::name("good_zixun")->where(["spuCode"=>$cg['spuCode']])->find();
         }else {
             $gd =Db::name('good_basic')->where(['spuCode'=>$cg['spuCode']])->find();

+ 1 - 1
app/admin/controller/Purchback.php

@@ -209,7 +209,7 @@ public function backfe(){
             return error_show(1002,"未找到数据");
         }
         $dom = Db::name("purchease_order")->where(['cgdNo'=>$info['cgdNo'],'is_del'=>0])->find();
-        if($dom['order_type']==3){
+        if($dom['order_type']==3||$dom['order_type']==4){
             $goon = Db::name("good_zixun")->where(["spuCode"=>$dom['spuCode'],"is_del"=>0])->find();
         }else {
             $goon =Db::name('good_basic')->where(['spuCode'=>$dom['spuCode']])->find();