add.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. $type = array
  3. (
  4. 1 => '自动生成',
  5. 2 => '手动生成',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'add',
  11. # 显示给用户看的名称
  12. 'lang' => '新增礼品卡',
  13. 'order' => 1,
  14. 'menu' => false,
  15. 'end' => array
  16. (
  17. 'update' => 'card/lib/code.createCard',
  18. 'insert' => 'card/lib/code.createCard',
  19. ),
  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. 'value' => Dever::input('where_id'),
  31. ),
  32. 'card_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_card_id'),
  41. 'list' => 'Dever::load("card/info-find#name", "{card_id}")',
  42. ),
  43. 'type' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '生成方式',
  47. 'default' => '1',
  48. 'desc' => '生成方式',
  49. 'match' => 'is_numeric',
  50. 'update' => 'radio',
  51. 'value' => '1',
  52. 'option' => $type,
  53. 'control' => 'type',
  54. ),
  55. 'num' => array
  56. (
  57. 'type' => 'varchar-32',
  58. 'name' => '生成数量',
  59. 'default' => '',
  60. 'desc' => '请输入生成数量',
  61. 'match' => 'is_string',
  62. 'update' => 'text',
  63. 'value' => '',
  64. 'show' => 'type=1',
  65. ),
  66. 'content' => array
  67. (
  68. 'type' => 'text-255',
  69. 'name' => '填写卡号-多个换行隔开,如卡号重复将不会录入到库中,如需填写面值,请用半角逗号隔开',
  70. 'default' => '',
  71. 'desc' => '填写卡号',
  72. 'match' => 'is_string',
  73. 'update' => 'textarea',
  74. 'value' => '',
  75. 'show' => 'type=2',
  76. ),
  77. 'cdate' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '录入时间',
  81. 'match' => array('is_numeric', time()),
  82. 'desc' => '',
  83. # 只有insert时才生效
  84. 'insert' => true,
  85. ),
  86. ),
  87. 'manage' => array
  88. (
  89. # 后台管理不要列表页
  90. 'list' => 'update',
  91. ),
  92. );