order.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待支付',
  5. 2 => '待生产发货',
  6. 3 => '已发货',
  7. 4 => '已到货',
  8. 5 => '已取消',
  9. 6 => '缺货与报损',
  10. );
  11. $type = array
  12. (
  13. 1 => '仓库',
  14. 2 => '门店',
  15. );
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'order',
  20. # 显示给用户看的名称
  21. 'lang' => '订货单',
  22. 'order' => 99,
  23. 'menu' => false,
  24. 'status' => $status,
  25. # 数据结构
  26. 'struct' => array
  27. (
  28. 'id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => 'ID',
  32. 'default' => '',
  33. 'desc' => '',
  34. 'match' => 'is_numeric',
  35. 'search' => 'order',
  36. //'list' => true,
  37. ),
  38. 'factory_id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => '所属工厂',
  42. 'default' => '',
  43. 'desc' => '所属工厂',
  44. 'match' => 'is_numeric',
  45. 'update' => 'hidden',
  46. 'value' => Dever::input('search_option_factory_id'),
  47. 'list' => 'Dever::load("factory/info-find#name", {factory_id})',
  48. ),
  49. 'name' => array
  50. (
  51. 'type' => 'varchar-800',
  52. 'name' => '订单名称',
  53. 'default' => '',
  54. 'desc' => '订单名称',
  55. 'match' => 'is_string',
  56. 'update' => 'text',
  57. ),
  58. 'order_num' => array
  59. (
  60. 'type' => 'varchar-100',
  61. 'name' => '订单编号',
  62. 'default' => '',
  63. 'desc' => '订单编号',
  64. 'match' => 'is_string',
  65. 'update' => 'text',
  66. 'search' => 'fulltext',
  67. 'list' => true,
  68. ),
  69. 'type' => array
  70. (
  71. 'type' => 'int-11',
  72. 'name' => '采购来源',
  73. 'default' => '',
  74. 'desc' => '采购来源',
  75. 'match' => 'is_numeric',
  76. ),
  77. 'type_id' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '来源id',
  81. 'default' => '',
  82. 'desc' => '来源id',
  83. 'match' => 'is_numeric',
  84. ),
  85. 'price' => array
  86. (
  87. 'type' => 'varchar-50',
  88. 'name' => '购买价格',
  89. 'default' => '',
  90. 'desc' => '购买价格',
  91. 'match' => 'option',
  92. 'update' => 'text',
  93. 'list' => true,
  94. ),
  95. 'num' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '购买数量',
  99. 'default' => '',
  100. 'desc' => '购买数量',
  101. 'match' => 'is_numeric',
  102. 'search' => 'select',
  103. 'list' => true,
  104. ),
  105. 'info' => array
  106. (
  107. 'type' => 'varchar-300',
  108. 'name' => '订单备注',
  109. 'default' => '',
  110. 'desc' => '订单备注',
  111. 'match' => 'option',
  112. 'update' => 'textarea',
  113. ),
  114. 'state' => array
  115. (
  116. 'type' => 'tinyint-1',
  117. 'name' => '状态',
  118. 'default' => '1',
  119. 'desc' => '请选择状态',
  120. 'match' => 'is_numeric',
  121. ),
  122. 'cdate' => array
  123. (
  124. 'type' => 'int-11',
  125. 'name' => '下单时间',
  126. 'match' => array('is_numeric', time()),
  127. 'desc' => '',
  128. # 只有insert时才生效
  129. 'insert' => true,
  130. 'search' => 'date',
  131. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  132. //'list' => 'Dever::load("service/lib/manage.showOrderTime", "{id}")',
  133. ),
  134. ),
  135. 'manage' => array
  136. (
  137. 'delete' => false,
  138. 'edit' => false,
  139. 'insert' => false,
  140. 'button' => array
  141. (
  142. //'导出订单' => array('location', 'user/lib/manage.out'),
  143. ),
  144. 'list_button' => array(
  145. //'edit' => array('退款', 'status,tk_time,tk_pic,tk_desc,tk_admin', '{status} == 2'),
  146. //'delete' => array('删除', '', '{status} == 1'),
  147. ),
  148. ),
  149. 'request' => array
  150. (
  151. ),
  152. );