feat(shopGoods): 优化商品列表和后端排序逻辑
- 商品列表「编号」列移除,改为名称下方灰色小字显示编号 - 市场价、价格、会员价三列合并为单列,按编辑弹窗顺序堆叠显示 - 后端新增 is_top 字段,实现置顶商品排序优先级调整 - pageRel 和 listRel 默认排序改为置顶优先、排序号次之、创建时间最后 - 采集默认设置 isTop 字段为 0,保持一致性 - 删除单独「编号」列节省列表横向空间,布局更紧凑 - 后端排序调整影响所有调用分页接口的端,置顶商品浮至最前 - 编辑弹窗「套餐价格」更名「进货价格」,对应接口字段注释同步修改
This commit is contained in:
@@ -98,9 +98,9 @@
|
||||
v-model:value="form.dealerPrice"
|
||||
/>
|
||||
</a-form-item>
|
||||
<a-form-item label="套餐价格" name="originPrice">
|
||||
<a-form-item label="进货价格" name="originPrice">
|
||||
<a-input-number
|
||||
:placeholder="`套餐价格`"
|
||||
:placeholder="`进货价格`"
|
||||
style="width: 240px"
|
||||
:min="0.01"
|
||||
v-model:value="form.buyingPrice"
|
||||
@@ -1337,7 +1337,7 @@ const rules = reactive({
|
||||
price: [
|
||||
{
|
||||
required: true,
|
||||
message: '请填写会员价',
|
||||
message: '请填写商品价格',
|
||||
type: 'number',
|
||||
trigger: 'blur'
|
||||
}
|
||||
@@ -1353,7 +1353,7 @@ const rules = reactive({
|
||||
buyingPrice: [
|
||||
{
|
||||
required: true,
|
||||
message: '请填写会员店/总仓批发价',
|
||||
message: '请填写进货价',
|
||||
type: 'number',
|
||||
trigger: 'blur'
|
||||
}
|
||||
|
||||
@@ -41,9 +41,31 @@
|
||||
:preview="false"
|
||||
:width="50"
|
||||
/>
|
||||
<span class="text-gray-700 font-bold">{{ record.name }}</span>
|
||||
<div class="flex flex-col justify-center leading-tight">
|
||||
<span class="text-gray-700 font-bold">{{ record.name }}</span>
|
||||
<span
|
||||
v-if="record.code"
|
||||
class="text-gray-400 text-xs mt-1"
|
||||
>编号:{{ record.code }}</span
|
||||
>
|
||||
</div>
|
||||
</a-space>
|
||||
</template>
|
||||
<template v-if="column.key === 'priceGroup'">
|
||||
<div class="flex flex-col leading-tight gap-0.5">
|
||||
<span class="text-gray-800 font-bold">¥{{ record.price }}</span>
|
||||
<span class="text-gray-400 text-xs"
|
||||
>市场价:{{
|
||||
record.salePrice ? `¥${record.salePrice}` : '-'
|
||||
}}</span
|
||||
>
|
||||
<span class="text-gray-400 text-xs"
|
||||
>会员价:{{
|
||||
record.dealerPrice ? `¥${record.dealerPrice}` : '-'
|
||||
}}</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="column.key === 'recommend'">
|
||||
<a-space @click.stop="onRecommend(record)">
|
||||
<span
|
||||
@@ -222,35 +244,10 @@
|
||||
key: 'name',
|
||||
width: 300
|
||||
},
|
||||
{
|
||||
title: '编号',
|
||||
dataIndex: 'code',
|
||||
key: 'code',
|
||||
align: 'center',
|
||||
},
|
||||
{
|
||||
title: '市场价',
|
||||
dataIndex: 'salePrice',
|
||||
key: 'salePrice',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => (text ? `¥${text}` : '-')
|
||||
},
|
||||
{
|
||||
title: '价格',
|
||||
dataIndex: 'price',
|
||||
key: 'price',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => `¥${text}`
|
||||
},
|
||||
{
|
||||
title: '会员价',
|
||||
dataIndex: 'dealerPrice',
|
||||
key: 'dealerPrice',
|
||||
align: 'center',
|
||||
width: 110,
|
||||
customRender: ({ text }) => (text ? `¥${text}` : '-')
|
||||
key: 'priceGroup',
|
||||
dataIndex: 'priceGroup'
|
||||
},
|
||||
{
|
||||
title: '销量',
|
||||
@@ -617,11 +614,11 @@
|
||||
return {
|
||||
// 行点击事件
|
||||
onClick: () => {
|
||||
openEdit(record);
|
||||
// openEdit(record);
|
||||
},
|
||||
// 行双击事件
|
||||
onDblclick: () => {
|
||||
// openEdit(record);
|
||||
openEdit(record);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user