商品调整

This commit is contained in:
BabyBoy 2025-09-22 10:46:21 +08:00
parent 1ba453dd19
commit b3b3067567
2 changed files with 8 additions and 7 deletions

View File

@ -67,13 +67,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <!-- <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="上架状态"> <el-form-item label="上架状态">
<DictRadio v-model="form.publishStatus" radioData="pms_publish_status" /> <DictRadio v-model="form.publishStatus" radioData="pms_publish_status" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row> -->
</el-card> </el-card>
<el-card style="margin: 20px 20px; font-size: 14px"> <el-card style="margin: 20px 20px; font-size: 14px">
@ -453,7 +453,7 @@ export default {
this.albumPics = albumPics.split(','); this.albumPics = albumPics.split(',');
} }
this.form = response.data; this.form = response.data;
this.form.publishStatus = this.form.publishStatus.toString(); // this.form.publishStatus = this.form.publishStatus.toString();
if (this.form.productAttr) { if (this.form.productAttr) {
this.productAttr = JSON.parse(this.form.productAttr); this.productAttr = JSON.parse(this.form.productAttr);
} }

View File

@ -45,7 +45,7 @@
<template #header> <template #header>
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button> <el-button type="primary" plain icon="Plus" @click="handleAdd" v-hasPermi="['pms:product:add']">新增</el-button>
</el-col> </el-col>
</el-row> </el-row>
</template> </template>
@ -88,6 +88,7 @@
<el-table-column label="商品状态" prop="publishStatus" fixed="right" align="center"> <el-table-column label="商品状态" prop="publishStatus" fixed="right" align="center">
<template v-slot="scope"> <template v-slot="scope">
<el-switch <el-switch
v-hasPermi="['pms:product:publish']"
:model-value="scope.row.publishStatus" :model-value="scope.row.publishStatus"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@ -109,9 +110,9 @@
> >
<el-table-column label="操作" class-name="small-padding fixed-width" width="350" align="center" fixed="right"> <el-table-column label="操作" class-name="small-padding fixed-width" width="350" align="center" fixed="right">
<template v-slot="scope"> <template v-slot="scope">
<el-button text type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改 </el-button> <el-button v-hasPermi="['pms:product:edit']" text type="primary" icon="Edit" @click="handleUpdate(scope.row)">修改 </el-button>
<el-button text type="primary" icon="Edit" @click="handleAuth(scope.row)">审核</el-button> <el-button v-hasPermi="['pms:product:auth']" text type="primary" icon="Edit" @click="handleAuth(scope.row)">审核</el-button>
<el-button text type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button> <el-button v-hasPermi="['pms:product:remove']" text type="primary" icon="Delete" @click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>