agreement.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  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. 4 => '市场管理培训师承诺书',
  13. 5 => '5000合同',
  14. 6 => '期权合同',
  15. );
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'agreement',
  20. # 显示给用户看的名称
  21. 'lang' => '合同模板',
  22. 'order' => 3,
  23. 'config_type' => $type,
  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. 'update' => 'hidden',
  36. //'list' => true,
  37. ),
  38. 'type' => array
  39. (
  40. 'type' => 'tinyint-1',
  41. 'name' => '合同类型',
  42. 'default' => '1',
  43. 'desc' => '合同类型',
  44. 'match' => 'is_numeric',
  45. 'update' => 'radio',
  46. 'option' => $type,
  47. 'search' => 'select',
  48. 'list' => true,
  49. //'control' => 'type',
  50. ),
  51. 'name' => array
  52. (
  53. 'type' => 'varchar-500',
  54. 'name' => '合同名称-变量说明:{name}是代理商姓名,{role}代理商角色,{area}签署地区,{date}签署时间',
  55. 'default' => '',
  56. 'desc' => '合同名称',
  57. 'match' => 'is_string',
  58. 'update' => 'text',
  59. 'search' => 'fulltext',
  60. 'list' => true,
  61. ),
  62. 'state' => array
  63. (
  64. 'type' => 'tinyint-1',
  65. 'name' => '状态',
  66. 'default' => '1',
  67. 'desc' => '请选择状态',
  68. 'match' => 'is_numeric',
  69. ),
  70. 'cdate' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '创建时间',
  74. 'match' => array('is_numeric', time()),
  75. 'desc' => '',
  76. # 只有insert时才生效
  77. 'insert' => true,
  78. //'search' => 'date',
  79. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  80. ),
  81. ),
  82. 'default' => array
  83. (
  84. 'col' => 'id,name,type,state,cdate',
  85. 'value' => array
  86. (
  87. '1,"{name}{role}{area}代理商合作协议.{date}.pdf", 1, 1,' . DEVER_TIME,
  88. '2,"{name}代理商合同解除协议.{date}.pdf", 2, 1,' . DEVER_TIME,
  89. '3,"{name}市场管理培训师承诺书.{date}.pdf", 4, 1,' . DEVER_TIME,
  90. '4,"5000合同.pdf", 5, 1,' . DEVER_TIME,
  91. '5,"{name}期权交付合同.{date}.pdf", 6, 1,' . DEVER_TIME,
  92. '6,"{name}软件服务合同.{date}.pdf", 3, 1,' . DEVER_TIME,
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. //'insert' => false,
  98. 'delete' => false,
  99. ),
  100. 'request' => array
  101. (
  102. 'getData' => array
  103. (
  104. # 匹配的正则或函数 选填项
  105. 'option' => array
  106. (
  107. 'state' => 1,
  108. ),
  109. 'order' => array('id' => 'desc'),
  110. 'type' => 'all',
  111. 'col' => '*|type',
  112. ),
  113. ),
  114. );