|
@@ -63,7 +63,10 @@ class Process extends Base
|
|
|
{
|
|
|
$param = $this->request->filter('trim')->only(['type', 'orderCode'], 'post');
|
|
|
|
|
|
- $val = Validate::rule([]);
|
|
|
+ $val = Validate::rule([
|
|
|
+ 'type'=>'require',
|
|
|
+ 'orderCode'=>'require',
|
|
|
+ ]);
|
|
|
if (!$val->check($param)) return error_show(1004, $val->getError());
|
|
|
// $process_type = isset($this->post['type']) && $this->post['type'] != "" ? $this->post['type'] : "";
|
|
|
// if ($process_type == "") {
|
|
@@ -86,7 +89,7 @@ class Process extends Base
|
|
|
->leftJoin('action_process b', 'b.order_type=a.order_type AND b.order_process=a.action_process')
|
|
|
->where(["a.order_type" => $param['type']])
|
|
|
->order('a.id', 'asc')
|
|
|
- ->field('a.id,a.action_uid,a.action_name,a.addtime,a.action_process,a.order_type,a.source,a.action_process,b.status_name');
|
|
|
+ ->field('a.id,a.action_uid,a.action_name,a.addtime,a.action_process,a.order_type,a.source,a.level,a.action_process,b.status_name');
|
|
|
if (is_numeric($param['orderCode'])) $rs->where('a.order_id', $param['orderCode']);
|
|
|
else $rs->where('a.order_code', $param['orderCode']);
|
|
|
|
|
@@ -95,7 +98,9 @@ class Process extends Base
|
|
|
->toArray();
|
|
|
|
|
|
$i = 0;
|
|
|
- $data = [['status_name' => '创建', 'order_process' => -1]];
|
|
|
+ if($param['type']=='FHGD') $data = [['status_name' => '创建-待发货', 'order_process' => -1]];//针对发货工单流程特殊处理
|
|
|
+ else $data = [['status_name' => '创建', 'order_process' => -1]];
|
|
|
+
|
|
|
foreach ($node as $value) {
|
|
|
|
|
|
$data[$i] = array_merge($data[$i], [
|
|
@@ -103,6 +108,7 @@ class Process extends Base
|
|
|
'action_name' => $value['action_name'],
|
|
|
'addtime' => $value['addtime'],
|
|
|
'source' => $value['source'],
|
|
|
+ 'level' => $value['level'],
|
|
|
]);
|
|
|
|
|
|
$data[$i + 1] = [
|