appoint.php 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <?php
  2. $admin = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('work/lib/appoint.people');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'appoint',
  16. # 显示给用户看的名称
  17. 'lang' => '指派工单',
  18. # 后台菜单排序
  19. 'order' => 2,
  20. 'menu' => false,
  21. 'start' => array
  22. (
  23. 'insert' => 'work/lib/appoint.insertAppoint',
  24. 'update' => 'work/lib/appoint.insertAppoint',
  25. ),
  26. 'end' => array
  27. (
  28. 'insert' => 'work/lib/appoint.updateAppoint',
  29. 'update' => 'work/lib/appoint.updateAppoint',
  30. ),
  31. // 'auto' => 100000,
  32. # 数据结构
  33. 'struct' => array
  34. (
  35. 'id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => 'ID',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. 'search' => 'order',
  43. 'list' => true,
  44. 'order' => 'desc',
  45. ),
  46. 'info_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '工单来源',
  50. 'default' => '-1',
  51. 'desc' => '工单来源',
  52. 'match' => 'option',
  53. // 'option' => $info_id,
  54. 'update' => 'hidden',
  55. 'value' => Dever::input('search_option_info_id'),
  56. 'list' => true,
  57. ),
  58. 'admin_id' => array
  59. (
  60. 'type' => 'varchar-500',
  61. 'name' => '指派人',
  62. 'default' => '',
  63. 'desc' => '指派人',
  64. 'match' => 'option',
  65. 'search' => 'linkage',
  66. 'update' => 'linkage',
  67. 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'),
  68. ),
  69. 'group' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '部门',
  73. 'default' => '',
  74. 'desc' => '部门',
  75. 'match' => 'option',
  76. // 'search' => 'linkage',
  77. 'update' => 'hidden',
  78. // 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'),
  79. ),
  80. 'admin' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '指派的人',
  84. 'default' => '',
  85. 'desc' => '指派的人',
  86. 'match' => 'option',
  87. // 'search' => 'linkage',
  88. 'update' => 'hidden',
  89. // 'option' => Dever::url('lib/appoint.get?level_total=2', 'work'),
  90. ),
  91. 'desc' => array
  92. (
  93. 'type' => 'text-255',
  94. 'name' => '描述详情',
  95. 'default' => '',
  96. 'desc' => '描述详情',
  97. 'match' => 'is_string',
  98. 'update' => 'textarea',
  99. 'list' => true,
  100. ),
  101. 'pic' => array
  102. (
  103. 'type' => 'varchar-500',
  104. 'name' => '相关截图',
  105. 'default' => '',
  106. 'desc' => '请选择相关截图',
  107. 'match' => 'option',
  108. 'update' => 'images',
  109. 'key' => '1',
  110. //'place' => '150',
  111. ),
  112. 'video' => array
  113. (
  114. 'type' => 'varchar-500',
  115. 'name' => '相关视频',
  116. 'default' => '',
  117. 'desc' => '请选择相关视频',
  118. 'match' => 'option',
  119. 'update' => 'video',
  120. 'key' => '3',
  121. //'place' => '150',
  122. ),
  123. 'state' => array
  124. (
  125. 'type' => 'tinyint-1',
  126. 'name' => '状态',
  127. 'default' => '1',
  128. 'desc' => '请选择状态',
  129. 'match' => 'is_numeric',
  130. ),
  131. 'cdate' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '创建时间',
  135. 'match' => array('is_numeric', time()),
  136. 'desc' => '',
  137. # 只有insert时才生效
  138. 'insert' => true,
  139. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  140. ),
  141. ),
  142. 'manage' => array
  143. (
  144. //'insert' => false,
  145. 'delete' => false,
  146. // 'edit' => false,
  147. ),
  148. 'request' => array
  149. (
  150. 'getData' => array
  151. (
  152. # 匹配的正则或函数 选填项
  153. 'option' => array
  154. (
  155. //'id' => array('yes', '!='),
  156. 'state' => 1,
  157. ),
  158. 'type' => 'all',
  159. 'order' => array('id' => 'desc'),
  160. 'col' => '*|id',
  161. ),
  162. 'getAll' => array
  163. (
  164. # 匹配的正则或函数 选填项
  165. 'option' => array
  166. (
  167. 'info_id' => 'yes',
  168. 'state' => 1,
  169. ),
  170. 'type' => 'all',
  171. 'order' => array('id' => 'asc'),
  172. 'col' => '*',
  173. ),
  174. 'getEmail' => array
  175. (
  176. # 匹配的正则或函数 选填项
  177. 'option' => array
  178. (
  179. 'group' => array('yes','in'),
  180. 'start' => array('yes-cdate','>='),
  181. 'end' =>array('yes-cdate','<='),
  182. 'state' => 1,
  183. ),
  184. 'type' => 'count',
  185. // 'order' => array('id' => 'desc'),
  186. 'col' => '*',
  187. ),
  188. 'getYAll' => array
  189. (
  190. # 匹配的正则或函数 选填项
  191. 'option' => array
  192. (
  193. 'group' => array('yes','in'),
  194. 'start' => array('yes-cdate','>='),
  195. 'end' =>array('yes-cdate','<='),
  196. 'state' => 1,
  197. ),
  198. 'type' => 'all',
  199. // 'order' => array('id' => 'desc'),
  200. 'col' => '*|info_id',
  201. ),
  202. 'getAdmin' => array
  203. (
  204. # 匹配的正则或函数 选填项
  205. 'option' => array
  206. (
  207. 'info_id' => 'yes',
  208. 'admin' => array('yes','!='),
  209. // 'end' =>array('yes-cdate','<='),
  210. 'state' => 1,
  211. ),
  212. 'type' => 'one',
  213. 'order' => array('id' => 'desc'),
  214. 'col' => '*',
  215. ),
  216. ),
  217. );