feat(商品管理): 添加商品使用说明字段
在商品DTO、请求参数及表单中添加`usageInstruction`字段,以便用户输入商品使用说明
This commit is contained in:
parent
39deeb7774
commit
e1888f55d4
|
@ -48,6 +48,8 @@ export interface GoodsDTO {
|
||||||
cellNoStr?: string;
|
cellNoStr?: string;
|
||||||
/** 总库存量(含所有仓库) */
|
/** 总库存量(含所有仓库) */
|
||||||
totalStock?: number;
|
totalStock?: number;
|
||||||
|
/** 商品使用说明 */
|
||||||
|
usageInstruction?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 商品请求参数 */
|
/** 商品请求参数 */
|
||||||
|
@ -61,6 +63,8 @@ export interface GoodsRequest {
|
||||||
coverImg?: string;
|
coverImg?: string;
|
||||||
goodsDetail: string;
|
goodsDetail: string;
|
||||||
remark?: string;
|
remark?: string;
|
||||||
|
/** 商品使用说明 */
|
||||||
|
usageInstruction?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 获取商品列表 */
|
/** 获取商品列表 */
|
||||||
|
|
|
@ -33,7 +33,8 @@ const formData = reactive<GoodsDTO>({
|
||||||
autoApproval: 0,
|
autoApproval: 0,
|
||||||
categoryId: 0,
|
categoryId: 0,
|
||||||
goodsDetail: "",
|
goodsDetail: "",
|
||||||
coverImg: ""
|
coverImg: "",
|
||||||
|
usageInstruction: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
|
@ -176,6 +177,9 @@ const handleDelete = async () => {
|
||||||
<el-radio :label="2">下架</el-radio>
|
<el-radio :label="2">下架</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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-form-item label="操作">
|
||||||
<el-popconfirm :title="`确认删除【${row.goodsName}】?`" @confirm="handleDelete()">
|
<el-popconfirm :title="`确认删除【${row.goodsName}】?`" @confirm="handleDelete()">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
|
|
@ -26,7 +26,8 @@ const formData = reactive<GoodsDTO>({
|
||||||
autoApproval: 0,
|
autoApproval: 0,
|
||||||
categoryId: 0,
|
categoryId: 0,
|
||||||
goodsDetail: "",
|
goodsDetail: "",
|
||||||
coverImg: ""
|
coverImg: "",
|
||||||
|
usageInstruction: ""
|
||||||
});
|
});
|
||||||
|
|
||||||
const rules = reactive<FormRules>({
|
const rules = reactive<FormRules>({
|
||||||
|
@ -135,6 +136,9 @@ const beforeAvatarUpload = (rawFile) => {
|
||||||
<el-radio :label="2">下架</el-radio>
|
<el-radio :label="2">下架</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</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>
|
</el-form>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
|
|
Loading…
Reference in New Issue