shop_sell.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. <?php
  2. $status = array
  3. (
  4. 1 => '未对账',
  5. 2 => '已对账',
  6. );
  7. $type = array
  8. (
  9. 1 => '按月对账',
  10. 2 => '按周对账',
  11. 3 => '按天对账',
  12. );
  13. $shop = function()
  14. {
  15. $array = array();
  16. $info = Dever::db('shop/info')->state();
  17. if($info)
  18. {
  19. $array += $info;
  20. }
  21. return $array;
  22. };
  23. return array
  24. (
  25. # 表名
  26. 'name' => 'shop_sell',
  27. # 显示给用户看的名称
  28. 'lang' => '门店零售对账单',
  29. 'order' => 89,
  30. 'config_status' => $status,
  31. 'config_type' => $type,
  32. # 数据结构
  33. 'struct' => array
  34. (
  35. 'id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => 'ID',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. 'search' => 'order',
  43. //'list' => true,
  44. ),
  45. 'type' => array
  46. (
  47. 'type' => 'tinyint-1',
  48. 'name' => '对账单类型',
  49. 'default' => '1',
  50. 'desc' => '对账单类型',
  51. 'match' => 'is_numeric',
  52. ),
  53. 'day' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '对账单时间',
  57. 'default' => '',
  58. 'match' => 'is_numeric',
  59. 'desc' => '',
  60. 'search' => 'day',
  61. 'order' => 'desc',
  62. 'list' => 'Dever::load("cash/lib/set.statDate", "{type}", "{day}")',
  63. ),
  64. 'shop_id' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '对账门店',
  68. 'default' => '',
  69. 'desc' => '对账门店',
  70. 'match' => 'is_numeric',
  71. 'search' => 'select',
  72. 'option' => $shop,
  73. 'update' => 'hidden',
  74. 'value' => Dever::input('search_option_shop_id'),
  75. 'list' => 'Dever::load("shop/info-one#name", {shop_id})',
  76. ),
  77. 'start' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '对账单开始时间',
  81. 'default' => '',
  82. 'match' => 'is_numeric',
  83. 'desc' => '',
  84. ),
  85. 'end' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '对账单结束时间',
  89. 'default' => '',
  90. 'match' => 'is_numeric',
  91. 'desc' => '',
  92. 'list_name' => '对账周期',
  93. 'list' => 'Dever::load("cash/lib/set.statTime", "{start}", "{end}")',
  94. ),
  95. 'cash' => array
  96. (
  97. 'type' => 'varchar-100',
  98. 'name' => '对账金额',
  99. 'default' => '0',
  100. 'desc' => '对账金额',
  101. 'match' => 'option',
  102. 'update' => 'text',
  103. 'list' => 'Dever::load("cash/lib/set.getCash", "{cash}")',
  104. ),
  105. 'num' => array
  106. (
  107. 'type' => 'varchar-100',
  108. 'name' => '对账数量',
  109. 'default' => '0',
  110. 'desc' => '对账数量',
  111. 'match' => 'option',
  112. 'update' => 'text',
  113. //'list' => true,
  114. ),
  115. 'shop_status' => array
  116. (
  117. 'type' => 'int-11',
  118. 'name' => '门店对账状态',
  119. 'default' => '1',
  120. 'desc' => '门店对账状态',
  121. 'match' => 'is_numeric',
  122. 'update' => 'radio',
  123. 'search' => 'select',
  124. 'option' => $status,
  125. 'list' => true,
  126. ),
  127. 'status' => array
  128. (
  129. 'type' => 'int-11',
  130. 'name' => '平台对账状态',
  131. 'default' => '1',
  132. 'desc' => '平台对账状态',
  133. 'match' => 'is_numeric',
  134. 'update' => 'radio',
  135. 'search' => 'select',
  136. 'option' => $status,
  137. 'list' => true,
  138. ),
  139. 'state' => array
  140. (
  141. 'type' => 'tinyint-1',
  142. 'name' => '状态',
  143. 'default' => '1',
  144. 'desc' => '请选择状态',
  145. 'match' => 'is_numeric',
  146. ),
  147. 'cdate' => array
  148. (
  149. 'type' => 'int-11',
  150. 'name' => '生成时间',
  151. 'match' => array('is_numeric', time()),
  152. 'desc' => '',
  153. # 只有insert时才生效
  154. 'insert' => true,
  155. //'search' => 'date',
  156. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  157. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  158. ),
  159. ),
  160. 'manage' => array
  161. (
  162. 'delete' => false,
  163. 'edit' => false,
  164. 'insert' => false,
  165. 'excel' => true,
  166. 'list_button' => array(
  167. 'list' => array('查看详情', '"order&project=cash&id={id}&page_type=1&type=shop_sell"'),
  168. 'oper' => array('确认对账金额', '"cash/lib/set.audit?id={id}&type=shop_sell"', '{status} == 1', 'Dever::load("cash/lib/set.statYes", "{id}", "shop_sell")', '请确认'),
  169. ),
  170. ),
  171. 'request' => array
  172. (
  173. # 获取总金额
  174. 'getAll' => array
  175. (
  176. # 匹配的正则或函数 选填项
  177. 'option' => array
  178. (
  179. 'start' => array('yes-day', '>='),
  180. 'end' => array('yes-day', '<='),
  181. 'shop_id' => 'yes',
  182. 'status' => 'yes',
  183. 'state' => 1,
  184. ),
  185. 'type' => 'all',
  186. 'order' => array('day'=>'desc','id' => 'desc'),
  187. 'page' => array(10, 'list'),
  188. 'col' => '*',
  189. ),
  190. ),
  191. );