Quellcode durchsuchen

优化产品工艺复制

huangsanjia vor 1 Jahr
Ursprung
Commit
680a2d60aa
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. 3 1
      application/api/controller/Product.php

+ 3 - 1
application/api/controller/Product.php

@@ -357,11 +357,13 @@ class Product extends Api
             if (!$gyResult){
                 $this->error('复制产品工艺资料数据失败');
             }
-        }else{
+        }elseif ($params['is_copy_gy'] == 0 && $params['is_copy_yb'] == 1){
             $ybResult = db('产品_印版资料')->insertAll($ybList);
             if (!$ybResult){
                 $this->error('复制产品印版资料数据失败');
             }
+        }else{
+            $this->success('工艺、印版至少选中一个');
         }
         $this->success('工艺复制成功');
     }