print.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '使用中',
  6. 2 => '停止使用',
  7. 3 => '申请合作',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'print',
  13. # 显示给用户看的名称
  14. 'lang' => '打印设备',
  15. # 后台菜单排序
  16. 'order' => 10,
  17. 'menu' => false,
  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. 'list' => true,
  30. 'order' => 'desc',
  31. ),
  32. 'shop_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '所属门店',
  36. 'default' => '',
  37. 'desc' => '所属门店',
  38. 'match' => 'is_numeric',
  39. 'update' => 'hidden',
  40. 'value' => Dever::input('search_option_shop_id'),
  41. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-200',
  46. 'name' => '设备名称',
  47. 'default' => '',
  48. 'desc' => '请输入设备名称',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'number' => array
  55. (
  56. 'type' => 'varchar-100',
  57. 'name' => '打印机编号',
  58. 'default' => '',
  59. 'desc' => '打印机编号',
  60. 'match' => 'is_string',
  61. 'update' => 'text',
  62. 'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'status' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '打印机状态',
  69. 'default' => '1',
  70. 'desc' => '打印机状态',
  71. 'match' => 'is_numeric',
  72. //'update' => 'select',
  73. 'option' => $status,
  74. 'search' => 'select',
  75. 'list' => true,
  76. 'edit' => true,
  77. ),
  78. 'state' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. ),
  86. 'cdate' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '购买时间',
  90. 'match' => array('is_numeric', time()),
  91. 'desc' => '',
  92. # 只有insert时才生效
  93. 'insert' => true,
  94. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  95. ),
  96. ),
  97. 'manage' => array
  98. (
  99. ),
  100. 'request' => array
  101. (
  102. ),
  103. );