|
@@ -265,7 +265,7 @@ class DispatchService extends Service
|
|
|
}
|
|
|
|
|
|
public function orderListRule($data){
|
|
|
- if(empty($data['process_id'])) return [false, '工序必须选择!'];
|
|
|
+// if(empty($data['process_id'])) return [false, '工序必须选择!'];
|
|
|
if(empty($data['out_order_no_time'][0]) || empty($data['out_order_no_time'][1])) return [false,'制单日期必须选择'];
|
|
|
$bool = $this->is_same_month($data['out_order_no_time'][0],$data['out_order_no_time'][1]);
|
|
|
if(! $bool) return [false,'制单日期必须同月!'];
|
|
@@ -274,7 +274,7 @@ class DispatchService extends Service
|
|
|
$process_model = new OrdersProductProcess(['channel' => $time]);
|
|
|
if(! $process_model->is_table_isset()) return [true, []];//不存在process子表 返回空数据
|
|
|
$process_array = $process_model->where('del_time',0)
|
|
|
- ->where('process_id',$data['process_id'])
|
|
|
+// ->where('process_id',$data['process_id'])
|
|
|
->distinct()
|
|
|
->select('order_product_id')
|
|
|
->get()->toArray();
|
|
@@ -290,7 +290,7 @@ class DispatchService extends Service
|
|
|
if(in_array(false, $data['quantity'], true) || in_array(0, $data['quantity'], true) || in_array('', $data['quantity'], true))return [false,'数量不能为空!'];
|
|
|
if(empty($data['dispatch_time'][0]) || empty($data['dispatch_time'][1])) return [false,'计划生产时间不能为空!'];
|
|
|
if(empty($data['out_order_no_time'][0]) || empty($data['out_order_no_time'][1])) return [false,'制单时间不能为空!'];
|
|
|
- if($this->isEmpty($data,'process_id')) return [false,'工序不能为空!'];
|
|
|
+// if($this->isEmpty($data,'process_id')) return [false,'工序不能为空!'];
|
|
|
if(! isset($data['is_split'])) return [false,'是否拆分标识不能为空!'];
|
|
|
|
|
|
$result = OrdersProduct::whereIn('id',$data['id'])
|