zhaowei
8 天以前 86f0166e2a759e6ec2c34b0dd0b388bafa80cedd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<template>
  <a-modal :width="1000" :visible="visible" @cancel="handleCancel" centered>
 
    <div id="table1">
      <div class="table-header">
        <h3>数控加工程序确认表</h3>
        <div>
          <div>单位:<span>{{detail.unit}}</span></div>
          <div>编号:<span>{{detail.serialNumber}}</span></div>
        </div>
      </div>
 
      <table border="1">
        <tr>
          <th colspan="2">程序文件名</th>
          <td colspan="9">{{detail.docName}}</td>
        </tr>
 
        <tr>
          <th colspan="2">零件图号</th>
          <td colspan="4">{{detail.partsCode}}</td>
          <th>零件名称</th>
          <td colspan="4">{{detail.partsName}}</td>
        </tr>
 
        <tr>
          <th colspan="2">零件材料</th>
          <td colspan="4">{{detail.materielDesp}}</td>
          <th>夹具</th>
          <td colspan="4">{{detail.fixtureInformation}}</td>
        </tr>
 
        <tr>
          <th colspan="2">工序(工步号)</th>
          <td colspan="2">{{detail.processWorkCode}}</td>
          <th>加工批次</th>
          <td>{{detail.processingBatch}}</td>
          <th>加工数量</th>
          <td colspan="2">{{detail.processingQuantity}}</td>
          <th>加工设备</th>
          <td>{{detail.processingEquipment}}</td>
        </tr>
 
        <tr style="height: 500px">
          <td colspan="11">
            <img :src="getImageUrl(detail.picture)" width="300" height="300"/>
          </td>
        </tr>
 
        <tr style="height: 100px;">
          <th colspan="2" style="text-align: left">说明</th>
          <td colspan="9" style="text-align: left;white-space: pre-wrap" v-html="detail.remake"></td>
        </tr>
 
        <tr>
          <th colspan="2">编写/日期</th>
          <td colspan="2">{{detail.compiler_dictText}}/{{detail.compilerTime}}</td>
          <th>校对/日期</th>
          <td colspan="2">{{detail.proofreader_dictText}}/{{detail.proofreaderTime}}</td>
          <th colspan="2">操作者/首检日期</th>
          <td colspan="2">{{detail.operator_dictText}}/{{detail.inspectionTime}}</td>
        </tr>
 
        <tr style="height: 70px">
          <th colspan="7">{{detail.inspectionOpinion}}</th>
          <th colspan="2">审批/日期</th>
          <td colspan="2">{{detail.approver_dictText}}/{{detail.approverTime}}</td>
        </tr>
      </table>
    </div>
 
    <template slot="footer">
      <a-button type="primary" v-print="'#table1'">打印</a-button>
    </template>
  </a-modal>
</template>
 
<script>
  export default {
    name: 'GuideCardPrintModal',
    data() {
      return {
        visible: false,
        detail: {}
      }
    },
    methods: {
      getImageUrl(imgSrcSuffix) {
        return `${window._CONFIG['domianURL']}/${imgSrcSuffix}`
      },
 
      handleCancel() {
        this.visible = false
      }
    }
  }
</script>
 
<style scoped lang="less">
  .table-header {
    display: flex;
    flex-direction: column;
    align-items: center;
 
    > div {
      width: 100%;
      display: flex;
      justify-content: space-between;
      padding: 10px 5px;
    }
  }
 
  table {
    width: 100%;
    table-layout: fixed;
    text-align: center;
    font-size: 12px;
 
    th, td {
      padding: 10px 5px;
    }
  }
</style>