MrShi
3 天以前 be3ec4c1f11a5e090408fcd6f650557651fcf007
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<template>
  <TableLayout :permissions="['business:shopInfo:query']">
    <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
      <el-form-item label="门店名称" prop="name">
        <el-input v-model="searchForm.name" clearable placeholder="请输入门店名称" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="类型" prop="companyType">
        <el-select v-model="searchForm.companyType" clearable placeholder="请选择类型" @change="search">
          <el-option label="企业" :value="1"></el-option>
          <el-option label="个人" :value="0"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="门店地址" prop="address">
        <el-input v-model="searchForm.address" clearable placeholder="请输入门店地址" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="联系人" prop="linkName">
        <el-input v-model="searchForm.linkName" clearable placeholder="请输入联系人" @keypress.enter.native="search"></el-input>
      </el-form-item>
      <el-form-item label="联系电话" prop="linkPhone">
        <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"
                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" @change="handleDateChange" />
      </el-form-item>
      <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>
        </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>
      <el-table
          :height="tableHeightNew"
        v-loading="isWorking.search"
        :data="tableData.list"
        stripe
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55"></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="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}">
            <span style="color: yellow;" v-if="row.auditStatus == 0">待审批</span>
            <span style="color: #13ce66;" v-else-if="row.auditStatus == 1">审批通过</span>
            <span style="color: #ff4949;" v-else-if="row.auditStatus == 2">审批未通过</span>
            <span style="color: #13ce66;" v-else-if="row.auditStatus == 3">已支付押金</span>
          </template>
        </el-table-column>
        <el-table-column label="操作" min-width="150" fixed="right">
          <template slot-scope="{row}">
            <el-button type="text" v-if="row.auditStatus == 0" @click="handleAudit(row)">审核</el-button>
          </template>
        </el-table-column>
      </el-table>
      <pagination
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
        :pagination="tableData.pagination"
      >
      </pagination>
    </template>
    <!-- 门店详情 -->
    <OperaShopInfoSeeWindow ref="operaShopInfoSeeWindow" />
    <OperaShopApprovalWindow ref="operaShopApprovalWindow" @success="search" />
  </TableLayout>
</template>
 
<script>
import BaseTable from '@/components/base/BaseTable'
import TableLayout from '@/layouts/TableLayout'
import Pagination from '@/components/common/Pagination'
import OperaShopInfoSeeWindow from '@/components/business/OperaShopInfoSeeWindow'
import OperaShopApprovalWindow from '@/components/business/OperaShopApprovalWindow'
 
export default {
  name: 'ShopQualificationList',
  extends: BaseTable,
  components: { TableLayout, Pagination, OperaShopInfoSeeWindow, OperaShopApprovalWindow },
  data () {
    return {
      searchForm: {
        name: '',
        companyType: '',
        address: '',
        linkName: '',
        linkPhone: '',
        createTime: '',
        createStartTime: '',
        createEndTime: '',
        auditStatusList: [0,1,2]
      }
    }
  },
  created () {
    this.config({
      module: '门店列表',
      api: '/business/shopInfo',
      'field.id': 'id',
      'field.main': 'id'
    })
    this.search()
  },
  methods: {
    reset () {
      this.searchForm = {
        name: '',
        companyType: '',
        address: '',
        linkName: '',
        linkPhone: '',
        createTime: '',
        status: ''
      }
      this.search()
    },
    handleDateChange (val) {
      this.searchForm.createStartTime = val ? val[0] : ''
      this.searchForm.createEndTime = val ? val[1] : ''
    },
    handleAudit (row) {
      this.$refs.operaShopApprovalWindow.open('门店审批', row)
    },
    openShopInfo (row) {
      this.$refs.operaShopInfoSeeWindow.open('门店信息', row)
    }
  }
}
</script>
<style scoped>
.link-name {
  color: #2E68EC;
  text-decoration: underline;
  cursor: pointer;
}
</style>