in.php 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待审核',
  5. 2 => '已审核',
  6. 3 => '已驳回',
  7. );
  8. $seller = function()
  9. {
  10. $array = array();
  11. $info = Dever::db('scm_role/sell')->select();
  12. if($info)
  13. {
  14. $array += $info;
  15. }
  16. return $array;
  17. };
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'in',
  22. # 显示给用户看的名称
  23. 'lang' => '入库单',
  24. 'order' => 98,
  25. 'set' => array
  26. (
  27. 'status' => $status,
  28. ),
  29. 'ends' => array
  30. (
  31. 'insert' => 'shop/lib/manage.sellOrderUpdate',
  32. 'update' => 'shop/lib/manage.sellOrderUpdate',
  33. 'updatemul' => 'shop/lib/manage.setSellOrderStatusMul_commit',
  34. ),
  35. # 数据结构
  36. 'struct' => array
  37. (
  38. 'id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => 'ID',
  42. 'default' => '',
  43. 'desc' => '',
  44. 'match' => 'is_numeric',
  45. 'search' => 'order',
  46. //'list' => true,
  47. ),
  48. 'order_num' => array
  49. (
  50. 'type' => 'varchar-100',
  51. 'name' => '订单号',
  52. 'default' => '',
  53. 'desc' => '订单号',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list_name' => '订单信息',
  58. 'list' => 'Dever::load("scm_order/lib/sell.info#order", {id})',
  59. ),
  60. 'seller_id' => array
  61. (
  62. 'type' => 'int-11',
  63. 'name' => '销售商',
  64. 'default' => '',
  65. 'desc' => '销售商',
  66. 'match' => 'is_numeric',
  67. 'update' => 'hidden',
  68. 'search' => array
  69. (
  70. 'api' => 'scm_role/seller-like',
  71. 'col' => 'name',
  72. 'result' => 'id',
  73. ),
  74. 'value' => Dever::input('search_option_seller_id'),
  75. ),
  76. 'uid' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '购买人',
  80. 'default' => '0',
  81. 'desc' => '购买人',
  82. 'match' => 'is_numeric',
  83. 'update' => 'text',
  84. 'search' => array
  85. (
  86. 'api' => 'passport/user-like',
  87. 'col' => 'username',
  88. 'result' => 'id',
  89. ),
  90. ),
  91. 'info' => array
  92. (
  93. 'type' => 'varchar-300',
  94. 'name' => '订单备注',
  95. 'default' => '',
  96. 'desc' => '订单备注',
  97. 'match' => 'option',
  98. 'update' => 'textarea',
  99. ),
  100. 'status' => array
  101. (
  102. 'type' => 'tinyint-1',
  103. 'name' => '订单状态',
  104. 'default' => '1',
  105. 'desc' => '订单状态',
  106. 'match' => 'is_numeric',
  107. 'option' => $status,
  108. 'search' => 'select',
  109. //'search_after' => '<br />',
  110. //'mul' => true,
  111. //'mul_option' => array(2 => '批量审核', 5 => '确认收货'),
  112. ),
  113. 'pay_date' => array
  114. (
  115. 'type' => 'int-11',
  116. 'name' => '付款时间',
  117. 'default' => '',
  118. 'match' => 'is_numeric',
  119. 'desc' => '',
  120. 'list' => '"{paydate}" > 0 ? date("Y-m-d H:i", {paydate}) : "-"',
  121. ),
  122. 'finish_date' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '完成时间',
  126. 'default' => '',
  127. 'match' => 'is_numeric',
  128. 'desc' => '',
  129. 'search' => 'date',
  130. 'list' => '"{finish_date}" ? date("Y-m-d H:i", {finish_date}) : "-"',
  131. ),
  132. 'oper_date' => array
  133. (
  134. 'type' => 'int-11',
  135. 'name' => '审核时间',
  136. 'default' => '',
  137. 'match' => 'is_numeric',
  138. 'desc' => '',
  139. //'list' => '"{operdate}" > 0 ? date("Y-m-d H:i:s", {operdate}) : "-"',
  140. //'list_name' => '发货时间',
  141. //'list_order' => 8,
  142. ),
  143. 'fa_date' => array
  144. (
  145. 'type' => 'int-11',
  146. 'name' => '发货时间',
  147. 'default' => '',
  148. 'match' => 'is_numeric',
  149. 'desc' => '',
  150. 'search' => 'date',
  151. 'list' => '"{fa_date}" > 0 ? date("Y-m-d H:i:s", {fa_date}) : "-"',
  152. ),
  153. 'state' => array
  154. (
  155. 'type' => 'tinyint-1',
  156. 'name' => '状态',
  157. 'default' => '1',
  158. 'desc' => '请选择状态',
  159. 'match' => 'is_numeric',
  160. ),
  161. 'cdate' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '下单时间',
  165. 'match' => array('is_numeric', time()),
  166. 'desc' => '',
  167. # 只有insert时才生效
  168. 'insert' => true,
  169. 'search' => 'sdate',
  170. 'list' => 'date("Y-m-d H:i", {cdate})',
  171. ),
  172. ),
  173. 'manage' => array
  174. (
  175. 'delete' => false,
  176. 'edit' => false,
  177. 'insert' => false,
  178. //'excel' => $excel,
  179. //'mul' => $mul,
  180. 'button' => array
  181. (
  182. //'导出订单明细' => array('excel', 'shop/excel.sell_order'),
  183. ),
  184. 'list_button' => array
  185. (
  186. //fast_list
  187. /*
  188. 'list' => array('查看详情', '"sell_order_goods&project=shop&order_id={id}&page_type=&search_option_shop_type='.$search_option_shop_type.'"'),
  189. 'list11' => array('查看采购单', '"buy_order&project=shop&search_option_type=1&&search_option_parent_type=2&search_option_parent_order_id={id}&oper_table=sell_order&search_option_shop_type='.$search_option_shop_type.'"', '{status} >= 3 && {audit} == 2 && {shop_type} == 2'),
  190. 'list1' => array('审核', '"sell_order_goods&project=shop&order_id={id}&audit=1&page_type=&search_option_shop_type='.$search_option_shop_type.'"', '{status} == 2 && {shop_type} == 2'),
  191. 'oper' => array('确认收货', '"shop/lib/manage.setSellOrderStatus?shop_id={shop_id}&order_id={id}"', '{status} == 4 && {shop_type} == 2'),
  192. */
  193. ),
  194. ),
  195. 'request' => array
  196. (
  197. 'getList' => array
  198. (
  199. # 匹配的正则或函数 选填项
  200. 'option' => array
  201. (
  202. 'shop_id' => 'yes',
  203. 'uid' => 'yes',
  204. 'status' => 'yes',
  205. 'state' => 1,
  206. ),
  207. 'type' => 'all',
  208. 'order' => array('cdate' => 'desc'),
  209. 'page' => array(5, 'list'),
  210. 'col' => '*',
  211. ),
  212. 'getAll' => array
  213. (
  214. # 匹配的正则或函数 选填项
  215. 'option' => array
  216. (
  217. 'uid' => 'yes',
  218. 'name' => array('yes', 'like'),
  219. 'shop_id' => 'yes',
  220. 'method' => 'yes',
  221. 'pay_method' => 'yes',
  222. 'start' => array('yes-cdate', '>='),
  223. 'end' => array('yes-cdate', '<='),
  224. 'status' => array('yes', 'in'),
  225. 'state' => 1,
  226. ),
  227. 'type' => 'all',
  228. 'order' => array('cdate' => 'desc'),
  229. 'page' => array(10, 'list'),
  230. 'col' => '*',
  231. ),
  232. ),
  233. );