|
@@ -0,0 +1,168 @@
|
|
|
+<template>
|
|
|
+ <a-card size="small" :bordered="false" class="approveStore-wrap">
|
|
|
+ <a-spin :spinning="spinning" tip="Loading...">
|
|
|
+ <!-- 提示 -->
|
|
|
+ <a-alert type="info" style="margin-bottom: 10px">
|
|
|
+ <div slot="message">我的邀请码:1A2B <a-button type="link" v-copyText="'1A2B'">复制</a-button></div>
|
|
|
+ </a-alert>
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div ref="tableSearch" class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="联系人手机">
|
|
|
+ <a-input allowClear placeholder="请输入联系人手机" v-model.tirm="queryParam.mobile"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="联系人姓名">
|
|
|
+ <a-input allowClear placeholder="请输入联系人姓名" v-model.tirm="queryParam.name"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="门店名称">
|
|
|
+ <a-input allowClear placeholder="请输入门店名称" v-model.tirm="queryParam.storeName"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="4" :sm="24">
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <v-select
|
|
|
+ v-model="queryParam.status"
|
|
|
+ ref="status"
|
|
|
+ id="approveStore-status"
|
|
|
+ code="FLAG"
|
|
|
+ placeholder="请选择"
|
|
|
+ allowClear></v-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :offset="18" :sm="24" style="margin-bottom: 10px">
|
|
|
+ <div style="float: right;">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="approveStore-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="approveStore-reset">重置</a-button>
|
|
|
+ </div>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable fixPagination"
|
|
|
+ ref="table"
|
|
|
+ :style="{ height: tableHeight+84.5+'px' }"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: tableHeight }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button size="small" type="link" class="button-primary" @click="handleAudit(record,1)">通过</a-button>
|
|
|
+ <a-button size="small" type="link" class="button-primary" @click="handleAudit(record,0)">不通过</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-spin>
|
|
|
+ </a-card>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { commonMixin } from '@/utils/mixin'
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import { shelfList } from '@/api/shelf'
|
|
|
+export default {
|
|
|
+ components: { STable, VSelect },
|
|
|
+ mixins: [commonMixin],
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ spinning: false,
|
|
|
+ tableHeight: 0,
|
|
|
+ disabled: false, // 查询、重置按钮是否可操作
|
|
|
+ queryParam: {
|
|
|
+ name: '',
|
|
|
+ mobile: '',
|
|
|
+ storeName: '',
|
|
|
+ status: undefined
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
|
|
|
+ { title: '提交时间', dataIndex: 'shelfName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '联系人手机', dataIndex: 'customerEntity.customerName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '联系人姓名', dataIndex: 'shelfName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '门店名称', dataIndex: 'shelfName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '门店地址', dataIndex: 'shelfName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '门头照片', dataIndex: 'shelfName', width: '8%', align: 'center', scopedSlots: { customRender: 'storeImg' } },
|
|
|
+ { title: '营业执照', dataIndex: 'shelfName', width: '8%', align: 'center', scopedSlots: { customRender: 'storeImg' } },
|
|
|
+ { title: '状态', dataIndex: 'shelfName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'left' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ this.disabled = true
|
|
|
+ this.spinning = true
|
|
|
+ return shelfList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ let data
|
|
|
+ if (res.status == 200) {
|
|
|
+ data = res.data
|
|
|
+ const no = (data.pageNo - 1) * data.pageSize
|
|
|
+ for (var i = 0; i < data.list.length; i++) {
|
|
|
+ data.list[i].no = no + i + 1
|
|
|
+ }
|
|
|
+ this.disabled = false
|
|
|
+ }
|
|
|
+ this.spinning = false
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openModal: false,
|
|
|
+ nowData: null
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 审核
|
|
|
+ handleAudit () {
|
|
|
+
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ resetSearchForm () {
|
|
|
+ this.queryParam.name = ''
|
|
|
+ this.queryParam.moblie = ''
|
|
|
+ this.queryParam.storeName = ''
|
|
|
+ this.queryParam.status = undefined
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ setTableH () {
|
|
|
+ const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 245
|
|
|
+ },
|
|
|
+ pageInit () {
|
|
|
+ const _this = this
|
|
|
+ this.$nextTick(() => { // 页面渲染完成后的回调
|
|
|
+ _this.setTableH()
|
|
|
+ _this.resetSearchForm()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
|
|
|
+ this.pageInit()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ '$store.state.app.winHeight' (newValue, oldValue) { // 窗口变更时,需同时更改表格高度
|
|
|
+ this.setTableH()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ activated () {
|
|
|
+ // 如果是新页签打开,则重置当前页面
|
|
|
+ if (this.$store.state.app.isNewTab) {
|
|
|
+ this.pageInit()
|
|
|
+ }
|
|
|
+ // 仅刷新列表,不重置页面
|
|
|
+ if (this.$store.state.app.updateList) {
|
|
|
+ this.setTableH()
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|