member_shop_log.php 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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 ? '角色' : '变更前店铺名称',
  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' => $search_auth == 1 ? true : false,
  76. ),
  77. 'dever_auth' => array
  78. (
  79. 'name' => '类型',
  80. 'default' => '',
  81. 'desc' => '类型',
  82. 'match' => 'is_string',
  83. 'search' => 'hidden',
  84. ),
  85. 'dever_time' => array
  86. (
  87. 'name' => '归店时间',
  88. 'default' => '',
  89. 'desc' => '类型',
  90. 'match' => 'is_string',
  91. // 'search' => 'hidden',
  92. 'search' => $search_auth == 2 ? 'date' : false,
  93. ),
  94. 'state' => array
  95. (
  96. 'type' => 'tinyint-1',
  97. 'name' => '状态',
  98. 'default' => '1',
  99. 'desc' => '请选择状态',
  100. 'match' => 'is_numeric',
  101. ),
  102. 'cdate' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '归店时间',
  106. 'match' => array('is_numeric', time()),
  107. 'desc' => '',
  108. # 只有insert时才生效
  109. 'insert' => true,
  110. 'search' => $search_auth == 1 ? 'date' : false,
  111. 'list' => 'date("Y-m-d H:i", {cdate})',
  112. 'order' => 'desc',
  113. ),
  114. ),
  115. 'manage' => array
  116. (
  117. 'edit' => false,
  118. 'insert' => false,
  119. 'delete' => false,
  120. ),
  121. 'request' => array
  122. (
  123. 'getAll' => array
  124. (
  125. # 匹配的正则或函数 选填项
  126. 'option' => array
  127. (
  128. 'start' => array('yes-cdate','>='),
  129. 'end' => array('yes-cdate','<='),
  130. 'new_shop_id' => 'yes',
  131. 'state' => 1,
  132. ),
  133. 'type' => 'count',
  134. // 'order' => array('cdate' => 'desc'),
  135. 'col' => '*',
  136. ),
  137. 'getGui' => array
  138. (
  139. # 匹配的正则或函数 选填项
  140. 'option' => array
  141. (
  142. 'start' => array('yes-cdate','>='),
  143. 'end' => array('yes-cdate','<='),
  144. // 'new_shop_id' => 'yes',
  145. 'state' => 1,
  146. ),
  147. 'type' => 'all',
  148. 'order' => array('cdate' => 'asc'),
  149. 'col' => '*',
  150. ),
  151. ),
  152. );