dever 3 years ago
parent
commit
f94e59f377
2 changed files with 24 additions and 2 deletions
  1. 2 2
      service/option/database/agreement.php
  2. 22 0
      service/option/lib/Manage.php

+ 2 - 2
service/option/database/agreement.php

@@ -350,9 +350,9 @@ return array
         'list_button' => array
         (
             'new' => array('查看', '"lib/agreement.location?id={id}"', 'option'),
-            'oper' => array('作废并生成', '"option/lib/manage.dropAgreement?id={id}"', "{status} == 2"),
+            //'oper' => array('作废并生成', '"option/lib/manage.dropAgreement?id={id}"', "{status} == 2"),
             'oper1' => array('更新', '"option/lib/manage.upAgreement?id={id}"', "{status} == 2"),
-            'edit' => array('审核', 'audit,audit_desc', '{audit} >= 2'),
+            'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'),
         ),
     ),
 

+ 22 - 0
service/option/lib/Manage.php

@@ -162,4 +162,26 @@ class Manage
         }
         return '';
     }
+
+    public function upAgreement_api()
+    {
+        $id = Dever::input('id');
+        if ($id) {
+            Dever::load('option/lib/agreement')->upContent($id);
+        }
+        
+
+        return 'reload';
+    }
+
+    public function dropAgreement_api()
+    {
+        $id = Dever::input('id');
+        if ($id) {
+            Dever::load('option/lib/agreement')->drop($id);
+        }
+        
+
+        return 'reload';
+    }
 }