<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>
|