order.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待支付',
  5. 2 => '待发货',
  6. 3 => '待收货',
  7. 4 => '已完成',
  8. 5 => '已取消',
  9. );
  10. return array
  11. (
  12. # 表名
  13. 'name' => 'order',
  14. # 显示给用户看的名称
  15. 'lang' => '礼品卡订单',
  16. 'status' => $status,
  17. # 后台菜单排序
  18. 'order' => 100,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'list' => true,
  31. 'order' => 'desc',
  32. ),
  33. 'uid' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '购买人名称',
  37. 'default' => '0',
  38. 'desc' => '请选择用户',
  39. 'match' => 'is_numeric',
  40. 'update' => 'text',
  41. //'search' => 'select',
  42. 'search' => array
  43. (
  44. 'api' => 'passport/user-one',
  45. 'col' => 'username',
  46. 'result' => 'id',
  47. ),
  48. 'list' => 'Dever::load("shop/lib/manage.user", {id})',
  49. ),
  50. 'mobile' => array
  51. (
  52. 'type' => 'varchar-300',
  53. 'name' => '下单手机号',
  54. 'default' => '',
  55. 'desc' => '手机号',
  56. 'match' => 'option',
  57. 'search' => 'fulltext',
  58. /*
  59. 'search' => array
  60. (
  61. 'api' => 'passport/user-select',//接口地址,最好是获取多条数据的地址
  62. 'col' => 'mobile',//要查询的字段
  63. 'result' => 'id',//返回的字段
  64. 'search' => 'uid',//本表的字段,默认为当前的字段
  65. ),
  66. */
  67. ),
  68. 'shop_id' => array
  69. (
  70. 'type' => 'int-11',
  71. 'name' => '兑换门店',
  72. 'default' => '',
  73. 'desc' => '兑换门店',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'address_id' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '送货地址',
  80. 'default' => '',
  81. 'desc' => '送货地址',
  82. 'match' => 'is_numeric',
  83. //'list' => 'Dever::load("passport/address-find#address", {address_id})';
  84. ),
  85. 'order_num' => array
  86. (
  87. 'type' => 'varchar-100',
  88. 'name' => '订单号',
  89. 'default' => '',
  90. 'desc' => '订单号',
  91. 'match' => 'is_string',
  92. 'update' => 'text',
  93. 'search' => 'fulltext',
  94. 'list' => true,
  95. ),
  96. 'price' => array
  97. (
  98. 'type' => 'varchar-50',
  99. 'name' => '支付金额',
  100. 'default' => '0',
  101. 'desc' => '支付金额',
  102. 'match' => 'option',
  103. 'update' => 'text',
  104. 'list' => true,
  105. ),
  106. 'num' => array
  107. (
  108. 'type' => 'int-11',
  109. 'name' => '购买数量',
  110. 'default' => '',
  111. 'desc' => '购买数量',
  112. 'match' => 'is_numeric',
  113. 'search' => 'select',
  114. //'list' => true,
  115. ),
  116. 'status' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '状态',
  120. 'default' => '1',
  121. 'desc' => '状态',
  122. 'match' => 'is_numeric',
  123. 'option' => $status,
  124. 'search' => 'select',
  125. 'update' => 'select',
  126. 'list' => true,
  127. //'mul' => array(1 => '恢复使用', 4 => '已作废'),
  128. ),
  129. 'state' => array
  130. (
  131. 'type' => 'tinyint-1',
  132. 'name' => '状态',
  133. 'default' => '1',
  134. 'desc' => '请选择状态',
  135. 'match' => 'is_numeric',
  136. ),
  137. 'cdate' => array
  138. (
  139. 'type' => 'int-11',
  140. 'name' => '生成时间',
  141. 'match' => array('is_numeric', time()),
  142. 'desc' => '',
  143. # 只有insert时才生效
  144. 'insert' => true,
  145. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  146. ),
  147. ),
  148. 'manage' => array
  149. (
  150. 'excel' => true,
  151. 'delete' => false,
  152. 'edit' => false,
  153. 'insert' => false,
  154. // 'mul' => '{type} == 1 || {type} == 4',
  155. 'list_button' => array
  156. (
  157. //'oper' => array('作废', 'goods/lib/manage.drop?id={id}', '{type} == 1'),
  158. //'oper2' => array('恢复使用', 'goods/lib/manage.recovery?id={id}', '{type} == 4'),
  159. ),
  160. ),
  161. # 索引
  162. 'index' => array
  163. (
  164. # 索引名 => 索引id
  165. 1 => array
  166. (
  167. 'card' => 'card'
  168. ),
  169. 'version' => 1,
  170. ),
  171. 'request' => array
  172. (
  173. ),
  174. );