member_agreement.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. <?php
  2. $status = array
  3. (
  4. 1 => '待签署',
  5. 2 => '有效',
  6. 3 => '作废',
  7. );
  8. $mid = Dever::input('search_option_mid');
  9. $button = array();
  10. if ($mid) {
  11. $button = array
  12. (
  13. '返回上一页' => array('location', 'l=project/database/list&project=agent&table=member_area&page_type=1&mid=' . $mid),
  14. );
  15. }
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'member_agreement',
  20. # 显示给用户看的名称
  21. 'lang' => '合同管理',
  22. 'order' => 10,
  23. 'status' => $status,
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. //'list' => true,
  36. ),
  37. 'mid' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => '手机号',
  41. 'default' => '-1',
  42. 'desc' => '代理商',
  43. 'match' => 'is_string',
  44. 'update' => 'text',
  45. /*
  46. 'search' => $mid ? 'hidden' : array
  47. (
  48. 'api' => 'agent/member-select',
  49. 'col' => 'mobile',
  50. 'result' => 'id',
  51. ),*/
  52. //'list_name' => '手机号',
  53. 'list' => 'Dever::load("agent/lib/member.getOne", {mid})',
  54. 'list_order' => 1,
  55. //'list_order' => 2,
  56. ),
  57. 'agent-member-name'=> array
  58. (
  59. 'name' => '姓名',
  60. 'default' => '',
  61. 'desc' => '姓名',
  62. 'match' => 'option',
  63. # 读取另外表的关联方式
  64. 'sync' => array('mid', 'id'),
  65. //'list' => $mid ? false : true,
  66. //'list_order' => 1,
  67. ),
  68. 'agent-member-role'=> array
  69. (
  70. 'name' => '代理角色',
  71. 'default' => '',
  72. 'desc' => '代理角色',
  73. 'match' => 'option',
  74. # 读取另外表的关联方式
  75. 'sync' => array('mid', 'id'),
  76. //'list' => 'Dever::load("setting/role-find#name", "{agent-member-role}")',
  77. //'list_order' => 3,
  78. ),
  79. 'order_num' => array
  80. (
  81. 'type' => 'varchar-100',
  82. 'name' => '合同编号',
  83. 'default' => '',
  84. 'desc' => '合同编号',
  85. 'match' => 'is_string',
  86. 'update' => 'text',
  87. ),
  88. 'order_id' => array
  89. (
  90. 'type' => 'int-11',
  91. 'name' => '关联订单表id',
  92. 'default' => '',
  93. 'desc' => '关联订单表id',
  94. 'match' => 'is_numeric',
  95. ),
  96. 'agreement_id' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '合同模板id',
  100. 'default' => '',
  101. 'desc' => '合同模板id',
  102. 'match' => 'is_numeric',
  103. ),
  104. 'agreement_name' => array
  105. (
  106. 'type' => 'varchar-500',
  107. 'name' => '合同名称',
  108. 'default' => '',
  109. 'desc' => '合同名称',
  110. 'match' => 'is_string',
  111. 'update' => 'text',
  112. 'search' => 'fulltext',
  113. 'list' => true,
  114. 'list_order' => 6,
  115. ),
  116. 'type' => array
  117. (
  118. 'type' => 'tinyint-1',
  119. 'name' => '类型',
  120. 'default' => '1',
  121. 'desc' => '类型',
  122. 'match' => 'is_numeric',
  123. ),
  124. 'sign' => array
  125. (
  126. 'type' => 'varchar-150',
  127. 'name' => '合同签名',
  128. 'default' => '',
  129. 'desc' => '合同签名',
  130. 'match' => 'option',
  131. 'update' => 'image',
  132. 'key' => '7',
  133. 'list' => '"<img src=\'{sign}\' width=\'150\'>"',
  134. 'list_order' => 7,
  135. ),
  136. 'name' => array
  137. (
  138. 'type' => 'varchar-100',
  139. 'name' => '姓名',
  140. 'default' => '',
  141. 'desc' => '姓名',
  142. 'match' => 'is_string',
  143. 'update' => 'text',
  144. ),
  145. 'mobile' => array
  146. (
  147. 'type' => 'bigint-11',
  148. 'name' => '手机号',
  149. 'default' => '',
  150. 'desc' => '请输入手机号',
  151. 'match' => Dever::rule('mobile'),
  152. 'update' => 'text',
  153. 'search' => $mid ? 'hidden' : 'fulltext',
  154. //'list' => $mid ? false : true,
  155. //'list_order' => 2,
  156. ),
  157. 'role' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '代理角色',
  161. 'default' => '',
  162. 'desc' => '代理角色',
  163. 'match' => 'is_numeric',
  164. ),
  165. 'price' => array
  166. (
  167. 'type' => 'float-11,2',
  168. 'name' => '实付金额',
  169. 'default' => '0',
  170. 'desc' => '金额',
  171. 'match' => 'option',
  172. 'update' => 'text',
  173. ),
  174. 'area' => array
  175. (
  176. 'type' => 'varchar-500',
  177. 'name' => '区域',
  178. 'default' => '',
  179. 'desc' => '区域',
  180. 'match' => 'option',
  181. ),
  182. 'idcard' => array
  183. (
  184. 'type' => 'varchar-32',
  185. 'name' => '身份证号码',
  186. 'default' => '',
  187. 'desc' => '身份证号码',
  188. 'match' => 'is_string',
  189. 'update' => 'text',
  190. ),
  191. 'idcard_front' => array
  192. (
  193. 'type' => 'varchar-150',
  194. 'name' => '身份证正面',
  195. 'default' => '',
  196. 'desc' => '身份证正面',
  197. 'match' => 'option',
  198. 'update' => 'image',
  199. 'key' => '8',
  200. 'place' => '660*660',
  201. ),
  202. 'idcard_back' => array
  203. (
  204. 'type' => 'varchar-150',
  205. 'name' => '身份证背面',
  206. 'default' => '',
  207. 'desc' => '身份证背面',
  208. 'match' => 'option',
  209. 'update' => 'image',
  210. 'key' => '8',
  211. 'place' => '660*660',
  212. ),
  213. 'company_name' => array
  214. (
  215. 'type' => 'varchar-100',
  216. 'name' => '公司名称',
  217. 'default' => '',
  218. 'desc' => '公司名称',
  219. 'match' => 'is_string',
  220. 'update' => 'text',
  221. //'search' => 'fulltext',
  222. //'list' => true,
  223. ),
  224. 'company_pic' => array
  225. (
  226. 'type' => 'varchar-150',
  227. 'name' => '营业执照',
  228. 'default' => '',
  229. 'desc' => '营业执照',
  230. 'match' => 'option',
  231. 'update' => 'image',
  232. 'key' => '8',
  233. 'place' => '660*660',
  234. ),
  235. 'company_number' => array
  236. (
  237. 'type' => 'varchar-80',
  238. 'name' => '营业执照号码',
  239. 'default' => '',
  240. 'desc' => '营业执照号码',
  241. 'match' => 'is_string',
  242. 'update' => 'text',
  243. ),
  244. 'address' => array
  245. (
  246. 'type' => 'varchar-800',
  247. 'name' => '地址',
  248. 'default' => '',
  249. 'desc' => '地址',
  250. 'match' => 'is_string',
  251. 'update' => 'text',
  252. ),
  253. 'qdate' => array
  254. (
  255. 'type' => 'int-11',
  256. 'name' => '协议签订时间',
  257. 'match' => 'is_numeric',
  258. 'desc' => '协议签订时间',
  259. 'update' => 'text',
  260. ),
  261. 'sdate' => array
  262. (
  263. 'type' => 'int-11',
  264. 'name' => '有效期开始时间',
  265. 'match' => 'is_numeric',
  266. 'desc' => '有效期开始时间',
  267. 'update' => 'text',
  268. ),
  269. 'edate' => array
  270. (
  271. 'type' => 'int-11',
  272. 'name' => '有效期结束时间',
  273. 'match' => 'is_numeric',
  274. 'desc' => '有效期结束时间',
  275. 'update' => 'text',
  276. ),
  277. 'udate' => array
  278. (
  279. 'type' => 'int-11',
  280. 'name' => '更新时间',
  281. 'match' => 'is_numeric',
  282. 'desc' => '更新时间',
  283. 'search' => 'date',
  284. 'list' => 'date("Y-m-d H:i", {udate})',
  285. 'list_order' => 5,
  286. ),
  287. 'status' => array
  288. (
  289. 'type' => 'tinyint-1',
  290. 'name' => '合同状态',
  291. 'default' => '1',
  292. 'desc' => '合同状态',
  293. 'match' => 'is_numeric',
  294. 'option' => $status,
  295. 'search' => 'select',
  296. 'list' => true,
  297. 'list_order' => 8,
  298. ),
  299. 'state' => array
  300. (
  301. 'type' => 'tinyint-1',
  302. 'name' => '状态',
  303. 'default' => '1',
  304. 'desc' => '请选择状态',
  305. 'match' => 'is_numeric',
  306. ),
  307. 'cdate' => array
  308. (
  309. 'type' => 'int-11',
  310. 'name' => '创建时间',
  311. 'match' => array('is_numeric', time()),
  312. 'desc' => '',
  313. # 只有insert时才生效
  314. 'insert' => true,
  315. //'search' => 'date',
  316. 'list' => 'date("Y-m-d H:i", {cdate})',
  317. 'list_order' => 4,
  318. ),
  319. ),
  320. 'manage' => array
  321. (
  322. 'insert' => false,
  323. 'delete' => false,
  324. 'edit' => false,
  325. 'button' => $button,
  326. 'list_button' => array
  327. (
  328. 'new' => array('查看', '"lib/agreement.location?id={id}"', 'agent'),
  329. ),
  330. ),
  331. 'request' => array
  332. (
  333. 'getData' => array
  334. (
  335. # 匹配的正则或函数 选填项
  336. 'option' => array
  337. (
  338. 'mid' => 'yes',
  339. 'order_id' => 'yes',
  340. 'agreement_id' => 'yes',
  341. 'state' => 1,
  342. ),
  343. 'type' => 'all',
  344. 'order' => array('id' => 'desc'),
  345. 'col' => '*',
  346. ),
  347. 'getOld' => array
  348. (
  349. # 匹配的正则或函数 选填项
  350. 'option' => array
  351. (
  352. 'mid' => 'yes',
  353. 'order_id' => 'yes',
  354. 'agreement_id' => 'yes',
  355. 'state' => 1,
  356. ),
  357. 'type' => 'one',
  358. 'order' => array('id' => 'desc'),
  359. 'col' => '*',
  360. ),
  361. 'getOne' => array
  362. (
  363. # 匹配的正则或函数 选填项
  364. 'option' => array
  365. (
  366. 'mid' => 'yes',
  367. 'type' => 'yes',
  368. 'state' => 1,
  369. ),
  370. 'type' => 'one',
  371. 'order' => array('id' => 'desc'),
  372. 'col' => '*',
  373. ),
  374. 'getAll' => array
  375. (
  376. # 匹配的正则或函数 选填项
  377. 'option' => array
  378. (
  379. 'mid' => 'yes',
  380. 'state' => 1,
  381. ),
  382. 'type' => 'all',
  383. 'order' => array('id' => 'desc'),
  384. 'page' => array(10, 'list'),
  385. 'col' => 'id,mid,agreement_id,status,qdate,role,name,area,agreement_name',
  386. ),
  387. ),
  388. );