|
@@ -47,7 +47,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属店铺" v-if="this.isStores">
|
|
|
+ <el-form-item label="所属店铺" v-if="medicalMallConfig.isStores">
|
|
|
<el-select style="width: 240px" v-model="queryParams.storeIds" placeholder="请选择店铺" clearable size="small" >
|
|
|
<el-option
|
|
|
v-for="item in storeOptions"
|
|
@@ -57,7 +57,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <div v-if="this.isMedicalMall">
|
|
|
+ <div v-if="medicalMallConfig.isAudit">
|
|
|
<el-form-item label="审核状态">
|
|
|
<el-select style="width: 240px" v-model="queryParams.isAudit" placeholder="请选择审核状态" size="small" >
|
|
|
<el-option value="0" label="待审核" key="isAudit0">待审核</el-option>
|
|
@@ -296,7 +296,7 @@
|
|
|
<el-table-column label="商品名称" show-overflow-tooltip align="center" prop="productName" />
|
|
|
<el-table-column label="分类" align="center" prop="cateName" />
|
|
|
<el-table-column label="所属公司" align="center" prop="companyName" />
|
|
|
- <el-table-column label="所属店铺" align="center" prop="storeName" v-if="this.isStores"/>
|
|
|
+ <el-table-column label="所属店铺" align="center" prop="storeName" v-if="medicalMallConfig.isStores"/>
|
|
|
<el-table-column label="售价" align="center" prop="price" >
|
|
|
<template slot-scope="scope" >
|
|
|
<span v-if="scope.row.price!=null">{{scope.row.price.toFixed(2)}}</span>
|
|
@@ -444,7 +444,7 @@
|
|
|
<el-form-item label="药品展示图" prop="drugImage">
|
|
|
<Material v-model="drugImageArr" type="image" :num="1" :width="150" :height="150" />
|
|
|
</el-form-item>
|
|
|
- <div v-if="this.isMedicalMall">
|
|
|
+ <div v-if="medicalMallConfig.isMedicalMall">
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="药品注册证书编号" prop="drugRegCertNo">
|
|
@@ -837,7 +837,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属店铺" prop="storeId" v-if="this.isStores">
|
|
|
+ <el-form-item label="所属店铺" prop="storeId" v-if="medicalMallConfig.isStores">
|
|
|
<el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small" >
|
|
|
<el-option
|
|
|
v-for="item in storeOptions"
|
|
@@ -919,6 +919,7 @@ import Material from '@/components/Material'
|
|
|
import singleImg from '@/components/Material/single'
|
|
|
import { getCompanyList } from "@/api/company/company";
|
|
|
import { listStore } from '@/api/hisStore/store'
|
|
|
+import { getConfigByKey } from '@/api/system/config'
|
|
|
export default {
|
|
|
name: "HisStoreProduct",
|
|
|
components: {
|
|
@@ -927,6 +928,48 @@ export default {
|
|
|
Material,
|
|
|
singleImg,
|
|
|
},
|
|
|
+ created() {
|
|
|
+ this.getDicts("store_product_tui_cate").then((response) => {
|
|
|
+ this.productTuiCateOptions = response.data;
|
|
|
+ });
|
|
|
+ getConfigByKey("medicalMall.func.switch").then(response => {
|
|
|
+ if(response.data && response.data.configValue) {
|
|
|
+ this.medicalMallConfig = JSON.parse(response.data.configValue);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getDicts("store_product_enable").then((response) => {
|
|
|
+ this.isNewOptions = response.data;
|
|
|
+ this.isBestOptions = response.data;
|
|
|
+ this.isHotOptions = response.data;
|
|
|
+ this.isGoodOptions=response.data;
|
|
|
+ this.isDisplayOptions=response.data;
|
|
|
+ });
|
|
|
+ this.getDicts("store_product_type").then((response) => {
|
|
|
+ this.productTypeOptions = response.data;
|
|
|
+ if(!this.medicalMallConfig.isMedicalMall &&
|
|
|
+ this.productTypeOptions.length === 4){
|
|
|
+ //删除后两项
|
|
|
+ this.productTypeOptions.splice(2,2);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ this.getDicts("store_product_is_show").then((response) => {
|
|
|
+ this.isShowOptions = response.data;
|
|
|
+ });
|
|
|
+ getAllShippingTemplates().then(response => {
|
|
|
+ this.templateList =response.data;
|
|
|
+ });
|
|
|
+ getAllStoreProductRule().then(response => {
|
|
|
+ this.ruleList =response.data;
|
|
|
+ });
|
|
|
+ getCompanyList().then(response => {
|
|
|
+ this.companyOptions = response.data;
|
|
|
+ });
|
|
|
+ listStore().then(response => {
|
|
|
+ this.storeOptions = response.rows;
|
|
|
+ });
|
|
|
+ this.getTreeselect();
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
watch: {
|
|
|
imageArr: function(val) {
|
|
|
this.form.image = val.join(',')
|
|
@@ -940,8 +983,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- isMedicalMall: this.$store.state.user.medicalMallConfig.medicalMall,
|
|
|
- isStores: this.$store.state.user.medicalMallConfig.stores,
|
|
|
+ medicalMallConfig:{},
|
|
|
companyId: null,
|
|
|
storeId: null,
|
|
|
isAudit: null,
|
|
@@ -1156,43 +1198,6 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
- this.getDicts("store_product_tui_cate").then((response) => {
|
|
|
- this.productTuiCateOptions = response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_product_enable").then((response) => {
|
|
|
- this.isNewOptions = response.data;
|
|
|
- this.isBestOptions = response.data;
|
|
|
- this.isHotOptions = response.data;
|
|
|
- this.isGoodOptions=response.data;
|
|
|
- this.isDisplayOptions=response.data;
|
|
|
- });
|
|
|
- this.getDicts("store_product_type").then((response) => {
|
|
|
- this.productTypeOptions = response.data;
|
|
|
- if(!this.isMedicalMall &&
|
|
|
- this.productTypeOptions.length === 4){
|
|
|
- //删除后两项
|
|
|
- this.productTypeOptions.splice(2,2);
|
|
|
- }
|
|
|
- });
|
|
|
- this.getDicts("store_product_is_show").then((response) => {
|
|
|
- this.isShowOptions = response.data;
|
|
|
- });
|
|
|
- getAllShippingTemplates().then(response => {
|
|
|
- this.templateList =response.data;
|
|
|
- });
|
|
|
- getAllStoreProductRule().then(response => {
|
|
|
- this.ruleList =response.data;
|
|
|
- });
|
|
|
- getCompanyList().then(response => {
|
|
|
- this.companyOptions = response.data;
|
|
|
- });
|
|
|
- listStore().then(response => {
|
|
|
- this.storeOptions = response.rows;
|
|
|
- });
|
|
|
- this.getTreeselect();
|
|
|
- this.getList();
|
|
|
- },
|
|
|
methods: {
|
|
|
cancel1(){
|
|
|
this.open1 = false;
|