member_shop_log.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. $shop = function()
  3. {
  4. $array = array();
  5. $data = Dever::db('shop/info-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'member_shop_log',
  16. # 显示给用户看的名称
  17. 'lang' => '归店记录列表',
  18. 'order' => 9,
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'update' => 'hidden',
  31. //'list' => true,
  32. ),
  33. 'mid' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '代理商姓名/手机号',
  37. 'default' => '-1',
  38. 'desc' => '代理商',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => array
  42. (
  43. 'api' => 'agent/member-getSearch',
  44. 'col' => 'col',
  45. 'result' => 'id',
  46. 'search' => 'mid',
  47. ),
  48. 'list_name' => '代理商信息',
  49. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  50. 'list_order' => 1,
  51. ),
  52. 'old_shop_id' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => '变更前店铺名称',
  56. 'default' => '',
  57. 'desc' => '店铺名称',
  58. 'match' => 'is_numeric',
  59. 'option' => $shop,
  60. 'list' => true,
  61. //'list_order' => 6,
  62. ),
  63. 'new_shop_id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '变更后店铺名称',
  67. 'default' => '',
  68. 'desc' => '店铺名称',
  69. 'match' => 'is_numeric',
  70. 'option' => $shop,
  71. 'list' => true,
  72. //'list_order' => 6,
  73. ),
  74. 'state' => array
  75. (
  76. 'type' => 'tinyint-1',
  77. 'name' => '状态',
  78. 'default' => '1',
  79. 'desc' => '请选择状态',
  80. 'match' => 'is_numeric',
  81. ),
  82. 'cdate' => array
  83. (
  84. 'type' => 'int-11',
  85. 'name' => '归店时间',
  86. 'match' => array('is_numeric', time()),
  87. 'desc' => '',
  88. # 只有insert时才生效
  89. 'insert' => true,
  90. 'search' => 'date',
  91. 'list' => 'date("Y-m-d", {cdate})',
  92. 'order' => 'desc',
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. 'edit' => false,
  98. 'insert' => false,
  99. 'delete' => false,
  100. ),
  101. 'request' => array
  102. (
  103. 'getAll' => array
  104. (
  105. # 匹配的正则或函数 选填项
  106. 'option' => array
  107. (
  108. 'start' => array('yes-cdate','>='),
  109. 'end' => array('yes-cdate','<='),
  110. 'new_shop_id' => 'yes',
  111. 'state' => 1,
  112. ),
  113. 'type' => 'count',
  114. // 'order' => array('cdate' => 'desc'),
  115. 'col' => '*',
  116. ),
  117. 'getGui' => array
  118. (
  119. # 匹配的正则或函数 选填项
  120. 'option' => array
  121. (
  122. 'start' => array('yes-cdate','>='),
  123. 'end' => array('yes-cdate','<='),
  124. // 'new_shop_id' => 'yes',
  125. 'state' => 1,
  126. ),
  127. 'type' => 'all',
  128. // 'order' => array('cdate' => 'desc'),
  129. 'col' => '*',
  130. ),
  131. ),
  132. );