chenlu
2025-07-30 e9f8d23f55f64903d834308f9f167aaf3195c20d
north-glass-erp/northglass-erp/src/components/pp/PrintProcessReplenish.vue
@@ -175,7 +175,6 @@
           flowCardCount=produceList.value.length
          handleSummary()
          handleGetQRCode()
        } else {
@@ -186,24 +185,44 @@
    }
)
const handleGetQRCode = async () => {
  let technologyNumber=''
  for (let i = 0; i < produceList.value.length; i++) {
    const technologyNumber = produceList.value[i].detail[0].mergeTechnologyNumber.toString(); // 转换为字符串以便处理每个字符
    produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code
    const detail = produceList.value[i].detail[0];
    const processId = detail.process_id;
    const mergeStr = detail.mergeTechnologyNumber?.toString() || '';
    const processId = produceList.value[i].detail[0].process_id;
    const url = `${processId}/${technologyNumber}`;
    // 生成 QR Code 并存储到数组中
    const qrcodeData = await QRCode.toDataURL(url);
    produceList.value[i].detail[0]["qrcodeList"].push({
      qrcode: qrcodeData,
      technologyNumber: technologyNumber
    });
    detail.qrcodeList = []; // 初始化
    for (let j = 0; j < mergeStr.length; j++) {
      const singleTech = mergeStr[j]; // 取出每一位字符
      const url = `${processId}/${singleTech}`;
      const qrcodeData = await QRCode.toDataURL(url);
      detail.qrcodeList.push({
        qrcode: qrcodeData,
        technologyNumber: singleTech
      });
    }
  }
};
// const handleGetQRCode = async () => {
//   let technologyNumber=''
//   for (let i = 0; i < produceList.value.length; i++) {
//
//     const technologyNumber = produceList.value[i].detail[0].technologyNumber.toString(); // 转换为字符串以便处理每个字符
//     produceList.value[i].detail[0]["qrcodeList"] = []; // 初始化一个空数组用来存储 QR Code
//     const merge = produceList.value[i].detail[0].mergeTechnologyNumber.toString();
//     const processId = produceList.value[i].detail[0].process_id;
//     const url = `${processId}/${technologyNumber}`;
//     // 生成 QR Code 并存储到数组中
//     const qrcodeData = await QRCode.toDataURL(url);
//     produceList.value[i].detail[0]["qrcodeList"].push({
//       qrcode: qrcodeData,
//       technologyNumber: technologyNumber
//     });
//   }
// };
//根据输入的数量重新汇总
@@ -265,7 +284,8 @@
        <td class="tdNowrap">客户名称:</td>
        <td colspan="2">{{ items.customer_name }}</td>
        <td class="tdNowrap">项目名称:</td>
        <td colspan="8" style="min-width: 300px;">{{ items.project }}</td>
        <td v-if="name=='洛阳北方玻璃技术股份有限公司'" colspan="4" style="min-width: 250px;">{{ items.projectBatch }}</td>
        <td v-else colspan="4" style="min-width: 250px;">{{ items.project }}</td>
        <td class="tdNowrap">工艺流程:</td>
        <td :colspan="2+item.processList.length*2"  style="width: 500px">{{ items.process }}</td>
      </tr>