rabin 2 years ago
parent
commit
38d33e9162
3 changed files with 23 additions and 4 deletions
  1. 3 1
      service/bill/database/tixian.php
  2. 8 1
      service/bill/lib/Manage.php
  3. 12 2
      service/bill/lib/Tixian.php

+ 3 - 1
service/bill/database/tixian.php

@@ -31,7 +31,9 @@ $type = array
 );
 
 $list_button = array();
-$list_button['list'] = array('查看详情', '"push_cash&project=bill&id={cash_id}&page_type=1&[refer]"');
+$list_button['list'] = array('查看详情', '"push_cash&project=bill&id={cash_id}&page_type=1&[refer]"', '{type} == 1');
+$list_button['list1'] = array('查看详情', '"push_cash&project=bill&id={cash_id}&page_type=1&[refer]"', '{type} == 2');
+$list_button['list2'] = array('查看详情', '"user_money_sign&project=shop&id={cash_id}&page_type=1&[refer]"', '{type} == 3');
 if (Dever::load('manage/auth')->checkFunc('bill.tixian', 'edit1', '发放')) {
     $list_button['fast'] = array('发放', '"tixian&where_id={id}&col=audit,audit_desc,pic&oper_save_jump=tixian&oper_table=tixian&oper_parent=tixian"', '{status} == 1 && "{bill-cash-status}" == 2');
 }

+ 8 - 1
service/bill/lib/Manage.php

@@ -247,7 +247,14 @@ class Manage
                  $audit = '已作废';
             }
             $cdate = date('Y-m-d H:i',$v['cdate']);
-            $cash = Dever::db('bill/cash')->find($v['cash_id']);
+            if ($v['type'] == 1) {
+                $cash = Dever::db('bill/cash')->find($v['cash_id']);
+            } elseif ($v['type'] == 2) {
+                $cash = Dever::db('shop/record')->find($v['cash_id']);
+            } elseif ($v['type'] == 3 {
+                $cash = Dever::db('shop/user_money')->find($v['cash_id']);
+            }
+            
             if ($cash['operdate']) {
                 $adate = date('Y-m-d H:i',$cash['operdate']);
             } else {

+ 12 - 2
service/bill/lib/Tixian.php

@@ -21,7 +21,7 @@ class Tixian
         }
     }
 
-    public function up($mid, $ycash, $cash,$sign, $type = 1)
+    public function up($mid, $ycash, $cash,$sign, $type = 1, $cash_id = false)
     {
         $state = false;
         if ($type == 1) {
@@ -56,6 +56,9 @@ class Tixian
     		$data['cash'] = $cash;
             $data['sign'] = $sign;
             $data['type'] = $type;
+            if ($cash_id) {
+                $data['cash_id'] = $cash_id;
+            }
             $data['status'] = -1;
     		return Dever::db('bill/tixian')->insert($data);
         }
@@ -90,7 +93,14 @@ class Tixian
 
         $html['name'] = $info['order_num'].'<br />'.$cdate.'<br />'.$operdate;
         $html['money'] = $info['ycash'].'<br />'.$info['cash'].'<br />'.$info['yue'];
-        $cash = Dever::db('bill/cash')->find($id);
+        if ($info['type'] == 1) {
+            $cash = Dever::db('bill/cash')->find($info['cash_id']);
+        } elseif ($info['type'] == 2) {
+            $cash = Dever::db('shop/record')->find($info['cash_id']);
+        } elseif ($info['type'] == 3) {
+            $cash = Dever::db('shop/user_money')->find($info['cash_id']);
+        }
+        
         if($cash['status']==1){
             $name = '待审核';
         }elseif($cash['status']==2){