|
|
@@ -10,6 +10,12 @@
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="所属店铺" prop="storeId" v-if="medicalMallConfig.isStores">
|
|
|
+ <el-select v-model="queryParams.storeId" placeholder="请选择所属店铺" clearable size="small">
|
|
|
+ <el-option v-for="item in storeList" :key="item.storeId" :label="item.storeName" :value="item.storeId">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
<el-form-item>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
@@ -37,6 +43,7 @@
|
|
|
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
|
|
|
>
|
|
|
<el-table-column label="分类名称" align="left" prop="cateName" />
|
|
|
+ <el-table-column label="所属店铺" align="center" prop="storeId" :formatter="storeNameFormatter" v-if="medicalMallConfig.isStores"/>
|
|
|
<el-table-column label="状态" align="center" prop="isShow">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
@@ -99,6 +106,8 @@ import { listStoreProductCategory, getStoreProductCategory, delStoreProductCateg
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
|
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
import Material from '@/components/Material'
|
|
|
+import { listStoreOptions } from '@/api/hisStore/store'
|
|
|
+import { getConfigByKey } from '@/api/system/config'
|
|
|
export default {
|
|
|
name: "HisStoreProductCategory",
|
|
|
components: {
|
|
|
@@ -112,6 +121,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ storeList: {},
|
|
|
+ medicalMallConfig: {},
|
|
|
picArr: [],
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
@@ -132,7 +143,8 @@ export default {
|
|
|
sort: null,
|
|
|
pic: null,
|
|
|
isShow: null,
|
|
|
- isDel: null
|
|
|
+ isDel: null,
|
|
|
+ storeId: null
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
@@ -152,8 +164,25 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getList();
|
|
|
+ listStoreOptions().then(response => {
|
|
|
+ this.storeList = response.data;
|
|
|
+ });
|
|
|
+ getConfigByKey("medicalMall.func.switch").then(response => {
|
|
|
+ if(response.data && response.data.configValue) {
|
|
|
+ this.medicalMallConfig = JSON.parse(response.data.configValue);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
+ storeNameFormatter(row){
|
|
|
+ if(row){
|
|
|
+ const option = this.storeList.find(item => item.storeId === row.storeId);
|
|
|
+ if(option){
|
|
|
+ return option.storeName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return row.storeId === null ? '总公司' : '未知';
|
|
|
+ },
|
|
|
/** 查询商品分类列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|