廖井涛
13 小时以前 f7a2fcdda7f1120498c5c5f75c5a99955fc54b43
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<script setup>
import request from "@/utils/request"
import {computed, onMounted, ref} from "vue"
import PrintFoot from "@/components/sd/order/PrintFoot.vue"
import companyInfo from "@/stores/sd/companyInfo"
import deepClone from "@/utils/deepClone";
import {ElMessage} from "element-plus";
import useUserInfoStore from "@/stores/userInfo";
import {Bottom, Burger, Food} from "@element-plus/icons-vue";
const company = companyInfo()
const userStore = useUserInfoStore()
const username = userStore.user.userName
let dialogVisible = ref(false)
 
 
let props = defineProps({
  materialOutboundId:null
})
let productId=ref({
 
})
let createOutbound = ref({})
let createOutboundDetail = ref({})
let materialStore= ref([])
const getData = () => {
  console.log(props.materialOutboundId)
  request.get(`/materialInventory/printCreateOutbound/${props.materialOutboundId}`).then(res => {
    createOutbound.value=res.data.createOutbound
    createOutboundDetail.value=res.data.createOutboundDetail
    console.log(createOutbound.value)
    console.log(createOutboundDetail.value)
    materialStore.value=[]
    for (let i=0;i< createOutboundDetail.value.length;i++){
      materialStore.value[i]=(createOutboundDetail.value[i])
      materialStore.value[i].json=(JSON.parse(createOutboundDetail.value[i].json))
 
    }
    console.log(materialStore.value)
 
  })
}
 
 
 
 
onMounted(() => {
  getData()
})
 
 
const printSheet = () => {
}
 
 
 
 
defineExpose({
  printSheet
});
</script>
 
 
<template>
 
  <div id="sheet" @dblclick="handleDoubleClick" >
    <table style="border-style: none;" >
      <thead>
      <tr class="title-s">
        <th colspan="6">
          <h1>
            {{ company.companyName }}
          </h1>
        </th>
      </tr>
 
      <tr class="title-s">
        <th colspan="1" style="width: 30%"></th>
        <th colspan="4" style="width: 40%;">
          <h3 >物料出库单</h3>
        </th>
        <th colspan="1" style="width: 30%;">出库单号:<span>{{ createOutbound.material_outbound_id }}</span></th>
      </tr>
      <tr>
        <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="1">
          领料日期:<span>{{ createOutbound.material_requisition_date }}</span></th>
        <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="1">
          领料员:<span>{{ createOutbound.material_requisition_personnel }}</span></th>
        <th style="text-align: left;border:none;font-weight: bold;font-size: 17px;" colspan="2">
          领料班组:<span>{{ createOutbound.material_requisition_team }}</span></th>
        <th style="text-align: center;border:none;font-weight: bold;font-size: 17px;" colspan="2">
          销售单号:<span>{{ createOutbound.order_id }}</span></th>
      </tr>
 
      </thead>
      <tr style="border-style: none">
        <td colspan="6" style="border-style: none">
          <table style="border-style: none;width: 100%;height: 100%">
              <thead>
              <tr>
                <th style="width: 15%;font-weight: bold;">物料编码</th>
                <th style="width: 25%;font-weight: bold;" >物料名称</th>
                <th style="width: 15%;font-weight: bold;" >宽</th>
                <th style="width: 15%;font-weight: bold;">高</th>
                <th style="width: 15%;font-weight: bold;">数量</th>
                <th style="width: 15%;font-weight: bold;" >产地</th>
              </tr>
              </thead>
 
              <tr class="day-in" v-for="(items, index1) in materialStore" :key="index1">
                <td>{{items.materialCode}}</td>
                <td>{{items.json.name }}</td>
                <td>{{items.json.width}}</td>
                <td>{{items.json.height}}</td>
                <td>{{items.outboundQuantity }}</td>
                <td>{{items.producer}}</td>
              </tr>
 
 
 
 
            <tfoot style="border: 0">
 
            <tr class="day-in" style="border: 0;">
              <td colspan="6" style="border: 0;">
                <div style="display:flex;">
                  <div style="width: 15%">仓管员:{{ createOutbound.warehouse_manager }}</div>
                  <div style="width: 25%">制单日期:{{ createOutbound.create_time }}</div>
                  <div style="width: 15%">审核员:{{ createOutbound.reviewed }}</div>
                  <div style="width: 25%">审核日期:{{ createOutbound.reviewed_time }}</div>
                  <div style="width: 15%">打印人:{{ username }}</div>
                </div>
 
 
              </td>
            </tr>
            </tfoot>
          </table>
        </td>
      </tr>
 
 
 
 
 
 
    </table>
 
 
 
  </div>
 
 
</template>
 
<style scoped>
h1,h3{
  left:0;
  right:0;
  top:0;
  bottom:0;
  margin:auto;
}
h1{
  font-size: 1.5rem;
}
h3{
  font-size: 1.2rem;
  font-weight: bolder;
}
 
 
table{
  border-collapse: collapse;
  width: 100%;
  text-align: center;
}
tr,td,th{
  border: 1px solid black;
}
 
th,.no-change-row {
  white-space: nowrap;
}
 
.title-1{
  width: 76px;
}
.title-s,.title-s th{
  border:0
}
 
.hr-border{
  height: 2px;
  width: 100%;
  background-color: black;
  color: black;
}
table {
  border-collapse: collapse;
  width: 100%;
 
}
td > table {
  margin: 0;
  padding: 0;
}
.day-in{
  height: 30px;
}
 
 
 
</style>