appoint.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. 'desc' => array
  81. (
  82. 'type' => 'text-255',
  83. 'name' => '描述详情',
  84. 'default' => '',
  85. 'desc' => '描述详情',
  86. 'match' => 'is_string',
  87. 'update' => 'textarea',
  88. 'list' => true,
  89. ),
  90. 'pic' => array
  91. (
  92. 'type' => 'varchar-500',
  93. 'name' => '相关截图',
  94. 'default' => '',
  95. 'desc' => '请选择相关截图',
  96. 'match' => 'option',
  97. 'update' => 'images',
  98. 'key' => '1',
  99. //'place' => '150',
  100. ),
  101. 'video' => array
  102. (
  103. 'type' => 'varchar-500',
  104. 'name' => '相关视频',
  105. 'default' => '',
  106. 'desc' => '请选择相关视频',
  107. 'match' => 'option',
  108. 'update' => 'video',
  109. 'key' => '3',
  110. //'place' => '150',
  111. ),
  112. 'state' => array
  113. (
  114. 'type' => 'tinyint-1',
  115. 'name' => '状态',
  116. 'default' => '1',
  117. 'desc' => '请选择状态',
  118. 'match' => 'is_numeric',
  119. ),
  120. 'cdate' => array
  121. (
  122. 'type' => 'int-11',
  123. 'name' => '创建时间',
  124. 'match' => array('is_numeric', time()),
  125. 'desc' => '',
  126. # 只有insert时才生效
  127. 'insert' => true,
  128. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  129. ),
  130. ),
  131. 'manage' => array
  132. (
  133. //'insert' => false,
  134. 'delete' => false,
  135. // 'edit' => false,
  136. ),
  137. 'request' => array
  138. (
  139. 'getData' => array
  140. (
  141. # 匹配的正则或函数 选填项
  142. 'option' => array
  143. (
  144. //'id' => array('yes', '!='),
  145. 'state' => 1,
  146. ),
  147. 'type' => 'all',
  148. 'order' => array('id' => 'desc'),
  149. 'col' => '*|id',
  150. ),
  151. 'getAll' => array
  152. (
  153. # 匹配的正则或函数 选填项
  154. 'option' => array
  155. (
  156. 'info_id' => 'yes',
  157. 'state' => 1,
  158. ),
  159. 'type' => 'all',
  160. 'order' => array('id' => 'asc'),
  161. 'col' => '*',
  162. ),
  163. 'getEmail' => array
  164. (
  165. # 匹配的正则或函数 选填项
  166. 'option' => array
  167. (
  168. 'group' => array('yes','in'),
  169. 'start' => array('yes-cdate','>='),
  170. 'end' =>array('yes-cdate','<='),
  171. 'state' => 1,
  172. ),
  173. 'type' => 'count',
  174. // 'order' => array('id' => 'desc'),
  175. 'col' => '*',
  176. ),
  177. ),
  178. );