member.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. 'value' => Dever::input('search_option_store_id'),
  58. 'list' => 'Dever::load("store/info-find#name", {store_id})',
  59. ),
  60. 'role_id' => array
  61. (
  62. 'type' => 'varchar-60',
  63. 'name' => '角色',
  64. 'default' => '1',
  65. 'desc' => '角色',
  66. 'match' => 'is_numeric',
  67. 'update' => 'checkbox',
  68. 'option' => $role,
  69. 'list' => true,
  70. ),
  71. 'name' => array
  72. (
  73. 'type' => 'varchar-32',
  74. 'name' => '员工姓名',
  75. 'default' => '',
  76. 'desc' => '请输入仓库名称',
  77. 'match' => 'is_string',
  78. 'update' => 'text',
  79. 'search' => 'fulltext',
  80. 'list' => true,
  81. ),
  82. 'mobile' => array
  83. (
  84. 'type' => 'bigint-11',
  85. 'name' => '员工手机号',
  86. 'default' => '',
  87. 'desc' => '请输入员工手机号',
  88. 'match' => Dever::rule('mobile'),
  89. 'update' => 'text',
  90. 'search' => 'fulltext',
  91. 'list' => true,
  92. ),
  93. 'avatar' => array
  94. (
  95. 'type' => 'varchar-150',
  96. 'name' => '头像',
  97. 'default' => '',
  98. 'desc' => '请选择头像',
  99. 'match' => 'option',
  100. 'update' => 'image',
  101. 'key' => '1',
  102. 'place' => '150',
  103. ),
  104. 'state' => array
  105. (
  106. 'type' => 'tinyint-1',
  107. 'name' => '状态',
  108. 'default' => '1',
  109. 'desc' => '请选择状态',
  110. 'match' => 'is_numeric',
  111. ),
  112. 'cdate' => array
  113. (
  114. 'type' => 'int-11',
  115. 'name' => '创建时间',
  116. 'match' => array('is_numeric', time()),
  117. 'desc' => '',
  118. # 只有insert时才生效
  119. //'insert' => true,
  120. 'search' => 'date',
  121. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  122. ),
  123. ),
  124. 'manage' => array
  125. (
  126. ),
  127. 'request' => array
  128. (
  129. ),
  130. );