|
@@ -295,7 +295,7 @@ class FinishedOrderService extends Service
|
|
|
if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
|
|
|
if($this->isEmpty($data,'quantity')) return [false,'请填写完工数量!'];
|
|
|
foreach ($data['quantity'] as $value){
|
|
|
- if(! is_numeric($value) && $value < 0) return [false,'请填写正确的完工数量!'];
|
|
|
+ if(! is_numeric($value) && $value <= 0) return [false,'请填写正确的完工数量!'];
|
|
|
}
|
|
|
if($this->isEmpty($data,'finish_id') && $this->isEmpty($data,'team_id')) return [false,'人员和班组不能都为空!'];
|
|
|
|
|
@@ -692,7 +692,7 @@ class FinishedOrderService extends Service
|
|
|
|
|
|
$post = $waste = [];
|
|
|
foreach ($data as $value){
|
|
|
- if(! is_numeric($value['quantity']) && $value['quantity'] < 0) return [false,'请填写正确的完工数量!'];
|
|
|
+ if(! is_numeric($value['quantity']) && $value['quantity'] <= 0) return [false,'请填写正确的完工数量!'];
|
|
|
if(empty($value['finished_id']) && empty($value['team_id'])) return [false,'人员和班组必须填写一项!',''];
|
|
|
if(isset($post[$value['id']])){
|
|
|
$post[$value['id']] += $value['quantity'];
|