soft_cash.php 9.2 KB

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