spu:分佣属性和分佣保持一致
This commit is contained in:
parent
5dc0c6e3da
commit
8778f5746f
@ -20,8 +20,8 @@ export interface Sku {
|
|||||||
stock?: number // 库存
|
stock?: number // 库存
|
||||||
weight?: number // 商品重量,单位:kg 千克
|
weight?: number // 商品重量,单位:kg 千克
|
||||||
volume?: number // 商品体积,单位:m^3 平米
|
volume?: number // 商品体积,单位:m^3 平米
|
||||||
firstBrokerageRecord?: number | string // 一级分销的佣金
|
firstBrokeragePrice?: number | string // 一级分销的佣金
|
||||||
secondBrokerageRecord?: number | string // 二级分销的佣金
|
secondBrokeragePrice?: number | string // 二级分销的佣金
|
||||||
salesCount?: number // 商品销量
|
salesCount?: number // 商品销量
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
<el-table-column align="center" label="一级返佣(元)" min-width="168">
|
<el-table-column align="center" label="一级返佣(元)" min-width="168">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.firstBrokerageRecord"
|
v-model="row.firstBrokeragePrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
:step="0.1"
|
:step="0.1"
|
||||||
@ -91,7 +91,7 @@
|
|||||||
<el-table-column align="center" label="二级返佣(元)" min-width="168">
|
<el-table-column align="center" label="二级返佣(元)" min-width="168">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model="row.secondBrokerageRecord"
|
v-model="row.secondBrokeragePrice"
|
||||||
:min="0"
|
:min="0"
|
||||||
:precision="2"
|
:precision="2"
|
||||||
:step="0.1"
|
:step="0.1"
|
||||||
@ -181,12 +181,12 @@
|
|||||||
<template v-if="formData!.subCommissionType">
|
<template v-if="formData!.subCommissionType">
|
||||||
<el-table-column align="center" label="一级返佣(元)" min-width="80">
|
<el-table-column align="center" label="一级返佣(元)" min-width="80">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.firstBrokerageRecord }}
|
{{ row.firstBrokeragePrice }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="二级返佣(元)" min-width="80">
|
<el-table-column align="center" label="二级返佣(元)" min-width="80">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ row.secondBrokerageRecord }}
|
{{ row.secondBrokeragePrice }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</template>
|
</template>
|
||||||
@ -295,8 +295,8 @@ const skuList = ref<Sku[]>([
|
|||||||
stock: 0, // 库存
|
stock: 0, // 库存
|
||||||
weight: 0, // 商品重量
|
weight: 0, // 商品重量
|
||||||
volume: 0, // 商品体积
|
volume: 0, // 商品体积
|
||||||
firstBrokerageRecord: 0, // 一级分销的佣金
|
firstBrokeragePrice: 0, // 一级分销的佣金
|
||||||
secondBrokerageRecord: 0 // 二级分销的佣金
|
secondBrokeragePrice: 0 // 二级分销的佣金
|
||||||
}
|
}
|
||||||
]) // 批量添加时的临时数据
|
]) // 批量添加时的临时数据
|
||||||
|
|
||||||
@ -415,8 +415,8 @@ const generateTableData = (propertyList: any[]) => {
|
|||||||
stock: 0,
|
stock: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
firstBrokerageRecord: 0,
|
firstBrokeragePrice: 0,
|
||||||
secondBrokerageRecord: 0
|
secondBrokeragePrice: 0
|
||||||
}
|
}
|
||||||
// 如果存在属性相同的 sku 则不做处理
|
// 如果存在属性相同的 sku 则不做处理
|
||||||
const index = formData.value!.skus!.findIndex(
|
const index = formData.value!.skus!.findIndex(
|
||||||
@ -491,8 +491,8 @@ watch(
|
|||||||
stock: 0,
|
stock: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
firstBrokerageRecord: 0,
|
firstBrokeragePrice: 0,
|
||||||
secondBrokerageRecord: 0
|
secondBrokeragePrice: 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -332,8 +332,8 @@ defineExpose({ validate })
|
|||||||
const changeSubCommissionType = () => {
|
const changeSubCommissionType = () => {
|
||||||
// 默认为零,类型切换后也要重置为零
|
// 默认为零,类型切换后也要重置为零
|
||||||
for (const item of formData.skus) {
|
for (const item of formData.skus) {
|
||||||
item.firstBrokerageRecord = 0
|
item.firstBrokeragePrice = 0
|
||||||
item.secondBrokerageRecord = 0
|
item.secondBrokeragePrice = 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -352,8 +352,8 @@ const onChangeSpec = () => {
|
|||||||
stock: 0,
|
stock: 0,
|
||||||
weight: 0,
|
weight: 0,
|
||||||
volume: 0,
|
volume: 0,
|
||||||
firstBrokerageRecord: 0,
|
firstBrokeragePrice: 0,
|
||||||
secondBrokerageRecord: 0
|
secondBrokeragePrice: 0
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -82,8 +82,8 @@ const formData = ref<ProductSpuApi.Spu>({
|
|||||||
stock: 0, // 库存
|
stock: 0, // 库存
|
||||||
weight: 0, // 商品重量
|
weight: 0, // 商品重量
|
||||||
volume: 0, // 商品体积
|
volume: 0, // 商品体积
|
||||||
firstBrokerageRecord: 0, // 一级分销的佣金
|
firstBrokeragePrice: 0, // 一级分销的佣金
|
||||||
secondBrokerageRecord: 0 // 二级分销的佣金
|
secondBrokeragePrice: 0 // 二级分销的佣金
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
description: '', // 商品详情
|
description: '', // 商品详情
|
||||||
@ -112,15 +112,15 @@ const getDetail = async () => {
|
|||||||
item.price = floatToFixed2(item.price)
|
item.price = floatToFixed2(item.price)
|
||||||
item.marketPrice = floatToFixed2(item.marketPrice)
|
item.marketPrice = floatToFixed2(item.marketPrice)
|
||||||
item.costPrice = floatToFixed2(item.costPrice)
|
item.costPrice = floatToFixed2(item.costPrice)
|
||||||
item.firstBrokerageRecord = floatToFixed2(item.firstBrokerageRecord)
|
item.firstBrokeragePrice = floatToFixed2(item.firstBrokeragePrice)
|
||||||
item.secondBrokerageRecord = floatToFixed2(item.secondBrokerageRecord)
|
item.secondBrokeragePrice = floatToFixed2(item.secondBrokeragePrice)
|
||||||
} else {
|
} else {
|
||||||
// 回显价格分转元
|
// 回显价格分转元
|
||||||
item.price = formatToFraction(item.price)
|
item.price = formatToFraction(item.price)
|
||||||
item.marketPrice = formatToFraction(item.marketPrice)
|
item.marketPrice = formatToFraction(item.marketPrice)
|
||||||
item.costPrice = formatToFraction(item.costPrice)
|
item.costPrice = formatToFraction(item.costPrice)
|
||||||
item.firstBrokerageRecord = formatToFraction(item.firstBrokerageRecord)
|
item.firstBrokeragePrice = formatToFraction(item.firstBrokeragePrice)
|
||||||
item.secondBrokerageRecord = formatToFraction(item.secondBrokerageRecord)
|
item.secondBrokeragePrice = formatToFraction(item.secondBrokeragePrice)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
formData.value = res
|
formData.value = res
|
||||||
@ -149,8 +149,8 @@ const submitForm = async () => {
|
|||||||
item.price = convertToInteger(item.price)
|
item.price = convertToInteger(item.price)
|
||||||
item.marketPrice = convertToInteger(item.marketPrice)
|
item.marketPrice = convertToInteger(item.marketPrice)
|
||||||
item.costPrice = convertToInteger(item.costPrice)
|
item.costPrice = convertToInteger(item.costPrice)
|
||||||
item.firstBrokerageRecord = convertToInteger(item.firstBrokerageRecord)
|
item.firstBrokeragePrice = convertToInteger(item.firstBrokeragePrice)
|
||||||
item.secondBrokerageRecord = convertToInteger(item.secondBrokerageRecord)
|
item.secondBrokeragePrice = convertToInteger(item.secondBrokeragePrice)
|
||||||
})
|
})
|
||||||
// 处理轮播图列表
|
// 处理轮播图列表
|
||||||
const newSliderPicUrls: any[] = []
|
const newSliderPicUrls: any[] = []
|
||||||
|
Loading…
Reference in New Issue
Block a user