store.php 5.7 KB

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