dever 3 years ago
parent
commit
7496a83910
2 changed files with 19 additions and 1 deletions
  1. 8 1
      service/option/database/agreement.php
  2. 11 0
      service/option/lib/Manage.php

+ 8 - 1
service/option/database/agreement.php

@@ -44,6 +44,10 @@ return array
     'lang' => '期权合同管理',
     'order' => 10,
     'status' => $status,
+    'start' => array
+    (
+        'update' => 'option/lib/manage.setAudit',
+    ),
     'end' => array
     (
         'update' => 'option/lib/manage.setAgreement',
@@ -303,6 +307,7 @@ return array
             'value'     => $col ? '3' : '1',
             'list'      => true,
             'list_order' => 7,
+            'control'   => 'audit',
         ),
 
         'audit_desc'        => array
@@ -313,8 +318,10 @@ return array
             'desc'      => '备注',
             'match'     => 'option',
             'update'    => 'textarea',
+            'value'     => '',
             'list'      => '"{audit_desc}" ? "{audit_desc}" : "-"',
             'list_order'  => 9,
+            'show'      => 'audit=4',
         ),
 
         'audit_date'     => array
@@ -371,7 +378,7 @@ return array
             'new' => array('查看', '"lib/agreement.location?id={id}"', 'option'),
             //'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'),
         ),
     ),
 

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

@@ -266,4 +266,15 @@ class Manage
             }
         }
     }
+
+    public function setAudit($id, $name, $data)
+    {
+        $audit = Dever::param('audit', $data);
+        if ($audit == 3) {
+            $data['set_audit_desc'] = 'null';
+            return $data;
+        } else {
+            return $data;
+        }
+    }
 }