|
@@ -38,6 +38,14 @@ class Manufacture extends Api
|
|
|
}else{
|
|
}else{
|
|
|
$status = '1-已完工';
|
|
$status = '1-已完工';
|
|
|
}
|
|
}
|
|
|
|
|
+ $page = 0;
|
|
|
|
|
+ $limit = 15;
|
|
|
|
|
+ if (isset($param['page'])){
|
|
|
|
|
+ $page = $param['page'];
|
|
|
|
|
+ }
|
|
|
|
|
+ if (isset($param['limit'])){
|
|
|
|
|
+ $limit = $param['limit'];
|
|
|
|
|
+ }
|
|
|
$where = [
|
|
$where = [
|
|
|
'gd_statu' => $status,
|
|
'gd_statu' => $status,
|
|
|
'行号' => '1',
|
|
'行号' => '1',
|
|
@@ -49,7 +57,8 @@ class Manufacture extends Api
|
|
|
rtrim(接单日期) as 接单日期,rtrim(交货日期) as 交货日期,rtrim(订单数量) as 订单数量,rtrim(计量单位) as 计量单位,rtrim(Gd_khmc) as 客户名称,
|
|
rtrim(接单日期) as 接单日期,rtrim(交货日期) as 交货日期,rtrim(订单数量) as 订单数量,rtrim(计量单位) as 计量单位,rtrim(Gd_khmc) as 客户名称,
|
|
|
rtrim(Gd_客户代号) as 客户编号,rtrim(Gd_desc) as 备注,rtrim(客户料号) as 客户料号,rtrim(Sys_id) as 创建用户,rtrim(Sys_rq) as 创建时间,
|
|
rtrim(Gd_客户代号) as 客户编号,rtrim(Gd_desc) as 备注,rtrim(客户料号) as 客户料号,rtrim(Sys_id) as 创建用户,rtrim(Sys_rq) as 创建时间,
|
|
|
rtrim(Mod_rq) as 修改时间,rtrim(Uniqid) as UNIQID,rtrim(投料率) as 投料率,rtrim(销售订单号) as 销售订单号';
|
|
rtrim(Mod_rq) as 修改时间,rtrim(Uniqid) as UNIQID,rtrim(投料率) as 投料率,rtrim(销售订单号) as 销售订单号';
|
|
|
- $list = \db('工单_基本资料')->where($where)->field($field)->limit(500)->order('Uniqid desc')->select();
|
|
|
|
|
|
|
+ $list = \db('工单_基本资料')->where($where)->field($field)->limit(($page-1)*$limit,$limit)->order('Uniqid desc')->select();
|
|
|
|
|
+ $total = \db('工单_基本资料')->where($where)->count();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|
|
|
$this->success('',[]);
|
|
$this->success('',[]);
|
|
|
}
|
|
}
|
|
@@ -64,7 +73,7 @@ class Manufacture extends Api
|
|
|
}
|
|
}
|
|
|
unset($list[$key]['成品名称']);
|
|
unset($list[$key]['成品名称']);
|
|
|
}
|
|
}
|
|
|
- $this->success('成功',$list);
|
|
|
|
|
|
|
+ $this->success('成功',['data'=>$list,'total'=>$total]);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -644,11 +653,6 @@ class Manufacture extends Api
|
|
|
if (empty($param)){
|
|
if (empty($param)){
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
- $where = [
|
|
|
|
|
- 'Gy0_sbbh' => ['like','%'.$param['machine'].'%'],
|
|
|
|
|
- 'Gy0_sj1' => ['between',['1900-01-01 00:00:01','2098-12-31 23:59:59']],
|
|
|
|
|
- 'PD_WG' => '1900-01-01 00:00:00'
|
|
|
|
|
- ];
|
|
|
|
|
$machine = $param['machine'];
|
|
$machine = $param['machine'];
|
|
|
$list = \db('工单_工艺资料')
|
|
$list = \db('工单_工艺资料')
|
|
|
->alias('a')
|
|
->alias('a')
|