|
@@ -30,13 +30,13 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="公司" prop="companyId">
|
|
|
|
|
- <el-select style="width: 220px" filterable v-model="queryParams.companyId" placeholder="请选择公司名" clearable size="small">
|
|
|
|
|
|
|
+ <el-form-item label="所属店铺" prop="storeId">
|
|
|
|
|
+ <el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small" >
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in companyOptions"
|
|
|
|
|
- :key="item.companyId"
|
|
|
|
|
- :label="item.companyName"
|
|
|
|
|
- :value="item.companyId"
|
|
|
|
|
|
|
+ v-for="item in storeOptions"
|
|
|
|
|
+ :key="item.storeId"
|
|
|
|
|
+ :label="item.storeName"
|
|
|
|
|
+ :value="item.storeId"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -108,7 +108,8 @@
|
|
|
<el-tag prop="cateId" v-for="(item, index) in cateOptions" v-if="scope.row.cateId==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
<el-tag prop="cateId" v-for="(item, index) in cateOptions" v-if="scope.row.cateId==item.dictValue">{{item.dictLabel}}</el-tag>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
- <el-table-column label="所属公司" align="center" prop="companyName" />
|
|
|
|
|
|
|
+<!-- <el-table-column label="所属公司" align="center" prop="companyName" />-->
|
|
|
|
|
+ <el-table-column label="所属店铺" align="center" width="150px" :formatter="formatStoreName"/>
|
|
|
<el-table-column label="标题" align="center" prop="title" show-overflow-tooltip />
|
|
<el-table-column label="标题" align="center" prop="title" show-overflow-tooltip />
|
|
|
<el-table-column label="描述" align="center" prop="descs" show-overflow-tooltip />
|
|
<el-table-column label="描述" align="center" prop="descs" show-overflow-tooltip />
|
|
|
<el-table-column label="原价" align="center" >
|
|
<el-table-column label="原价" align="center" >
|
|
@@ -175,13 +176,13 @@
|
|
|
<el-radio :label="item.dictValue" v-for="item in statusOptions" >{{item.dictLabel}}</el-radio>
|
|
<el-radio :label="item.dictValue" v-for="item in statusOptions" >{{item.dictLabel}}</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="公司" prop="companyId">
|
|
|
|
|
- <el-select style="width: 220px" filterable v-model="form1.companyId" placeholder="请选择公司名" clearable size="small">
|
|
|
|
|
|
|
+ <el-form-item label="所属店铺" prop="storeId">
|
|
|
|
|
+ <el-select style="width: 240px" v-model="form1.storeId" placeholder="请选择店铺" clearable size="small" >
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in companyOptions"
|
|
|
|
|
- :key="item.companyId"
|
|
|
|
|
- :label="item.companyName"
|
|
|
|
|
- :value="item.companyId"
|
|
|
|
|
|
|
+ v-for="item in storeOptions"
|
|
|
|
|
+ :key="item.storeId"
|
|
|
|
|
+ :label="item.storeName"
|
|
|
|
|
+ :value="item.storeId"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -214,13 +215,23 @@
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="所属公司" prop="companyId">
|
|
|
|
|
- <el-select style="width: 240px" v-model="form.companyId" placeholder="请选择企业" clearable size="small" @change="handleCompanyChange">
|
|
|
|
|
|
|
+<!-- <el-form-item label="所属公司" prop="companyId">-->
|
|
|
|
|
+<!-- <el-select style="width: 240px" v-model="form.companyId" placeholder="请选择企业" clearable size="small" @change="handleCompanyChange">-->
|
|
|
|
|
+<!-- <el-option-->
|
|
|
|
|
+<!-- v-for="item in companyOptions"-->
|
|
|
|
|
+<!-- :key="item.companyId"-->
|
|
|
|
|
+<!-- :label="item.companyName"-->
|
|
|
|
|
+<!-- :value="item.companyId"-->
|
|
|
|
|
+<!-- />-->
|
|
|
|
|
+<!-- </el-select>-->
|
|
|
|
|
+<!-- </el-form-item>-->
|
|
|
|
|
+ <el-form-item label="所属店铺" prop="storeId">
|
|
|
|
|
+ <el-select style="width: 240px" v-model="form.storeId" placeholder="请选择店铺" clearable size="small" >
|
|
|
<el-option
|
|
<el-option
|
|
|
- v-for="item in companyOptions"
|
|
|
|
|
- :key="item.companyId"
|
|
|
|
|
- :label="item.companyName"
|
|
|
|
|
- :value="item.companyId"
|
|
|
|
|
|
|
+ v-for="item in storeOptions"
|
|
|
|
|
+ :key="item.storeId"
|
|
|
|
|
+ :label="item.storeName"
|
|
|
|
|
+ :value="item.storeId"
|
|
|
/>
|
|
/>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -336,6 +347,7 @@ import productAttrValueSelect from "../components/productAttrValueSelect";
|
|
|
import Material from '@/components/Material'
|
|
import Material from '@/components/Material'
|
|
|
import singleImg from '@/components/Material/single'
|
|
import singleImg from '@/components/Material/single'
|
|
|
import {getCompanyList} from "@/api/company/company";
|
|
import {getCompanyList} from "@/api/company/company";
|
|
|
|
|
+import {listStore} from "@/api/hisStore/store";
|
|
|
export default {
|
|
export default {
|
|
|
name: "HisStoreProductPackage",
|
|
name: "HisStoreProductPackage",
|
|
|
components: {
|
|
components: {
|
|
@@ -437,7 +449,8 @@ export default {
|
|
|
{ required: true, message: "限购次数不能为空" }
|
|
{ required: true, message: "限购次数不能为空" }
|
|
|
],
|
|
],
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ storeOptions:[]
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -455,6 +468,10 @@ export default {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
|
|
|
|
|
this.getCompanyList();
|
|
this.getCompanyList();
|
|
|
|
|
+
|
|
|
|
|
+ listStore().then(response => {
|
|
|
|
|
+ this.storeOptions = response.rows;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
handleCompanyChange(){
|
|
handleCompanyChange(){
|
|
@@ -500,8 +517,8 @@ export default {
|
|
|
this.$message.success("商品已添加!");
|
|
this.$message.success("商品已添加!");
|
|
|
},
|
|
},
|
|
|
handleAddProduct(){
|
|
handleAddProduct(){
|
|
|
- if(!this.form.companyId) {
|
|
|
|
|
- this.$message.error("请选择套餐所属公司!");
|
|
|
|
|
|
|
+ if(!this.form.storeId) {
|
|
|
|
|
+ this.$message.error("请选择套餐所属商铺!");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
this.product.open=true;
|
|
this.product.open=true;
|
|
@@ -729,7 +746,10 @@ export default {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
-
|
|
|
|
|
|
|
+ formatStoreName(row) {
|
|
|
|
|
+ const store = this.storeOptions.find(option => option.storeId === row.storeId);
|
|
|
|
|
+ return store ? store.storeName : '';
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|