appoint.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  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. 'upload' => 'yun',
  123. 'large' => true,
  124. ),
  125. 'state' => array
  126. (
  127. 'type' => 'tinyint-1',
  128. 'name' => '状态',
  129. 'default' => '1',
  130. 'desc' => '请选择状态',
  131. 'match' => 'is_numeric',
  132. ),
  133. 'cdate' => array
  134. (
  135. 'type' => 'int-11',
  136. 'name' => '创建时间',
  137. 'match' => array('is_numeric', time()),
  138. 'desc' => '',
  139. # 只有insert时才生效
  140. 'insert' => true,
  141. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  142. ),
  143. ),
  144. 'manage' => array
  145. (
  146. //'insert' => false,
  147. 'delete' => false,
  148. // 'edit' => false,
  149. ),
  150. 'request' => array
  151. (
  152. 'getData' => array
  153. (
  154. # 匹配的正则或函数 选填项
  155. 'option' => array
  156. (
  157. //'id' => array('yes', '!='),
  158. 'state' => 1,
  159. ),
  160. 'type' => 'all',
  161. 'order' => array('id' => 'desc'),
  162. 'col' => '*|id',
  163. ),
  164. 'getAll' => array
  165. (
  166. # 匹配的正则或函数 选填项
  167. 'option' => array
  168. (
  169. 'info_id' => 'yes',
  170. 'state' => 1,
  171. ),
  172. 'type' => 'all',
  173. 'order' => array('id' => 'asc'),
  174. 'col' => '*',
  175. ),
  176. 'getEmail' => array
  177. (
  178. # 匹配的正则或函数 选填项
  179. 'option' => array
  180. (
  181. 'group' => array('yes','in'),
  182. 'start' => array('yes-cdate','>='),
  183. 'end' =>array('yes-cdate','<='),
  184. 'state' => 1,
  185. ),
  186. 'type' => 'count',
  187. // 'order' => array('id' => 'desc'),
  188. 'col' => '*',
  189. ),
  190. 'getYAll' => array
  191. (
  192. # 匹配的正则或函数 选填项
  193. 'option' => array
  194. (
  195. 'group' => array('yes','in'),
  196. 'start' => array('yes-cdate','>='),
  197. 'end' =>array('yes-cdate','<='),
  198. 'state' => 1,
  199. ),
  200. 'type' => 'all',
  201. // 'order' => array('id' => 'desc'),
  202. 'col' => '*|info_id',
  203. ),
  204. 'getAdmin' => array
  205. (
  206. # 匹配的正则或函数 选填项
  207. 'option' => array
  208. (
  209. 'info_id' => 'yes',
  210. 'admin' => array('yes','!='),
  211. // 'end' =>array('yes-cdate','<='),
  212. 'state' => 1,
  213. ),
  214. 'type' => 'one',
  215. 'order' => array('id' => 'desc'),
  216. 'col' => '*',
  217. ),
  218. ),
  219. );