in_order.php 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待审核',
  5. 2 => '已审核',
  6. 3 => '已驳回',
  7. );
  8. $store = array();
  9. $servicer_id = Dever::input('search_option_servicer_id');
  10. if ($servicer_id) {
  11. $store = function() use($servicer_id) {
  12. return Dever::db('scm_servicer/store')->select(array('servicer_id' => $servicer_id));
  13. };
  14. }
  15. $supplier = function() use($servicer_id) {
  16. return Dever::db('scm_servicer/supplier')->getData(array('servicer_id' => $servicer_id));
  17. };
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'in_order',
  22. # 显示给用户看的名称
  23. 'lang' => '入库单查询',
  24. 'order' => 9,
  25. 'set' => array
  26. (
  27. 'status' => $status,
  28. ),
  29. # 数据结构
  30. 'struct' => array
  31. (
  32. 'id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => 'ID',
  36. 'default' => '',
  37. 'desc' => '',
  38. 'match' => 'is_numeric',
  39. 'search' => 'order',
  40. //'list' => true,
  41. ),
  42. 'order_num' => array
  43. (
  44. 'type' => 'varchar-100',
  45. 'name' => '订单号',
  46. 'default' => '',
  47. 'desc' => '订单号',
  48. 'match' => 'is_string',
  49. 'search' => 'fulltext',
  50. 'list_name' => '订单信息',
  51. //'list' => 'Dever::load("scm_order/lib/sell.info#order", {id})',
  52. ),
  53. 'servicer_id' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '配送商ID',
  57. 'default' => '',
  58. 'desc' => '配送商ID',
  59. 'match' => 'is_numeric',
  60. 'update' => 'hidden',
  61. 'searchs' => array
  62. (
  63. 'api' => 'scm_role/seller-like',
  64. 'col' => 'name',
  65. 'result' => 'id',
  66. ),
  67. 'value' => $servicer_id,
  68. ),
  69. 'servicer_store_id' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '仓库',
  73. 'default' => '',
  74. 'desc' => '仓库',
  75. 'match' => 'is_numeric',
  76. 'update' => 'select',
  77. 'option' => $store,
  78. 'list' => true,
  79. ),
  80. 'supplier_id' => array
  81. (
  82. 'type' => 'int-11',
  83. 'name' => '供应商',
  84. 'default' => '',
  85. 'desc' => '供应商',
  86. 'match' => 'is_numeric',
  87. 'update' => 'select',
  88. 'option' => $supplier,
  89. 'list' => true,
  90. ),
  91. 'info' => array
  92. (
  93. 'type' => 'varchar-300',
  94. 'name' => '订单备注',
  95. 'default' => '',
  96. 'desc' => '订单备注',
  97. 'match' => 'option',
  98. 'update' => 'text',
  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. 'scm_servicer-in_order_goods'=> array
  114. (
  115. 'name' => '商品设置',
  116. 'default' => '',
  117. 'desc' => '商品设置',
  118. 'match' => 'option',
  119. # 同步更新另外一个表的内容,两个表相关联的id,更新另一个表的字段
  120. 'sync' => array('id', 'order_id'),
  121. 'update' => array(1),
  122. # 1纵向展示 2横向展示
  123. 'update_type' => 2,
  124. //'list' => 'Dever::load("scm_servicer/lib/manage.getStore", {id})',
  125. ),
  126. 'state' => array
  127. (
  128. 'type' => 'tinyint-1',
  129. 'name' => '状态',
  130. 'default' => '1',
  131. 'desc' => '请选择状态',
  132. 'match' => 'is_numeric',
  133. ),
  134. 'cdate' => array
  135. (
  136. 'type' => 'int-11',
  137. 'name' => '下单时间',
  138. 'match' => array('is_numeric', time()),
  139. 'desc' => '',
  140. # 只有insert时才生效
  141. 'insert' => true,
  142. 'search' => 'sdate',
  143. 'list' => 'date("Y-m-d H:i", {cdate})',
  144. ),
  145. ),
  146. 'manage' => array
  147. (
  148. 'delete' => false,
  149. 'edit' => false,
  150. 'insert' => false,
  151. //'excel' => $excel,
  152. //'mul' => $mul,
  153. 'button' => array
  154. (
  155. //'导出订单明细' => array('excel', 'shop/excel.sell_order'),
  156. ),
  157. 'list_button' => array
  158. (
  159. //fast_list
  160. /*
  161. 'list' => array('查看详情', '"sell_order_goods&project=shop&order_id={id}&page_type=&search_option_shop_type='.$search_option_shop_type.'"'),
  162. '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'),
  163. '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'),
  164. 'oper' => array('确认收货', '"shop/lib/manage.setSellOrderStatus?shop_id={shop_id}&order_id={id}"', '{status} == 4 && {shop_type} == 2'),
  165. */
  166. ),
  167. ),
  168. 'request' => array
  169. (
  170. ),
  171. );