| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508 |
- <?php
- ?>
- <div id="app" v-cloak>
- <el-card shadow="never" style="border:0;min-width: 1000px;" body-style="background-color: #f3f3f3;padding: 10px 0 0;">
- <div slot="header">
- <span>申请列表</span>
- </div>
- <div class="table-body">
- <div style="padding-bottom: 20px;">
- <div class="flex">
- <div class="flex" style="margin-right: 20px;">
- <el-date-picker v-model="addTime" type="datetimerange" range-separator="至"
- start-placeholder="开始日期" end-placeholder="结束日期"
- value-format="yyyy-MM-dd HH:mm:ss" @change="addTimeChange" :default-time="['00:00:00', '23:59:59']">
- </el-date-picker>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="请输入团长会员ID" v-model="searchData.user_id"></el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="团长昵称/手机号" v-model="searchData.member"></el-input>
- </div>
- <div class="flex" style="margin-right: 20px;">
- <el-input size="small" placeholder="自提点名称" v-model="searchData.name"></el-input>
- </div>
- <el-button style="padding: 9px 15px !important;" size="small" type="primary" @click="searchs">搜索</el-button>
- <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>
- </div>
- </div>
- <el-table :data="list" stripe v-loading="loading" size="small" style="margin-bottom: 15px; width: 100%">
- <el-table-column prop="id" label="序号" width="100" align="center"></el-table-column>
- <el-table-column label="团长昵称" width="200" prop="user_id" align="center">
- <template slot-scope="scope">
- <div class="table-info-img-text">
- <el-image class="table-info-img circle" :src="scope.row.user.avatar_url">
- <div slot="error" class="image-slot">
- <com-image src="/resources/img/common/default-avatar.png"></com-image>
- </div>
- </el-image>
- <div class="table-info-text">
- <div style="color:#000; text-align: left">{{scope.row.user.nickname}}</div>
- <div style="font-size: 12px; text-align: left">ID:{{scope.row.user.id}}</div>
- </div>
- </div>
- </template>
- </el-table-column>
- <el-table-column label="手机号" prop="contact_phone" align="center">
- </el-table-column>
- <el-table-column label="自提点名称" prop="name" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.name}}</div>
- </template>
- </el-table-column>
- <el-table-column label="自提点地址" align="center">
- <template slot-scope="scope">
- <div>{{scope.row.area}}{{scope.row.street}}</div>
- </template>
- </el-table-column>
- <el-table-column label="身份证" align="center">
- <template slot-scope="scope">
- <el-image v-for="(img, index) in scope.row.id_card_pic" :key="index"
- style="width: 50px; height: 50px; margin-right: 5px"
- :src="img"
- fit="aspectFill"
- :preview-src-list="scope.row.id_card_pic.concat([scope.row.license_pic, scope.row.logo])">
- </el-image>
- </template>
- </el-table-column>
- <el-table-column label="营业执照" align="center">
- <template slot-scope="scope">
- <el-image
- style="width: 50px; height: 50px"
- :src="scope.row.license_pic"
- fit="aspectFill"
- :preview-src-list="[scope.row.license_pic, scope.row.logo].concat(scope.row.id_card_pic)">
- </el-image>
- </template>
- </el-table-column>
- <el-table-column label="申请时间" prop="created_at" align="center">
- <template slot-scope="scope">
- <div>
- {{scope.row.created_at | dateTimeFormat('Y-m-d H:i:s')}}
- </div>
- </template>
- </el-table-column>
- <el-table-column label="状态" prop="created_at" align="center">
- <template slot-scope="scope">
- <el-tag size="mini" :type="applyStatus[scope.row.apply_status].type">{{applyStatus[scope.row.apply_status].title}}</el-tag>
- </template>
- </el-table-column>
- <el-table-column label="审核备注" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.check">
- {{scope.row.check.remark}}
- </div>
- <div v-else>
- -
- </div>
- </template>
- </el-table-column>
- <el-table-column label="审核时间" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.check">
- {{scope.row.check.created_at | dateTimeFormat('Y-m-d H:i:s')}}
- </div>
- <div v-else>
- -
- </div>
- </template>
- </el-table-column>
- <el-table-column label="操作" style="width: 200px;" fixed="right" align="center">
- <template slot-scope="scope">
- <div v-if="scope.row.apply_status == 1">
- <el-button type="text" size="small" @click="onCheck(scope.row, 100)">同意</el-button>
- <el-button type="text" size="small" @click="onCheck(scope.row, 50)">驳回</el-button>
- </div>
- <div v-else>
- -
- </div>
- </template>
- </el-table-column>
- </el-table>
- <div style="text-align: right;margin: 20px 0;">
- <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
- </div>
- </div>
- </el-card>
- <el-dialog
- title="审核确认"
- :visible.sync="checkDialogShow"
- width="30%">
- <div>
- <!-- <el-alert-->
- <!-- :title="`您正在审核 ${currentItem.name} 自提点,审核结果为 ${form.status == 50 ? '驳回' : '通过'} 请谨慎操作!`"-->
- <!-- type="danger"-->
- <!-- :closable="false">-->
- <!-- </el-alert>-->
- <div style="padding: 10px; text-align: center">
- 您正在审核 <strong style="margin: 0 10px; font-size: 20px; color: #F56C6C">{{currentItem.name}}</strong> 自提点,审核结果为
- <strong style="margin: 0 10px; font-size: 20px; color: #F56C6C">{{form.status == 50 ? '驳回' : '通过'}}</strong> 请谨慎操作!
- </div>
- <el-form :model="form" ref="form" label-width="120px" size="small">
- <el-form-item label="审核备注" prop="remark" :rules="[
- {required: true, 'message': '审核备注不能为空'}
- ]">
- <el-input type="textarea" v-model="form.remark"></el-input>
- </el-form-item>
- </el-form>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button size="small" @click="checkDialogShow = false">取消{{form.status == 50 ? '驳回' : '通过'}}</el-button>
- <el-button size="small" :loading="loading" :disabled="loading" type="primary" @click="onCheckSubmit">确定{{form.status == 50 ? '驳回' : '通过'}}</el-button>
- </span>
- </el-dialog>
- </div>
- <script>
- const app = new Vue({
- el: '#app',
- data: {
- checkDialogShow: false,
- searchData: {
- user_id: '',
- member: '',
- date_end: '',
- date_start: '',
- name: '',
- limit: 10
- },
- currPage: 1,
- pageCount: 0,
- loading: false,
- dialogVisible: false,
- list: [],
- addTime: null,
- dialogLoading: false,
- applyStatus: {
- 0: {
- title: '编辑中',
- type: 'info'
- },
- 1: {
- title: '待审核',
- type: 'primary'
- },
- 50: {
- title: '被驳回',
- type: 'danger'
- },
- 100: {
- title: '已通过',
- type: 'success'
- }
- },
- currentItem: {
- name: ''
- },
- form: {
- id: 0,
- remark: '',
- status: 0
- }
- },
- mounted() {
- this.loadData();
- },
- methods: {
- searchs() {
- this.currPage = 1;
- this.loadData();
- },
- addTimeChange(v) {
- this.searchData.date_start = v ? v[0] : '';
- this.searchData.date_end = v ? v[1] : '';
- },
- clereSearch() {
- this.searchData.member = '';
- this.searchData.user_id = '';
- this.searchData.date_start = '';
- this.searchData.date_end = '';
- this.searchData.name = '';
- this.currPage = 1;
- this.loadData();
- },
- loadData() {
- this.loading = true;
- request({
- params: {
- r: 'community/apply/index',
- page: this.currPage,
- ...this.searchData,
- },
- method: 'get',
- }).then(e => {
- this.loading = false;
- if (e.data.code == 0) {
- this.list = e.data.data.list;
- this.pageCount = e.data.data.page_count;
- } else {
- this.$message.error(e.data.msg);
- }
- }).catch(e => {
- this.loading = false;
- });
- },
- pagination(currentPage) {
- let self = this;
- self.currPage = currentPage;
- self.loadData();
- },
- onCheck(item, status) {
- this.currentItem = item
- this.form.status = status
- this.form.id = item.id
- this.form.remark = ''
- this.checkDialogShow = true
- },
- onCheckSubmit() {
- this.$refs['form'].validate((valid) => {
- if (valid) {
- this.loading = true
- request({
- method: 'post',
- params: {
- r: 'community/apply/check',
- },
- data: this.form
- }).then(e => {
- this.loading = false;
- if (e.data.code === 0) {
- this.$message.success(e.data.msg);
- this.currentItem.apply_status = this.form.status
- this.currentItem.check = {
- remark: this.form.remark,
- created_at: (new Date()).valueOf()
- }
- } else {
- this.$message.error(e.data.msg);
- }
- this.checkDialogShow = false
- }).catch(e => {
- this.loading = false;
- });
- } else {
- console.log(valid)
- }
- })
- }
- }
- });
- </script>
- <style>
- .el-tabs__header {
- font-size: 16px;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .input-item {
- width: 250px;
- margin-right: 40px;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .table-body {
- padding: 20px;
- background-color: #fff;
- }
- .table-body .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- .input-item {
- width: 250px;
- margin: 0 0 20px;
- display: inline-block;
- }
- .input-item .el-input__inner {
- border-right: 0;
- }
- .input-item .el-input__inner:hover {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input__inner:focus {
- border: 1px solid #dcdfe6;
- border-right: 0;
- outline: 0;
- }
- .input-item .el-input-group__append {
- background-color: #fff;
- border-left: 0;
- width: 10%;
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- padding: 0;
- }
- .input-item .el-input-group__append .el-button {
- margin: 0;
- }
- .batch {
- margin: 0 0 20px;
- display: inline-block;
- }
- .batch .el-button {
- padding: 9px 15px !important;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .el-table .el-button {
- padding: 0 !important;
- border: 0;
- margin: 0 5px;
- }
- #app .copy .el-input-group__append {
- background-color: #409EFF;
- border-color: #409EFF;
- padding: 0 10px;
- }
- #app .table-body .copybtn {
- color: #fff;
- padding: 0 30px;
- }
- .el-alert {
- padding: 0;
- padding-left: 5px;
- padding-bottom: 5px;
- }
- .el-alert--info .el-alert__description {
- color: #606266;
- }
- .el-alert .el-button {
- margin-left: 20px;
- }
- .el-alert__content {
- display: flex;
- align-items: center;
- }
- .table-body .el-alert__title {
- margin-top: 5px;
- font-weight: 400;
- }
- .el-table th>.cell {
- color: #333;
- font-weight: bold;
- font-size: 14px;
- }
- .el-table__footer-wrapper,
- .el-table__header-wrapper {
- border-bottom: 1.4px solid #D6D6D6;
- }
- .item-box {
- margin-right: 20px;
- }
- .flex {
- display: flex;
- align-items: center;
- }
- .input-title {
- margin-right: 15px;
- }
- .item-box .label {
- margin-right: 8px;
- }
- .com-share-pop {
- display: inline-block;
- }
- .grid-icon {
- color: #999;
- cursor: pointer;
- font-size: 18px;
- }
- .el-input__inner {
- height: 32px;
- line-height: 32px;
- }
- .el-range-editor.el-input__inner {
- padding: 0 15px;
- }
- .el-date-editor .el-range-input,
- .el-date-editor .el-range-separator {
- font-size: 13px;
- height: auto;
- }
- </style>
|