member.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. $role = array
  3. (
  4. 1 => '管理员',
  5. 2 => '配货员',
  6. 3 => '库存管理员',
  7. 4 => '财务',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'member',
  13. # 显示给用户看的名称
  14. 'lang' => '账号管理',
  15. 'menu' => false,
  16. 'check' => 'mobile',
  17. 'role' => $role,
  18. # 数据结构
  19. 'struct' => array
  20. (
  21. 'id' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => 'ID',
  25. 'default' => '',
  26. 'desc' => '',
  27. 'match' => 'is_numeric',
  28. 'search' => 'order',
  29. 'update' => 'hidden',
  30. //'list' => true,
  31. ),
  32. 'uid' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '用户名',
  36. 'default' => '0',
  37. 'desc' => '请选择用户',
  38. 'match' => 'is_numeric',
  39. //'update' => 'text',
  40. //'search' => 'select',
  41. 'search' => array
  42. (
  43. 'api' => 'passport/user-all',
  44. 'col' => 'username',
  45. 'result' => 'id',
  46. ),
  47. //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  48. ),
  49. 'store_id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => '所属仓库',
  53. 'default' => '',
  54. 'desc' => '所属仓库',
  55. 'match' => 'is_numeric',
  56. 'update' => 'hidden',
  57. 'search' => 'hidden',
  58. 'value' => Dever::input('search_option_store_id'),
  59. 'list' => 'Dever::load("store/info-find#name", {store_id})',
  60. ),
  61. 'role_id' => array
  62. (
  63. 'type' => 'varchar-60',
  64. 'name' => '角色',
  65. 'default' => '1',
  66. 'desc' => '角色',
  67. 'match' => 'is_numeric',
  68. 'update' => 'checkbox',
  69. 'option' => $role,
  70. 'list' => true,
  71. ),
  72. 'name' => array
  73. (
  74. 'type' => 'varchar-32',
  75. 'name' => '员工姓名',
  76. 'default' => '',
  77. 'desc' => '请输入仓库名称',
  78. 'match' => 'is_string',
  79. 'update' => 'text',
  80. 'search' => 'fulltext',
  81. 'list' => true,
  82. ),
  83. 'mobile' => array
  84. (
  85. 'type' => 'bigint-11',
  86. 'name' => '员工手机号',
  87. 'default' => '',
  88. 'desc' => '请输入员工手机号',
  89. 'match' => Dever::rule('mobile'),
  90. 'update' => 'text',
  91. 'search' => 'fulltext',
  92. 'list' => true,
  93. ),
  94. 'avatar' => array
  95. (
  96. 'type' => 'varchar-150',
  97. 'name' => '头像',
  98. 'default' => '',
  99. 'desc' => '请选择头像',
  100. 'match' => 'option',
  101. 'update' => 'image',
  102. 'key' => '1',
  103. 'place' => '150',
  104. ),
  105. 'state' => array
  106. (
  107. 'type' => 'tinyint-1',
  108. 'name' => '状态',
  109. 'default' => '1',
  110. 'desc' => '请选择状态',
  111. 'match' => 'is_numeric',
  112. ),
  113. 'cdate' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '创建时间',
  117. 'match' => array('is_numeric', time()),
  118. 'desc' => '',
  119. # 只有insert时才生效
  120. //'insert' => true,
  121. 'search' => 'date',
  122. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  123. ),
  124. ),
  125. 'manage' => array
  126. (
  127. ),
  128. 'request' => array
  129. (
  130. 'getManage' => array
  131. (
  132. # 匹配的正则或函数 选填项
  133. 'option' => array
  134. (
  135. 'store_id' => 'yes',
  136. 'name' => array('yes', 'like'),
  137. 'role_id' => array('yes', 'like'),
  138. 'state' => 1,
  139. ),
  140. 'type' => 'one',
  141. 'order' => array('id' => 'asc'),
  142. 'col' => '*',
  143. ),
  144. ),
  145. );