feat(商品管理): 添加商品使用说明字段

在商品DTO、请求参数及表单中添加`usageInstruction`字段,以便用户输入商品使用说明
This commit is contained in:
dzq 2025-05-20 16:12:15 +08:00
parent 39deeb7774
commit e1888f55d4
3 changed files with 14 additions and 2 deletions

View File

@ -48,6 +48,8 @@ export interface GoodsDTO {
cellNoStr?: string;
/** 总库存量(含所有仓库) */
totalStock?: number;
/** 商品使用说明 */
usageInstruction?: string;
}
/** 商品请求参数 */
@ -61,6 +63,8 @@ export interface GoodsRequest {
coverImg?: string;
goodsDetail: string;
remark?: string;
/** 商品使用说明 */
usageInstruction?: string;
}
/** 获取商品列表 */

View File

@ -33,7 +33,8 @@ const formData = reactive<GoodsDTO>({
autoApproval: 0,
categoryId: 0,
goodsDetail: "",
coverImg: ""
coverImg: "",
usageInstruction: ""
});
const rules = reactive<FormRules>({
@ -176,6 +177,9 @@ const handleDelete = async () => {
<el-radio :label="2">下架</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="使用说明" prop="usageInstruction">
<el-input v-model="formData.usageInstruction" type="textarea" :rows="3" placeholder="请输入商品使用说明" />
</el-form-item>
<el-form-item label="操作">
<el-popconfirm :title="`确认删除【${row.goodsName}】?`" @confirm="handleDelete()">
<template #reference>

View File

@ -26,7 +26,8 @@ const formData = reactive<GoodsDTO>({
autoApproval: 0,
categoryId: 0,
goodsDetail: "",
coverImg: ""
coverImg: "",
usageInstruction: ""
});
const rules = reactive<FormRules>({
@ -135,6 +136,9 @@ const beforeAvatarUpload = (rawFile) => {
<el-radio :label="2">下架</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="使用说明" prop="usageInstruction">
<el-input v-model="formData.usageInstruction" type="textarea" :rows="3" placeholder="请输入商品使用说明" />
</el-form-item>
</el-form>
<template #footer>