buy_order_goods.php 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待审',
  5. 2 => '已审核',
  6. 3 => '未通过',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'buy_order_goods',
  12. # 显示给用户看的名称
  13. 'lang' => '订单商品表',
  14. 'menu' => false,
  15. 'status' => $status,
  16. 'end' => array
  17. (
  18. 'insert' => 'scm/lib/order.updateGoods?table=scm_seller/buy_order_goods',
  19. 'update' => 'scm/lib/order.updateGoods?table=scm_seller/buy_order_goods',
  20. ),
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'update' => 'hidden',
  33. //'list' => true,
  34. ),
  35. 'order_id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '订单表id',
  39. 'default' => '',
  40. 'desc' => '订单表id',
  41. 'match' => 'is_numeric',
  42. ),
  43. 'goods' => array
  44. (
  45. 'type' => 'varchar-2000',
  46. 'name' => '商品',
  47. 'default' => '',
  48. 'desc' => '商品',
  49. 'match' => 'option',
  50. 'update' => 'select',
  51. 'update_search' => 'scm_product/lib/manage.searchProduct?{seller_id}',
  52. 'bind' => array('onchange', 'loading', array('url' => Dever::url('lib/manage.showInfo?cash_col=buy_price', 'scm_product'), 'col' => 'seller_id,seller_shop_id')),
  53. ),
  54. 'goods_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '库存',
  58. 'default' => '',
  59. 'desc' => '商品',
  60. 'match' => 'is_numeric',
  61. 'update' => 'show',
  62. 'value' => '暂无',
  63. ),
  64. 'sku_id' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => 'sku_id',
  68. 'default' => '-1',
  69. 'desc' => 'sku_id',
  70. 'match' => 'is_numeric',
  71. ),
  72. 'unit_id' => array
  73. (
  74. 'type' => 'int-11',
  75. 'name' => '单位',
  76. 'default' => '',
  77. 'desc' => '单位',
  78. 'match' => 'is_numeric',
  79. 'update' => 'select',
  80. 'option' => array(0 => '请先选择商品'),
  81. 'bind' => array('onchange', 'loading', array('url' => Dever::url('lib/manage.showPriceByUnit?cash_col=buy_price', 'scm_product'), 'col' => 'seller_id,seller_shop_id,goods')),
  82. ),
  83. 'cash' => array
  84. (
  85. 'type' => 'decimal-11,2',
  86. 'name' => '单价',
  87. 'default' => '',
  88. 'desc' => '单价',
  89. 'match' => 'option',
  90. 'update' => 'text',
  91. ),
  92. 'num' => array
  93. (
  94. 'type' => 'decimal-11,2',
  95. 'name' => '数量',
  96. 'default' => '1',
  97. 'desc' => '数量',
  98. 'match' => 'option',
  99. 'update' => 'text',
  100. ),
  101. 'status' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '状态',
  105. 'default' => '1',
  106. 'desc' => '状态',
  107. 'match' => 'is_numeric',
  108. //'update' => 'select',
  109. 'option' => $status,
  110. 'search' => 'select',
  111. 'list' => true,
  112. 'edit' => true,
  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. ),
  133. ),
  134. 'manage' => array
  135. (
  136. 'insert' => false,
  137. 'delete' => false,
  138. 'page_list' => 'order_goods',
  139. ),
  140. 'request' => array
  141. (
  142. ),
  143. );