index.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?php
  2. use common\helpers\ComponentHelper;
  3. ?>
  4. <div id="app" v-cloak>
  5. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  6. <div slot="header">
  7. <span>申请列表</span>
  8. </div>
  9. <div class="table-body">
  10. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;">
  11. <el-table-column label="基本信息">
  12. <template slot-scope="scope">
  13. <div class="user_img" flex="cross:center">
  14. <el-image class="default-avatar" :src="scope.row.user.avatar_url">
  15. <div slot="error" class="image-slot">
  16. <com-image src="resources/img/mall/default_avatar_url.png"></com-image>
  17. </div>
  18. </el-image>
  19. <div class="uer-nickname over1" v-if="scope.row.user.nickname">{{scope.row.user.nickname}}</div>
  20. <div class="uer-nickname over1" v-else >ID:{{scope.row.user.id}}</div>
  21. </div>
  22. </template>
  23. </el-table-column>
  24. <el-table-column label="会员手机号" prop="name" align="center">
  25. <template slot-scope="scope">
  26. <div v-if="scope.row.user">{{scope.row.user.mobile}}</div>
  27. </template>
  28. </el-table-column>
  29. <el-table-column label="名称" prop="name" align="center">
  30. <template slot-scope="scope">
  31. <div v-if="scope.row.user">{{scope.row.name}}</div>
  32. </template>
  33. </el-table-column>
  34. <el-table-column label="申请手机号" prop="mobile" align="center" >
  35. <template slot-scope="scope">
  36. <div v-if="scope.row.user">{{scope.row.mobile}}</div>
  37. </template>
  38. </el-table-column>
  39. <el-table-column label="备注信息" prop="remark" align="center"></el-table-column>
  40. <el-table-column label="审核状态" prop="check_status" align="center">
  41. <template slot-scope="scope">
  42. <el-tag v-if="scope.row.check_status == 0">待审核</el-tag>
  43. <el-tag v-if="scope.row.check_status == 1" type="success">审核通过</el-tag>
  44. <el-tag v-if="scope.row.check_status == 2" type="danger">不通过</el-tag>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="操作" align="center">
  48. <template slot-scope="scope">
  49. <el-button v-if="scope.row.check_status == 0" type="text" size="mini" circle style="margin-left: 10px;margin-top: 10px" @click="applyEdit(scope.row)">
  50. <el-tooltip class="item" effect="dark" content="编辑" placement="top">
  51. <img src="resources/img/mall/edit.png" alt="">
  52. </el-tooltip>
  53. </el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <div flex="box:last cross:center">
  58. <div></div>
  59. <div>
  60. <el-pagination
  61. v-if="list.length > 0"
  62. style="display: inline-block;float: right;"
  63. background :page-size="pageSize"
  64. @current-change="pageChange"
  65. layout="prev, pager, next" :current-page="current_page"
  66. :total="pagination.totalCount">
  67. </el-pagination>
  68. </div>
  69. </div>
  70. </div>
  71. </el-card>
  72. <el-dialog :visible.sync="apply_edit" width="20%" title="审核渠道分红申请">
  73. <div>
  74. <el-form @submit.native.prevent size="small" label-width="150px">
  75. <el-form-item label="审核状态" prop="status">
  76. <el-radio-group v-model="check_status">
  77. <el-radio :label="1">通过</el-radio>
  78. <el-radio :label="2">不通过</el-radio>
  79. </el-radio-group>
  80. </el-form-item>
  81. </el-form>
  82. <el-form @submit.native.prevent size="small" label-width="150px">
  83. <el-form-item label="申请备注" prop="remark">
  84. <template slot-scope="scope">
  85. <el-tag>{{remark}}</el-tag>
  86. </template>
  87. </el-form-item>
  88. </el-form>
  89. <el-form @submit.native.prevent size="small" label-width="150px">
  90. <el-form-item label="审核备注" prop="check_remark">
  91. <el-input type="textarea"
  92. :rows="4"
  93. placeholder="审核备注"
  94. v-model="check_remark">
  95. </el-input>
  96. </el-form-item>
  97. </el-form>
  98. </div>
  99. <span slot="footer" class="dialog-footer">
  100. <el-button @click="editCancel" type="default" size="small">取消</el-button>
  101. <el-button type="primary" @click="editSubmit">确 定</el-button>
  102. </span>
  103. </el-dialog>
  104. </div>
  105. <script>
  106. const app = new Vue({
  107. el: '#app',
  108. data: {
  109. list: [],
  110. apply_edit: false,
  111. pagination: null,
  112. pageSize: 10,
  113. current_page: 1,
  114. id:0,
  115. remark:'',
  116. check_remark:'',
  117. check_status:'1',
  118. loading:false,
  119. search: {
  120. page: 1,
  121. },
  122. },
  123. mounted() {
  124. this.loadData();
  125. },
  126. methods: {
  127. loadData() {
  128. this.loading = true;
  129. let params = {
  130. r: 'agent/apply/index'
  131. };
  132. params = Object.assign(params, this.search);
  133. request({
  134. params: params,
  135. method: 'get',
  136. }).then(e => {
  137. this.loading = false;
  138. if (e.data.code == 0) {
  139. this.list = e.data.data.list;
  140. this.pagination = e.data.data.pagination;
  141. this.pageSize = e.data.data.page_size;
  142. this.current_page = e.data.data.page;
  143. } else {
  144. this.$message.error(e.data.msg);
  145. }
  146. }).catch(e => {
  147. this.loading = false;
  148. });
  149. },
  150. pageChange(page) {
  151. this.search.page = page;
  152. this.loadData();
  153. },
  154. applyEdit(row) {
  155. this.id = row.id;
  156. this.check_status = 1;
  157. this.remark = row.remark;
  158. this.apply_edit = true;
  159. },
  160. editCancel(){
  161. this.apply_edit = false;
  162. this.id = 0;
  163. this.remark = '';
  164. },
  165. editSubmit(id,check_status,check_remark){
  166. let params = {
  167. r: 'agent/apply/check',
  168. };
  169. request({
  170. params: params,
  171. method: 'post',
  172. data:{
  173. id:this.id,
  174. check_status:this.check_status,
  175. check_remark:this.check_remark,
  176. }
  177. }).then(e => {
  178. this.loading = false;
  179. if (e.data.code == 0) {
  180. this.apply_edit = false;
  181. this.$message.success(e.data.msg);
  182. this.id = 0;
  183. this.check_status = '';
  184. this.remark ='';
  185. this.loadData();
  186. } else {
  187. this.$message.error(e.data.msg);
  188. }
  189. }).catch(e => {
  190. this.loading = false;
  191. });
  192. },
  193. }
  194. });
  195. </script>
  196. <style>
  197. .el-tabs__header {
  198. font-size: 16px;
  199. }
  200. .table-body {
  201. padding: 20px;
  202. background-color: #fff;
  203. }
  204. .table-body .el-button {
  205. padding: 0 !important;
  206. border: 0;
  207. margin: 0 5px;
  208. }
  209. .input-item {
  210. width: 250px;
  211. margin: 0 0 20px;
  212. display: inline-block;
  213. }
  214. /*.input-item .el-input__inner {*/
  215. /* border-right: 0;*/
  216. /*}*/
  217. .input-item .el-input__inner:hover {
  218. border: 1px solid #dcdfe6;
  219. /*border-right: 0;*/
  220. outline: 0;
  221. }
  222. .input-item .el-input__inner:focus {
  223. border: 1px solid #dcdfe6;
  224. /*border-right: 0;*/
  225. outline: 0;
  226. }
  227. .input-item .el-input-group__append {
  228. background-color: #fff;
  229. border-left: 0;
  230. width: 10%;
  231. padding: 0;
  232. }
  233. .input-item .el-input-group__append .el-button {
  234. padding: 0;
  235. }
  236. .input-item .el-input-group__append .el-button {
  237. margin: 0;
  238. }
  239. .batch {
  240. margin: 0 0 20px;
  241. display: inline-block;
  242. }
  243. .batch .el-button {
  244. padding: 9px 15px !important;
  245. }
  246. .el-table th>.cell{
  247. color: #333;
  248. font-weight: bold;
  249. font-size: 14px;
  250. }
  251. .el-table__footer-wrapper, .el-table__header-wrapper{
  252. border-bottom: 1.4px solid #D6D6D6;
  253. }
  254. .el-table th>.cell {
  255. color: #333;
  256. font-weight: bold;
  257. font-size: 14px;
  258. }
  259. .table1 .el-table__footer-wrapper,
  260. .table1 .el-table__header-wrapper {
  261. border-bottom: 1.4px solid #D6D6D6;
  262. }
  263. .user_img{
  264. position: relative;
  265. margin-right: 8px;
  266. /* height: 50px;
  267. width: 50px; */
  268. }
  269. .default-avatar{
  270. width: 50px;
  271. height: 50px;
  272. border-radius: 50%;
  273. margin-right: 8px;
  274. }
  275. .uer-nickname {
  276. flex: 1;
  277. }
  278. </style>