feat(custom): \!
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-03 22:23:48 +08:00
parent 1c95c1097c
commit a4c2674fbe
13 changed files with 5089 additions and 1644 deletions

View File

@@ -173,6 +173,17 @@
:min="0"
/>
</n-form-item-gi>
<n-form-item-gi :span="20" label="商品折扣比例" path="discount">
<n-input-number
v-model:value="nowRow.discount"
clearable
placeholder="请输入折扣比例...."
:min="0"
:precision="0"
>
<template #suffix>%</template>
</n-input-number>
</n-form-item-gi>
<n-form-item-gi :span="20" label="豆子过期时间" path="expiration">
<n-input-number
v-model:value="nowRow.expiration"
@@ -323,6 +334,12 @@ const rules = {
message: '请输入分佣比例',
trigger: 'blur',
},
discount: {
required: true,
type: 'number',
message: '请输入折扣比例',
trigger: 'blur',
},
}
const nowRow = ref({})
@@ -426,6 +443,34 @@ const columns = ref([
key: 'number',
align: 'center',
},
{
title: '积分抵扣',
slot: 'exchange',
align: 'center',
render: (row) => {
return h(
'span',
{},
{
default: () => (row.exchange ? `${(row.exchange / 100).toFixed(2)}元` : '无'),
}
)
},
},
{
title: '折扣比例(%)',
slot: 'discount',
align: 'center',
render: (row) => {
return h(
'span',
{},
{
default: () => `${row.discount}%`,
}
)
},
},
{
title: '商品库存',
key: 'stock',