appoint.php 7.5 KB

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