member.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. 'update' => 'hidden',
  28. //'list' => true,
  29. ),
  30. 'uid' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => '用户名',
  34. 'default' => '0',
  35. 'desc' => '请选择用户',
  36. 'match' => 'is_numeric',
  37. //'update' => 'text',
  38. //'search' => 'select',
  39. 'search' => array
  40. (
  41. 'api' => 'passport/user-all',
  42. 'col' => 'username',
  43. 'result' => 'id',
  44. ),
  45. //'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  46. ),
  47. 'factory_id' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => '所属工厂',
  51. 'default' => '',
  52. 'desc' => '所属工厂',
  53. 'match' => 'is_numeric',
  54. 'update' => 'hidden',
  55. 'value' => Dever::input('search_option_factory_id'),
  56. 'list' => 'Dever::load("factory/info-find#name", {factory_id})',
  57. ),
  58. 'role_id' => array
  59. (
  60. 'type' => 'varchar-60',
  61. 'name' => '角色',
  62. 'default' => '1',
  63. 'desc' => '角色',
  64. 'match' => 'is_numeric',
  65. 'update' => 'checkbox',
  66. 'option' => $role,
  67. 'list' => true,
  68. ),
  69. 'name' => array
  70. (
  71. 'type' => 'varchar-32',
  72. 'name' => '员工姓名',
  73. 'default' => '',
  74. 'desc' => '请输入仓库名称',
  75. 'match' => 'is_string',
  76. 'update' => 'text',
  77. 'search' => 'fulltext',
  78. 'list' => true,
  79. ),
  80. 'mobile' => array
  81. (
  82. 'type' => 'bigint-11',
  83. 'name' => '员工手机号',
  84. 'default' => '',
  85. 'desc' => '请输入员工手机号',
  86. 'match' => 'is_numeric',
  87. 'update' => 'text',
  88. 'search' => 'fulltext',
  89. 'list' => true,
  90. ),
  91. 'avatar' => array
  92. (
  93. 'type' => 'varchar-150',
  94. 'name' => '头像',
  95. 'default' => '',
  96. 'desc' => '请选择头像',
  97. 'match' => 'option',
  98. 'update' => 'image',
  99. 'key' => '1',
  100. 'place' => '150',
  101. ),
  102. 'state' => array
  103. (
  104. 'type' => 'tinyint-1',
  105. 'name' => '状态',
  106. 'default' => '1',
  107. 'desc' => '请选择状态',
  108. 'match' => 'is_numeric',
  109. ),
  110. 'cdate' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '创建时间',
  114. 'match' => array('is_numeric', time()),
  115. 'desc' => '',
  116. # 只有insert时才生效
  117. //'insert' => true,
  118. 'search' => 'date',
  119. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  120. ),
  121. ),
  122. 'manage' => array
  123. (
  124. ),
  125. 'request' => array
  126. (
  127. ),
  128. );