servicer.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'servicer',
  6. # 显示给用户看的名称
  7. 'lang' => '经销商配送商关系表',
  8. 'menu' => false,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'update' => 'hidden',
  21. //'list' => true,
  22. ),
  23. 'seller_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '经销商ID',
  27. 'default' => '-1',
  28. 'desc' => '经销商ID',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_seller_id'),
  32. ),
  33. 'servicer_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '配送商ID',
  37. 'default' => '',
  38. 'desc' => '配送商ID',
  39. 'match' => 'is_numeric',
  40. 'update' => 'hidden',
  41. 'search' => 'hidden',
  42. 'value' => Dever::input('search_option_servicer_id'),
  43. 'list' => 'Dever::load("scm_supplier/info-one#name", {servicer_id})',
  44. ),
  45. 'reorder' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '排序-优先级,数值越大越靠前',
  49. 'default' => '1',
  50. 'desc' => '请输入排序',
  51. 'match' => 'option',
  52. //'update' => 'text',
  53. 'search' => 'order',
  54. 'list_name' => '排序',
  55. 'list' => true,
  56. 'order' => 'desc',
  57. 'edit' => true,
  58. ),
  59. 'state' => array
  60. (
  61. 'type' => 'tinyint-1',
  62. 'name' => '状态',
  63. 'default' => '1',
  64. 'desc' => '请选择状态',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'cdate' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '创建时间',
  71. 'match' => array('is_numeric', time()),
  72. 'desc' => '',
  73. # 只有insert时才生效
  74. //'insert' => true,
  75. 'search' => 'date',
  76. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  77. ),
  78. ),
  79. 'manage' => array
  80. (
  81. ),
  82. 'request' => array
  83. (
  84. 'getAll' => array
  85. (
  86. 'option' => array
  87. (
  88. 'seller_id' => 'yes',
  89. 'state' => 1,
  90. ),
  91. 'type' => 'all',
  92. 'col' => '*|servicer_id',
  93. ),
  94. 'getData' => array
  95. (
  96. # 匹配的正则或函数 选填项
  97. 'option' => array
  98. (
  99. 'seller_id' => array('yes-t_1.seller_id'),
  100. 'state' => 'yes-t_2.state-1',
  101. 'state_1' => 'yes-t_1.state-1',
  102. ),
  103. # 联表
  104. 'join' => array
  105. (
  106. array
  107. (
  108. 'table' => 'scm_servicer/info',
  109. 'type' => 'left join',
  110. 'on' => array('servicer_id','id'),
  111. 'col' => 'servicer_id',
  112. ),
  113. ),
  114. 'type' => 'all',
  115. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  116. 'col' => '*,t_2.name,t_2.id as id|id',
  117. ),
  118. ),
  119. );