|
|
@@ -342,12 +342,16 @@ class WorkOrder extends Api
|
|
|
->cache(true,84600)
|
|
|
->find();
|
|
|
if (empty($printData)){
|
|
|
- $this->error('未找到该工单印件资料');
|
|
|
+ $list['印件名称'] = '';
|
|
|
+ $list['印件代号'] = '';
|
|
|
+ $list['平张投料'] = '';
|
|
|
+ $list['印件ID'] = '';
|
|
|
+ }else{
|
|
|
+ $list['印件名称'] = $printData['印件名称'];
|
|
|
+ $list['印件代号'] = $printData['印件代号'];
|
|
|
+ $list['平张投料'] = $printData['平张投料'];
|
|
|
+ $list['印件ID'] = $printData['id'];
|
|
|
}
|
|
|
- $list['印件名称'] = $printData['印件名称'];
|
|
|
- $list['印件代号'] = $printData['印件代号'];
|
|
|
- $list['平张投料'] = $printData['平张投料'];
|
|
|
- $list['印件ID'] = $printData['id'];
|
|
|
$this->success('成功',$list);
|
|
|
}
|
|
|
|
|
|
@@ -1648,4 +1652,31 @@ class WorkOrder extends Api
|
|
|
$this->error('删除失败');
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 工艺资料添加->工序损耗代码
|
|
|
+ * @return void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ * @throws \think\exception\DbException
|
|
|
+ */
|
|
|
+ public function WastageList()
|
|
|
+ {
|
|
|
+ if ($this->request->isGet() === false){
|
|
|
+ $this->error('请求错误');
|
|
|
+ }
|
|
|
+ $param = $this->request->param();
|
|
|
+ if (isset($param['search']) === false){
|
|
|
+ $this->error('参数错误');
|
|
|
+ }
|
|
|
+ $order = \db('dic_lzsh')
|
|
|
+ ->where('sys_mc','like',substr($param['search'],0,6).'%')
|
|
|
+ ->value('rtrim(sys_bh) as 编号');
|
|
|
+ $list = \db('dic_lzsh')
|
|
|
+ ->where('sys_bh','like',$order.'%')
|
|
|
+ ->where('sys_bh','<>',$order)
|
|
|
+ ->field('rtrim(sys_bh) as 编号,rtrim(sys_mc) as 名称,rtrim(UniqId) as UniqId')
|
|
|
+ ->select();
|
|
|
+ $this->success('成功',$list);
|
|
|
+ }
|
|
|
}
|