Browse Source

设置下次保养

lizhen_gitee 1 year ago
parent
commit
dd8258fbc3
1 changed files with 22 additions and 0 deletions
  1. 22 0
      application/api/controller/company/Order.php

+ 22 - 0
application/api/controller/company/Order.php

@@ -130,6 +130,28 @@ class Order extends Apic
         $this->success('操作成功',$baoyang_switch);
     }
 
+    //设置保养时间提醒
+    public function baoyang(){
+        $id = input('id',0);
+
+        $info = Db::name('order')->where('id',$id)->where('company_id',$this->auth->company_id)->find();
+        if(!$info){
+            $this->error('不存在的订单');
+        }
+
+        //更新
+        $next_date       = input('next_date','');
+        $next_carlicheng = input('next_carlicheng','');
+        $data = [
+            'next_date'       => $next_date,
+            'next_carlicheng' => $next_carlicheng,
+        ];
+
+        Db::name('order')->where('id',$id)->update($data);
+        $this->success('操作成功');
+
+    }
+
     //追加列表
     public function appen_lists(){
         $id = input('id',0);