journal.php 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <?php
  2. $journal = function()
  3. {
  4. $array = array();
  5. $info = Dever::db('journal/info')->state();
  6. if($info)
  7. {
  8. $array += $info;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'journal',
  16. # 显示给用户看的名称
  17. 'lang' => '小刊订单',
  18. 'order' => '10',
  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. //'list' => true,
  30. ),
  31. 'day_string' => array
  32. (
  33. 'type' => 'varchar-60',
  34. 'name' => '统计日期',
  35. 'default' => '',
  36. 'desc' => '统计日期',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. //'search' => 'fulltext',
  40. 'list' => true,
  41. ),
  42. 'day_int' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '统计日期',
  46. 'default' => '',
  47. 'desc' => '统计日期',
  48. 'match' => 'is_numeric',
  49. 'update' => 'text',
  50. 'search' => 'time',
  51. 'order' => 'desc',
  52. //'list' => true,
  53. ),
  54. 'journal_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '小刊',
  58. 'default' => '',
  59. 'desc' => '小刊',
  60. 'match' => 'is_numeric',
  61. 'update' => 'select',
  62. 'option' => $journal,
  63. 'list' => true,
  64. ),
  65. 'order_num' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '总订单数',
  69. 'default' => '0',
  70. 'match' => '总订单数',
  71. 'match' => 'is_numeric',
  72. 'update' => 'text',
  73. 'list' => true,
  74. ),
  75. 'order_yes_num' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '支付订单数',
  79. 'default' => '0',
  80. 'match' => '支付订单数',
  81. 'match' => 'is_numeric',
  82. 'update' => 'text',
  83. 'list' => true,
  84. ),
  85. 'order_no_num' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '未支付订单数',
  89. 'default' => '0',
  90. 'match' => '未支付订单数',
  91. 'match' => 'is_numeric',
  92. 'update' => 'text',
  93. 'list' => true,
  94. ),
  95. 'buy_num' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '售出本数',
  99. 'default' => '0',
  100. 'match' => '售出本数',
  101. 'match' => 'is_numeric',
  102. 'update' => 'text',
  103. 'list' => true,
  104. ),
  105. 'buy_cash' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '售出金额',
  109. 'default' => '0',
  110. 'match' => '售出金额',
  111. 'match' => 'is_numeric',
  112. 'update' => 'text',
  113. 'list' => true,
  114. ),
  115. 'state' => array
  116. (
  117. 'type' => 'tinyint-1',
  118. 'name' => '状态',
  119. 'default' => '1',
  120. 'desc' => '请选择状态',
  121. 'match' => 'is_numeric',
  122. ),
  123. 'cdate' => array
  124. (
  125. 'type' => 'int-11',
  126. 'name' => '创建时间',
  127. 'match' => array('is_numeric', time()),
  128. 'desc' => '',
  129. # 只有insert时才生效
  130. 'insert' => true,
  131. //'search' => 'date',
  132. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  133. ),
  134. ),
  135. 'manage' => array
  136. (
  137. 'insert' => false,
  138. 'edit' => false,
  139. 'delete' => false,
  140. 'num' => false,
  141. 'excel' => true,
  142. //'page_list' => 'journal',
  143. ),
  144. 'request' => array
  145. (
  146. 'getData' => array
  147. (
  148. # 匹配的正则或函数 选填项
  149. 'option' => array
  150. (
  151. 'start' => array('yes-day_int', '>='),
  152. 'end' => array('yes-day_int', '<='),
  153. 'state' => 1,
  154. ),
  155. 'type' => 'all',
  156. 'order' => array('day_int' => 'asc'),
  157. //'group' => 'day_int',
  158. 'col' => '*',
  159. ),
  160. ),
  161. );