|
@@ -22,35 +22,25 @@
|
|
v-model="queryParam.orgCode"
|
|
v-model="queryParam.orgCode"
|
|
allowClear
|
|
allowClear
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
|
+ :replace-fields="{children:'children', title:'name', key:'id', value: 'code' }"
|
|
:tree-data="treeData"
|
|
:tree-data="treeData"
|
|
placeholder="请选择组织机构"
|
|
placeholder="请选择组织机构"
|
|
treeNodeFilterProp="title">
|
|
treeNodeFilterProp="title">
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :span="6">
|
|
|
|
- <a-form-item class="search-item" label="门店类型">
|
|
|
|
- <v-select
|
|
|
|
- id="store-type"
|
|
|
|
- ref="selfFlag"
|
|
|
|
- allowClear
|
|
|
|
- placeholder="请选择门店类型"
|
|
|
|
- v-model="queryParam.selfFlag"
|
|
|
|
- code="STORE_TYPE"></v-select>
|
|
|
|
- </a-form-item>
|
|
|
|
- </a-col>
|
|
|
|
<a-col :span="6">
|
|
<a-col :span="6">
|
|
<a-form-item class="search-item" label="启用状态">
|
|
<a-form-item class="search-item" label="启用状态">
|
|
<v-select
|
|
<v-select
|
|
id="store-status"
|
|
id="store-status"
|
|
- ref="isEnable"
|
|
|
|
|
|
+ ref="enableFlag"
|
|
allowClear
|
|
allowClear
|
|
placeholder="请选择启用状态"
|
|
placeholder="请选择启用状态"
|
|
- v-model="queryParam.isEnable"
|
|
|
|
|
|
+ v-model="queryParam.enableFlag"
|
|
code="ENABLE_FLAG"></v-select>
|
|
code="ENABLE_FLAG"></v-select>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
- <a-col :span="6">
|
|
|
|
|
|
+ <a-col :span="6" style="padding-bottom: 10px;">
|
|
<a-button type="primary" id="store-search" class="search-btn" @click="$refs.table.refresh(true)">查询</a-button>
|
|
<a-button type="primary" id="store-search" class="search-btn" @click="$refs.table.refresh(true)">查询</a-button>
|
|
<a-button id="store-reset" @click="reset">重置</a-button>
|
|
<a-button id="store-reset" @click="reset">重置</a-button>
|
|
</a-col>
|
|
</a-col>
|
|
@@ -67,20 +57,15 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 组织机构 -->
|
|
<!-- 组织机构 -->
|
|
<template slot="orgCode" slot-scope="text, record">{{ record.orgPCodeName }}{{ record.orgCodeName }}</template>
|
|
<template slot="orgCode" slot-scope="text, record">{{ record.orgPCodeName }}{{ record.orgCodeName }}</template>
|
|
- <!-- 门店类型 -->
|
|
|
|
- <template slot="typeDictValue" slot-scope="text, record">
|
|
|
|
- <div v-if="record.typeDictValue">{{ record.typeDictValue }}</div>
|
|
|
|
- <div v-else>--</div>
|
|
|
|
- </template>
|
|
|
|
<!-- 负责人名称 -->
|
|
<!-- 负责人名称 -->
|
|
<template slot="managerName" slot-scope="text, record">
|
|
<template slot="managerName" slot-scope="text, record">
|
|
<div v-if="record.managerName">{{ record.managerName }}</div>
|
|
<div v-if="record.managerName">{{ record.managerName }}</div>
|
|
<div v-else>--</div>
|
|
<div v-else>--</div>
|
|
</template>
|
|
</template>
|
|
<!-- 启用状态 -->
|
|
<!-- 启用状态 -->
|
|
- <template slot="isEnable" slot-scope="text, record">
|
|
|
|
- <div v-if="record.isEnable == 0" style="color: #ff4d4f">{{ record.isEnableDictValue }}</div>
|
|
|
|
- <div v-if="record.isEnable == 1" style="color: #1890FF">{{ record.isEnableDictValue }}</div>
|
|
|
|
|
|
+ <template slot="enableFlag" slot-scope="text, record">
|
|
|
|
+ <div v-if="record.enableFlag == 0" style="color: #ff4d4f">{{ record.enableFlagDictValue }}</div>
|
|
|
|
+ <div v-if="record.enableFlag == 1" style="color: #1890FF">{{ record.enableFlagDictValue }}</div>
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -123,18 +108,16 @@ export default {
|
|
name: '', // 门店名称
|
|
name: '', // 门店名称
|
|
managerMobile: '', // 负责人手机
|
|
managerMobile: '', // 负责人手机
|
|
orgCode: null, // 组织机构
|
|
orgCode: null, // 组织机构
|
|
- selfFlag: '', // 门店类型
|
|
|
|
- isEnable: '' // 启用状态
|
|
|
|
|
|
+ enableFlag: '' // 启用状态
|
|
},
|
|
},
|
|
columns: [
|
|
columns: [
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '序号', dataIndex: 'no', width: 60, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
|
|
{ title: '创建时间', dataIndex: 'createDate', width: 150, align: 'center' },
|
|
{ title: '组织机构', scopedSlots: { customRender: 'orgCode' }, width: 150, align: 'center' },
|
|
{ title: '组织机构', scopedSlots: { customRender: 'orgCode' }, width: 150, align: 'center' },
|
|
{ title: '门店名称', dataIndex: 'name', width: 120, align: 'center' },
|
|
{ title: '门店名称', dataIndex: 'name', width: 120, align: 'center' },
|
|
- { title: '门店类型', scopedSlots: { customRender: 'typeDictValue' }, width: 80, align: 'center' },
|
|
|
|
{ title: '负责人名称', scopedSlots: { customRender: 'managerName' }, width: 100, align: 'center' },
|
|
{ title: '负责人名称', scopedSlots: { customRender: 'managerName' }, width: 100, align: 'center' },
|
|
{ title: '负责人手机', dataIndex: 'managerMobile', width: 100, align: 'center' },
|
|
{ title: '负责人手机', dataIndex: 'managerMobile', width: 100, align: 'center' },
|
|
- { title: '启用状态', scopedSlots: { customRender: 'isEnable' }, width: 80, align: 'center' },
|
|
|
|
|
|
+ { title: '启用状态', scopedSlots: { customRender: 'enableFlag' }, width: 80, align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 120, align: 'center' }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
@@ -165,30 +148,12 @@ export default {
|
|
getOrgList () {
|
|
getOrgList () {
|
|
findOrgTree().then(res => {
|
|
findOrgTree().then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
- this.treeData = this.recursionFun(res.data)
|
|
|
|
|
|
+ this.treeData = res.data
|
|
} else {
|
|
} else {
|
|
this.treeData = []
|
|
this.treeData = []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 递归函数
|
|
|
|
- recursionFun (data) {
|
|
|
|
- if (data) {
|
|
|
|
- data.map(item => {
|
|
|
|
- if (item.children && item.children.length == 0) {
|
|
|
|
- item.key = item.id ? 'org' + item.id : ''
|
|
|
|
- item.value = item.code ? item.code : ''
|
|
|
|
- item.title = item.name ? item.name : ''
|
|
|
|
- } else {
|
|
|
|
- item.key = item.id ? 'org' + item.id : ''
|
|
|
|
- item.value = item.code ? item.code : ''
|
|
|
|
- item.title = item.name ? item.name : ''
|
|
|
|
- this.recursionFun(item.children)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- return data
|
|
|
|
- },
|
|
|
|
// 编辑
|
|
// 编辑
|
|
edit (item) {
|
|
edit (item) {
|
|
this.storeId = String(item.id)
|
|
this.storeId = String(item.id)
|
|
@@ -214,8 +179,7 @@ export default {
|
|
name: '', // 门店名称
|
|
name: '', // 门店名称
|
|
managerMobile: '', // 负责人手机
|
|
managerMobile: '', // 负责人手机
|
|
orgCode: null, // 组织机构
|
|
orgCode: null, // 组织机构
|
|
- selfFlag: '', // 门店类型
|
|
|
|
- isEnable: '' // 启用状态
|
|
|
|
|
|
+ enableFlag: '' // 启用状态
|
|
}
|
|
}
|
|
this.addrCityList = []
|
|
this.addrCityList = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|