| | |
| | | <el-input v-model="searchForm.linkPhone" clearable placeholder="请输入联系电话" @keypress.enter.native="search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="注册时间" prop="createTime"> |
| | | <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd HH:mm:ss" |
| | | range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" /> |
| | | <el-date-picker type="daterange" v-model="searchForm.createTime" clearable value-format="yyyy-MM-dd" |
| | | range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleDateChange" /> |
| | | </el-form-item> |
| | | <el-form-item label="状态" prop="status"> |
| | | <el-select v-model="searchForm.status" clearable placeholder="请选择状态" @change="search"> |
| | | <el-form-item label="状态" prop="auditStatus"> |
| | | <el-select v-model="searchForm.auditStatus" clearable placeholder="请选择状态" @change="search"> |
| | | <el-option label="待审批" :value="0"></el-option> |
| | | <el-option label="审批通过" :value="1"></el-option> |
| | | <el-option label="审批未通过" :value="2"></el-option> |
| | |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column prop="name" label="门店名称" min-width="120px"></el-table-column> |
| | | <el-table-column prop="name" label="门店名称" min-width="120px"> |
| | | <template slot-scope="{row}"> |
| | | <span class="link-name" @click="openShopInfo(row)">{{ row.name }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="companyType" label="类型" min-width="80px"> |
| | | <template slot-scope="{row}"> |
| | | {{row.companyType == 1 ? '企业' : '个人'}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="address" label="门店地址" min-width="200px"></el-table-column> |
| | | <el-table-column prop="contact" label="联系人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="telephone" label="联系电话" min-width="120px"></el-table-column> |
| | | <el-table-column prop="linkName" label="联系人" min-width="100px"></el-table-column> |
| | | <el-table-column prop="linkPhone" label="联系电话" min-width="120px"></el-table-column> |
| | | <el-table-column prop="createTime" label="注册日期" min-width="160px"></el-table-column> |
| | | <el-table-column label="账号状态" min-width="100px"> |
| | | <template slot-scope="{row}"> |
| | | <el-switch @change="changeStatus($event, row)" v-model="row.status" active-color="#13ce66" |
| | | inactive-color="#ff4949" :active-value="0" :inactive-value="1"> |
| | | </el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" min-width="150" fixed="right"> |
| | | <template slot-scope="{row}"> |
| | | <el-button type="text" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" @click="handleResetPwd(row)">重置密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | > |
| | | </pagination> |
| | | </template> |
| | | <!-- 门店详情 --> |
| | | <OperaShopInfoWindow ref="operaShopInfoWindow" /> |
| | | <!-- 编辑门店 --> |
| | | <OperaShopEditWindow ref="operaShopEditWindow" @success="search" /> |
| | | </TableLayout> |
| | | </template> |
| | | |
| | |
| | | import BaseTable from '@/components/base/BaseTable' |
| | | import TableLayout from '@/layouts/TableLayout' |
| | | import Pagination from '@/components/common/Pagination' |
| | | import OperaShopInfoWindow from '@/components/business/OperaShopInfoWindow' |
| | | import OperaShopEditWindow from '@/components/business/OperaShopEditWindow' |
| | | import { changeStatus, resetPassword } from '@/api/business/shopInfo' |
| | | export default { |
| | | name: 'StoreList', |
| | | extends: BaseTable, |
| | | components: { TableLayout, Pagination }, |
| | | components: { TableLayout, Pagination, OperaShopInfoWindow, OperaShopEditWindow }, |
| | | data () { |
| | | return { |
| | | searchForm: { |
| | |
| | | linkName: '', |
| | | linkPhone: '', |
| | | createTime: '', |
| | | status: '' |
| | | createStartTime: '', |
| | | createEndTime: '', |
| | | auditStatus: 3 |
| | | } |
| | | } |
| | | }, |
| | |
| | | reset () { |
| | | this.searchForm = { |
| | | name: '', |
| | | type: '', |
| | | companyType: '', |
| | | address: '', |
| | | contact: '', |
| | | telephone: '', |
| | | linkName: '', |
| | | linkPhone: '', |
| | | createTime: '', |
| | | status: '' |
| | | status: '', |
| | | auditStatus: 3 |
| | | } |
| | | this.search() |
| | | }, |
| | | handleDateChange (val) { |
| | | this.searchForm.createStartTime = val ? val[0] : '' |
| | | this.searchForm.createEndTime = val ? val[1] : '' |
| | | }, |
| | | changeStatus (e, row) { |
| | | this.working = true |
| | | this.api.updateStatus({ id: row.id, status: e }) |
| | | changeStatus({ id: row.id, status: e }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '操作成功') |
| | | this.search() |
| | |
| | | .finally(() => { |
| | | this.working = false |
| | | }) |
| | | }, |
| | | openShopInfo (row) { |
| | | this.$refs.operaShopInfoWindow.open('门店信息', row) |
| | | }, |
| | | handleEdit (row) { |
| | | this.$refs.operaShopEditWindow.open('编辑门店', row) |
| | | }, |
| | | handleResetPwd (row) { |
| | | this.$confirm('是否确认重置门店密码?', '提示') |
| | | .then(() => { |
| | | resetPassword({ id: row.id }) |
| | | .then(res => { |
| | | this.$tip.apiSuccess(res || '重置密码成功') |
| | | }) |
| | | .catch(e => { |
| | | this.$tip.apiFailed(e) |
| | | }) |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | </script> |
| | | <style scoped> |
| | | .link-name { |
| | | color: #2E68EC; |
| | | text-decoration: underline; |
| | | cursor: pointer; |
| | | } |
| | | </style> |