|
@@ -0,0 +1,169 @@
|
|
|
+<template>
|
|
|
+ <a-card class="StoreManagement" :bordered="false">
|
|
|
+ <!-- 搜索条件 -->
|
|
|
+ <div class="table-page-search-wrapper">
|
|
|
+ <a-form layout="inline">
|
|
|
+ <a-row :gutter="48">
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item class="search-item" label="门店名称">
|
|
|
+ <a-input v-model.trim="queryParam.name" placeholder="请输入门店名称" @pressEnter="$refs.table.refresh(true)" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item class="search-item" label="负责人手机">
|
|
|
+ <a-input v-model.trim="queryParam.managerMobile" placeholder="请输入负责人手机" @pressEnter="$refs.table.refresh(true)" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item class="search-item" label="组织机构">
|
|
|
+ <a-input v-model.trim="queryParam.orgCode" placeholder="请选择组织机构" @pressEnter="$refs.table.refresh(true)" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item class="search-item" label="门店类型">
|
|
|
+ <!-- <v-select ref="businessStatus" allowClear placeholder="请选择门店类型" v-model="queryParam.type" code="STORE_BUSINESS_STATUS"></v-select> -->
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item class="search-item" label="启用状态">
|
|
|
+ <!-- <v-select ref="deviceStatus" allowClear placeholder="请选择启用状态" v-model="queryParam.enableFlag" code="DEVICE_STATUS"></v-select> -->
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-button type="primary" class="search-btn" @click="$refs.table.refresh(true)">查询</a-button>
|
|
|
+ <a-button type="" @click="reset">重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 表格列表 -->
|
|
|
+ <s-table
|
|
|
+ ref="table"
|
|
|
+ size="default"
|
|
|
+ rowKey="id"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ bordered>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-icon type="edit" title="编辑" @click="edit(record)" :style="{ fontSize: '20px', color: '#1890FF', padding: '0 10px' }" />
|
|
|
+ <a-icon type="link" title="设置" @click="modalHandle('details', record)" :style="{ fontSize: '20px', color: '#e29e14', padding: '0 10px' }" />
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+
|
|
|
+ <!-- 新增/编辑 洗车机 -->
|
|
|
+ <store-modal :openModal="openModal" :storeId="storeId" @success="carWashSubmit" @close="closeModal" />
|
|
|
+ <!-- 查看详情 洗车机 -->
|
|
|
+ <!-- <details-car-wash-modal :openModal="openEquipmentModal" :storeId="storeId" @close="closeDetailsModal" /> -->
|
|
|
+ </a-card>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { STable, VSelect } from '@/components'
|
|
|
+import StoreModal from './StoreModal.vue'
|
|
|
+// import DetailsCarWashModal from './DetailsCarWashModal.vue'
|
|
|
+// import { getProvince, getCityByPro } from '@/api/lookup'
|
|
|
+import { findStoreList } from '@/api/store.js'
|
|
|
+export default {
|
|
|
+ name: 'CarWashManagement',
|
|
|
+ components: { STable, VSelect, StoreModal },
|
|
|
+ data () {
|
|
|
+ return {
|
|
|
+ queryParam: {
|
|
|
+ name: '', // 门店名称
|
|
|
+ managerMobile: '', // 负责人手机
|
|
|
+ orgCode: '', // 组织机构
|
|
|
+ type: '', // 门店类型
|
|
|
+ enableFlag: '' // 启用状态
|
|
|
+ },
|
|
|
+ columns: [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '100', align: 'center' },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '100', align: 'center' },
|
|
|
+ { title: '组织机构', dataIndex: 'orgCode', width: '100', align: 'center' },
|
|
|
+ { title: '门店名称', dataIndex: 'name', width: '100', align: 'center' },
|
|
|
+ { title: '门店类型', dataIndex: 'type', width: '100', align: 'center' },
|
|
|
+ { title: '负责人名称', dataIndex: 'managerId', width: '100', align: 'center' },
|
|
|
+ { title: '负责人手机', dataIndex: 'managerMobile', width: '100', align: 'center' },
|
|
|
+ { title: '启用状态', dataIndex: 'enableFlag', width: '100', align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '265', align: 'center' }
|
|
|
+ ],
|
|
|
+ // 加载数据方法 必须为 Promise 对象
|
|
|
+ loadData: parameter => {
|
|
|
+ return findStoreList(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ const no = (res.data.pageNo - 1) * res.data.pageSize
|
|
|
+ for (let i = 0; i < res.data.list.length; i++) {
|
|
|
+ const _item = res.data.list[i]
|
|
|
+ _item.no = no + i + 1
|
|
|
+ }
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openModal: false, // 新增/编辑 洗车机 弹框展示状态
|
|
|
+ pageType: '', // 新增/编辑 洗车机 页面类型
|
|
|
+ openEquipmentModal: false, // 查看详情 洗车机 弹框展示状态
|
|
|
+ addrProvinceList: [], // 省列表数据
|
|
|
+ addrCityList: [], // 市列表数据
|
|
|
+ isQrCodeModal: false, // 查看小程序码 弹框展示状态
|
|
|
+ qrCode: '', // 小程序码
|
|
|
+ storeId: '' // 网点id
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ const arr = [
|
|
|
+ { a: 1, b: 3 },
|
|
|
+ { a: 11, b: 331 },
|
|
|
+ { a: 111, b: 333 },
|
|
|
+ { a: 1111, b: 33 }
|
|
|
+ ]
|
|
|
+ const arrs = { a: { b: 1, c: 3 } }
|
|
|
+ arr.push({ a: arrs['a'].b, b: arrs['a'].c })
|
|
|
+ console.log(arr)
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ // 编辑
|
|
|
+ edit (item) {
|
|
|
+ this.storeId = String(item.id)
|
|
|
+ this.openModal = true
|
|
|
+ this.openEquipmentModal = false
|
|
|
+ },
|
|
|
+ // 新增编辑 提交成功
|
|
|
+ carWashSubmit () {
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ this.openModal = false
|
|
|
+ },
|
|
|
+ // 重置
|
|
|
+ reset () {
|
|
|
+ this.queryParam = {
|
|
|
+ name: '', // 门店名称
|
|
|
+ managerMobile: '', // 负责人手机
|
|
|
+ orgCode: '', // 组织机构
|
|
|
+ type: '', // 门店类型
|
|
|
+ enableFlag: '' // 启用状态
|
|
|
+ }
|
|
|
+ this.addrCityList = []
|
|
|
+ this.$refs.table.refresh(true)
|
|
|
+ },
|
|
|
+ // 新增、编辑 弹框关闭
|
|
|
+ closeModal () {
|
|
|
+ this.storeId = ''
|
|
|
+ this.openModal = false
|
|
|
+ },
|
|
|
+ // 详情 弹框关闭
|
|
|
+ closeDetailsModal () {
|
|
|
+ this.storeId = ''
|
|
|
+ this.openEquipmentModal = false
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.StoreManagement {
|
|
|
+ .table-page-search-wrapper {
|
|
|
+ .search-btn {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|