|
@@ -1,15 +1,20 @@
|
|
|
<template>
|
|
|
<div class="padding-20">
|
|
|
<div class="search-box">
|
|
|
- <el-form ref="form" :inline="true" :model="searchForm" clearable label-width="100px" class="mt-10">
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :inline="true"
|
|
|
+ :model="searchForm"
|
|
|
+ clearable
|
|
|
+ label-width="80px"
|
|
|
+ class="mt-10">
|
|
|
<el-form-item label="姓名:">
|
|
|
- <el-input v-model="searchForm.department_name" placeholder="请输入姓名" clearable></el-input>
|
|
|
+ <el-input v-model="searchForm.user_name" placeholder="请输入姓名" clearable></el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="手机号:">
|
|
|
- <el-input v-model="searchForm.department_name" placeholder="请输入手机号后4位" clearable></el-input>
|
|
|
- </el-form-item>
|
|
|
- <el-form-item label="身份证:">
|
|
|
- <el-input v-model="searchForm.department_name" placeholder="请输入身份证后6位" clearable></el-input>
|
|
|
+ <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
|
|
@@ -23,7 +28,11 @@
|
|
|
></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-button
|
|
|
+ icon="el-icon-search"
|
|
|
+ type="primary"
|
|
|
+ @click="searchSubmit">查询
|
|
|
+ </el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -35,28 +44,26 @@
|
|
|
class="marginT-10 order-table"
|
|
|
border
|
|
|
:max-height="vheight">
|
|
|
- <el-table-column label="农户姓名" prop="id"></el-table-column>
|
|
|
- <el-table-column label="身份证号" prop="created_at"></el-table-column>
|
|
|
- <el-table-column label="手机号" prop="department_name"></el-table-column>
|
|
|
- <el-table-column label="村信息" prop="department_desc" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="微信号" prop="department_project_name" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="个人二维码" prop="department_project_name">
|
|
|
+ <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">
|
|
|
- <el-image
|
|
|
- style="display: block;width: 80px; height: 80px;font-size: 0;"
|
|
|
- :src="scope.row.element_img_url"
|
|
|
- :preview-src-list="[]">
|
|
|
- </el-image>
|
|
|
+ {{ scope.row.shop_address.address_name }}{{ scope.row.shop_address.name }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="详细地址" prop="department_project_name" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="备注" prop="department_project_name" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column label="申请时间" prop="department_project_name"></el-table-column>
|
|
|
- <el-table-column label="状态" prop="department_project_name"></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>
|
|
|
- <el-button type="text" @click="del(scope.row)">农户产品</el-button>
|
|
|
+ <el-button type="text" @click="edit(scope.row)">操作</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -97,30 +104,58 @@ export default {
|
|
|
time: [],
|
|
|
searchForm: {},
|
|
|
tableData: [],
|
|
|
- tableUrl: '/department/list'
|
|
|
+ tableUrl: '/api/admin/shop/list'
|
|
|
}
|
|
|
},
|
|
|
- methods: {
|
|
|
- add() {
|
|
|
- this.detailsDialog.exData = {}
|
|
|
- this.detailsDialog.show = true
|
|
|
+ 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
|
|
|
},
|
|
|
- del(row) {
|
|
|
- this.$confirm('确定要删除吗', '确认', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
- type: 'warning'
|
|
|
- }).then(async () => {
|
|
|
- const data = await this.$fetch('/api/auth/department/del', { id: row.id })
|
|
|
- if (data.code == 200) {
|
|
|
- this.$message.success('删除成功')
|
|
|
- this.init()
|
|
|
- }
|
|
|
- }).catch(() => {})
|
|
|
+ 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() {
|
|
@@ -130,4 +165,9 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+.key-word {
|
|
|
+ ::v-deep .el-form-item__content {
|
|
|
+ width: 260px;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|