Browse Source

精度问题

hella_online_20240829
zhang_li 4 months ago
parent
commit
0d80d6f574
  1. 4
      src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

4
src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/labelForm.vue

@ -168,6 +168,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as defaultButtons from '@/utils/disposition/defaultButtons'
import * as accuracyFun from "@/utils/calculate"
const message = useMessage() // const message = useMessage() //
const { t } = useI18n() // const { t } = useI18n() //
@ -381,7 +382,8 @@ const submitForm = () => {
let obj = tableData.value.find((item) => { let obj = tableData.value.find((item) => {
item.allNumber = 0 item.allNumber = 0
item.packageList.forEach((cur) => { item.packageList.forEach((cur) => {
item.allNumber += parseFloat(cur.qtyOne) || 0 item.allNumber = accuracyFun.add(item.allNumber , parseFloat(cur.qtyOne)?parseFloat(cur.qtyOne):0)
// item.allNumber += parseFloat(cur.qtyOne) || 0
}) })
return item.allNumber != parseFloat(item.qty) return item.allNumber != parseFloat(item.qty)
}) })

Loading…
Cancel
Save