option_account.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <?php
  2. $type = array
  3. (
  4. 1 => '零售店',
  5. // 2 => '已签署',
  6. // 3 => '已作废',
  7. );
  8. $status = array
  9. (
  10. 1 => '待交付',
  11. 2 => '已交付',
  12. // 3 => '已作废',
  13. );
  14. $manage_audit = array
  15. (
  16. 1 => '待财务终审',
  17. 2 => '交付确认',
  18. 3 => '已完成',
  19. 4 => '驳回',
  20. );
  21. $audit = array
  22. (
  23. 1 => '审核通过',
  24. 2 => '拒绝',
  25. );
  26. $col = Dever::input('col');
  27. return array
  28. (
  29. # 表名
  30. 'name' => 'option_account',
  31. # 显示给用户看的名称
  32. 'lang' => '期权账户管理',
  33. 'menu' => true,
  34. // 'config_type' => $type,
  35. 'config_status' => $status,
  36. 'end' => array
  37. (
  38. 'update' => 'agent/lib/option_account.updateAccount',
  39. ),
  40. # 数据结构
  41. 'struct' => array
  42. (
  43. 'id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '受益人姓名/电话',
  47. 'default' => '',
  48. 'desc' => '',
  49. 'match' => 'is_numeric',
  50. 'search' => 'order',
  51. 'search' => array
  52. (
  53. 'api' => 'agent/option_account-getSearch',
  54. 'col' => 'col',
  55. 'result' => 'id',
  56. 'search' => 'id',
  57. ),
  58. 'update' => 'hidden',
  59. //'list' => true,
  60. ),
  61. 'name' => array
  62. (
  63. 'type' => 'varchar-100',
  64. 'name' => '受益人姓名',
  65. 'default' => '',
  66. 'desc' => '姓名',
  67. 'match' => 'is_string',
  68. 'update' => 'text',
  69. 'list_name' => '受益人',
  70. 'list' => 'Dever::load("agent/lib/option_account.show#list",{id})',
  71. ),
  72. 'mobile' => array
  73. (
  74. 'type' => 'bigint-11',
  75. 'name' => '受益人电话',
  76. 'default' => '',
  77. 'desc' => '请输入受益人电话',
  78. 'match' => Dever::rule('mobile'),
  79. 'update' => 'text',
  80. // 'search' => 'fulltext',
  81. // 'list' => true,
  82. ),
  83. 'idcard' => array
  84. (
  85. 'type' => 'varchar-32',
  86. 'name' => '身份证号码',
  87. 'default' => '',
  88. 'desc' => '身份证号码',
  89. 'match' => Dever::rule('idcard'),
  90. 'search' => 'fulltext',
  91. 'update' => 'text',
  92. ),
  93. 'area' => array
  94. (
  95. 'type' => 'varchar-500',
  96. 'name' => '门店地址',
  97. 'default' => '',
  98. 'desc' => '门店地址',
  99. 'match' => 'option',
  100. 'search' => 'linkage',
  101. 'update' => 'linkage',
  102. 'option' => Dever::url('api.get?level_total=4', 'area'),
  103. ),
  104. 'address' => array
  105. (
  106. 'type' => 'varchar-200',
  107. 'name' => '详细地址',
  108. 'default' => '',
  109. 'desc' => '地址',
  110. 'match' => 'is_string',
  111. 'update' => 'text',
  112. // 'list' => true,
  113. ),
  114. 'title' => array
  115. (
  116. 'type' => 'varchar-100',
  117. 'name' => '期权记录标题',
  118. 'default' => '',
  119. 'desc' => '期权记录标题',
  120. 'match' => 'is_string',
  121. 'update' => 'text',
  122. 'list' => true,
  123. ),
  124. 'desc' => array
  125. (
  126. 'type' => 'varchar-600',
  127. 'name' => '说明',
  128. 'default' => '',
  129. 'desc' => '记录说明',
  130. 'match' => 'option',
  131. 'update' => 'textarea',
  132. 'list' => true,
  133. ),
  134. 'type' => array
  135. (
  136. 'type' => 'tinyint-1',
  137. 'name' => '记录类型',
  138. 'default' => '1',
  139. 'desc' => '记录类型',
  140. 'match' => 'is_numeric',
  141. 'update' => 'radio',
  142. 'option' => $type,
  143. // 'search' => 'select',
  144. // 'list' => true,
  145. ),
  146. 'price' => array
  147. (
  148. 'type' => 'decimal-11,2',
  149. 'name' => '设备费用-单位:万元',
  150. 'default' => '0',
  151. 'desc' => '设备费用',
  152. 'match' => 'option',
  153. 'update' => 'text',
  154. 'list_name' => '资金记录明细',
  155. 'list' => 'Dever::load("agent/lib/option_account.show#price",{id})',
  156. ),
  157. 'zh_price' => array
  158. (
  159. 'type' => 'decimal-11,2',
  160. 'name' => '装修费用-单位:万元',
  161. 'default' => '0',
  162. 'desc' => '装修费用',
  163. 'match' => 'option',
  164. 'update' => 'text',
  165. // 'list' => true,
  166. ),
  167. 'zj_price' => array
  168. (
  169. 'type' => 'decimal-11,2',
  170. 'name' => '租金费用-单位:万元',
  171. 'default' => '0',
  172. 'desc' => '租金费用',
  173. 'match' => 'option',
  174. 'update' => 'text',
  175. // 'list' => true,
  176. ),
  177. 'other_price' => array
  178. (
  179. 'type' => 'decimal-11,2',
  180. 'name' => '其他费用-单位:万元',
  181. 'default' => '0',
  182. 'desc' => '其他费用',
  183. 'match' => 'option',
  184. 'update' => 'text',
  185. // 'list' => true,
  186. ),
  187. 'pic' => array
  188. (
  189. 'type' => 'text-255',
  190. 'name' => '上传凭证-门店租赁合同,支付凭证等',
  191. 'default' => '',
  192. 'desc' => '多张图片',
  193. 'match' => 'is_string',
  194. 'update' => 'images',
  195. 'key' => '1',
  196. // 'place' => '759*562',
  197. ),
  198. 'annex' => array
  199. (
  200. 'type' => 'text-800',
  201. 'name' => '上传附件',
  202. 'default' => '',
  203. 'desc' => '上传附件',
  204. 'match' => 'is_string',
  205. 'update' => 'upload',
  206. 'key' => '10',
  207. // 'place' => '759*562',
  208. ),
  209. 'status' => array
  210. (
  211. 'type' => 'tinyint-1',
  212. 'name' => '交付状态',
  213. 'default' => '1',
  214. 'desc' => '交付状态',
  215. 'match' => 'is_numeric',
  216. // 'update' => 'select',
  217. 'option' => $status,
  218. 'search' => 'select',
  219. 'list_name' => '交付状态<br/>交付时间',
  220. 'list' => 'Dever::load("agent/lib/option_account.show#date",{id})',
  221. ),
  222. 'jf_date' => array
  223. (
  224. 'type' => 'int-11',
  225. 'name' => '交付时间',
  226. 'match' => 'option',
  227. 'default' => '0',
  228. 'desc' => '',
  229. 'match' => 'is_numeric',
  230. // 'update' => 'day',
  231. 'search' => 'date',
  232. 'callback' => 'maketime',
  233. // 'list' => '{buy_date} > 0 ? date("Y-m-d H:i", {buy_date}) : "无"',
  234. ),
  235. 'audit_type' => array
  236. (
  237. 'type' => 'tinyint-1',
  238. 'name' => '审核状态',
  239. 'default' => '1',
  240. 'desc' => '审核状态',
  241. 'match' => 'is_numeric',
  242. // 'update' => 'select',
  243. 'option' => $manage_audit,
  244. 'search' => 'select',
  245. 'list_name' => '审核状态<br/>审核时间',
  246. 'list' => 'Dever::load("agent/lib/option_account.show#audit",{id})',
  247. ),
  248. 'audit_date' => array
  249. (
  250. 'type' => 'int-11',
  251. 'name' => '审核时间',
  252. 'match' => 'option',
  253. 'default' => '0',
  254. 'desc' => '',
  255. 'match' => 'is_numeric',
  256. // 'update' => 'day',
  257. 'search' => 'date',
  258. 'callback' => 'maketime',
  259. // 'list' => '{buy_date} > 0 ? date("Y-m-d H:i", {buy_date}) : "无"',
  260. ),
  261. 'audit' => array
  262. (
  263. 'type' => 'int-11',
  264. 'name' => '审核状态',
  265. 'default' => '1',
  266. 'desc' => '审核状态',
  267. 'match' => 'is_numeric',
  268. 'update' => $col ? 'radio' : false,
  269. 'option' => $audit,
  270. 'search' => 'select',
  271. 'mul' => true,
  272. 'control' => 'audit',
  273. ),
  274. 'remark' => array
  275. (
  276. 'type' => 'varchar-600',
  277. 'name' => '备注',
  278. 'default' => '',
  279. 'desc' => '备注',
  280. 'match' => 'option',
  281. 'update' => 'textarea',
  282. // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  283. // 'list_order' => 9,
  284. 'show' => 'audit=2',
  285. ),
  286. 'audit_desc' => array
  287. (
  288. 'type' => 'varchar-600',
  289. 'name' => '审核说明',
  290. 'default' => '',
  291. 'desc' => '审核说明',
  292. 'match' => 'is_string',
  293. 'update' => $col ? 'textarea' : false,
  294. // 'list' => '"{audit_desc}" ? "{audit_desc}" : "-"',
  295. // 'list_order' => 9,
  296. 'show' => 'audit=2',
  297. ),
  298. 'num' => array
  299. (
  300. 'type' => 'int-11',
  301. 'name' => '确认期权数',
  302. 'default' => '',
  303. 'desc' => '姓名',
  304. 'match' => 'is_number',
  305. 'update' => $col ? 'text' : false,
  306. 'show' => 'audit=1',
  307. ),
  308. 'audit_admin' => array
  309. (
  310. 'type' => 'int-11',
  311. 'name' => '添加人',
  312. 'default' => '',
  313. 'match' => 'is_numeric',
  314. 'desc' => '操作人',
  315. 'list' => '"{audit_admin}" > 0 ? Dever::load("manage/admin-find#username", {audit_admin}) : "-"',
  316. 'list_order' => 10,
  317. ),
  318. 'state' => array
  319. (
  320. 'type' => 'tinyint-1',
  321. 'name' => '状态',
  322. 'default' => '1',
  323. 'desc' => '请选择状态',
  324. 'match' => 'is_numeric',
  325. ),
  326. 'cdate' => array
  327. (
  328. 'type' => 'int-11',
  329. 'name' => '添加时间',
  330. 'match' => array('is_numeric', time()),
  331. 'desc' => '',
  332. # 只有insert时才生效
  333. 'insert' => true,
  334. // 'search' => 'date',
  335. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  336. 'list_order' => 11,
  337. ),
  338. ),
  339. 'manage' => array
  340. (
  341. // 'insert' => $insert,
  342. 'delete' => false,
  343. 'edit' => false,
  344. 'page_list' => 'option_account',
  345. // 'button' => $button,
  346. 'list_button' => array
  347. (
  348. 'list' => array('查看详情', '"option_account&project=agent&id={id}&page_type=1&[refer]"'),
  349. // 'list' => array('查看详情', 'Dever::load("agent/lib/option_account.list",{id})'),
  350. ),
  351. ),
  352. 'request' => array
  353. (
  354. 'getSearch' => array
  355. (
  356. # 匹配的正则或函数 选填项
  357. 'option' => array
  358. (
  359. 'col' => array('yes-mobile,name', 'like'),
  360. ),
  361. 'type' => 'all',
  362. 'col' => '*|id',
  363. ),
  364. ),
  365. );