print.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <?php
  2. # 获取分类权限
  3. $status = array
  4. (
  5. 1 => '离线',
  6. 2 => '在线,工作状态正常',
  7. 3 => '在线,工作状态不正常',
  8. 10 => '绑定失败',
  9. );
  10. return array
  11. (
  12. # 表名
  13. 'name' => 'print',
  14. # 显示给用户看的名称
  15. 'lang' => '打印设备',
  16. # 后台菜单排序
  17. 'order' => 10,
  18. 'menu' => false,
  19. 'check' => 'number',
  20. 'end' => array
  21. (
  22. 'insert' => 'shop/lib/manage.printInsert',
  23. 'update' => 'shop/lib/manage.printUpdate',
  24. ),
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. 'list' => true,
  37. 'order' => 'desc',
  38. ),
  39. 'shop_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '所属门店',
  43. 'default' => '',
  44. 'desc' => '所属门店',
  45. 'match' => 'is_numeric',
  46. 'update' => 'hidden',
  47. 'search' => 'hidden',
  48. 'value' => Dever::input('search_option_shop_id'),
  49. 'list' => 'Dever::load("shop/info-one#name", {shop_id})',
  50. ),
  51. 'name' => array
  52. (
  53. 'type' => 'varchar-200',
  54. 'name' => '设备名称',
  55. 'default' => '',
  56. 'desc' => '请输入设备名称',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'search' => 'fulltext',
  60. 'list' => true,
  61. ),
  62. 'number' => array
  63. (
  64. 'type' => 'varchar-100',
  65. 'name' => '打印机编号',
  66. 'default' => '',
  67. 'desc' => '打印机编号',
  68. 'match' => 'is_string',
  69. 'update' => 'text',
  70. 'search' => 'fulltext',
  71. 'list' => true,
  72. ),
  73. 'key' => array
  74. (
  75. 'type' => 'varchar-100',
  76. 'name' => '打印机识别码',
  77. 'default' => '',
  78. 'desc' => '打印机识别码',
  79. 'match' => 'is_string',
  80. 'update' => 'text',
  81. 'search' => 'fulltext',
  82. 'list' => true,
  83. ),
  84. 'phonenum' => array
  85. (
  86. 'type' => 'varchar-100',
  87. 'name' => '流量卡号码',
  88. 'default' => '',
  89. 'desc' => '流量卡号码',
  90. 'match' => 'option',
  91. 'update' => 'text',
  92. //'search' => 'fulltext',
  93. //'list' => true,
  94. ),
  95. 'status' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '打印机状态',
  99. 'default' => '1',
  100. 'desc' => '打印机状态',
  101. 'match' => 'is_numeric',
  102. //'update' => 'select',
  103. 'option' => $status,
  104. 'search' => 'select',
  105. 'list' => 'Dever::load("shop/lib/manage.printStatus", "{status}", "{number}")',
  106. //'edit' => true,
  107. ),
  108. 'state' => array
  109. (
  110. 'type' => 'tinyint-1',
  111. 'name' => '状态',
  112. 'default' => '1',
  113. 'desc' => '请选择状态',
  114. 'match' => 'is_numeric',
  115. ),
  116. 'cdate' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '购买时间',
  120. 'match' => array('is_numeric', time()),
  121. 'desc' => '',
  122. # 只有insert时才生效
  123. 'insert' => true,
  124. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  125. ),
  126. ),
  127. 'manage' => array
  128. (
  129. //'delete' => false,
  130. 'edit' => false,
  131. 'list_button' => array
  132. (
  133. 'fast' => array('编辑', '"print&where_id={id}&col=name,phonenum&oper_save_jump=print&oper_table=print&oper_parent=print"'),
  134. //'delete' => array('删除', 'print', '{status} == 10'),
  135. )
  136. ),
  137. 'request' => array
  138. (
  139. ),
  140. );