apply-list.php 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ComponentHelper::loadComponentView('components/apply-edit', __DIR__);
  4. ?>
  5. <style>
  6. .el-table th>.cell {
  7. color: #333;
  8. font-weight: bold;
  9. font-size: 14px;
  10. }
  11. .table1 .el-table__footer-wrapper,
  12. .table1 .el-table__header-wrapper {
  13. border-bottom: 1.4px solid #D6D6D6;
  14. }
  15. .user_img{
  16. position: relative;
  17. margin-right: 8px;
  18. /* height: 50px;
  19. width: 50px; */
  20. }
  21. .default-avatar{
  22. width: 50px;
  23. height: 50px;
  24. border-radius: 50%;
  25. margin-right: 8px;
  26. }
  27. .uer-nickname {
  28. flex: 1;
  29. }
  30. </style>
  31. <div id="app">
  32. <div class="table-body" style="min-width: 1000px;">
  33. <div slot="header" class="clearfix" style="height: 20px;">
  34. <span>申请列表</span>
  35. </div>
  36. <div slot="header" class="clearfix" style="margin-top: 20px;">
  37. <div class="demo-input-suffix" style="margin-top: 20px;margin-bottom: 10px;">
  38. <el-input @keyup.enter.native="toSearchActivity" size="small" style="width:300px;margin-right: 20px;" placeholder="请输入会员昵称/ID" v-model="keyword" clearable>
  39. </el-input>
  40. <el-select size="small" v-model="check_status" @change='toSearch' class="select" style="margin-right: 20px;width: 150px;" placeholder="请选择审核状态">
  41. <el-option :key="index" :label="item.name" :value="item.level" v-for="(item, index) in checkStatusList"></el-option>
  42. </el-select>
  43. <el-date-picker
  44. size="small"
  45. v-model="month"
  46. type="month"
  47. placeholder="选择月份"
  48. style="margin-right: 20px;"
  49. @change="toSearch"
  50. value-format="yyyy-MM">
  51. </el-date-picker>
  52. <el-button type="primary" size="small" @click="toSearch">搜索</el-button>
  53. </div>
  54. </div>
  55. <template>
  56. <el-table :data="list" stripe style="width: 100%" v-loading="listLoading" class="table1">
  57. <el-table-column prop="user_id" label="用户ID" align="center"></el-table-column>
  58. <el-table-column label="基本信息" >
  59. <template slot-scope="scope">
  60. <div class="user_img" flex="cross:center">
  61. <el-image class="default-avatar" :src="scope.row.user.avatar_url">
  62. <div slot="error" class="image-slot">
  63. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  64. </div>
  65. </el-image>
  66. <div class="uer-nickname over1" v-if="scope.row.user.nickname" style="color:#000;">{{scope.row.user.nickname}}</div>
  67. <div class="uer-nickname over1" style="color:#000;" v-else>ID:{{scope.row.user.id}}</div>
  68. </div>
  69. </template>
  70. </el-table-column>
  71. <el-table-column prop="mobile" label="手机号" align="center"></el-table-column>
  72. <el-table-column prop="realname" label="真实姓名" align="center"></el-table-column>
  73. <el-table-column label="申请代理身份" align="center">
  74. <template slot-scope="scope">
  75. <div >{{level_map[scope.row.level]}}</div>
  76. </template>
  77. </el-table-column>
  78. <el-table-column prop="address" label="申请区域" align="center"></el-table-column>
  79. <el-table-column label="申请时间" align="center">
  80. <template slot-scope="scope">
  81. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  82. </template>
  83. </el-table-column>
  84. <el-table-column label="申请金额" align="center">
  85. <template slot-scope="scope">
  86. <div v-if="scope.row.pay_price > 0">{{scope.row.pay_price}}</div>
  87. <div v-else>-</div>
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="退回时间" align="center">
  91. <template slot-scope="scope">
  92. <div v-if="scope.row.is_refund == 1">{{scope.row.refund_time|dateTimeFormat('Y-m-d H:i:s')}}</div>
  93. <div v-else>-</div>
  94. </template>
  95. </el-table-column>
  96. <el-table-column prop="marks" label="备注" align="center"></el-table-column>
  97. <el-table-column label="状态" align="center">
  98. <template slot-scope="scope">
  99. {{check_status_map[scope.row.check_status]}}
  100. </template>
  101. </el-table-column>
  102. <el-table-column label="操作" align="center">
  103. <template slot-scope="scope">
  104. <el-button type="primary" size="small" v-if="scope.row.check_status==0" @click="editApply(scope.row)">
  105. 未审核
  106. <i class="el-icon-caret-right el-icon--right"></i>
  107. </el-button>
  108. <el-button type="danger" size="small" v-if="scope.row.check_status==2">不通过</el-button>
  109. </template>
  110. </el-table-column>
  111. </el-table>
  112. <div flex="main:right cross:center" style="margin-top: 20px;">
  113. <el-pagination v-if="pagination" :page-size="pagination.defaultPageSize"
  114. style="display: inline-block;float: right;" background @current-change="pageChange"
  115. layout="prev, pager, next" :total="pagination.totalCount">
  116. </el-pagination>
  117. </div>
  118. </template>
  119. </div>
  120. <apply-edit v-model="show" :row="row" @success="loadData"></apply-edit>
  121. </div>
  122. <script>
  123. const app = new Vue({
  124. el: '#app',
  125. data() {
  126. return {
  127. listLoading: false,
  128. list: [],
  129. pagination: {
  130. total: 0
  131. },
  132. loading: false,
  133. LoadDataType: -1, //默认显示全部数据
  134. dialogFormVisible: false, //默认不显示弹窗
  135. group_buy_attr_list: [],
  136. goodsDetail: {},
  137. dialogLoading:false,
  138. commander_level_limit_text:'',
  139. user_level_limit_text:'',
  140. level_map:null,
  141. check_status_map:[],
  142. keyword:'',
  143. check_status:'',
  144. month:'',
  145. page: 1,
  146. checkStatusList:[
  147. {
  148. name:'全部状态',
  149. level:-1
  150. }
  151. ,{
  152. name:'未审核',
  153. level:0
  154. },
  155. {
  156. name:'审核通过',
  157. level:1
  158. },
  159. {
  160. name:'不通过',
  161. level:2
  162. },
  163. ],
  164. show:false,
  165. row: {},
  166. }
  167. },
  168. methods: {
  169. edit(id) {
  170. navigateTo({
  171. r: 'bargain/default/edit',
  172. id: id
  173. })
  174. },
  175. //状态按钮的点击事件
  176. toSearch() {
  177. this.loadData();
  178. },
  179. toSearchActivity() {
  180. this.loadData()
  181. },
  182. update(row) {
  183. if(row.status==0){
  184. this.$confirm('此操作将删除该砍价商品, 是否继续?', '提示', {
  185. confirmButtonText: '确定',
  186. cancelButtonText: '取消',
  187. type: 'warning'
  188. }).then(() => {
  189. this.delGoods(row.id);
  190. }).catch(() => {
  191. this.$message({
  192. type: 'info',
  193. message: '已取消'
  194. });
  195. });
  196. }
  197. if(row.status==1){
  198. this.$confirm('此操作将使该砍价活动失效, 是否继续?', '提示', {
  199. confirmButtonText: '确定',
  200. cancelButtonText: '取消',
  201. type: 'warning'
  202. }).then(() => {
  203. this.invalidGoods(row.id);
  204. }).catch(() => {
  205. this.$message({
  206. type: 'info',
  207. message: '已取消'
  208. });
  209. });
  210. }
  211. },
  212. pageChange(page) {
  213. this.page = page;
  214. this.loadData();
  215. },
  216. // 请求获取数据--获取拼团商品列表
  217. loadData() {
  218. this.listLoading = true;
  219. let params = {
  220. r: 'area/default/apply-list',
  221. page: this.page,
  222. limit:10,
  223. keyword: this.keyword,
  224. check_status: this.check_status,
  225. month:this.month
  226. };
  227. request({
  228. params: params,
  229. method: 'get',
  230. }).then(e => {
  231. let res = e.data;
  232. this.listLoading = false;
  233. if (res.code === 0) {
  234. this.list = res.data.list;
  235. this.level_map = res.data.level_map;
  236. this.check_status_map = res.data.check_status_map;
  237. this.pagination = res.data.pagination; //拿到关于页码页容量的数据
  238. } else {
  239. this.$message.error(res.msg);
  240. }
  241. }).catch(e => {});
  242. },
  243. editApply(row) {
  244. this.show = true;
  245. this.row.id=row.id;
  246. },
  247. },
  248. // 加载的时候获取到列表页
  249. mounted() {
  250. // 数据初始化
  251. this.LoadDataType = -1;
  252. this.loadData();
  253. }
  254. })
  255. </script>