area_entry.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'area_entry',
  6. # 显示给用户看的名称
  7. 'lang' => '区域分润录入',
  8. 'order' => 79,
  9. 'menu' => 'agent',
  10. 'end' => array
  11. (
  12. //'insert' => 'mail/lib/manage.updateArea_entry',
  13. ),
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'search' => 'order',
  25. //'list' => true,
  26. ),
  27. 'month' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => '月份',
  31. 'default' => '',
  32. 'match' => 'is_numeric',
  33. 'desc' => '',
  34. 'update' => 'month',
  35. 'search' => 'month_eq',
  36. 'callback' => 'maketime',
  37. 'list' => 'date("Y-m", {month})',
  38. ),
  39. 'shop_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => '店铺名称/店铺编号',
  43. 'default' => '',
  44. 'desc' => '店铺名称',
  45. 'match' => 'is_numeric',
  46. 'update' => 'select',
  47. 'update_search' => 'shop/lib/manage.search_l_shop',
  48. 'search' => array
  49. (
  50. 'api' => 'shop/info-like',
  51. 'col' => '*',
  52. 'result' => 'id',
  53. ) ,
  54. 'list_name' => '门店信息',
  55. 'list' => 'Dever::load("mail/lib/manage.entry_member", {id})',
  56. 'list_order' => 2,
  57. ),
  58. 'buy' => array
  59. (
  60. 'type' => 'decimal-11,2',
  61. 'name' => '毛利',
  62. 'default' => '0',
  63. 'desc' => '采购金额',
  64. 'match' => 'is_numeric',
  65. 'update' => 'text',
  66. 'list' => true,
  67. 'list_order' => 4,
  68. ),
  69. 'state' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '状态',
  73. 'default' => '1',
  74. 'desc' => '请选择状态',
  75. 'match' => 'is_numeric',
  76. ),
  77. 'cdate' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '统计时间',
  81. 'match' => array('is_numeric', time()),
  82. 'desc' => '',
  83. ),
  84. ),
  85. 'manage' => array
  86. (
  87. // 'insert' => false,
  88. 'delete' => false,
  89. // 'edit' => false,
  90. // 'excel' => true,
  91. ),
  92. 'request' => array
  93. (
  94. 'getBuy' => array
  95. (
  96. # 匹配的正则或函数 选填项
  97. 'option' => array
  98. (
  99. 'start' => array('yes-month','>='),
  100. 'end' => array('yes-month','<='),
  101. 'shop_id' => array('yes','in'),
  102. 'state' => 1,
  103. ),
  104. 'type' => 'all',
  105. 'col' => '*',
  106. ),
  107. 'getBuyTotal' => array
  108. (
  109. # 匹配的正则或函数 选填项
  110. 'option' => array
  111. (
  112. 'start' => array('yes-month','>='),
  113. 'end' => array('yes-month','<='),
  114. 'shop_id' => 'yes',
  115. 'state' => 1,
  116. ),
  117. 'type' => 'one',
  118. 'col' => 'sum(buy) as total',
  119. ),
  120. ),
  121. );