123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <template>
- <div class="padding-20">
- <div class="search-box">
- <el-form
- ref="form"
- :inline="true"
- :model="searchForm"
- clearable
- label-width="80px"
- class="mt-10">
- <el-form-item label="姓名:">
- <el-input v-model="searchForm.user_name" placeholder="请输入姓名" clearable></el-input>
- </el-form-item>
- <el-form-item
- class="key-word"
- label="关键词:">
- <el-input v-model="searchForm.key_word" placeholder="请输入手机号后4位或身份证后6位" clearable></el-input>
- </el-form-item>
- <el-form-item label="申请时间:">
- <el-date-picker
- :editable="false"
- v-model="time"
- @change="timearr => {timearr ? (searchForm.start_time = timearr[0] + ' 00:00:00', searchForm.end_time = timearr[1] + ' 23:59:59') : searchForm.start_time = searchForm.end_time = undefined}"
- type="daterange"
- value-format="yyyy-MM-dd"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- ></el-date-picker>
- </el-form-item>
- <el-form-item class="ml-10">
- <el-button
- icon="el-icon-search"
- type="primary"
- @click="searchSubmit">查询
- </el-button>
- </el-form-item>
- </el-form>
- </div>
- <el-table
- :data="tableData"
- stripe
- v-loading="tableLoading"
- fit
- class="marginT-10 order-table"
- border
- :max-height="vheight">
- <el-table-column label="农户编号" prop="user_id"></el-table-column>
- <el-table-column label="农户姓名" prop="user_name"></el-table-column>
- <el-table-column label="身份证号" prop="user_card"></el-table-column>
- <el-table-column label="手机号" prop="shop_phone"></el-table-column>
- <el-table-column label="村信息" prop="country_msg" show-overflow-tooltip></el-table-column>
- <el-table-column label="详细地址" prop="shop_address" show-overflow-tooltip>
- <template slot-scope="scope">
- {{ scope.row.shop_address.address_name }}{{ scope.row.shop_address.name }}
- </template>
- </el-table-column>
- <el-table-column label="农户类型" prop="shop_type">
- <template slot-scope="scope">{{ getShopTypeText(scope.row.shop_type) }}</template>
- </el-table-column>
- <el-table-column label="农户状态" prop="shop_status" show-overflow-tooltip>
- <template slot-scope="scope">{{ getShopStatusText(scope.row.shop_status) }}</template>
- </el-table-column>
- <el-table-column label="入驻时间" prop="shop_check_at"></el-table-column>
- <el-table-column label="操作">
- <template slot-scope="scope">
- <el-button type="text" @click="edit(scope.row)">操作</el-button>
- </template>
- </el-table-column>
- </el-table>
- <el-pagination
- class="marginT-20"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :hide-on-single-page="true"
- :current-page="page"
- :page-size="page_size"
- :page-sizes="[10, 20, 100, 200, 300, 400]"
- background
- layout="total, sizes, prev, pager, next, jumper"
- :total="totalCount"/>
- <detail
- v-if="detailsDialog.show"
- v-model="detailsDialog.show"
- :exData="detailsDialog.exData"
- @success="init"></detail>
- </div>
- </template>
- <script>
- import page from '@/mixin/page'
- import detail from './details'
- export default {
- mixins: [page],
- components: {
- detail
- },
- data() {
- return {
- detailsDialog: {
- show: true,
- exData: {}
- },
- time: [],
- searchForm: {},
- tableData: [],
- tableUrl: '/api/admin/shop/list'
- }
- },
- computed: {
- // 店铺类型
- shopType() {
- return [
- {
- name: '普通',
- value: '0'
- },
- {
- name: '优秀',
- value: '1'
- }
- ]
- },
- arrShopStatus() {
- return [
- {
- name: '审核中',
- value: '0'
- },
- {
- name: '审核通过',
- value: '1'
- },
- {
- name: '未通过',
- value: '2'
- }
- ]
- }
- },
- methods: {
- edit(row) {
- this.detailsDialog.exData = row
- this.detailsDialog.show = true
- },
- getShopStatusText(val) {
- const index = this.arrShopStatus.findIndex(item => item.value === val + '')
- if (index > -1) {
- return this.arrShopStatus[index].name
- }
- return ''
- },
- getShopTypeText(val) {
- const index = this.shopType.findIndex(item => item.value === val + '')
- if (index > -1) {
- return this.shopType[index].name
- }
- return ''
- }
- },
- mounted() {
- this.init()
- }
- }
- </script>
- <style lang="scss" scoped>
- .key-word {
- ::v-deep .el-form-item__content {
- width: 260px;
- }
- }
- </style>
|