mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-06 17:09:08 +08:00
refactor(goods-setting): 移除图片尺寸配置并新增自营店商品审核开关
- 移除缩略图、小图、原图宽高配置项及相关校验规则 - 新增自营店商品审核独立开关(selfOperatedGoodsCheck) - 统一商品审核开关值为字符串类型 true/false - 更新商品审核描述文案为非自营店商品审核说明 - 清理README中已移除功能的描述条目
This commit is contained in:
12
README.md
12
README.md
@@ -173,17 +173,7 @@ lilishop-ui
|
|||||||
| ✅ 购物卡 | ✅ 腾讯云-云直播 |
|
| ✅ 购物卡 | ✅ 腾讯云-云直播 |
|
||||||
| ✅ 卡密商品 | ✅ 二级分销 |
|
| ✅ 卡密商品 | ✅ 二级分销 |
|
||||||
| ✅ 定时任务管理(数据库配置驱动) | ✅ 预约服务商品 |
|
| ✅ 定时任务管理(数据库配置驱动) | ✅ 预约服务商品 |
|
||||||
| ✅ 主题色管理 | ✅ 新增无需配送发货方式 |
|
| ✅ 主题色管理 | |
|
||||||
| ✅ 多维统计(营业/商品/会员/积分/储值/营销/分销) | ✅ 经营报表(店铺业绩/商品同比环比/订单明细/销售汇总) |
|
|
||||||
| ✅ 分类页多模板设置 | ✅ 移动端楼层装修组件库 |
|
|
||||||
| ✅ PC端楼层装修重构(自适应高度 / 可视化热区绘制) | ✅ 全站统一顶栏 / 商品与店铺双模式搜索 |
|
|
||||||
| ✅ PC端店铺独立列表 | ✅ 敏感词场景化过滤与分组开关 |
|
|
||||||
| ✅ 店铺结算汇总 / 结算台账 | ✅ 支付方式汇总 / 钱包流水 |
|
|
||||||
| ✅ 平台经营报表 / 商家周期财务汇总 | ✅ 财务报表与流水 Excel 导出 / 结算单批量下载 |
|
|
||||||
| ✅ 会员消息四渠道异步通知(站内信 / 短信 / 公众号 / 小程序) | ✅ 消息模板多渠道矩阵管理(模板配置 / 渠道开关) |
|
|
||||||
| ✅ 平台订单详情优化 / 标准 A4 出库发货单打印 | ✅ 售后详情展示优化 / 移动端售后入口整合至订单列表 |
|
|
||||||
| ✅ 商品详情视频内嵌相册 | ✅ 评价管理增强(回复状态 / 图片筛选 / 评价分级) |
|
|
||||||
| ✅ PC会员中心订单快捷入口 / 资产卡片 | ✅ 平台表单抽屉化 / 文章独立编辑页 |
|
|
||||||
|
|
||||||
### 🔜 近期规划中
|
### 🔜 近期规划中
|
||||||
- 🔜 微信小店对接
|
- 🔜 微信小店对接
|
||||||
|
|||||||
@@ -98,23 +98,11 @@
|
|||||||
<el-radio-button value="CLOSE">关闭</el-radio-button>
|
<el-radio-button value="CLOSE">关闭</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="商品页面小图宽度" prop="smallPictureWidth">
|
<el-form-item label="自营店商品审核" prop="selfOperatedGoodsCheck">
|
||||||
<el-input v-model="goods.smallPictureWidth" placeholder="商品页面小图宽度" style="width: 350px" />
|
<el-radio-group v-model="goods.selfOperatedGoodsCheck">
|
||||||
</el-form-item>
|
<el-radio-button value="OPEN">需要审核</el-radio-button>
|
||||||
<el-form-item label="商品页面小图高度" prop="smallPictureHeight">
|
<el-radio-button value="CLOSE">无需审核</el-radio-button>
|
||||||
<el-input v-model="goods.smallPictureHeight" placeholder="商品页面小图高度" style="width: 350px" />
|
</el-radio-group>
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="缩略图宽度" prop="abbreviationPictureWidth">
|
|
||||||
<el-input v-model="goods.abbreviationPictureWidth" placeholder="缩略图宽度" style="width: 350px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="缩略图高度" prop="abbreviationPictureHeight">
|
|
||||||
<el-input v-model="goods.abbreviationPictureHeight" placeholder="缩略图高度" style="width: 350px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原图宽" prop="originalPictureWidth">
|
|
||||||
<el-input v-model="goods.originalPictureWidth" placeholder="原图宽" style="width: 350px" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="原图高" prop="originalPictureHeight">
|
|
||||||
<el-input v-model="goods.originalPictureHeight" placeholder="原图高" style="width: 350px" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" style="width: 100px;margin-right:5px" :loading="saveLoading" @click="saveGoods">
|
<el-button type="primary" style="width: 100px;margin-right:5px" :loading="saveLoading" @click="saveGoods">
|
||||||
@@ -162,12 +150,7 @@ const order = ref({
|
|||||||
});
|
});
|
||||||
const goods = ref({
|
const goods = ref({
|
||||||
goodsCheck: "OPEN",
|
goodsCheck: "OPEN",
|
||||||
smallPictureWidth: "",
|
selfOperatedGoodsCheck: "OPEN",
|
||||||
smallPictureHeight: "",
|
|
||||||
abbreviationPictureWidth: "",
|
|
||||||
abbreviationPictureHeight: "",
|
|
||||||
originalPictureWidth: "",
|
|
||||||
originalPictureHeight: "",
|
|
||||||
});
|
});
|
||||||
// 历史遗留:wechat/qq/weibo/alipay 未在 data 中声明,直接挂 this,且模板中无对应表单项
|
// 历史遗留:wechat/qq/weibo/alipay 未在 data 中声明,直接挂 this,且模板中无对应表单项
|
||||||
let wechat;
|
let wechat;
|
||||||
@@ -262,86 +245,7 @@ const orderValidate = {
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
const goodsValidate = {
|
const goodsValidate = {};
|
||||||
smallPictureWidth: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
smallPictureHeight: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
abbreviationPictureWidth: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
abbreviationPictureHeight: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
originalPictureWidth: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
originalPictureHeight: [
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
validator: (rule, value, callback) => {
|
|
||||||
if (!regular.integer.test(value)) {
|
|
||||||
callback(new Error("请输入正整数,且不为零!"));
|
|
||||||
} else {
|
|
||||||
callback();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
trigger: "blur",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
const baseForm = ref(null);
|
const baseForm = ref(null);
|
||||||
const pointForm = ref(null);
|
const pointForm = ref(null);
|
||||||
@@ -401,7 +305,10 @@ function initGoods() {
|
|||||||
if (res.success) {
|
if (res.success) {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
goods.value = res.result;
|
goods.value = {
|
||||||
|
goodsCheck: res.result.goodsCheck,
|
||||||
|
selfOperatedGoodsCheck: res.result.selfOperatedGoodsCheck ?? res.result.goodsCheck,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -6,50 +6,15 @@
|
|||||||
<el-radio-button value="true">开启</el-radio-button>
|
<el-radio-button value="true">开启</el-radio-button>
|
||||||
<el-radio-button value="false">关闭</el-radio-button>
|
<el-radio-button value="false">关闭</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
<span class="desc">商品审核关闭后,商家添加商品则无需审核直接上架</span>
|
<span class="desc">控制非自营店商品是否需要审核</span>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="自营店商品审核" prop="selfOperatedGoodsCheck">
|
||||||
|
<el-radio-group v-model="formValidate.selfOperatedGoodsCheck">
|
||||||
|
<el-radio-button value="true">需要审核</el-radio-button>
|
||||||
|
<el-radio-button value="false">无需审核</el-radio-button>
|
||||||
|
</el-radio-group>
|
||||||
|
<span class="desc">独立控制自营店新增、编辑商品是否需要审核</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div class="label-item">
|
|
||||||
<el-form-item class="label-item" label="缩略图宽" prop="abbreviationPictureWidth">
|
|
||||||
<el-input type="number" v-model="formValidate.abbreviationPictureWidth">
|
|
||||||
<template #prepend>宽</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item class="label-item" label="缩略图高" prop="abbreviationPictureHeight">
|
|
||||||
<el-input type="number" v-model="formValidate.abbreviationPictureHeight">
|
|
||||||
<template #prepend>高</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="label-item">
|
|
||||||
<el-form-item label="小图宽" prop="smallPictureWidth">
|
|
||||||
<el-input type="number" v-model="formValidate.smallPictureWidth">
|
|
||||||
<template #prepend>宽</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="小图高" class="label-item" prop="smallPictureHeight">
|
|
||||||
<el-input type="number" v-model="formValidate.smallPictureHeight">
|
|
||||||
<template #prepend>高</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="label-item">
|
|
||||||
<el-form-item class="label-item" label="原图宽高" prop="originalPictureWidth">
|
|
||||||
<el-input type="number" v-model="formValidate.originalPictureWidth">
|
|
||||||
<template #prepend>宽</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item class="label-item" label="原图宽高" prop="originalPictureHeight">
|
|
||||||
<el-input type="number" v-model="formValidate.originalPictureHeight">
|
|
||||||
<template #prepend>高</template>
|
|
||||||
<template #append>px</template>
|
|
||||||
</el-input>
|
|
||||||
</el-form-item>
|
|
||||||
</div>
|
|
||||||
<div class="label-btns goods-setting-btns">
|
<div class="label-btns goods-setting-btns">
|
||||||
<div class="goods-setting-save-row">
|
<div class="goods-setting-save-row">
|
||||||
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
|
<el-button type="primary" @click="submit('formValidate')">保存</el-button>
|
||||||
@@ -67,13 +32,8 @@ const props = defineProps(["res", "type"]);
|
|||||||
|
|
||||||
// 表单数据(init 中整体替换)
|
// 表单数据(init 中整体替换)
|
||||||
const formValidate = ref({
|
const formValidate = ref({
|
||||||
goodsCheck: 1,
|
goodsCheck: "false",
|
||||||
smallPictureHeight: "0",
|
selfOperatedGoodsCheck: "false",
|
||||||
smallPictureWidth: "0",
|
|
||||||
abbreviationPictureWidth: "0",
|
|
||||||
abbreviationPictureHeight: "0",
|
|
||||||
originalPictureWidth: "0",
|
|
||||||
originalPictureHeight: "0",
|
|
||||||
});
|
});
|
||||||
// 校验规则(只做属性合并)
|
// 校验规则(只做属性合并)
|
||||||
const ruleValidate = reactive({});
|
const ruleValidate = reactive({});
|
||||||
@@ -104,10 +64,11 @@ function setupSetting() {
|
|||||||
}
|
}
|
||||||
function init() {
|
function init() {
|
||||||
result.value = JSON.parse(props.res);
|
result.value = JSON.parse(props.res);
|
||||||
Object.keys(result.value).map((item) => {
|
const toBooleanText = (value) => String(value === true || value === "true");
|
||||||
result.value[item] += "";
|
formValidate.value = {
|
||||||
});
|
goodsCheck: toBooleanText(result.value.goodsCheck),
|
||||||
formValidate.value = { ...result.value };
|
selfOperatedGoodsCheck: toBooleanText(result.value.selfOperatedGoodsCheck ?? result.value.goodsCheck),
|
||||||
|
};
|
||||||
Object.keys(formValidate.value).forEach((item) => {
|
Object.keys(formValidate.value).forEach((item) => {
|
||||||
ruleValidate[item] = [
|
ruleValidate[item] = [
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user