|
|
@@ -68,8 +68,8 @@ export default {
|
|
|
if (this.selectList) {
|
|
|
for (const item of this.selectList) {
|
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
|
- if ( itemInfo && !this.$util.isEmpty(itemInfo.bigPrice)) {
|
|
|
- price += item.bigCount * Number(itemInfo.bigPrice);
|
|
|
+ if ( itemInfo && !this.$util.isEmpty(itemInfo.price)) {
|
|
|
+ price += item.bigCount * Number(itemInfo.price);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -80,13 +80,8 @@ export default {
|
|
|
if (this.selectList) {
|
|
|
for (const item of this.selectList) {
|
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
|
- if (
|
|
|
- itemInfo &&
|
|
|
- !this.$util.isEmpty(itemInfo.bigPrice) &&
|
|
|
- !this.$util.isEmpty(itemInfo.smallPrice)
|
|
|
- ) {
|
|
|
- price += item.bigCount * Number(itemInfo.bigPrice);
|
|
|
- price += item.smallCount * Number(itemInfo.smallPrice);
|
|
|
+ if ( itemInfo && !this.$util.isEmpty(itemInfo.price)) {
|
|
|
+ price += item.bigCount * Number(itemInfo.price);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -214,11 +209,12 @@ export default {
|
|
|
switchGlobalUnitType(){
|
|
|
if(this.globalUnitType == 0){
|
|
|
this.globalUnitType = 1
|
|
|
- this.customData.userPrice = parseFloat(this.customData.smallPrice)
|
|
|
+ let smallPrice = this.customData.smallPrice ? this.customData.smallPrice : 0
|
|
|
+ this.customData.userPrice = parseFloat(smallPrice)
|
|
|
this.customData.bigCount = null
|
|
|
}else{
|
|
|
this.globalUnitType = 0
|
|
|
- this.customData.userPrice = parseFloat(this.customData.bigPrice)
|
|
|
+ this.customData.userPrice = parseFloat(this.customData.price)
|
|
|
this.customData.smallCount = null
|
|
|
}
|
|
|
},
|