feat:material_application dish
This commit is contained in:
@@ -92,6 +92,9 @@ class MaterialService extends BaseService{
|
||||
if (!empty($processing)){
|
||||
$info->processing = $processing;
|
||||
}
|
||||
if($info->status == MaterialCode::AUDIT_REFUSE){
|
||||
$info->status = MaterialCode::UN_AUDIT;
|
||||
}
|
||||
$info->operator_id = $this->userId;
|
||||
|
||||
if (!$info->save()) throw new ErrException('申请修改失败');
|
||||
@@ -104,7 +107,7 @@ class MaterialService extends BaseService{
|
||||
$id = (int)$this->request->input('id');
|
||||
$info = $this->MaterialApplication->getInfoById($id);
|
||||
$info->is_del = 2;
|
||||
if ($info->status == MaterialCode::ALL_OUT) throw new ErrException("已全部出库");
|
||||
if ($info->status == MaterialCode::ALL_OUT || $info->status == MaterialCode::PART_OUT) throw new ErrException("已进行出库");
|
||||
if (!$info->save()) throw new ErrException('申请删除失败');
|
||||
return $this->return->success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user