商品单规格和多规格之间切换

This commit is contained in:
duan 2024-08-08 09:11:20 +08:00
parent 3b12a2ba06
commit 9a55093516
2 changed files with 10 additions and 6 deletions

View File

@ -2,7 +2,8 @@
<div class="app-container">
<el-form ref="formRef" :model="form" :rules="rules" label-width="140px" label-position="left">
<el-form-item label="商品类型" prop="typeEnum">
<div class="shop_type_box" :class="{ disabled: form.id }">
<div class="shop_type_box" :class="{ }">
<!-- <div class="shop_type_box" :class="{ disabled: form.id }"> -->
<div class="item" v-for="(item, index) in shopTypes" :key="index"
:class="{ active: shopTypesActive == index }" @click="changeTypeEnum(index)">
<div class="s_title">{{ item.label }}</div>
@ -152,9 +153,9 @@
</template>
</el-table-column>
</el-table>
<div class="tips" v-if="form.isShowMall">
<!-- <div class="tips" v-if="form.isShowMall">
小程序商城必须设置库存数量大于0
</div>
</div> -->
</el-form-item>
<template v-if="form.typeEnum == 'group'">
<el-form-item label="使用日期说明" prop="notices.dateUsed">
@ -307,9 +308,9 @@
</template>
</el-table-column> -->
</el-table>
<div class="tips" v-if="form.isShowMall">
<!-- <div class="tips" v-if="form.isShowMall">
小程序商城必须设置库存数量大于0
</div>
</div> -->
</el-form-item>
<template v-if="form.typeEnum != 'group'">
<el-form-item label="上架区域">
@ -745,7 +746,7 @@ export default {
},
//
changeTypeEnum(index) {
if (this.form.id) return;
// if (this.form.id) return;
this.shopTypesActive = index;
const typeEnum = this.shopTypes[index].typeEnum;
this.form.typeEnum = typeEnum;

View File

@ -53,6 +53,9 @@
<template v-slot="scope">
<span>{{ scope.row.lowPrice }}</span>
</template>
</el-table-column>
<el-table-column label="商品规格" prop="typeEnum">
</el-table-column>
<el-table-column label="销量/库存">
<template v-slot="scope">