cqp 4 هفته پیش
والد
کامیت
a5cc60f07f
1فایلهای تغییر یافته به همراه12 افزوده شده و 0 حذف شده
  1. 12 0
      app/Service/WorkFlowService.php

+ 12 - 0
app/Service/WorkFlowService.php

@@ -70,6 +70,18 @@ class WorkFlowService extends Service
         return [true, $customer];
         return [true, $customer];
     }
     }
 
 
+    public function workFlowDel($data, $user){
+        if($this->isEmpty($data,'id')) return [false,'请选择数据!'];
+        $customer = WorkFlowTemplates::where('del_time',0)
+            ->where('id',$data['id'])
+            ->first();
+        if(empty($customer)) return [false,'审批流不存在或已被删除'];
+        $customer->del_time = time();
+        $customer->save();
+
+        return [true, ''];
+    }
+
     public function workFlowCommon($data,$user, $field = []){
     public function workFlowCommon($data,$user, $field = []){
         if(empty($field)) $field = WorkFlowTemplates::$field;
         if(empty($field)) $field = WorkFlowTemplates::$field;