dever 3 роки тому
батько
коміт
ea0bcd5a68

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

@@ -46,7 +46,7 @@ return array
     'status' => $status,
     'end' => array
     (
-        'update' => 'option/lib/manage.setAgreement_commit',
+        'update' => 'option/lib/manage.setAgreement',
     ),
     # 数据结构
     'struct' => array
@@ -352,7 +352,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'),
         ),
     ),
 

+ 1 - 0
service/option/database/bill_jiaofu.php

@@ -310,6 +310,7 @@ return array
             (
                 'status' => 'yes',
                 'qdate' => 'yes',
+                'agreement_id' => 'yes',
             ),
             'type' => 'update',
         ),

+ 1 - 1
service/option/lib/Cash.php

@@ -236,7 +236,7 @@ class Cash
     */
 
     # 确认期权价值
-    public function setValue($info)
+    public function setValue_commit($info)
     {
         $state = Dever::db('option/bill_jiaofu')->upYes(array('where_start' => $info['jiaofu_date'], 'where_aid' => $info['aid'], 'where_status' => 2, 'set_agreement_id' => $info['id'], 'set_status' => 1, 'set_qdate' => time()));
 

+ 2 - 2
service/option/lib/Manage.php

@@ -20,7 +20,7 @@ class Manage
     }
 
     # 协议审核
-    public function setAgreement_commit($id, $name, $data)
+    public function setAgreement($id, $name, $data)
     {
         Dever::config('base')->hook = true;
         $update = array();
@@ -37,7 +37,7 @@ class Manage
             $update['where_id'] = $info['id'];
             $state = Dever::db('option/agreement')->update($update);
             if ($state && $audit == 3) {
-                Dever::load('option/lib/cash.setValue', $info);
+                Dever::load('option/lib/cash.setValue_commit', $info);
             }
         }
     }