出库小数位处理
This commit is contained in:
@ -278,32 +278,32 @@
|
|||||||
|
|
||||||
if (formState.uomCode == 'GJ') {
|
if (formState.uomCode == 'GJ') {
|
||||||
if (!formState.qtyTon) {
|
if (!formState.qtyTon) {
|
||||||
formState.qtyTon = (Number(formState.rateTonGj) ? Number(formState.qtyGj || 0)/Number(formState.rateTonGj) : 0).toFixed(3)
|
formState.qtyTon = Number(formState.rateTonGj) ? Number(formState.qtyGj || 0)/Number(formState.rateTonGj) : 0
|
||||||
amountCount()
|
amountCount()
|
||||||
}
|
}
|
||||||
if (!formState.amount) {
|
if (!formState.amount) {
|
||||||
formState.amount = (Number(formState.qtyGj || 0)*Number(formState.priceGj || 0)).toFixed(2)
|
formState.amount = Number(formState.qtyGj || 0)*Number(formState.priceGj || 0)
|
||||||
amountCount()
|
amountCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (formState.uomCode == 'TON') {
|
if (formState.uomCode == 'TON') {
|
||||||
if (!formState.qtyGj) {
|
if (!formState.qtyGj) {
|
||||||
formState.qtyGj = (Number(formState.qtyTon || 0)*Number(formState.rateTonGj || 0)).toFixed(3)
|
formState.qtyGj = Number(formState.qtyTon || 0)*Number(formState.rateTonGj || 0)
|
||||||
amountCount()
|
amountCount()
|
||||||
}
|
}
|
||||||
if (!formState.amount) {
|
if (!formState.amount) {
|
||||||
formState.amount = (Number(formState.qtyTon || 0)*Number(formState.priceTon || 0)).toFixed(2)
|
formState.amount = Number(formState.qtyTon || 0)*Number(formState.priceTon || 0)
|
||||||
amountCount()
|
amountCount()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const amountCount = () => {
|
const amountCount = () => {
|
||||||
if (!formState.priceTon) {
|
if (!formState.priceTon) {
|
||||||
formState.priceTon = (Number(formState.qtyTon) ? Number(formState.amount || 0)/Number(formState.qtyTon) : 0).toFixed(4)
|
formState.priceTon = Number(formState.qtyTon) ? Number(formState.amount || 0)/Number(formState.qtyTon) : 0
|
||||||
}
|
}
|
||||||
if (!formState.priceGj) {
|
if (!formState.priceGj) {
|
||||||
formState.priceGj = (Number(formState.qtyGj) ? Number(formState.amount || 0)/Number(formState.qtyGj) : 0).toFixed(4)
|
formState.priceGj = Number(formState.qtyGj) ? Number(formState.amount || 0)/Number(formState.qtyGj) : 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const onSearchStation = (val)=> {
|
const onSearchStation = (val)=> {
|
||||||
@ -336,6 +336,11 @@
|
|||||||
await formRef.value.validateFields();
|
await formRef.value.validateFields();
|
||||||
let obj = {
|
let obj = {
|
||||||
...formState,
|
...formState,
|
||||||
|
qtyTon: formState.qtyTon ? formState.qtyTon.toFixed(3) : formState.qtyTon,
|
||||||
|
amount: formState.amount ? formState.amount.toFixed(2) : formState.amount,
|
||||||
|
qtyGj: formState.qtyGj ? formState.qtyGj.toFixed(3) : formState.qtyGj,
|
||||||
|
priceTon: formState.priceTon ? formState.priceTon.toFixed(4) : formState.priceTon,
|
||||||
|
priceGj: formState.priceGj ? formState.priceGj.toFixed(4) : formState.priceGj,
|
||||||
lngFileUploadList: dataFile.value,
|
lngFileUploadList: dataFile.value,
|
||||||
}
|
}
|
||||||
spinning.value = true;
|
spinning.value = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user