|
|
@@ -315,17 +315,17 @@ class Order extends Backend
|
|
|
|
|
|
//生产作业票
|
|
|
public function task(){
|
|
|
- $ids = input('ids');
|
|
|
+ $ids = input('ids');//获取订单id
|
|
|
if (!$ids) {
|
|
|
$this->error(__('No Results were found'));
|
|
|
}
|
|
|
if (false === $this->request->isPost()) {
|
|
|
- //生产部=>开票人
|
|
|
+ //生产部=>开票人=>审核人
|
|
|
$sckp = Db::name('personnel')->where('bid',"=",3)->where('position','=',"sckp")->order('name desc')->select();
|
|
|
- //生产部=>审核人
|
|
|
$scsh = Db::name('personnel')->where('bid',"=",3)->where('position','=',"scsh")->order('name desc')->select();
|
|
|
$this->assign('sckp',$sckp);
|
|
|
$this->assign('scsh',$scsh);
|
|
|
+
|
|
|
$order = Db::name('order')->where('id',$ids)->find();
|
|
|
$map = [];
|
|
|
$map['name'] = array('like','%'.$order['product'].'%');
|
|
|
@@ -335,13 +335,15 @@ class Order extends Backend
|
|
|
if (!empty($list)){
|
|
|
$res = $this->get_repeat_data($list);
|
|
|
}
|
|
|
+
|
|
|
//批次号顺序新增
|
|
|
$tastbach = Db::name('task')->order('bach desc')->find();
|
|
|
$bach = $tastbach['bach'] +1;
|
|
|
$this->view->assign('bach',$bach);
|
|
|
-// halt($res);die;
|
|
|
$this->view->assign('ids',$ids);
|
|
|
+
|
|
|
$this->view->assign('row', $res);
|
|
|
+ $this->view->assign('machineList',\app\admin\model\Machine::select());
|
|
|
return $this->view->fetch();
|
|
|
}
|
|
|
}
|