|
@@ -51,7 +51,7 @@ class Feeding extends Backend
|
|
|
return $this->view->fetch();
|
|
return $this->view->fetch();
|
|
|
}
|
|
}
|
|
|
$params = $this->request->post('row/a');
|
|
$params = $this->request->post('row/a');
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
$params = $this->preExcludeFields($params);
|
|
$params = $this->preExcludeFields($params);
|
|
|
$tid = Db::name('task')->where('bach',$params['bach'])->order('id desc')->find();
|
|
$tid = Db::name('task')->where('bach',$params['bach'])->order('id desc')->find();
|
|
|
$arr = [];
|
|
$arr = [];
|
|
@@ -97,11 +97,11 @@ class Feeding extends Backend
|
|
|
$res = Db::name('task')->where('bach',$bach)->order('create','desc')->select();
|
|
$res = Db::name('task')->where('bach',$bach)->order('create','desc')->select();
|
|
|
//已有过工序
|
|
//已有过工序
|
|
|
if($row){
|
|
if($row){
|
|
|
- Session::set('process',serialize($row));
|
|
|
|
|
|
|
+// Session::set('process',serialize($row));
|
|
|
$result['inspector'] = $row[0]['inspector'];
|
|
$result['inspector'] = $row[0]['inspector'];
|
|
|
$result['operator'] = $row[0]['operator'];
|
|
$result['operator'] = $row[0]['operator'];
|
|
|
}else{
|
|
}else{
|
|
|
- Session::delete('process');
|
|
|
|
|
|
|
+// Session::delete('process');
|
|
|
$result['inspector'] = '';
|
|
$result['inspector'] = '';
|
|
|
$result['operator'] = '';
|
|
$result['operator'] = '';
|
|
|
}
|
|
}
|
|
@@ -113,7 +113,9 @@ class Feeding extends Backend
|
|
|
public function get_formula(){
|
|
public function get_formula(){
|
|
|
$bach = $this->request->post('bach');//批次号
|
|
$bach = $this->request->post('bach');//批次号
|
|
|
$num = $this->request->post('num');//生产量
|
|
$num = $this->request->post('num');//生产量
|
|
|
- $process = unserialize(Session::get('process'));
|
|
|
|
|
|
|
+// $process = unserialize(Session::get('process'));
|
|
|
|
|
+// print_r($process);die;
|
|
|
|
|
+ $process = Db::name('feeding')->where('bach',$bach)->select();
|
|
|
if($num){//如果有,批次号重复,需精确查找
|
|
if($num){//如果有,批次号重复,需精确查找
|
|
|
$res = Db::name('task')->alias('t')
|
|
$res = Db::name('task')->alias('t')
|
|
|
->join('formula_detail f','f.pid=t.fid','left')
|
|
->join('formula_detail f','f.pid=t.fid','left')
|