member_shop_log.php 4.9 KB

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