info.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. # 定义几个常用的选项
  3. $option = array
  4. (
  5. 1 => '可用',
  6. 2 => '不可用',
  7. );
  8. $type = array
  9. (
  10. 1 => '默认',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'info',
  16. # 显示给用户看的名称
  17. 'lang' => '基础设备管理',
  18. # 后台菜单排序
  19. 'order' => 20,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '标识ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'search' => 'order',
  31. 'order' => 'desc',
  32. 'list' => true,
  33. ),
  34. 'name' => array
  35. (
  36. 'type' => 'varchar-40',
  37. 'name' => '设备名称',
  38. 'default' => '',
  39. 'desc' => '设备名称',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'num' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '成品数量',
  49. 'default' => '',
  50. 'desc' => '成品数量',
  51. 'match' => 'is_string',
  52. //'update' => 'text',
  53. //'search' => 'fulltext',
  54. 'list' => true,
  55. ),
  56. 'type' => array
  57. (
  58. 'type' => 'tinyint-1',
  59. 'name' => '设备类型',
  60. 'default' => '1',
  61. 'desc' => '请选择设备类型',
  62. 'match' => 'is_numeric',
  63. 'option' => $type,
  64. 'update' => 'select',
  65. 'search' => 'select',
  66. 'list' => true,
  67. # 开启显示控制,可以控制下边的表单
  68. 'show' => 'type',
  69. ),
  70. 'info' => array
  71. (
  72. 'type' => 'varchar-255',
  73. 'name' => '说明介绍-选填',
  74. 'default' => '',
  75. 'desc' => '请输入系统说明',
  76. 'match' => 'option',
  77. 'update' => 'editor',
  78. //'list' => true,
  79. ),
  80. 'reorder' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '排序-数值越大越靠前',
  84. 'default' => '1',
  85. 'desc' => '请输入排序',
  86. 'match' => 'option',
  87. 'update' => 'text',
  88. 'search' => 'order',
  89. 'list' => true,
  90. 'order' => 'desc',
  91. 'edit' => true,
  92. ),
  93. 'state' => array
  94. (
  95. 'type' => 'tinyint-1',
  96. 'name' => '状态',
  97. 'default' => '1',
  98. 'desc' => '请选择状态',
  99. 'match' => 'is_numeric',
  100. 'option' => $option,
  101. 'update' => 'radio',
  102. 'list' => true,
  103. ),
  104. 'cdate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '录入时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. # 只有insert时才生效
  111. 'insert' => true,
  112. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  113. ),
  114. ),
  115. 'manage' => array
  116. (
  117. # 不允许编辑
  118. //'edit' => false,
  119. # 列表页的类型
  120. //'list_type' => 'parent',
  121. # 可以删除
  122. 'list_button' => array
  123. (
  124. //oper_save_jump=system&oper_parent=system 特殊配置 oper_save_jump保存之后跳到那个表的列表页 oper_parent下级列表页中显示返回上一页的链接
  125. 21 => array('新增元件', '"element&option_info_id={id}&oper_parent=info"'),
  126. 11 => array('元件列表', '"element&search_option_info_id={id}&option_info_id={id}&oper_save_jump=info&oper_parent=info"'),
  127. 12 => array('<br />'),
  128. 13 => array('成品列表', '"product&search_option_info_id={id}&option_info_id={id}&oper_save_jump=info&oper_parent=info"'),
  129. 23 => array('包装成品', 'modal|showMsg(\'包装成品\',$(this),\''.Dever::url('data.product', 'device').'\',function(){updateMsg(\'sendmsg\')})|"info_id={id}"'),
  130. //22 => array('新增设备', '"system&option_element_id={id}&oper_save_jump=system&oper_parent=system"', '{element_id}==-1'),
  131. //6 => '删除'
  132. ),
  133. //'desc' => '注意:命令码',
  134. ),
  135. # request 请求接口定义
  136. 'request' => array
  137. (
  138. ),
  139. );