area_entry.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <?php
  2. $shop = function()
  3. {
  4. $array = array();
  5. $data = Dever::db('shop/info-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'area_entry',
  16. # 显示给用户看的名称
  17. 'lang' => '区域分润录入',
  18. 'order' => 79,
  19. 'menu' => 'agent',
  20. 'end' => array
  21. (
  22. 'insert' => 'mail/lib/manage.updateArea_entry',
  23. ),
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. //'list' => true,
  36. ),
  37. 'month' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => '月份',
  41. 'default' => '',
  42. 'match' => 'is_numeric',
  43. 'desc' => '',
  44. 'update' => 'month',
  45. 'search' => 'day',
  46. 'list' => 'date("Y-m", {month})',
  47. ),
  48. // 'area' => array
  49. // (
  50. // 'type' => 'varchar-500',
  51. // 'name' => '区域',
  52. // 'default' => '',
  53. // 'desc' => '区域',
  54. // 'match' => 'option',
  55. // 'update' => 'linkage',
  56. // 'list' => 'Dever::load("area/api.string", "{area}")',
  57. // 'option' => Dever::url('api.get?level_total=4', 'area'),
  58. // ),
  59. 'shop_id' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '店铺名称/店铺编号',
  63. 'default' => '',
  64. 'desc' => '店铺名称',
  65. 'match' => 'is_numeric',
  66. 'option' => $shop,
  67. 'search' => array
  68. (
  69. 'api' => 'shop/info-like',
  70. 'col' => '*',
  71. 'result' => 'id',
  72. ) ,
  73. 'list_name' => '门店信息',
  74. 'list' => 'Dever::load("mail/lib/manage.entry_member", {id})',
  75. 'list_order' => 2,
  76. ),
  77. 'sid' => array
  78. (
  79. 'type' => 'varchar-30',
  80. 'name' => '店铺编号-一般为5位数字,不能重复',
  81. 'default' => '',
  82. 'desc' => '店铺编号',
  83. 'match' => 'is_string',
  84. 'update' => 'text',
  85. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  86. 'bind' => array('onblur', 'loading', array('url' => Dever::url("shop/lib/record.search"))),
  87. ),
  88. 'num' => array
  89. (
  90. 'type' => 'decimal-11',
  91. 'name' => '店铺数量',
  92. 'default' => '0',
  93. 'desc' => '店铺数量',
  94. 'match' => 'is_numeric',
  95. // 'update' => 'text',
  96. // 'list' => true,
  97. ),
  98. 'cprice' => array
  99. (
  100. 'type' => 'decimal-11,2',
  101. 'name' => '毛利',
  102. 'default' => '0',
  103. 'desc' => '采购金额',
  104. 'match' => 'is_numeric',
  105. 'update' => 'text',
  106. 'list' => true,
  107. 'list_order' => 4,
  108. ),
  109. 'price' => array
  110. (
  111. 'type' => 'decimal-11,2',
  112. 'name' => '分润金额',
  113. 'default' => '0',
  114. 'desc' => '分润金额',
  115. 'match' => 'is_numeric',
  116. // 'update' => 'text',
  117. // 'list' => true,
  118. 'list_order' => 5,
  119. ),
  120. 'state' => array
  121. (
  122. 'type' => 'tinyint-1',
  123. 'name' => '状态',
  124. 'default' => '1',
  125. 'desc' => '请选择状态',
  126. 'match' => 'is_numeric',
  127. ),
  128. 'cdate' => array
  129. (
  130. 'type' => 'int-11',
  131. 'name' => '统计时间',
  132. 'match' => array('is_numeric', time()),
  133. 'desc' => '',
  134. ),
  135. ),
  136. 'manage' => array
  137. (
  138. // 'insert' => false,
  139. 'delete' => false,
  140. // 'edit' => false,
  141. // 'excel' => true,
  142. ),
  143. 'request' => array
  144. (
  145. 'getNewAll' => array
  146. (
  147. # 匹配的正则或函数 选填项
  148. 'option' => array
  149. (
  150. 'start' => array('yes-month','>='),
  151. 'end' => array('yes-month','<='),
  152. // 'area' => array('yes','like'),
  153. 'state' => 1,
  154. ),
  155. 'type' => 'all',
  156. 'col' => '*',
  157. ),
  158. 'getAll' => array
  159. (
  160. # 匹配的正则或函数 选填项
  161. 'option' => array
  162. (
  163. 'start' => array('yes-month','>='),
  164. 'end' => array('yes-month','<='),
  165. // 'area' => array('yes','like'),
  166. 'state' => 1,
  167. ),
  168. 'type' => 'all',
  169. 'col' => 'id,area',
  170. ),
  171. 'getNum' => array
  172. (
  173. # 匹配的正则或函数 选填项
  174. 'option' => array
  175. (
  176. 'start' => array('yes-month','>='),
  177. 'end' => array('yes-month','<='),
  178. 'area' => array('yes','like'),
  179. 'state' => 1,
  180. ),
  181. 'type' => 'one',
  182. 'col' => 'sum(num) as num',
  183. ),
  184. 'getPrice' => array
  185. (
  186. # 匹配的正则或函数 选填项
  187. 'option' => array
  188. (
  189. 'start' => array('yes-month','>='),
  190. 'end' => array('yes-month','<='),
  191. 'area' => array('yes','like'),
  192. 'state' => 1,
  193. ),
  194. 'type' => 'one',
  195. 'col' => 'sum(cprice) as cprice',
  196. ),
  197. ),
  198. );