<script setup>
|
import request from "@/utils/request"
|
import {ElDatePicker, ElMessage} from "element-plus"
|
import {nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, watch} from "vue"
|
import {Search} from "@element-plus/icons-vue"
|
import {useRouter} from 'vue-router'
|
import {changeFilterEvent, filterChanged} from "@/hook"
|
import {useI18n} from 'vue-i18n'
|
import deepClone from "@/utils/deepClone";
|
import QRCode from "qrcode";
|
import companyInfo from "@/stores/sd/companyInfo";
|
import userInfo from "@/stores/userInfo"
|
//语言获取
|
const company = companyInfo()
|
const {t} = useI18n()
|
let router = useRouter()
|
let produceList = ref([])
|
let count = ref([{id:1},{id:2}])
|
let list = ref()
|
const details = ref([])
|
const user=userInfo()
|
const name1=ref("admin")
|
const name2=ref("admin")
|
|
const data = ref({
|
printList: []
|
})
|
|
let props = defineProps({
|
printList: null,
|
})
|
|
const {currentRoute} = useRouter()
|
const route = currentRoute.value
|
|
|
data.value.printList = JSON.parse(props.printList)
|
|
onMounted(() => {
|
selectPrint()
|
}
|
)
|
|
|
onUpdated(() => {
|
const element = document.getElementById('my-paragraph');
|
if (element) {
|
console.log(element.style.height)
|
}
|
});
|
|
const selectPrint = () => {
|
request.post(`/finishedGoodsInventory/getSelectPrints`, data.value).then((res) => {
|
if (res.code == 200) {
|
console.log(res.data.data)
|
produceList.value = deepClone(res.data.data)
|
} else {
|
ElMessage.warning(res.msg)
|
router.push("/login")
|
}
|
})
|
}
|
|
</script>
|
|
<template>
|
<div>
|
|
<template v-for="(item,id) in produceList" :key="id">
|
<template v-for="(items,id) in count" :key="id">
|
<div style="width: 46%;" >
|
<div style="height: 100%;width: 100%;">
|
<table>
|
<thead>
|
<tr>
|
<td colspan="1" style="text-align: center;font-weight: bolder;">
|
<div style="width: 60px;height: 60px"><img id="img-pic" style="width:100%;height: 100%" src="@/assets/northGlass.ico" alt=""></div>
|
</td>
|
<td colspan="4" style="font-weight: bolder">
|
<div style="font-size: 18px;font-weight: bold;line-height: 15px;">洛阳北方玻璃技术股份有限公司<br>
|
<span style="font-size: 8px;"> LUOYANGNORTHGLASSTECHNOLOGYCO.,LTD.</span>
|
</div>
|
</td>
|
</tr>
|
<tr>
|
<td colspan="5" style="text-align: center;">
|
<div>(装箱单)</div>
|
</td>
|
</tr>
|
<tr style="width: 100%;" v-for="(itemFlow,index) in item.detail" :key="index">
|
<td colspan="5">
|
<div style="display:flex;">
|
<div style="width: 100%"><span style="font-weight: bold;">客户名称</span>:<input class="contactNumber" style="width: 60%;" type="text" v-model="itemFlow.customer_name" /></div>
|
</div>
|
<div style="display:flex;">
|
<div style="width: 100%"><span style="font-weight: bold">工程名称</span>:{{itemFlow.project}}</div>
|
</div>
|
<div style="display:flex;">
|
<div style="width: 50%"><span style="font-weight: bold">订单号</span>:{{itemFlow.order_id}}</div>
|
<div style="width: 50%"><span style="font-weight: bold">装箱单号</span>:{{itemFlow.remarks}}</div>
|
</div>
|
<div style="display:flex;">
|
<div style="width: 50%"><span style="font-weight: bold">包装日期</span>:{{itemFlow.reporting_work_time}}</div>
|
<div style="width: 50%"><span style="font-weight: bold">本架数量</span>:{{itemFlow.quantity}}</div>
|
</div>
|
<div style="display:flex;">
|
<div style="width: 50%"><span style="font-weight: bold">加工班组</span>:{{itemFlow.teams_groups_name2}}</div>
|
<div style="width: 50%"><span style="font-weight: bold">包装班组</span>:{{itemFlow.teams_groups_name}}</div>
|
</div>
|
<div style="display:flex;">
|
<div style="width: 50%"><span style="font-weight: bold">质量检验</span>:<input class="contactNumber" type="text" v-model="name1" /></div>
|
<div style="width: 50%"><span style="font-weight: bold">成品发货</span>:<input class="contactNumber" type="text" v-model="name2" /></div>
|
</div>
|
|
|
</td>
|
</tr>
|
<tr style="width: 100%;">
|
<td style="width: 20%;">编号</td>
|
<td style="width: 20%;">宽度</td>
|
<td style="width: 20%;">高度</td>
|
<td style="width: 20%;">片数</td>
|
<td style="width: 20%;">面积(m²)</td>
|
</tr>
|
<tr style="width: 100%;">
|
<td colspan="5" ><hr></td>
|
</tr>
|
</thead>
|
|
<tbody>
|
<template v-for="(itemDatile,index) in item.detailList" :key="index">
|
<tr style="width: 100%;">
|
<td colspan="1" style="font-weight: bold">加工品种:</td>
|
<td colspan="4"><el-input class="textarea" type="textarea" :autosize="{ minRows: 2, maxRows: 20 }" v-model="itemDatile.product_name"/></td>
|
</tr>
|
<template v-for="(item,index) in itemDatile.detailList" :key="index">
|
<tr style="width: 100%;margin-top: 20px">
|
<td style="font-size: 10px">{{ item.building_number }}</td>
|
<td style="font-weight: bold">{{ item.width }}</td>
|
<td style="font-weight: bold">{{ item.height }}</td>
|
<td style="font-weight: bold">{{ item.quantity }}</td>
|
<td>{{ item.area }}</td>
|
</tr>
|
</template>
|
</template>
|
|
<!-- <tr style="width: 100%;" v-for="(itemFlows,index) in item.detail" :key="index">
|
<td>合计</td>
|
<td></td>
|
<td></td>
|
<td>{{itemFlows.quantity}}</td>
|
<td>{{itemFlows.area}}</td>
|
</tr>-->
|
</tbody>
|
<tfoot >
|
|
<tr style="border: 0;font-size: 10px">
|
<td colspan="5" style="border: 0;">
|
<div style="display:flex;">
|
<div>地址:洛阳国家高新技术开发区张庄</div>
|
<div>电话:0379-64312861.64331830</div>
|
</div>
|
<div style="display:flex;">
|
<div>http://www.northglass.com</div>
|
<div>传真:0379-64332066</div>
|
</div>
|
<div style="display:flex;">
|
<div>E-mail:luoyang@northglass.com</div>
|
<div>邮编:471003</div>
|
</div>
|
|
</td>
|
</tr>
|
</tfoot>
|
</table>
|
</div>
|
</div>
|
<div class="element-to-break-after" v-if="items.id===1" ></div>
|
<div class="element-to-breakr" v-if="items.id===2" ></div>
|
</template>
|
|
|
</template>
|
</div>
|
|
</template>
|
|
<style scoped>
|
* {
|
margin: 0;
|
padding: 0;
|
}
|
|
.element-to-break-after {
|
width: 8%;
|
}
|
.element-to-breakr{
|
page-break-after: always;
|
}
|
#contentTable{
|
width: 100%;
|
height: 100%;
|
}
|
|
#record{
|
font-size: 15px;
|
text-align: left;
|
display: flex;
|
flex-wrap: wrap
|
}
|
|
table{
|
width: 100%;
|
}
|
|
@media print {
|
@page {
|
size: auto; /* auto is the initial value */
|
margin: 4mm 5mm 0mm 5mm /* this affects the margin in the printer settings */
|
|
}
|
|
thead{
|
display: table-header-group;
|
}
|
table {
|
page-break-inside: auto;
|
}
|
tr {
|
page-break-inside: avoid;
|
}
|
|
|
tfoot {
|
display: table-footer-group;
|
/* position: fixed;
|
width: 50%;
|
bottom: 0;
|
height: 100px;*/
|
}
|
|
}
|
|
.contactNumber{
|
width: 40%;
|
height:20px;
|
border: none;
|
box-shadow: none;
|
font-size: 15px;
|
}
|
|
.textarea{
|
--el-border-color: rgba(255,255,255,0.0);
|
--el-input-focus-border-color: rgba(255,255,255,0.0);
|
--el-input-focus-border-width: 0px;
|
--el-input-hover-border-color: rgba(255,255,255,0.0);
|
--el-input-hover-border-width: 0px;
|
}
|
|
</style>
|