servicer_supplier.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'servicer_supplier',
  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. 'servicer_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_servicer_id'),
  32. ),
  33. 'supplier_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_supplier_id'),
  43. 'list' => 'Dever::load("scm_role/supplier-one#name", {supplier_id})',
  44. ),
  45. 'state' => array
  46. (
  47. 'type' => 'tinyint-1',
  48. 'name' => '状态',
  49. 'default' => '1',
  50. 'desc' => '请选择状态',
  51. 'match' => 'is_numeric',
  52. ),
  53. 'cdate' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '创建时间',
  57. 'match' => array('is_numeric', time()),
  58. 'desc' => '',
  59. # 只有insert时才生效
  60. //'insert' => true,
  61. 'search' => 'date',
  62. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  63. ),
  64. ),
  65. 'manage' => array
  66. (
  67. ),
  68. 'request' => array
  69. (
  70. 'getAll' => array
  71. (
  72. 'option' => array
  73. (
  74. 'servicer_id' => 'yes',
  75. 'state' => 1,
  76. ),
  77. 'type' => 'all',
  78. 'col' => '*|supplier_id',
  79. ),
  80. 'getData' => array
  81. (
  82. # 匹配的正则或函数 选填项
  83. 'option' => array
  84. (
  85. 'servicer_id' => array('yes-t_1.servicer_id'),
  86. 'state' => 'yes-t_2.state-1',
  87. 'state_1' => 'yes-t_1.state-1',
  88. ),
  89. # 联表
  90. 'join' => array
  91. (
  92. array
  93. (
  94. 'table' => 'scm_role/supplier',
  95. 'type' => 'left join',
  96. 'on' => array('supplier_id','id'),
  97. 'col' => 'supplier_id',
  98. ),
  99. ),
  100. 'type' => 'all',
  101. 'order' => array('t_2.reorder' => 'desc', 't_2.id' => 'desc'),
  102. 'col' => '*,t_2.name',
  103. ),
  104. ),
  105. );