soft_cash.php 7.8 KB

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