廖井涛
2024-11-27 d61be83018956c6132c5aba6c1cecf57ba6e06cc
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -10,6 +10,7 @@
import QRCode from "qrcode";
import companyInfo from "@/stores/sd/companyInfo";
import userInfo from "@/stores/userInfo"
import {add} from '@/utils/decimal'
//语言获取
const company = companyInfo()
const {t} = useI18n()
@@ -196,7 +197,7 @@
      totalQuantity += collection.quantity * 1;
      //每个序号面积
      collection.total_area = parseFloat((collection.width * collection.height * collection.quantity / 1000000).toFixed(2))
      totalArea += collection.total_area * 1;
      totalArea = add(totalArea, collection.total_area)
      totalWeight += collection.width * collection.height * collection.quantity / 1000000 * collection.separation * 2.5 * 1;
      //每个序号周长
      collection.perimeter = parseFloat(((collection.width * 2 + collection.height * 2) * collection.quantity / 1000).toFixed(3))
@@ -210,14 +211,14 @@
const AreaQuantitySummary = () => {
  console.log(produceList.value)
  for (let i = 0; i < produceList.value.length; i++) {
    // 遍历当前项目的 detail 数组
    for (let j = 0; j < produceList.value[i].detail.length; j++) {
      // 累加数量
      totalQuantity += produceList.value[i].detail[j].quantity;
      totalQuantity = add(totalQuantity,produceList.value[i].detail[j].quantity)
      // 累加面积
      totalArea += produceList.value[i].detail[j].gross_area;
      totalArea = add(totalArea,produceList.value[i].detail[j].gross_area)
    }
  }
@@ -316,7 +317,7 @@
          数量:
          <label>{{ itemsum.quantity }}</label>
          面积:
          <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label>
          <label>{{ itemsum.gross_area }}</label>
          重量:
          <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label>
        </td>