Commit da76c127 authored by jingnan's avatar jingnan 👀

税率和含税单价 为0的时候,入库金额和入库单价及含税金额应该也是0,不能为空

parent 14431f53
...@@ -276,6 +276,9 @@ export default { ...@@ -276,6 +276,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -292,6 +295,9 @@ export default { ...@@ -292,6 +295,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -1955,7 +1961,7 @@ export default { ...@@ -1955,7 +1961,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2) taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { taxPrice: '' }) this.form = Object.assign({}, this.form, { taxPrice: 0 })
} }
// 入库单价=含税单价/(1+税率/100) // 入库单价=含税单价/(1+税率/100)
...@@ -1970,7 +1976,7 @@ export default { ...@@ -1970,7 +1976,7 @@ export default {
).toFixed(8) ).toFixed(8)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' }) this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
} }
// 入库金额=含税单价/(1+税率/100)* 入库数量 // 入库金额=含税单价/(1+税率/100)* 入库数量
...@@ -1986,7 +1992,7 @@ export default { ...@@ -1986,7 +1992,7 @@ export default {
).toFixed(2) ).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockPrice: '' }) this.form = Object.assign({}, this.form, { stockPrice: 0 })
} }
}, },
save() { save() {
......
...@@ -279,6 +279,9 @@ export default { ...@@ -279,6 +279,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -295,6 +298,9 @@ export default { ...@@ -295,6 +298,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -1958,7 +1964,7 @@ export default { ...@@ -1958,7 +1964,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2) taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { taxPrice: '' }) this.form = Object.assign({}, this.form, { taxPrice: 0 })
} }
// 入库单价=含税单价/(1+税率/100) // 入库单价=含税单价/(1+税率/100)
...@@ -1973,7 +1979,7 @@ export default { ...@@ -1973,7 +1979,7 @@ export default {
).toFixed(8) ).toFixed(8)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' }) this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
} }
// 入库金额=含税单价/(1+税率/100)* 入库数量 // 入库金额=含税单价/(1+税率/100)* 入库数量
...@@ -1989,7 +1995,7 @@ export default { ...@@ -1989,7 +1995,7 @@ export default {
).toFixed(2) ).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockPrice: '' }) this.form = Object.assign({}, this.form, { stockPrice: 0 })
} }
}, },
save() { save() {
...@@ -2023,11 +2029,11 @@ export default { ...@@ -2023,11 +2029,11 @@ export default {
'urgency': this.form.urgency, 'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo || '/', 'arrivedDrawNo': this.form.arrivedDrawNo || '/',
'arrivalVer': this.form.arrivalVer || '/', 'arrivalVer': this.form.arrivalVer || '/',
'stockUnitPrice': this.form.stockUnitPrice, 'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate, 'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice, 'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice, 'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice, 'taxPrice': this.form.taxPrice || 0,
'storageZoneName': this.form.storageZoneName, 'storageZoneName': this.form.storageZoneName,
'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone, 'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter', 'storageZoneIdType': 'ExtDxProductWorkCenter',
......
...@@ -277,6 +277,9 @@ export default { ...@@ -277,6 +277,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -293,6 +296,9 @@ export default { ...@@ -293,6 +296,9 @@ export default {
isVirtualFlag = true isVirtualFlag = true
this.$set(this.form, 'taxRate', 0) this.$set(this.form, 'taxRate', 0)
this.$set(this.form, 'taxUnitPrice', 0) this.$set(this.form, 'taxUnitPrice', 0)
!this.form.stockUnitPrice && this.$set(this.form, 'stockUnitPrice', 0)
!this.form.stockPrice && this.$set(this.form, 'stockPrice', 0)
!this.form.taxPrice && this.$set(this.form, 'taxPrice', 0)
} else { } else {
isVirtualFlag = false isVirtualFlag = false
} }
...@@ -1945,7 +1951,7 @@ export default { ...@@ -1945,7 +1951,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2) taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { taxPrice: '' }) this.form = Object.assign({}, this.form, { taxPrice: 0 })
} }
// 入库单价=含税单价/(1+税率/100) // 入库单价=含税单价/(1+税率/100)
...@@ -1960,7 +1966,7 @@ export default { ...@@ -1960,7 +1966,7 @@ export default {
).toFixed(8) ).toFixed(8)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' }) this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
} }
// 入库金额=含税单价/(1+税率/100)* 入库数量 // 入库金额=含税单价/(1+税率/100)* 入库数量
...@@ -1976,7 +1982,7 @@ export default { ...@@ -1976,7 +1982,7 @@ export default {
).toFixed(2) ).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockPrice: '' }) this.form = Object.assign({}, this.form, { stockPrice: 0 })
} }
}, },
save() { save() {
...@@ -2011,11 +2017,11 @@ export default { ...@@ -2011,11 +2017,11 @@ export default {
'urgency': this.form.urgency, 'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo || '/', 'arrivedDrawNo': this.form.arrivedDrawNo || '/',
'arrivalVer': this.form.arrivalVer || '/', 'arrivalVer': this.form.arrivalVer || '/',
'stockUnitPrice': this.form.stockUnitPrice, 'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate, 'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice, 'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice, 'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice, 'taxPrice': this.form.taxPrice || 0,
'storageZoneName': this.form.storageZoneName, 'storageZoneName': this.form.storageZoneName,
'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone, 'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter', 'storageZoneIdType': 'ExtDxProductWorkCenter',
......
...@@ -741,7 +741,7 @@ export default { ...@@ -741,7 +741,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2) taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { taxPrice: '' }) this.form = Object.assign({}, this.form, { taxPrice: 0 })
} }
// 入库单价=含税单价/(1+税率/100) // 入库单价=含税单价/(1+税率/100)
...@@ -756,7 +756,7 @@ export default { ...@@ -756,7 +756,7 @@ export default {
).toFixed(8) ).toFixed(8)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' }) this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
} }
// 入库金额=含税单价/(1+税率/100)* 入库数量 // 入库金额=含税单价/(1+税率/100)* 入库数量
...@@ -772,7 +772,7 @@ export default { ...@@ -772,7 +772,7 @@ export default {
).toFixed(2) ).toFixed(2)
}) })
} else { } else {
this.form = Object.assign({}, this.form, { stockPrice: '' }) this.form = Object.assign({}, this.form, { stockPrice: 0 })
} }
}, },
save() { save() {
...@@ -800,11 +800,11 @@ export default { ...@@ -800,11 +800,11 @@ export default {
'urgency': this.form.urgency, 'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo, 'arrivedDrawNo': this.form.arrivedDrawNo,
'arrivalVer': this.form.arrivalVer, 'arrivalVer': this.form.arrivalVer,
'stockUnitPrice': this.form.stockUnitPrice, 'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate, 'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice, 'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice, 'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice, 'taxPrice': this.form.taxPrice || 0,
'storageZoneId': this.form.storageZone, 'storageZoneId': this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter', 'storageZoneIdType': 'ExtDxProductWorkCenter',
'inventoryReqId': this.basicData.rows.id, 'inventoryReqId': this.basicData.rows.id,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment