|
|
@@ -2646,6 +2646,13 @@ class WorkOrder extends Api
|
|
|
if (empty($param)){
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+ $where= [];
|
|
|
+ if (isset($param['search'])) {
|
|
|
+ $where['a.物料名称|d.款号|c.订单编号|b.BOM_颜色'] = ['like', $param['search'] . '%'];
|
|
|
+ }
|
|
|
+ if (isset($param['date'])) {
|
|
|
+ $where['d.rq'] = ['like', $param['date'] . '%'];
|
|
|
+ }
|
|
|
$field = '
|
|
|
a.批次号,
|
|
|
a.关联号,
|
|
|
@@ -2661,6 +2668,7 @@ class WorkOrder extends Api
|
|
|
a.sys_id as 入仓人员,
|
|
|
a.sys_rq as 入仓日期,
|
|
|
b.BOM_颜色 as 颜色,
|
|
|
+ d.款号,
|
|
|
b.BOM_计划用量 as 计划用料,
|
|
|
b.BOM_标准用量 as 定额用料,
|
|
|
b.BOM_计划门幅 as 计划门幅,
|
|
|
@@ -2674,7 +2682,7 @@ class WorkOrder extends Api
|
|
|
->join('工单关联表 c','a.关联号 = c.关联编号')
|
|
|
->field($field)
|
|
|
->whereNull('d.Mod_rq')
|
|
|
- ->where('d.rq','like',$param['date'].'%')
|
|
|
+ ->where($where)
|
|
|
// ->where('a.sys_rq','like',$param['date'].'%')
|
|
|
->group('a.批次号')
|
|
|
->select();
|