|
|
@@ -52,6 +52,7 @@ export default {
|
|
|
buyNum:'',
|
|
|
unitPrice:'',
|
|
|
unitType:0,
|
|
|
+ unitName:'',
|
|
|
//全选类型 0 数值全选 1 价格全选 2 没有任何全选
|
|
|
checkType:0,
|
|
|
bigStockNum:0,
|
|
|
@@ -72,8 +73,10 @@ export default {
|
|
|
this.smallStockNum = smallStockNum.toFixed(2)
|
|
|
this.smallStockNum = parseFloat(this.smallStockNum)
|
|
|
this.unitPrice = newData.bigPrice ? parseFloat(newData.bigPrice) : 0
|
|
|
+ this.unitName = newData.bigUnit
|
|
|
}else{
|
|
|
this.unitPrice = newData.price ? parseFloat(newData.price) : 0
|
|
|
+ this.unitName = '份';
|
|
|
}
|
|
|
},
|
|
|
deep:true,
|
|
|
@@ -144,6 +147,7 @@ export default {
|
|
|
this.customData.buyNum = this.buyNum
|
|
|
this.customData.unitPrice = this.unitPrice
|
|
|
this.customData.unitType = this.unitType
|
|
|
+ this.customData.unitName = this.unitName
|
|
|
this.$emit('confirmAddItemModel', this.customData)
|
|
|
this.checkType = 0
|
|
|
this.fillType = 0
|
|
|
@@ -151,6 +155,7 @@ export default {
|
|
|
changeUnitType(){
|
|
|
this.unitType = this.unitType == 0 ? 1 : 0
|
|
|
this.unitPrice = this.unitType == 0 ? this.customData.bigPrice : this.customData.smallPrice
|
|
|
+ this.unitName = this.unitType == 0 ? this.customData.bigUnit : this.customData.smallUnit
|
|
|
this.unitPrice = parseFloat(this.unitPrice)
|
|
|
}
|
|
|
}
|