dever 6 years ago
parent
commit
032de9450d
2 changed files with 32 additions and 4 deletions
  1. 2 4
      product/database/order.php
  2. 30 0
      product/lib/Manage.php

+ 2 - 4
product/database/order.php

@@ -68,7 +68,7 @@ return array
 			'update'	=> 'text',
 			'search'	=> 'fulltext',
 			'list_name'	=> '订单信息',
-			'list'		=> 'Dever::load("service/lib/manage.showOrderUser", "{id}")',
+			'list'		=> 'Dever::load("product/lib/manage.showOrderUser", "{id}")',
 		),
 
 		'uid'		=> array
@@ -179,9 +179,7 @@ return array
 		'edit' => false,
 		'insert' => false,
 
-		'list_button' => array(
-			'list' => array('兑换码列表', '"info&project=code&search_option_product_id={id}&search_option_product_price_id={id}&oper_parent=info&oper_project=product"'),
-		),
+		
 	),
 
 	'request' => array

+ 30 - 0
product/lib/Manage.php

@@ -0,0 +1,30 @@
+<?php
+namespace Product\Lib;
+
+use Dever;
+
+class Manage
+{
+    public function showOrderUser($id)
+    {
+        $info = Dever::db('product/order')->one($id);
+
+        $table = array();
+
+        $user = Dever::db('passport/user')->one($info['uid']);
+
+        $table['用户名'] = $user['username'];
+        $table['手机号'] = $user['mobile'];
+        $table['产品名'] = $info['name'];
+        if ($info['type'] == 1) {
+            $table['支付方式'] = '购买';
+            $table['支付金额'] = $info['cash'];
+        } else {
+            $table['支付方式'] = '兑换';
+            $table['兑换码'] = $info['code'];
+        }
+
+
+        return Dever::table($table);
+    }
+}