<template>
  <div class="productOrderSpecification">
    <table border class="form-header font-size-16" style="table-layout: fixed;width: 100%;border:1px solid #000000;font-size:14px;line-height: 25px;    margin: 8px 10px 5px 10px;">
      <!--  -->
      <tr height="30" class="color000">
        <td colspan="6" align="center"><img width="140" src="@/assets/logo/logo.png" alt=""></td>
        <td colspan="18" align="center"><div class="titles">广州市宝绅科技应用有限公司</div>Guangzhou Baoshen Science & Applied Technologies Co., Ltd.</td>
      </tr>
      <tr height="35" class="color000">
        <td colspan="24" align="center"><div class="titles" style="line-height: 40px;height:40px">原材料检验记录表({{body.vendorName}})</div></td>
      </tr>
      <tr height="20" class="color000">
        <td colspan="3" align="center">采购单号</td>
        <td colspan="3" align="center">{{ body.saleNo }}</td>
        <td colspan="2" align="center">送货数量</td>
        <td colspan="2" align="center">{{ body.quantity }}</td>
        <td colspan="2" align="center">不良品数</td>
        <td colspan="2" align="center" style="word-wrap:break-word;word-break:break-all">{{ body.quantityUnqualified }}</td>
        <td colspan="2" align="center">单位</td>
        <td colspan="2" align="center">{{ body.unit }}</td>
        <td colspan="2" align="center">报检日期</td>
        <td colspan="4" align="center">{{ body.checkTime }}</td>
      </tr>
      <tr height="20" class="color000">
        <td colspan="3" align="center">产品编号</td>
        <td colspan="5" align="center">{{ body.sapItemCode }}</td>
        <td colspan="2" align="center">产品名称</td>
        <td colspan="6" align="center">{{ body.itemName }}</td>
        <td colspan="2" align="center">供应商名称</td>
        <td colspan="6" align="center" style="word-wrap:break-word;word-break:break-all">{{ body.vendorName }}</td>
      </tr>

      <tr height="20" class="color000" style="font-weight: 400">
        <td colspan="1" align="center">序号</td>
        <td colspan="2" align="center">检验项目</td>
        <td colspan="15" align="center">检验标准</td>
        <td colspan="4" align="center">检验结果</td>
        <td colspan="2" align="center">判定</td>
      </tr>
      <tr height="20" v-for="(item,index) in body.lineList" :key="'processes' + index" class="color000">
        <td colspan="1" align="center">{{index + 1}}</td>
        <td colspan="2" align="center">{{item.qcTool}}</td>
        <td colspan="15" align="center">{{item.indexName}}</td>
        <td colspan="4" align="center">{{item.qualityCheckResults}} </td>
        <td colspan="2" align="center"><dict-tag :options="dict.type.ver_item_determination" :value="item.status" /></td>
      </tr>
      <tr height="40" class="color000">
        <td colspan="2" align="center">备注</td>
        <td colspan="22" align="center" style="word-wrap:break-word;word-break:break-all; height: 40px;line-height:15px;font-size: 13px">
          (1)品牌或客户指定材料供应商的，按照其标准或要求执行: (2)品牌或客户的标准高于内部标准的，按照品牌或客户的标准执行:<br>
          (3)品牌或客户无具体标准要求的，按照内部标准执行;(4)★表示月度抽检测试项目，※表示周抽检项目;●表示年度测试项目;
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
import dayjs from 'dayjs'
export default {
  props: ['iqcTable'],
  dicts: [
    "ver_item_determination",
  ],
  data() {
    return {
      date: dayjs().format('YYYY-MM-DD'),
//       body: {
//       "saleNo": "采购单号/purchaseOrderNo",
//       "quantity": "1",
//       "unit": "单位/baseunit",
//       "sapItemCode": "产品编码",
//       "vendorCode": "工银上编码",
//       "vendorName": "供应商名称/vendorName",
//       "logoUrl": "http://192.168.3.181:81/downdir/logo444.png",
//       "itemName": "产品名称",
//       "quantityUnqualified":"1",
//       "checkTime": "报检日期/提交时间",
//       "lineList": [
//             {
//                   "seqNo": "序号",
//                   "iqcItemName": "检验项目/qcIqcLineList.",
//                   "iqcItemBaseDesc": "检验标准/qcIqcLineList.",
//                   "checkResult": "检测结果/qcIqcLineList.",
//                   "checkStatus": "判定/qcIqcLineList."
//             }
//       ]
// }
    }
  },
  computed: {
    body (){
      return this.iqcTable
    }
  }
}
</script>

<style scoped lang="scss">
.productOrderSpecification{
  position: relative;
  width: 920px;
  height: 1300px;
  padding: 0 49px;
  padding-top:20px;
  box-sizing: border-box;

}
.titles{
  text-align: center;
  font-size:22px;
  font-weight: 500;
}
.pageBottom{
  display: flex;
  justify-content: flex-end;
  width: 850px;
  padding: 0px 49px;
  color: #000;
  div{
    margin-left:100px;
    min-width: 200px;
  }
}
[text-center]{
  text-align: center;
}
.color000{
  color: #000;
  td {
    word-wrap:break-word;
    word-break:break-all
  }
}
</style>

