agreement.php 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. $role = function()
  3. {
  4. $info = Dever::db('setting/role')->select();
  5. return $info;
  6. };
  7. $type = array
  8. (
  9. 1 => '代理商合同',
  10. 2 => '代理升级变更合同',
  11. 3 => '软件服务合同',
  12. );
  13. return array
  14. (
  15. # 表名
  16. 'name' => 'agreement',
  17. # 显示给用户看的名称
  18. 'lang' => '合同模板',
  19. 'order' => 3,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'search' => 'order',
  31. 'update' => 'hidden',
  32. //'list' => true,
  33. ),
  34. 'type' => array
  35. (
  36. 'type' => 'tinyint-1',
  37. 'name' => '合同类型',
  38. 'default' => '1',
  39. 'desc' => '合同类型',
  40. 'match' => 'is_numeric',
  41. 'update' => 'radio',
  42. 'option' => $type,
  43. 'search' => 'select',
  44. 'list' => true,
  45. 'control' => 'type',
  46. ),
  47. 'role_id' => array
  48. (
  49. 'type' => 'int-11',
  50. 'name' => '代理商角色',
  51. 'default' => '',
  52. 'desc' => '代理商角色',
  53. 'match' => 'is_numeric',
  54. 'update' => 'hidden',
  55. 'search' => 'hidden',
  56. 'list' => 'Dever::load("setting/role-one#name", {role_id})',
  57. 'show' => 'type=1',
  58. ),
  59. 'name' => array
  60. (
  61. 'type' => 'varchar-500',
  62. 'name' => '合同名称-变量说明:{name}是用户姓名,{role}代理商名称,{area}城市地区',
  63. 'default' => '',
  64. 'desc' => '合同名称',
  65. 'match' => 'is_string',
  66. 'update' => 'text',
  67. 'search' => 'fulltext',
  68. 'list' => true,
  69. ),
  70. 'content' => array
  71. (
  72. 'type' => 'text-255',
  73. 'name' => '合同内容-变量说明:{name}是用户姓名,{role}代理商名称,{area}城市地区',
  74. 'default' => '',
  75. 'desc' => '合同内容',
  76. 'match' => 'is_string',
  77. 'update' => 'textarea',
  78. ),
  79. 'state' => array
  80. (
  81. 'type' => 'tinyint-1',
  82. 'name' => '状态',
  83. 'default' => '1',
  84. 'desc' => '请选择状态',
  85. 'match' => 'is_numeric',
  86. ),
  87. 'cdate' => array
  88. (
  89. 'type' => 'int-11',
  90. 'name' => '创建时间',
  91. 'match' => array('is_numeric', time()),
  92. 'desc' => '',
  93. # 只有insert时才生效
  94. //'insert' => true,
  95. 'search' => 'date',
  96. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  97. ),
  98. ),
  99. 'manage' => array
  100. (
  101. ),
  102. 'request' => array
  103. (
  104. ),
  105. );