| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <TableLayout :permissions="['business:jkiccard:query']"> |
| | | <!-- æç´¢è¡¨å --> |
| | | <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline> |
| | | <el-form-item label="å¡å·" prop="code"> |
| | | <el-input v-model="searchForm.code" placeholder="请è¾å
¥å¡å·" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å§å" prop="memberName"> |
| | | <el-input v-model="searchForm.memberName" placeholder="请è¾å
¥" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="身份类å" prop="userType"> |
| | | <el-select v-model="searchForm.userType" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option label="å
¨é¨" value=""></el-option> |
| | | <el-option label="叿º" :value="0"></el-option> |
| | | <el-option label="æ ¡éªäººå" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="status"> |
| | | <el-select v-model="searchForm.status" placeholder="è¯·éæ©" @change="search"> |
| | | <el-option label="å
¨é¨" value=""></el-option> |
| | | <el-option label="ç¦ç¨" :value="0"></el-option> |
| | | <el-option label="å¯ç¨" :value="1"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <section> |
| | | <el-button type="primary" @click="search">æç´¢</el-button> |
| | | <el-button @click="reset">éç½®</el-button> |
| | | </section> |
| | | </el-form> |
| | | <!-- è¡¨æ ¼åå页 --> |
| | | <template v-slot:table-wrap> |
| | | <ul class="toolbar" v-permissions="['business:jkiccard:create', 'business:jkiccard:delete']"> |
| | | <li><el-button type="primary" @click="$refs.operaJkIccardWindow.open('æ°å»ºICå¡')" icon="el-icon-plus" v-permissions="['business:jkiccard:create']">æ°å»º</el-button></li> |
| | | </ul> |
| | | <el-table |
| | | :height="tableHeightNew" |
| | | v-loading="isWorking.search" |
| | | :data="tableData.list" |
| | | stripe |
| | | > |
| | | <el-table-column prop="code" label="ICå¡å·" min-width="100px"></el-table-column> |
| | | <el-table-column label="身份类å" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <span v-if="row.userType === 0">叿º</span> |
| | | <span v-if="row.userType === 1">æ ¡éªäººå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="memberName" label="å
³è人å" min-width="100px"></el-table-column> |
| | | <el-table-column prop="createDate" label="å建æ¶é´" min-width="100px"></el-table-column> |
| | | <el-table-column label="ç¶æ" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch |
| | | v-model="row.status" |
| | | @change="changeStatus($event, row.id)" |
| | | active-color="#13ce66" |
| | | inactive-color="#ff4949" |
| | | :active-value="1" |
| | | :inactive-value="0"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="containPermissions(['business:jkiccard:update', 'business:jkiccard:delete'])" |
| | | label="æä½" |
| | | min-width="120" |
| | | fixed="right" |
| | | > |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="$refs.operaJkIccardWindow.open('ç¼è¾æ°å»ºICå¡', row)" icon="el-icon-edit" v-permissions="['business:jkiccard:update']">ç¼è¾</el-button> |
| | | <el-button type="text" @click="deleteById(row)" icon="el-icon-delete" v-permissions="['business:jkiccard:delete']">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | @size-change="handleSizeChange" |
| | | @current-change="handlePageChange" |
| | | :pagination="tableData.pagination" |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- æ°å»º/ä¿®æ¹ --> |
| | | <OperaJkIccardWindow ref="operaJkIccardWindow" @success="handlePageChange"/> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | | <script> |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaJkIccardWindow from '@/components/business/OperaJkIccardWindow' |
| | | import { updateStatusById } from '@/api/business/jkIccard' |
| | | export default { |
| | | name: 'JkIccard', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination, OperaJkIccardWindow }, |
| | | data () { |
| | | return { |
| | | // æç´¢ |
| | | searchForm: { |
| | | code: '', |
| | | memberName: '', |
| | | userType: '', |
| | | status: '' |
| | | } |
| | | } |
| | | }, |
| | | created () { |
| | | this.config({ |
| | | module: 'é¥åæICå¡ä¿¡æ¯è¡¨', |
| | | api: '/business/jkIccard', |
| | | 'field.id': 'id', |
| | | 'field.main': 'id' |
| | | }) |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | changeStatus(status, id) { |
| | | updateStatusById({ id, status }) |
| | | .then(res => { |
| | | this.search() |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |