|
@@ -165,6 +165,7 @@ export default defineComponent({
|
|
orderList.forEach((order: any) => {
|
|
orderList.forEach((order: any) => {
|
|
tempGoodsType.push({
|
|
tempGoodsType.push({
|
|
orderType: order.orderType,
|
|
orderType: order.orderType,
|
|
|
|
+ basePrice: order.price,
|
|
price: order.price
|
|
price: order.price
|
|
})
|
|
})
|
|
})
|
|
})
|
|
@@ -629,6 +630,13 @@ export default defineComponent({
|
|
orderStatus.orderObject.discountCardPrice = Number(
|
|
orderStatus.orderObject.discountCardPrice = Number(
|
|
item.discountPrice
|
|
item.discountPrice
|
|
)
|
|
)
|
|
|
|
+
|
|
|
|
+ this.orderGoodsType.forEach((item: any)=> {
|
|
|
|
+ if(item.orderType !== 'DISCOUNT') {
|
|
|
|
+ item.price = numberToTwoUp(item.price - Number(item.discountPrice))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
this.orderPrice = Number(
|
|
this.orderPrice = Number(
|
|
numberToTwoUp(
|
|
numberToTwoUp(
|
|
Number(this.orderAmount) -
|
|
Number(this.orderAmount) -
|
|
@@ -658,6 +666,11 @@ export default defineComponent({
|
|
orderStatus.orderObject.discountCardPrice = Number(
|
|
orderStatus.orderObject.discountCardPrice = Number(
|
|
item.discountPrice
|
|
item.discountPrice
|
|
)
|
|
)
|
|
|
|
+ this.orderGoodsType.forEach((item: any)=> {
|
|
|
|
+ if(item.orderType !== 'DISCOUNT') {
|
|
|
|
+ item.price = numberToTwoUp(item.price - Number(item.discountPrice))
|
|
|
|
+ }
|
|
|
|
+ })
|
|
if (index === -1) {
|
|
if (index === -1) {
|
|
this.orderAmount = this.orderAmount + item.salePrice
|
|
this.orderAmount = this.orderAmount + item.salePrice
|
|
this.selectGoods.push({
|
|
this.selectGoods.push({
|
|
@@ -679,7 +692,11 @@ export default defineComponent({
|
|
if (index !== -1) {
|
|
if (index !== -1) {
|
|
this.selectGoods.splice(index, 1)
|
|
this.selectGoods.splice(index, 1)
|
|
this.orderAmount = this.orderAmount - item.salePrice
|
|
this.orderAmount = this.orderAmount - item.salePrice
|
|
-
|
|
|
|
|
|
+ this.orderGoodsType.forEach((item: any)=> {
|
|
|
|
+ if(item.orderType !== 'DISCOUNT') {
|
|
|
|
+ item.price = item.basePrice
|
|
|
|
+ }
|
|
|
|
+ })
|
|
const typeIndex = tempType.findIndex((child: any) => child.orderType === item.vipType)
|
|
const typeIndex = tempType.findIndex((child: any) => child.orderType === item.vipType)
|
|
if(typeIndex !== -1) {
|
|
if(typeIndex !== -1) {
|
|
tempType.splice(typeIndex, 1)
|
|
tempType.splice(typeIndex, 1)
|