Commit da76c127 authored by jingnan's avatar jingnan 👀

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

parent 14431f53
......@@ -276,6 +276,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -292,6 +295,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -1955,7 +1961,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { taxPrice: '' })
this.form = Object.assign({}, this.form, { taxPrice: 0 })
}
// 入库单价=含税单价/(1+税率/100)
......@@ -1970,7 +1976,7 @@ export default {
).toFixed(8)
})
} else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' })
this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
}
// 入库金额=含税单价/(1+税率/100)* 入库数量
......@@ -1986,7 +1992,7 @@ export default {
).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { stockPrice: '' })
this.form = Object.assign({}, this.form, { stockPrice: 0 })
}
},
save() {
......
......@@ -279,6 +279,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -295,6 +298,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -1958,7 +1964,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { taxPrice: '' })
this.form = Object.assign({}, this.form, { taxPrice: 0 })
}
// 入库单价=含税单价/(1+税率/100)
......@@ -1973,7 +1979,7 @@ export default {
).toFixed(8)
})
} else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' })
this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
}
// 入库金额=含税单价/(1+税率/100)* 入库数量
......@@ -1989,7 +1995,7 @@ export default {
).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { stockPrice: '' })
this.form = Object.assign({}, this.form, { stockPrice: 0 })
}
},
save() {
......@@ -2023,11 +2029,11 @@ export default {
'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo || '/',
'arrivalVer': this.form.arrivalVer || '/',
'stockUnitPrice': this.form.stockUnitPrice,
'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice,
'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice,
'taxPrice': this.form.taxPrice || 0,
'storageZoneName': this.form.storageZoneName,
'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter',
......
......@@ -277,6 +277,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -293,6 +296,9 @@ export default {
isVirtualFlag = true
this.$set(this.form, 'taxRate', 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 {
isVirtualFlag = false
}
......@@ -1945,7 +1951,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { taxPrice: '' })
this.form = Object.assign({}, this.form, { taxPrice: 0 })
}
// 入库单价=含税单价/(1+税率/100)
......@@ -1960,7 +1966,7 @@ export default {
).toFixed(8)
})
} else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' })
this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
}
// 入库金额=含税单价/(1+税率/100)* 入库数量
......@@ -1976,7 +1982,7 @@ export default {
).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { stockPrice: '' })
this.form = Object.assign({}, this.form, { stockPrice: 0 })
}
},
save() {
......@@ -2011,11 +2017,11 @@ export default {
'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo || '/',
'arrivalVer': this.form.arrivalVer || '/',
'stockUnitPrice': this.form.stockUnitPrice,
'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice,
'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice,
'taxPrice': this.form.taxPrice || 0,
'storageZoneName': this.form.storageZoneName,
'storageZoneId': typeof (this.form.storageZone) === 'object' ? this.form.storageZone.id : this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter',
......
......@@ -741,7 +741,7 @@ export default {
taxPrice: (this.form.taxUnitPrice * this.form.reqAmount).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { taxPrice: '' })
this.form = Object.assign({}, this.form, { taxPrice: 0 })
}
// 入库单价=含税单价/(1+税率/100)
......@@ -756,7 +756,7 @@ export default {
).toFixed(8)
})
} else {
this.form = Object.assign({}, this.form, { stockUnitPrice: '' })
this.form = Object.assign({}, this.form, { stockUnitPrice: 0 })
}
// 入库金额=含税单价/(1+税率/100)* 入库数量
......@@ -772,7 +772,7 @@ export default {
).toFixed(2)
})
} else {
this.form = Object.assign({}, this.form, { stockPrice: '' })
this.form = Object.assign({}, this.form, { stockPrice: 0 })
}
},
save() {
......@@ -800,11 +800,11 @@ export default {
'urgency': this.form.urgency,
'arrivedDrawNo': this.form.arrivedDrawNo,
'arrivalVer': this.form.arrivalVer,
'stockUnitPrice': this.form.stockUnitPrice,
'stockUnitPrice': this.form.stockUnitPrice || 0,
'taxRate': this.form.taxRate,
'stockPrice': this.form.stockPrice,
'stockPrice': this.form.stockPrice || 0,
'taxUnitPrice': this.form.taxUnitPrice,
'taxPrice': this.form.taxPrice,
'taxPrice': this.form.taxPrice || 0,
'storageZoneId': this.form.storageZone,
'storageZoneIdType': 'ExtDxProductWorkCenter',
'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