chenlu
2024-11-25 16a1240f5d47ca6b858d3a0d4a6aa0bf190069e0
打印流程卡调整
1个文件已修改
27 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -19,6 +19,8 @@
const details = ref([])
const user=userInfo()
let totalQuantity = 0;  // 用于记录总数量
let totalArea = 0;      // 用于记录总面积
const data = ref({
  printList: []
@@ -135,6 +137,7 @@
          //处理同配置打印
          handleGetQRCode()
          handleSummary()
          AreaQuantitySummary()
        } else {
          ElMessage.warning(res.msg)
          router.push("/login")
@@ -205,6 +208,20 @@
  }
}
const AreaQuantitySummary = () => {
  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;
      // 累加面积
      totalArea += produceList.value[i].detail[j].gross_area;
    }
  }
}
</script>
<template>
@@ -219,7 +236,15 @@
          <div>{{ company.companyName }}</div>
          <div>生产流程卡</div>
          <div  style="font-weight: bolder;display: flex;justify-content:space-between">
            <div>打印人:{{user.user.userName}} &nbsp;&nbsp;时间:{{formattedTime}}</div>
            <div>
              打印人:{{user.user.userName}} &nbsp;&nbsp;
              时间:{{formattedTime}}
              &nbsp;&nbsp;
              <span style="font-weight: bolder;" v-if="name=='金华福喜天成玻璃有限公司'">
                打印总数量:{{totalQuantity}}
              打印总面积:{{totalArea}}
              </span>
            </div>
            <div>
              <span v-if="name!='金华福喜天成玻璃有限公司'" style="font-size: 10px">{{itemFlow.otherRemarks}}</span>&nbsp;&nbsp;
              流程卡号: {{