print.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  40. ),
  41. 'name' => array
  42. (
  43. 'type' => 'varchar-200',
  44. 'name' => '设备名称',
  45. 'default' => '',
  46. 'desc' => '请输入设备名称',
  47. 'match' => 'is_string',
  48. 'update' => 'text',
  49. 'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'number' => array
  53. (
  54. 'type' => 'varchar-100',
  55. 'name' => '打印机编号',
  56. 'default' => '',
  57. 'desc' => '打印机编号',
  58. 'match' => 'is_string',
  59. 'update' => 'text',
  60. 'search' => 'fulltext',
  61. 'list' => true,
  62. ),
  63. 'status' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '打印机状态',
  67. 'default' => '1',
  68. 'desc' => '打印机状态',
  69. 'match' => 'is_numeric',
  70. //'update' => 'select',
  71. 'option' => $status,
  72. 'search' => 'select',
  73. 'list' => true,
  74. 'edit' => true,
  75. ),
  76. 'state' => array
  77. (
  78. 'type' => 'tinyint-1',
  79. 'name' => '状态',
  80. 'default' => '1',
  81. 'desc' => '请选择状态',
  82. 'match' => 'is_numeric',
  83. ),
  84. 'cdate' => array
  85. (
  86. 'type' => 'int-11',
  87. 'name' => '购买时间',
  88. 'match' => array('is_numeric', time()),
  89. 'desc' => '',
  90. # 只有insert时才生效
  91. 'insert' => true,
  92. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. ),
  98. 'request' => array
  99. (
  100. ),
  101. );