index.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508
  1. <?php
  2. ?>
  3. <div id="app" v-cloak>
  4. <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
  5. <div slot="header">
  6. <span>申请列表</span>
  7. </div>
  8. <div class="table-body">
  9. <div style="padding-bottom: 20px;">
  10. <div class="flex">
  11. <div class="flex" style="margin-right: 20px;">
  12. <el-date-picker v-model="addTime" type="datetimerange" range-separator="至"
  13. start-placeholder="开始日期" end-placeholder="结束日期"
  14. value-format="yyyy-MM-dd HH:mm:ss" @change="addTimeChange" :default-time="['00:00:00', '23:59:59']">
  15. </el-date-picker>
  16. </div>
  17. <div class="flex" style="margin-right: 20px;">
  18. <el-input size="small" placeholder="请输入团长会员ID" v-model="searchData.user_id"></el-input>
  19. </div>
  20. <div class="flex" style="margin-right: 20px;">
  21. <el-input size="small" placeholder="团长昵称/手机号" v-model="searchData.member"></el-input>
  22. </div>
  23. <div class="flex" style="margin-right: 20px;">
  24. <el-input size="small" placeholder="自提点名称" v-model="searchData.name"></el-input>
  25. </div>
  26. <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
  27. <el-button type="warning" @click="clereSearch" v-if="searchData.user_id || searchData.name || searchData.member || searchData.date_start || searchData.date_end" style="font-size:12px;padding: 9px 15px !important;">清除搜索条件</el-button>
  28. </div>
  29. </div>
  30. <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
  31. <el-table-column prop="id" label="序号" width="100" align="center"></el-table-column>
  32. <el-table-column label="团长昵称" width="200" prop="user_id" align="center">
  33. <template slot-scope="scope">
  34. <div class="table-info-img-text">
  35. <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
  36. <div slot="error" class="image-slot">
  37. <com-image src="/resources/img/common/default-avatar.png"></com-image>
  38. </div>
  39. </el-image>
  40. <div class="table-info-text">
  41. <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
  42. <div style="font-size: 12px; text-align: left">ID:{{scope.row.user.id}}</div>
  43. </div>
  44. </div>
  45. </template>
  46. </el-table-column>
  47. <el-table-column label="手机号" prop="contact_phone" align="center">
  48. </el-table-column>
  49. <el-table-column label="自提点名称" prop="name" align="center">
  50. <template slot-scope="scope">
  51. <div>{{scope.row.name}}</div>
  52. </template>
  53. </el-table-column>
  54. <el-table-column label="自提点地址" align="center">
  55. <template slot-scope="scope">
  56. <div>{{scope.row.area}}{{scope.row.street}}</div>
  57. </template>
  58. </el-table-column>
  59. <el-table-column label="身份证" align="center">
  60. <template slot-scope="scope">
  61. <el-image v-for="(img, index) in scope.row.id_card_pic" :key="index"
  62. style="width: 50px; height: 50px; margin-right: 5px"
  63. :src="img"
  64. fit="aspectFill"
  65. :preview-src-list="scope.row.id_card_pic.concat([scope.row.license_pic, scope.row.logo])">
  66. </el-image>
  67. </template>
  68. </el-table-column>
  69. <el-table-column label="营业执照" align="center">
  70. <template slot-scope="scope">
  71. <el-image
  72. style="width: 50px; height: 50px"
  73. :src="scope.row.license_pic"
  74. fit="aspectFill"
  75. :preview-src-list="[scope.row.license_pic, scope.row.logo].concat(scope.row.id_card_pic)">
  76. </el-image>
  77. </template>
  78. </el-table-column>
  79. <el-table-column label="申请时间" prop="created_at" align="center">
  80. <template slot-scope="scope">
  81. <div>
  82. {{scope.row.created_at | dateTimeFormat('Y-m-d H:i:s')}}
  83. </div>
  84. </template>
  85. </el-table-column>
  86. <el-table-column label="状态" prop="created_at" align="center">
  87. <template slot-scope="scope">
  88. <el-tag size="mini" :type="applyStatus[scope.row.apply_status].type">{{applyStatus[scope.row.apply_status].title}}</el-tag>
  89. </template>
  90. </el-table-column>
  91. <el-table-column label="审核备注" align="center">
  92. <template slot-scope="scope">
  93. <div v-if="scope.row.check">
  94. {{scope.row.check.remark}}
  95. </div>
  96. <div v-else>
  97. -
  98. </div>
  99. </template>
  100. </el-table-column>
  101. <el-table-column label="审核时间" align="center">
  102. <template slot-scope="scope">
  103. <div v-if="scope.row.check">
  104. {{scope.row.check.created_at | dateTimeFormat('Y-m-d H:i:s')}}
  105. </div>
  106. <div v-else>
  107. -
  108. </div>
  109. </template>
  110. </el-table-column>
  111. <el-table-column label="操作" style="width: 200px;" fixed="right" align="center">
  112. <template slot-scope="scope">
  113. <div v-if="scope.row.apply_status == 1">
  114. <el-button type="text" size="small" @click="onCheck(scope.row, 100)">同意</el-button>
  115. <el-button type="text" size="small" @click="onCheck(scope.row, 50)">驳回</el-button>
  116. </div>
  117. <div v-else>
  118. -
  119. </div>
  120. </template>
  121. </el-table-column>
  122. </el-table>
  123. <div style="text-align: right;margin: 20px 0;">
  124. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  125. </div>
  126. </div>
  127. </el-card>
  128. <el-dialog
  129. title="审核确认"
  130. :visible.sync="checkDialogShow"
  131. width="30%">
  132. <div>
  133. <!-- <el-alert-->
  134. <!-- :title="`您正在审核 ${currentItem.name} 自提点,审核结果为 ${form.status == 50 ? '驳回' : '通过'} 请谨慎操作!`"-->
  135. <!-- type="danger"-->
  136. <!-- :closable="false">-->
  137. <!-- </el-alert>-->
  138. <div style="padding: 10px; text-align: center">
  139. 您正在审核 <strong style="margin: 0 10px; font-size: 20px; color: #F56C6C">{{currentItem.name}}</strong> 自提点,审核结果为
  140. <strong style="margin: 0 10px; font-size: 20px; color: #F56C6C">{{form.status == 50 ? '驳回' : '通过'}}</strong> 请谨慎操作!
  141. </div>
  142. <el-form :model="form" ref="form" label-width="120px" size="small">
  143. <el-form-item label="审核备注" prop="remark" :rules="[
  144. {required: true, 'message': '审核备注不能为空'}
  145. ]">
  146. <el-input type="textarea" v-model="form.remark"></el-input>
  147. </el-form-item>
  148. </el-form>
  149. </div>
  150. <span slot="footer" class="dialog-footer">
  151. <el-button size="small" @click="checkDialogShow = false">取消{{form.status == 50 ? '驳回' : '通过'}}</el-button>
  152. <el-button size="small" :loading="loading" :disabled="loading" type="primary" @click="onCheckSubmit">确定{{form.status == 50 ? '驳回' : '通过'}}</el-button>
  153. </span>
  154. </el-dialog>
  155. </div>
  156. <script>
  157. const app = new Vue({
  158. el: '#app',
  159. data: {
  160. checkDialogShow: false,
  161. searchData: {
  162. user_id: '',
  163. member: '',
  164. date_end: '',
  165. date_start: '',
  166. name: '',
  167. limit: 10
  168. },
  169. currPage: 1,
  170. pageCount: 0,
  171. loading: false,
  172. dialogVisible: false,
  173. list: [],
  174. addTime: null,
  175. dialogLoading: false,
  176. applyStatus: {
  177. 0: {
  178. title: '编辑中',
  179. type: 'info'
  180. },
  181. 1: {
  182. title: '待审核',
  183. type: 'primary'
  184. },
  185. 50: {
  186. title: '被驳回',
  187. type: 'danger'
  188. },
  189. 100: {
  190. title: '已通过',
  191. type: 'success'
  192. }
  193. },
  194. currentItem: {
  195. name: ''
  196. },
  197. form: {
  198. id: 0,
  199. remark: '',
  200. status: 0
  201. }
  202. },
  203. mounted() {
  204. this.loadData();
  205. },
  206. methods: {
  207. searchs() {
  208. this.currPage = 1;
  209. this.loadData();
  210. },
  211. addTimeChange(v) {
  212. this.searchData.date_start = v ? v[0] : '';
  213. this.searchData.date_end = v ? v[1] : '';
  214. },
  215. clereSearch() {
  216. this.searchData.member = '';
  217. this.searchData.user_id = '';
  218. this.searchData.date_start = '';
  219. this.searchData.date_end = '';
  220. this.searchData.name = '';
  221. this.currPage = 1;
  222. this.loadData();
  223. },
  224. loadData() {
  225. this.loading = true;
  226. request({
  227. params: {
  228. r: 'community/apply/index',
  229. page: this.currPage,
  230. ...this.searchData,
  231. },
  232. method: 'get',
  233. }).then(e => {
  234. this.loading = false;
  235. if (e.data.code == 0) {
  236. this.list = e.data.data.list;
  237. this.pageCount = e.data.data.page_count;
  238. } else {
  239. this.$message.error(e.data.msg);
  240. }
  241. }).catch(e => {
  242. this.loading = false;
  243. });
  244. },
  245. pagination(currentPage) {
  246. let self = this;
  247. self.currPage = currentPage;
  248. self.loadData();
  249. },
  250. onCheck(item, status) {
  251. this.currentItem = item
  252. this.form.status = status
  253. this.form.id = item.id
  254. this.form.remark = ''
  255. this.checkDialogShow = true
  256. },
  257. onCheckSubmit() {
  258. this.$refs['form'].validate((valid) => {
  259. if (valid) {
  260. this.loading = true
  261. request({
  262. method: 'post',
  263. params: {
  264. r: 'community/apply/check',
  265. },
  266. data: this.form
  267. }).then(e => {
  268. this.loading = false;
  269. if (e.data.code === 0) {
  270. this.$message.success(e.data.msg);
  271. this.currentItem.apply_status = this.form.status
  272. this.currentItem.check = {
  273. remark: this.form.remark,
  274. created_at: (new Date()).valueOf()
  275. }
  276. } else {
  277. this.$message.error(e.data.msg);
  278. }
  279. this.checkDialogShow = false
  280. }).catch(e => {
  281. this.loading = false;
  282. });
  283. } else {
  284. console.log(valid)
  285. }
  286. })
  287. }
  288. }
  289. });
  290. </script>
  291. <style>
  292. .el-tabs__header {
  293. font-size: 16px;
  294. }
  295. .table-body {
  296. padding: 20px;
  297. background-color: #fff;
  298. }
  299. .input-item {
  300. width: 250px;
  301. margin-right: 40px;
  302. }
  303. .input-item .el-input__inner {
  304. border-right: 0;
  305. }
  306. .input-item .el-input__inner:hover {
  307. border: 1px solid #dcdfe6;
  308. border-right: 0;
  309. outline: 0;
  310. }
  311. .input-item .el-input__inner:focus {
  312. border: 1px solid #dcdfe6;
  313. border-right: 0;
  314. outline: 0;
  315. }
  316. .input-item .el-input-group__append {
  317. background-color: #fff;
  318. border-left: 0;
  319. width: 10%;
  320. padding: 0;
  321. }
  322. .input-item .el-input-group__append .el-button {
  323. padding: 0;
  324. }
  325. .input-item .el-input-group__append .el-button {
  326. margin: 0;
  327. }
  328. .table-body {
  329. padding: 20px;
  330. background-color: #fff;
  331. }
  332. .table-body .el-button {
  333. padding: 0 !important;
  334. border: 0;
  335. margin: 0 5px;
  336. }
  337. .input-item {
  338. width: 250px;
  339. margin: 0 0 20px;
  340. display: inline-block;
  341. }
  342. .input-item .el-input__inner {
  343. border-right: 0;
  344. }
  345. .input-item .el-input__inner:hover {
  346. border: 1px solid #dcdfe6;
  347. border-right: 0;
  348. outline: 0;
  349. }
  350. .input-item .el-input__inner:focus {
  351. border: 1px solid #dcdfe6;
  352. border-right: 0;
  353. outline: 0;
  354. }
  355. .input-item .el-input-group__append {
  356. background-color: #fff;
  357. border-left: 0;
  358. width: 10%;
  359. padding: 0;
  360. }
  361. .input-item .el-input-group__append .el-button {
  362. padding: 0;
  363. }
  364. .input-item .el-input-group__append .el-button {
  365. margin: 0;
  366. }
  367. .batch {
  368. margin: 0 0 20px;
  369. display: inline-block;
  370. }
  371. .batch .el-button {
  372. padding: 9px 15px !important;
  373. }
  374. .el-table th>.cell {
  375. color: #333;
  376. font-weight: bold;
  377. font-size: 14px;
  378. }
  379. .el-table__footer-wrapper,
  380. .el-table__header-wrapper {
  381. border-bottom: 1.4px solid #D6D6D6;
  382. }
  383. .el-table .el-button {
  384. padding: 0 !important;
  385. border: 0;
  386. margin: 0 5px;
  387. }
  388. #app .copy .el-input-group__append {
  389. background-color: #409EFF;
  390. border-color: #409EFF;
  391. padding: 0 10px;
  392. }
  393. #app .table-body .copybtn {
  394. color: #fff;
  395. padding: 0 30px;
  396. }
  397. .el-alert {
  398. padding: 0;
  399. padding-left: 5px;
  400. padding-bottom: 5px;
  401. }
  402. .el-alert--info .el-alert__description {
  403. color: #606266;
  404. }
  405. .el-alert .el-button {
  406. margin-left: 20px;
  407. }
  408. .el-alert__content {
  409. display: flex;
  410. align-items: center;
  411. }
  412. .table-body .el-alert__title {
  413. margin-top: 5px;
  414. font-weight: 400;
  415. }
  416. .el-table th>.cell {
  417. color: #333;
  418. font-weight: bold;
  419. font-size: 14px;
  420. }
  421. .el-table__footer-wrapper,
  422. .el-table__header-wrapper {
  423. border-bottom: 1.4px solid #D6D6D6;
  424. }
  425. .item-box {
  426. margin-right: 20px;
  427. }
  428. .flex {
  429. display: flex;
  430. align-items: center;
  431. }
  432. .input-title {
  433. margin-right: 15px;
  434. }
  435. .item-box .label {
  436. margin-right: 8px;
  437. }
  438. .com-share-pop {
  439. display: inline-block;
  440. }
  441. .grid-icon {
  442. color: #999;
  443. cursor: pointer;
  444. font-size: 18px;
  445. }
  446. .el-input__inner {
  447. height: 32px;
  448. line-height: 32px;
  449. }
  450. .el-range-editor.el-input__inner {
  451. padding: 0 15px;
  452. }
  453. .el-date-editor .el-range-input,
  454. .el-date-editor .el-range-separator {
  455. font-size: 13px;
  456. height: auto;
  457. }
  458. </style>