bill_jiaofu.php 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <?php
  2. $type = Dever::db('option/cash')->config['config_type'];
  3. $status = array
  4. (
  5. 1 => '已确认',
  6. 2 => '未确认',
  7. );
  8. $audit = array
  9. (
  10. 1 => '正常',
  11. 2 => '作废',
  12. );
  13. $audit_manage = array
  14. (
  15. //1 => '正常',
  16. 2 => '作废',
  17. );
  18. $col = Dever::input('col');
  19. $aid = Dever::input('search_option_aid');
  20. $mid = Dever::input('search_option_mid');
  21. $oper_table = Dever::input('oper_table');
  22. $button = array();
  23. if (!$oper_table && $aid) {
  24. $option_aid = $aid;
  25. $search_auth = Dever::input('search_auth');
  26. if ($search_auth) {
  27. $option_aid .= '&search_auth=' . $search_auth;
  28. }
  29. $button = array
  30. (
  31. // '返回上一页' => array('location', 'l=project/database/list&project=option&table=cash&page_type=1&aid=' . $option_aid),
  32. );
  33. }
  34. return array
  35. (
  36. # 表名
  37. 'name' => 'bill_jiaofu',
  38. # 显示给用户看的名称
  39. 'lang' => '期权交付记录',
  40. 'order' => 90,
  41. 'end' => array
  42. (
  43. //'update' => 'option/lib/manage.setJiaofu',
  44. ),
  45. 'config_audit' => $audit,
  46. # 数据结构
  47. 'struct' => array
  48. (
  49. 'id' => array
  50. (
  51. 'type' => 'int-11',
  52. 'name' => 'ID',
  53. 'default' => '',
  54. 'desc' => '',
  55. 'match' => 'is_numeric',
  56. 'search' => 'order',
  57. //'list' => true,
  58. ),
  59. 'option-member-company_id'=> array
  60. (
  61. 'name' => '所属公司',
  62. 'default' => '',
  63. 'desc' => '所属公司',
  64. 'match' => 'option',
  65. # 读取另外表的关联方式
  66. 'sync' => array('mid', 'id'),
  67. ),
  68. 'order_num' => array
  69. (
  70. 'type' => 'varchar-100',
  71. 'name' => '流水号',
  72. 'default' => '',
  73. 'desc' => '流水号',
  74. 'match' => 'is_string',
  75. 'update' => 'text',
  76. //'search' => 'fulltext',
  77. //'list' => true,
  78. //'list_order' => 1,
  79. ),
  80. 'type' => array
  81. (
  82. 'type' => 'tinyint-1',
  83. 'name' => '交易类型',
  84. 'default' => '1',
  85. 'desc' => '交易类型',
  86. 'match' => 'is_numeric',
  87. 'option' => $type,
  88. 'update' => 'radio',
  89. 'list' => true,
  90. 'list_order' => 4,
  91. ),
  92. 'aid' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '主账号手机号',
  96. 'default' => '-1',
  97. 'desc' => '期权登录账户',
  98. 'match' => 'is_string',
  99. 'update' => 'text',
  100. 'search' => $aid ? 'hidden' : array
  101. (
  102. 'api' => 'option/member-getMain',
  103. 'col' => 'mobile',
  104. 'result' => 'aid',
  105. 'search' => 'aid',//本表的字段,默认为当前的字段
  106. ),
  107. 'list_name' => '主账户',
  108. 'list' => 'Dever::load("option/lib/account.getInfo", {aid})',
  109. 'list_order' => 3,
  110. ),
  111. 'mid' => array
  112. (
  113. 'type' => 'int-11',
  114. 'name' => '子账号手机号',
  115. 'default' => '-1',
  116. 'desc' => '期权账户',
  117. 'match' => 'is_string',
  118. 'update' => 'text',
  119. 'search' => $mid ? 'hidden' : array
  120. (
  121. 'api' => 'option/member-getChild',
  122. 'col' => 'mobile',
  123. 'result' => 'id',
  124. 'search' => 'mid',//本表的字段,默认为当前的字段
  125. ),
  126. 'list_name' => '子账户',
  127. 'list' => 'Dever::load("option/lib/member.getInfo", {mid})',
  128. 'list_order' => 3,
  129. ),
  130. 'cash' => array
  131. (
  132. 'type' => 'decimal-11,2',
  133. 'name' => '账户操作',
  134. 'default' => '0',
  135. 'desc' => '账户操作',
  136. 'match' => 'is_numeric',
  137. //'update' => 'text',
  138. 'list' => '"+{cash}"',
  139. 'list_order' => 4,
  140. ),
  141. 'sign' => array
  142. (
  143. 'type' => 'varchar-150',
  144. 'name' => '签字',
  145. 'default' => '',
  146. 'desc' => '签字',
  147. 'match' => 'option',
  148. 'update' => 'image',
  149. 'key' => '7',
  150. //'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  151. //'list_order' => 5,
  152. ),
  153. 'agreement_id' => array
  154. (
  155. 'type' => 'int-11',
  156. 'name' => '合同id',
  157. 'default' => '',
  158. 'desc' => '合同id',
  159. 'match' => 'is_numeric',
  160. ),
  161. 'status' => array
  162. (
  163. 'type' => 'tinyint-1',
  164. 'name' => '交付确认',
  165. 'default' => '2',
  166. 'desc' => '交付确认',
  167. 'match' => 'is_numeric',
  168. 'option' => $status,
  169. 'search' => 'select',
  170. 'update' => 'radio',
  171. 'list' => true,
  172. 'list_order' => 4,
  173. ),
  174. 'audit' => array
  175. (
  176. 'type' => 'tinyint-1',
  177. 'name' => '审核',
  178. 'default' => $col ? '3' : '1',
  179. 'desc' => '审核',
  180. 'match' => 'is_numeric',
  181. 'option' => $col ? $audit_manage : $audit,
  182. 'update' => 'radio',
  183. 'control' => 'audit',
  184. 'value' => $col ? '3' : '1',
  185. //'list' => true,
  186. 'list_order' => 7,
  187. ),
  188. 'audit_desc' => array
  189. (
  190. 'type' => 'varchar-500',
  191. 'name' => '审核备注',
  192. 'default' => '',
  193. 'desc' => '备注',
  194. 'match' => 'option',
  195. 'update' => 'textarea',
  196. //'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  197. 'list_order' => 9,
  198. ),
  199. 'audit_date' => array
  200. (
  201. 'type' => 'int-11',
  202. 'name' => '审核时间',
  203. 'match' => 'is_numeric',
  204. 'desc' => '审核时间',
  205. 'default' => '',
  206. ),
  207. 'audit_admin' => array
  208. (
  209. 'type' => 'int-11',
  210. 'name' => '操作人',
  211. 'default' => '',
  212. 'match' => 'is_numeric',
  213. 'desc' => '操作人',
  214. //'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  215. //'list_order' => 6,
  216. ),
  217. 'desc' => array
  218. (
  219. 'type' => 'varchar-500',
  220. 'name' => '备注说明',
  221. 'default' => '',
  222. 'desc' => '备注说明',
  223. 'match' => 'option',
  224. 'update' => 'textarea',
  225. 'list' => true,
  226. 'list_order' => 10,
  227. ),
  228. 'qdate' => array
  229. (
  230. 'type' => 'int-11',
  231. 'name' => '确认时间',
  232. 'default' => '',
  233. 'match' => 'is_numeric',
  234. 'desc' => '',
  235. ),
  236. 'state' => array
  237. (
  238. 'type' => 'tinyint-1',
  239. 'name' => '状态',
  240. 'default' => '1',
  241. 'desc' => '请选择状态',
  242. 'match' => 'is_numeric',
  243. ),
  244. 'cdate' => array
  245. (
  246. 'type' => 'int-11',
  247. 'name' => '处理时间',
  248. 'match' => array('is_numeric', time()),
  249. 'desc' => '',
  250. 'default' => '',
  251. # 只有insert时才生效
  252. 'insert' => true,
  253. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  254. 'list_order' => 2,
  255. ),
  256. ),
  257. 'alter' => array
  258. (
  259. 5 => array
  260. (
  261. array('update', 'cash', 'cash', 'decimal-11,2 0 期权操作'),
  262. ),
  263. 'version' => 5,
  264. ),
  265. 'manage' => array
  266. (
  267. 'insert' => false,
  268. 'delete' => false,
  269. 'edit' => false,
  270. 'button' => $button,
  271. 'list_button' => array
  272. (
  273. //'list' => array('查看详情', '"member_area&mid={id}&page_type=1"'),
  274. //'edit' => array('审核', 'audit,audit_desc', '{audit} == 2'),
  275. //'delete' => array('删除', '', '{status} == 1'),
  276. ),
  277. 'company' => array
  278. (
  279. 'col' => 'company_id',
  280. 'join' => array
  281. (
  282. 'table' => 'option/member',
  283. 'type' => 'left join',
  284. 'on' => array('mid', 'id'),
  285. ),
  286. ),
  287. ),
  288. 'request' => array
  289. (
  290. 'getData' => array
  291. (
  292. # 匹配的正则或函数 选填项
  293. 'option' => array
  294. (
  295. 'aid' => 'yes',
  296. 'mid' => 'yes',
  297. 'type' => 'yes',
  298. 'audit' => 'yes',
  299. 'status' => 'yes',
  300. 'state' => 1,
  301. ),
  302. 'order' => array('id' => 'desc'),
  303. 'page' => array(10, 'list'),
  304. 'type' => 'all',
  305. 'col' => '*',
  306. ),
  307. 'getTotal' => array
  308. (
  309. # 匹配的正则或函数 选填项
  310. 'where' => array
  311. (
  312. 'aid' => 'yes',
  313. 'mid' => 'yes',
  314. 'type' => 'yes',
  315. 'end' => array('yes-cdate', '<='),
  316. 'status' => 'yes',
  317. 'state' => 1,
  318. ),
  319. 'type' => 'one',
  320. 'col' => 'sum(cash) as total',
  321. ),
  322. 'upYes' => array
  323. (
  324. # 匹配的正则或函数 选填项
  325. 'where' => array
  326. (
  327. 'aid' => 'yes',
  328. 'mid' => 'yes',
  329. 'type' => 'yes',
  330. 'end' => array('yes-cdate', '<='),
  331. 'status' => 'yes',
  332. 'state' => 1,
  333. ),
  334. 'set' => array
  335. (
  336. 'status' => 'yes',
  337. 'qdate' => 'yes',
  338. 'agreement_id' => 'yes',
  339. ),
  340. 'type' => 'update',
  341. ),
  342. #获取所有数据
  343. 'getCount' => array
  344. (
  345. # 匹配的正则或函数 选填项
  346. 'option' => array
  347. (
  348. 'state' => 1,
  349. 'status' =>'yes',
  350. ),
  351. // 'order' => array('id' => 'desc'),
  352. 'type' => 'count',
  353. 'group' => 'mid',
  354. 'col' => '*',
  355. ),
  356. 'getCash' => array
  357. (
  358. # 匹配的正则或函数 选填项
  359. 'option' => array
  360. (
  361. 'type' => 'yes',
  362. 'status' => 'yes',
  363. 'state' => 1,
  364. ),
  365. 'type' => 'one',
  366. 'col' => 'sum(cash) as total',
  367. ),
  368. 'getSearch' => array
  369. (
  370. # 匹配的正则或函数 选填项
  371. 'option' => array
  372. (
  373. 'mid' => 'yes',
  374. 'aid' => 'yes',
  375. 'type' => 'yes',
  376. 'status' => 'yes',
  377. 'state' => 1,
  378. ),
  379. 'type' => 'one',
  380. 'col' => 'sum(cash) as total',
  381. ),
  382. ),
  383. );