invoice.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. <?php
  2. $type = array
  3. (
  4. 1 => '普通发票',
  5. 2 => '默认发票',
  6. );
  7. $title_type = array
  8. (
  9. 1 => '企业单位',
  10. 2 => '个人',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'invoice',
  16. # 显示给用户看的名称
  17. 'lang' => '用户发票库',
  18. 'menu' => false,
  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. 'update' => 'hidden',
  31. //'list' => true,
  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' => 'user/info-like',
  45. 'col' => 'search',
  46. 'result' => 'id',
  47. ),
  48. 'list' => 'Dever::load("user/lib/info.get#name", {uid})',
  49. ),
  50. 'type' => array
  51. (
  52. 'type' => 'tinyint-1',
  53. 'name' => '类型',
  54. 'default' => '2',
  55. 'desc' => '类型',
  56. 'match' => 'is_numeric',
  57. 'option' => $type,
  58. 'update' => 'select',
  59. //'list' => true,
  60. ),
  61. 'title_type' => array
  62. (
  63. 'type' => 'tinyint-1',
  64. 'name' => '抬头类型',
  65. 'default' => '1',
  66. 'desc' => '抬头类型',
  67. 'match' => 'is_numeric',
  68. 'option' => $title_type,
  69. 'update' => 'radio',
  70. //'list' => true,
  71. ),
  72. 'title' => array
  73. (
  74. 'type' => 'varchar-100',
  75. 'name' => '抬头名称',
  76. 'default' => '',
  77. 'desc' => '抬头名称',
  78. 'match' => 'option',
  79. 'search' => 'fulltext',
  80. //'update' => 'text',
  81. //'list' => true,
  82. ),
  83. 'email' => array
  84. (
  85. 'type' => 'varchar-100',
  86. 'name' => '邮箱',
  87. 'default' => '',
  88. 'desc' => '邮箱',
  89. 'match' => 'option',
  90. 'search' => 'fulltext',
  91. //'update' => 'text',
  92. //'list' => true,
  93. ),
  94. 'mobile' => array
  95. (
  96. 'type' => 'varchar-100',
  97. 'name' => '手机号',
  98. 'default' => '',
  99. 'desc' => '手机号',
  100. 'match' => 'option',
  101. 'search' => 'fulltext',
  102. //'update' => 'text',
  103. //'list' => true,
  104. ),
  105. 'number' => array
  106. (
  107. 'type' => 'varchar-100',
  108. 'name' => '公司税号',
  109. 'default' => '',
  110. 'desc' => '公司税号',
  111. 'match' => 'option',
  112. //'update' => 'text',
  113. ),
  114. 'phone' => array
  115. (
  116. 'type' => 'varchar-100',
  117. 'name' => '公司电话',
  118. 'default' => '',
  119. 'desc' => '公司电话',
  120. 'match' => 'option',
  121. //'update' => 'text',
  122. ),
  123. 'address' => array
  124. (
  125. 'type' => 'varchar-1000',
  126. 'name' => '注册地址',
  127. 'default' => '',
  128. 'desc' => '注册地址',
  129. 'match' => 'option',
  130. //'update' => 'text',
  131. //'list' => true,
  132. ),
  133. 'bank' => array
  134. (
  135. 'type' => 'varchar-100',
  136. 'name' => '开户银行',
  137. 'default' => '',
  138. 'desc' => '开户银行',
  139. 'match' => 'option',
  140. //'update' => 'text',
  141. //'list' => true,
  142. ),
  143. 'bank_number' => array
  144. (
  145. 'type' => 'varchar-100',
  146. 'name' => '银行账号',
  147. 'default' => '',
  148. 'desc' => '银行账号',
  149. 'match' => 'option',
  150. //'update' => 'text',
  151. //'list' => true,
  152. ),
  153. 'state' => array
  154. (
  155. 'type' => 'tinyint-1',
  156. 'name' => '状态',
  157. 'default' => '1',
  158. 'desc' => '请选择状态',
  159. 'match' => 'is_numeric',
  160. ),
  161. 'cdate' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '操作时间',
  165. 'match' => array('is_numeric', time()),
  166. 'desc' => '',
  167. # 只有insert时才生效
  168. //'insert' => true,
  169. 'search' => 'date',
  170. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  171. ),
  172. ),
  173. 'manage' => array
  174. (
  175. ),
  176. 'request' => array
  177. (
  178. 'getList' => array
  179. (
  180. # 匹配的正则或函数 选填项
  181. 'option' => array
  182. (
  183. 'uid' => 'yes',
  184. 'state' => 1,
  185. ),
  186. 'type' => 'all',
  187. 'order' => array('type' => 'desc','id' => 'desc'),
  188. 'page' => array(10, 'list'),
  189. 'col' => '*',
  190. ),
  191. 'updateType' => array
  192. (
  193. 'set' => array
  194. (
  195. 'type' => 'yes',
  196. ),
  197. 'where' => array
  198. (
  199. 'type' => 'yes',
  200. ),
  201. 'type' => 'update',
  202. ),
  203. ),
  204. );