Browse Source

生产进程

qiuenguang 1 year ago
parent
commit
731ace2aa1
1 changed files with 6 additions and 1 deletions
  1. 6 1
      application/api/controller/Manufacture.php

+ 6 - 1
application/api/controller/Manufacture.php

@@ -5,6 +5,7 @@ namespace app\api\controller;
 
 use app\common\controller\Api;
 use Monolog\Handler\IFTTTHandler;
+use Overtrue\Socialite\Providers\WeWorkProvider;
 use think\Db;
 use think\Request;
 use function fast\e;
@@ -1043,14 +1044,18 @@ class Manufacture extends Api
         if(empty($param)){
             $this->error('参数错误');
         }
+        if (isset($param['search'])){
+            $where['a.订单编号'] = ['like','%'.$param['search'].'%'];
+        }
         $time = date('Y-m',strtotime($param['mouth']));
+        $where['b.Sys_rq'] = ['like',$time.'%'];
         $list = \db('工单_印件资料')
             ->alias('a')
             ->join('工单_基本资料 b','a.订单编号 = b.订单编号')
             ->join('设备_产量计酬 c','a.订单编号 = c.订单编号 AND a.子订单编号 = c.子订单编号','left')
             ->field('a.订单编号,a.子订单编号,a.款号,a.颜色,a.zdtotal as 制单总数,a.sctotal as 裁切总数,a.ck_rq as 出库日期,
             SUM(c.数量) as 车缝产量,c.后道,c.大烫,c.总检,c.包装')
-            ->where('b.Sys_rq','like',$time.'%')
+            ->where($where)
             ->group('a.子订单编号')
             ->order('a.Uniqid')
             ->select();