|
@@ -68,8 +68,9 @@ export default {
|
|
|
if (this.selectList) {
|
|
if (this.selectList) {
|
|
|
for (const item of this.selectList) {
|
|
for (const item of this.selectList) {
|
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
|
- if ( itemInfo && !this.$util.isEmpty(itemInfo.price)) {
|
|
|
|
|
- price += item.bigCount * Number(itemInfo.price);
|
|
|
|
|
|
|
+ if ( itemInfo && !this.$util.isEmpty(itemInfo.bigPrice) && !this.$util.isEmpty(itemInfo.smallPrice) ) {
|
|
|
|
|
+ price += item.bigCount * Number(itemInfo.bigPrice);
|
|
|
|
|
+ price += item.smallCount * Number(itemInfo.smallPrice);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -80,8 +81,13 @@ export default {
|
|
|
if (this.selectList) {
|
|
if (this.selectList) {
|
|
|
for (const item of this.selectList) {
|
|
for (const item of this.selectList) {
|
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
const itemInfo = this.getSelectItemById(item.id, item.classId);
|
|
|
- if ( itemInfo && !this.$util.isEmpty(itemInfo.price)) {
|
|
|
|
|
- price += item.bigCount * Number(itemInfo.price);
|
|
|
|
|
|
|
+ if (
|
|
|
|
|
+ itemInfo &&
|
|
|
|
|
+ !this.$util.isEmpty(itemInfo.bigPrice) &&
|
|
|
|
|
+ !this.$util.isEmpty(itemInfo.smallPrice)
|
|
|
|
|
+ ) {
|
|
|
|
|
+ price += item.bigCount * Number(itemInfo.bigPrice);
|
|
|
|
|
+ price += item.smallCount * Number(itemInfo.smallPrice);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -209,12 +215,11 @@ export default {
|
|
|
switchGlobalUnitType(){
|
|
switchGlobalUnitType(){
|
|
|
if(this.globalUnitType == 0){
|
|
if(this.globalUnitType == 0){
|
|
|
this.globalUnitType = 1
|
|
this.globalUnitType = 1
|
|
|
- let smallPrice = this.customData.smallPrice ? this.customData.smallPrice : 0
|
|
|
|
|
- this.customData.userPrice = parseFloat(smallPrice)
|
|
|
|
|
|
|
+ this.customData.userPrice = parseFloat(this.customData.smallPrice)
|
|
|
this.customData.bigCount = null
|
|
this.customData.bigCount = null
|
|
|
}else{
|
|
}else{
|
|
|
this.globalUnitType = 0
|
|
this.globalUnitType = 0
|
|
|
- this.customData.userPrice = parseFloat(this.customData.price)
|
|
|
|
|
|
|
+ this.customData.userPrice = parseFloat(this.customData.bigPrice)
|
|
|
this.customData.smallCount = null
|
|
this.customData.smallCount = null
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -470,7 +475,7 @@ export default {
|
|
|
if ( Number(bigCount) * ratio + Number(smallCount) > Number(item.bigNum) * ratio + Number(item.smallNum) ) {
|
|
if ( Number(bigCount) * ratio + Number(smallCount) > Number(item.bigNum) * ratio + Number(item.smallNum) ) {
|
|
|
list[index].bigCount = Number(item.bigNum);
|
|
list[index].bigCount = Number(item.bigNum);
|
|
|
list[index].smallCount = Number(item.smallNum);
|
|
list[index].smallCount = Number(item.smallNum);
|
|
|
- this.$msg("库存还剩 "+item.bigNum);
|
|
|
|
|
|
|
+ this.$msg("库存还剩"+item.bigNum);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|