index.php 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  1. <div id="app" v-cloak>
  2. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  3. <div slot="header">
  4. <span>申请列表</span>
  5. </div>
  6. <div class="table-body">
  7. <el-form size="small" :inline="true">
  8. <el-form-item>
  9. <el-input style="width: 200px" v-model="searchData.user_id" placeholder="请输入用户ID进行搜索" clearable></el-input>
  10. </el-form-item>
  11. <el-form-item>
  12. <el-input style="width: 200px" v-model="searchData.keyword" placeholder="请输入用户昵称/手机号进行搜索" clearable></el-input>
  13. </el-form-item>
  14. <el-form-item>
  15. <el-input style="width: 200px" v-model="searchData.name" placeholder="请输入名称进行搜索" clearable></el-input>
  16. </el-form-item>
  17. <el-form-item>
  18. <el-input style="width: 200px" v-model="searchData.mobile" placeholder="请输入手机号进行搜索" clearable></el-input>
  19. </el-form-item>
  20. <el-form-item>
  21. <el-date-picker size="small" v-model="searchData.date" type="datetimerange" style="float: left" value-format="yyyy-MM-dd HH:mm:ss" range-separator="至" start-placeholder="开始日期" @change="selectDateTime" end-placeholder="结束日期">
  22. </el-date-picker>
  23. </el-form-item>
  24. <el-form-item>
  25. <el-button type="primary" @click="searchs" style="padding: 9px 15px !important">搜索</el-button>
  26. </el-form-item>
  27. </el-form>
  28. <el-tabs v-model="activeName" >
  29. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px;" >
  30. <el-table-column prop="user_id" label="会员ID" align="center"></el-table-column>
  31. <el-table-column label="会员信息" width="200">
  32. <template slot-scope="scope">
  33. <div class="table-info-img-text">
  34. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  35. <div slot="error" class="image-slot">
  36. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  37. </div>
  38. </el-image>
  39. <div class="table-info-text">
  40. <div style="color:#000;">{{scope.row.user.nickname}}</div>
  41. <div style="font-size: 12px;">{{scope.row.user.mobile}}</div>
  42. </div>
  43. </div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column prop="mobile" label="手机号" align="center">
  47. <template slot-scope="scope">
  48. <span>{{scope.row.mobile ? scope.row.mobile : '--'}}</span>
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="姓名" prop="name" align="center" ></el-table-column>
  52. <el-table-column label="服务地址" prop="address" align="left"></el-table-column>
  53. <el-table-column label="资格证书" align="center">
  54. <template slot-scope="scope">
  55. <el-image
  56. v-for="(img, index) in scope.row.qualification_certificate"
  57. :key="index"
  58. style="width: 50px; height: 50px; margin-left: 5px"
  59. :src="img"
  60. :preview-src-list="scope.row.qualification_certificate">
  61. </el-image>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="身份证信息" align="center" prop="idcard"></el-table-column>
  65. <el-table-column prop="idcard" label="身份证" align="center">
  66. <template slot-scope="scope">
  67. <el-image
  68. v-for="(img, index) in scope.row.idcard_images"
  69. :key="index"
  70. style="width: 50px; height: 50px; margin-left: 5px"
  71. :src="img"
  72. :preview-src-list="scope.row.idcard_images">
  73. </el-image>
  74. </template>
  75. </el-table-column>
  76. <el-table-column label="申请时间" align="center">
  77. <template slot-scope="scope">
  78. {{scope.row.created_at|dateTimeFormat('Y-m-d H:i:s')}}
  79. </template>
  80. </el-table-column>
  81. <el-table-column label="审核状态" align="center">
  82. <template slot-scope="scope">
  83. <el-tag size="mini" :type="status[scope.row.settle.check_status].type">{{status[scope.row.settle.check_status].title}}</el-tag>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="审核备注" align="left">
  87. <template slot-scope="scope">
  88. {{scope.row.settle.check_remark ? scope.row.settle.check_remark : '--'}}
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="操作" align="center">
  92. <template slot-scope="scope">
  93. <template v-if="scope.row.settle.check_status == 0">
  94. <el-button type="text" @click="onShowAudit(scope.row, 1)" class="all_text">通过</el-button>
  95. <el-button type="text" @click="onShowAudit(scope.row, 2)" class="all_text" style="margin-left: 10px">驳回</el-button>
  96. </template>
  97. <template v-else>-</template>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. </el-tabs>
  102. <div flex="box:last cross:center">
  103. <div></div>
  104. <div>
  105. <el-pagination v-if="pagination" :page-size="page_size"
  106. style="float: right;" background @current-change="pageChange"
  107. layout="prev, pager, next" :total="pagination.totalCount">
  108. </el-pagination>
  109. </div>
  110. </div>
  111. </div>
  112. </el-card>
  113. <el-dialog
  114. title="审核"
  115. :visible.sync="dialogVisible"
  116. width="30%">
  117. <el-form :model="auditForm">
  118. <el-form-item label="审核备注" prop="remark" :rules="[{required: true, message: '审核备注不能为空'}]">
  119. <el-input type="textarea" :rows="3" v-model="auditForm.remark"></el-input>
  120. </el-form-item>
  121. </el-form>
  122. <span slot="footer" class="dialog-footer">
  123. <el-button @click="dialogVisible = false">取 消</el-button>
  124. <el-button type="primary" :disabled="btnLoading" :loading="btnLoading" @click="onAudit">确 定</el-button>
  125. </span>
  126. </el-dialog>
  127. </div>
  128. <script>
  129. const app = new Vue({
  130. el: '#app',
  131. data: {
  132. searchData: {
  133. user_id: '',
  134. keyword: '', //会员昵称/手机号
  135. name: '',//用户来源
  136. mobile: '',//注册开始时间
  137. address: '',//注册结束时间
  138. date_start: '',
  139. date_end: '',
  140. date: '',
  141. },
  142. list: [],
  143. loading: false,
  144. btnLoading: false,
  145. activeName: '-1',
  146. pagination: null,
  147. page_size: 10,
  148. currentItem: null,
  149. status: [
  150. {
  151. title: '待审核',
  152. type: 'warning'
  153. },
  154. {
  155. title: '审核已通过',
  156. type: 'success'
  157. },
  158. {
  159. title: '审核被拒绝',
  160. type: 'danger'
  161. }
  162. ],
  163. auditForm: {
  164. id: 0,
  165. status: 1,
  166. remark: ''
  167. },
  168. dialogVisible: false,
  169. },
  170. computed: {
  171. },
  172. mounted() {
  173. this.loadData();
  174. },
  175. methods: {
  176. selectDateTime(e) {
  177. if (e != null) {
  178. this.searchData.date_start = e[0];
  179. this.searchData.date_end = e[1];
  180. } else {
  181. this.searchData.date_start = '';
  182. this.searchData.date_end = '';
  183. }
  184. this.searchs();
  185. },
  186. loadData() {
  187. this.loading = true;
  188. let params = {
  189. r: 'store/client/reserve-apply/index'
  190. };
  191. params = Object.assign(params, this.searchData);
  192. request({
  193. params: params,
  194. method: 'get',
  195. }).then(e => {
  196. this.loading = false;
  197. if (e.data.code == 0) {
  198. this.list = e.data.data.list;
  199. this.pagination = e.data.data.pagination;
  200. this.page_size = e.data.data.page_size;
  201. } else {
  202. this.$message.error(e.data.msg);
  203. }
  204. }).catch(e => {
  205. this.loading = false;
  206. });
  207. },
  208. searchs() {
  209. this.page = 1;
  210. this.loadData();
  211. },
  212. pageChange(page) {
  213. this.search.page = page;
  214. this.loadData();
  215. },
  216. onShowAudit(item, status) {
  217. this.currentItem = item
  218. this.auditForm = {
  219. id: item.settle.id,
  220. status: status,
  221. }
  222. this.dialogVisible = true
  223. },
  224. onAudit() {
  225. this.btnLoading = true;
  226. request({
  227. params: {
  228. r: 'store/client/reserve-apply/audit'
  229. },
  230. method: 'post',
  231. data: this.auditForm,
  232. }).then(e => {
  233. this.btnLoading = false;
  234. if (e.data.code == 0) {
  235. this.loadData();
  236. this.dialogVisible = false
  237. this.$message.success(e.data.msg);
  238. } else {
  239. this.$message.error(e.data.msg);
  240. }
  241. }).catch(e => {
  242. this.btnLoading = false;
  243. });
  244. }
  245. }
  246. });
  247. </script>
  248. <style>
  249. .el-tabs__header {
  250. font-size: 16px;
  251. }
  252. .table-body {
  253. padding: 20px;
  254. background-color: #fff;
  255. }
  256. .table-body .el-button {
  257. padding: 0 !important;
  258. border: 0;
  259. margin: 0 5px;
  260. }
  261. .input-item {
  262. width: 250px;
  263. margin: 0 0 20px;
  264. display: inline-block;
  265. }
  266. /*.input-item .el-input__inner {*/
  267. /* border-right: 0;*/
  268. /*}*/
  269. .input-item .el-input__inner:hover {
  270. border: 1px solid #dcdfe6;
  271. /*border-right: 0;*/
  272. outline: 0;
  273. }
  274. .input-item .el-input__inner:focus {
  275. border: 1px solid #dcdfe6;
  276. /*border-right: 0;*/
  277. outline: 0;
  278. }
  279. .input-item .el-input-group__append {
  280. background-color: #fff;
  281. border-left: 0;
  282. width: 10%;
  283. padding: 0;
  284. }
  285. .input-item .el-input-group__append .el-button {
  286. padding: 0;
  287. }
  288. .input-item .el-input-group__append .el-button {
  289. margin: 0;
  290. }
  291. .batch {
  292. margin: 0 0 20px;
  293. display: inline-block;
  294. }
  295. .batch .el-button {
  296. padding: 9px 15px !important;
  297. }
  298. .el-table th>.cell{
  299. color: #333;
  300. font-weight: bold;
  301. font-size: 14px;
  302. }
  303. .el-table__footer-wrapper, .el-table__header-wrapper{
  304. border-bottom: 1.4px solid #D6D6D6;
  305. }
  306. .el-table th>.cell {
  307. color: #333;
  308. font-weight: bold;
  309. font-size: 14px;
  310. }
  311. .table1 .el-table__footer-wrapper,
  312. .table1 .el-table__header-wrapper {
  313. border-bottom: 1.4px solid #D6D6D6;
  314. }
  315. .user_img{
  316. position: relative;
  317. margin-right: 8px;
  318. height: 50px;
  319. width: 50px;
  320. }
  321. .default-avatar{
  322. width: 50px;
  323. height: 50px;
  324. border-radius: 50%;
  325. margin-right: 8px;
  326. }
  327. .uer-nickname {
  328. flex: 1;
  329. }
  330. </style>