agreement.php 3.1 KB

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