soft_cash.php 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  1. <?php
  2. $status = array
  3. (
  4. 1 => array('name' => '待业务初审', 'style' => 'font-weight:bold;color:#436EEE'),
  5. 2 => array('name' => '待财务终审', 'style' => 'font-weight:bold;color:#436EEE'),
  6. 3 => array('name' => '已完成', 'style' => 'font-weight:bold;color:green'),
  7. 4 => array('name' => '驳回', 'style' => 'font-weight:bold;color:#CD3700'),
  8. );
  9. $manage_audit = array
  10. (
  11. //1 => '待审核',
  12. 2 => '已审核',
  13. 3 => '已作废',
  14. );
  15. $button = array();
  16. $col = Dever::input('col');
  17. if (Dever::load('manage/auth')->checkFunc('agent.soft_cash', 'editnew', '新增')) {
  18. $button['新增'] = array('新增', Dever::url('project/database/update&project=agent&&table=soft_cash&menu=agent&search_option_state=1'));
  19. }
  20. return array
  21. (
  22. # 表名
  23. 'name' => 'soft_cash',
  24. # 显示给用户看的名称
  25. 'lang' => '软件服务费',
  26. 'menu' => true,
  27. 'config_status' => $status,
  28. 'end' => array
  29. (
  30. 'insert' => 'agent/lib/soft_cash.updateSoft',
  31. 'update' => 'agent/lib/soft_cash.updateSoft',
  32. ),
  33. # 数据结构
  34. 'struct' => array
  35. (
  36. 'id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => 'ID',
  40. 'default' => '',
  41. 'desc' => '',
  42. 'match' => 'is_numeric',
  43. 'search' => 'order',
  44. 'update' => 'hidden',
  45. //'list' => true,
  46. ),
  47. 'mid' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => '代理商姓名/手机号',
  51. 'default' => '-1',
  52. 'desc' => '代理商',
  53. 'match' => 'is_string',
  54. // 'update' => 'text',
  55. 'search' => array
  56. (
  57. 'api' => 'agent/member-getSearch',
  58. 'col' => 'col',
  59. 'result' => 'id',
  60. 'search' => 'mid',
  61. ),
  62. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  63. 'list_order' => 2,
  64. ),
  65. 'mobile' => array
  66. (
  67. 'type' => 'bigint-11',
  68. 'name' => '代理商手机号',
  69. 'default' => '',
  70. 'desc' => '请输入手机号',
  71. 'match' => Dever::rule('mobile'),
  72. 'update' => 'text',
  73. # 绑定js脚本,更新时使用,第一个参数是执行的方式,第二个参数执行的方法,第三个参数是传值。
  74. 'bind' => array('onblur', 'loading', array('url' => Dever::url("lib/soft_cash.search", 'agent'))),
  75. //'search' => 'fulltext',
  76. //'list' => true,
  77. ),
  78. 'order_num' => array
  79. (
  80. 'type' => 'varchar-100',
  81. 'name' => '订单号',
  82. 'default' => '',
  83. 'desc' => '订单号',
  84. 'match' => 'is_string',
  85. // 'update' => 'text',
  86. //'search' => 'fulltext',
  87. 'list_name' => '订单号<br />购买时间',
  88. 'list' => 'Dever::load("agent/lib/soft_cash.soft_show#num",{id})',
  89. 'list_order' => 1,
  90. ),
  91. 'agreement_id' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '合同',
  95. 'default' => '-1',
  96. 'desc' => '合同',
  97. 'match' => 'is_string',
  98. // 'update' => 'text',
  99. ),
  100. 'cash' => array
  101. (
  102. 'type' => 'float-11,2',
  103. 'name' => '软件服务费用',
  104. 'default' => '0',
  105. 'desc' => '费用',
  106. 'match' => 'option',
  107. 'update' => 'text',
  108. 'list' => true,
  109. ),
  110. 'price' => array
  111. (
  112. 'type' => 'float-11,2',
  113. 'name' => '期权价值',
  114. 'default' => '0',
  115. 'desc' => '期权价值',
  116. 'match' => 'option',
  117. 'update' => 'text',
  118. 'list' => true,
  119. ),
  120. 'pic' => array
  121. (
  122. 'type' => 'text-255',
  123. 'name' => '支付凭证',
  124. 'default' => '',
  125. 'desc' => '多张图片',
  126. 'match' => 'is_string',
  127. 'update' => 'images',
  128. 'key' => '1',
  129. 'place' => '759*562',
  130. ),
  131. 'status' => array
  132. (
  133. 'type' => 'tinyint-1',
  134. 'name' => '订单状态',
  135. 'default' => '1',
  136. 'desc' => '订单状态',
  137. 'match' => 'is_numeric',
  138. // 'update' => 'radio',
  139. 'option' => $status,
  140. 'list' => true,
  141. ),
  142. 'audit' => array
  143. (
  144. 'type' => 'int-11',
  145. 'name' => '审核状态',
  146. 'default' => '2',
  147. 'desc' => '审核状态',
  148. 'match' => 'is_numeric',
  149. 'update' => $col ? 'radio' : false,
  150. 'option' => $manage_audit,
  151. 'mul' => true,
  152. 'control' => 'audit',
  153. ),
  154. 'audit_desc' => array
  155. (
  156. 'type' => 'varchar-600',
  157. 'name' => '备注',
  158. 'default' => '',
  159. 'desc' => '审核说明',
  160. 'match' => 'is_string',
  161. 'update' => $col ? 'textarea' : false,
  162. // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  163. // 'list_order' => 9,
  164. 'show' => 'audit=3',
  165. ),
  166. 'admin_desc' => array
  167. (
  168. 'type' => 'varchar-600',
  169. 'name' => '管理员备注',
  170. 'default' => '',
  171. 'desc' => '管理员备注',
  172. 'match' => 'option',
  173. 'update' => 'textarea',
  174. ),
  175. 'buy_date' => array
  176. (
  177. 'type' => 'int-11',
  178. 'name' => '购买时间',
  179. 'match' => 'option',
  180. 'default' => '0',
  181. 'desc' => '',
  182. 'match' => 'is_numeric',
  183. 'update' => 'day',
  184. 'callback' => 'maketime',
  185. // 'list' => '{buy_date} > 0 ? date("Y-m-d H:i", {buy_date}) : "无"',
  186. ),
  187. 'state' => array
  188. (
  189. 'type' => 'tinyint-1',
  190. 'name' => '状态',
  191. 'default' => '1',
  192. 'desc' => '请选择状态',
  193. 'match' => 'is_numeric',
  194. ),
  195. 'cdate' => array
  196. (
  197. 'type' => 'int-11',
  198. 'name' => '创建时间',
  199. 'match' => array('is_numeric', time()),
  200. 'desc' => '',
  201. # 只有insert时才生效
  202. 'insert' => true,
  203. 'search' => 'date',
  204. // 'list' => 'date("Y-m-d H:i:s", {cdate})',
  205. ),
  206. ),
  207. 'manage' => array
  208. (
  209. 'insert' => false,
  210. 'delete' => false,
  211. 'edit' => false,
  212. 'button' => $button,
  213. 'list_button' => array
  214. (
  215. 'list' => array('查看详情', '"member_prize&project=agent&id={id}&page_type=1&[refer]"'),
  216. ),
  217. ),
  218. 'request' => array
  219. (
  220. 'getList' => array
  221. (
  222. # 匹配的正则或函数 选填项
  223. 'option' => array
  224. (
  225. // 'main' => 'yes',
  226. 'mobile' => 'yes',
  227. 'state' => 1,
  228. ),
  229. 'order' => array('id' => 'desc'),
  230. 'type' => 'all',
  231. 'col' => '*',
  232. ),
  233. ),
  234. );