廖井涛
2024-08-05 43e115a7de2c763c36d79e610a3abb1d833ea892
north-glass-erp/northglass-erp/src/views/pp/Replenish/PrintRepairProcess.vue
@@ -34,12 +34,37 @@
        if (res.code == 200) {
          produceList.value = deepClone(res.data.data)
          if (printMerge!==null && printMerge!==undefined && printMerge!==""){
          if (printMerge !== null && printMerge !== undefined && printMerge !== "") {
            produceList.value.forEach(item => {
              item.detail[0].technologyNumber = printMerge;
            });
          }
          let technologyNumberMerge = printMerge.split('').join(',');
          produceList.value[0].detail[0].technologyNumberMerge = technologyNumberMerge
          const s01Values = [];
          for (let i = 0; i < produceList.value.length; i++) {
            const s01Values = [];
            if (produceList.value[i].detailList[0].other_columns!=null
                || produceList.value[i].detailList[0].other_columns!=undefined){
              produceList.value[i].detailList.forEach(element => {
                const otherColumnsObject = JSON.parse(element.other_columns);
                const s01Value = otherColumnsObject.S01;
                s01Values.push(s01Value || ''); // 如果 S01 值为空,添加空字符串或者其他默认值
              });
              // 将 s01Values 中的值赋给每个订单详情对象的 s01Value 属性
              produceList.value[i].detailList.forEach((detail, index) => {
                detail.s01Value = index < s01Values.length ? s01Values[index] : ''; // 赋值给 s01Value 属性
              });
            }
          }
          handleGetQRCode()
        } else {
          ElMessage.warning(res.msg)
@@ -48,7 +73,6 @@
      })
    }
)
@@ -71,8 +95,6 @@
    }
  }
};
// 打印方法
@@ -120,10 +142,14 @@
      <thead>
      <tr v-for="(itemFlow,index) in item.detail" :key="index">
        <td colspan="24">
          <div id="bj" style="float: right;font-size: 28px">补&nbsp;{{ id + 1 }}</div>
          <div id="bj" style="float: right;font-size: 28px">补 {{ id + 1 }}</div>
          <div>天津北方玻璃技术股份有限公司</div>
          <div>生产流程卡</div>
          <div style="text-align: right;font-weight: bolder">流程卡号: {{
          <div v-if="itemFlow.technologyNumberMerge!=''" style="text-align: right;font-weight: bolder">流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumberMerge }} 共 {{ flowCardCount }} 架
          </div>
          <div v-else style="text-align: right;font-weight: bolder">流程卡号: {{
              itemFlow.process_id
            }}/{{ itemFlow.technologyNumber }} 共 {{ flowCardCount }} 架
          </div>
@@ -135,7 +161,7 @@
        <td class="tdNowrap">项目名称:</td>
        <td colspan="2">{{ items.project }}</td>
        <td class="tdNowrap">工艺流程:</td>
        <td colspan="16">{{ items.process }}</td>
        <td colspan="17">{{ items.process }}</td>
      </tr>
      <tr v-for="(itemTr,index) in item.detail" :key="index">
        <td class="tdNowrap">磨边类型:</td>
@@ -143,10 +169,11 @@
        <td class="tdNowrap">单片名称:</td>
        <td colspan="2">{{ itemTr.glass_child }}</td>
        <td class="tdNowrap">产品名称:</td>
        <td colspan="16">{{ itemTr.product_name }}</td>
        <td colspan="17">{{ itemTr.product_name }}</td>
      </tr>
      <tr>
        <td rowspan='2'>序号</td>
        <td rowspan='2'>编号</td>
        <td rowspan='2'>宽*高</td>
        <td rowspan='2'>数量</td>
        <td rowspan='2'>面积</td>
@@ -186,6 +213,7 @@
      <tr v-for="(itemDatile,index) in item.detailList" :key="index">
        <td>{{ itemDatile.order_number }}</td>
        <td>{{itemDatile.s01Value}}</td>
        <td>{{ itemDatile.child_width }}</td>
        <td class="item">{{ itemDatile.quantity }}</td>
        <td>{{ itemDatile.total_area }}</td>
@@ -216,9 +244,9 @@
          数量:
          <label>{{ itemsum.quantity }}</label>
          面积:
          <label>{{ parseFloat(itemsum.gross_area,2) }}</label>
          <label>{{ parseFloat(itemsum.gross_area.toFixed(2)) }}</label>
          重量:
          <label>{{ itemsum.weight }}</label>
          <label>{{ parseFloat(itemsum.weight.toFixed(2)) }}</label>
        </td>
      </tr>
      <tr v-for="(itemtextarea,index) in item.detail" :key="index">
@@ -242,9 +270,12 @@
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <tr>
        <td>生产日期</td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
@@ -280,15 +311,18 @@
        <td></td>
        <td></td>
        <td></td>
        <td></td>
      </tr>
      <tr v-for="(qrCodeItem,index) in item.detail" :key="index">
        <td colspan="19" >
        <td colspan="19">
          <span style="display: flex;">
            <span style="display: flex;width: 25%" v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index">
            <span v-for="(qrCodeItems,index) in qrCodeItem.qrcodeList" :key="index" style="display: flex;width: 35%">
            <div class='qrCode' style="width: 80px;height: 80px;">
            <img :src= qrCodeItems.qrcode>
            <img :src=qrCodeItems.qrcode>
          </div>
          <span style="float: left;font-weight: bolder">{{ qrCodeItem.process_id+"/"+qrCodeItems.technologyNumber }}</span>
          <span style="float: left;font-weight: bolder">{{
              qrCodeItem.process_id + "/" + qrCodeItems.technologyNumber
            }}</span>
          </span>
          </span>
        </td>