Merge remote-tracking branch 'origin/master'

yangwl
zhaoxiaolin 2 months ago
commit 03d9240177

@ -0,0 +1,47 @@
import request from '@/utils/request'
// 查询自检互检列表
export function listSelfMutualInspection(query) {
return request({
url: '/mes/inspectionReport/selfMutualInspectionList',
method: 'get',
params: query
})
}
// 查询自检互检上方和下方数据
export function getSelfMutualInspectionData(query) {
return request({
url: '/mes/inspectionReport/selfMutualInspectionData',
method: 'get',
params: query
})
}
// 查询组线列表
export function getLineCodeList(query) {
return request({
url: '/mes/inspectionReport/getLineCodeList',
method: 'get',
params: query
});
}
// 查询首检左侧
export function listFirstInspectionLeft(query) {
return request({
url: '/mes/inspectionReport/listFirstInspectionLeft',
method: 'get',
params: query
})
}
// 查询首检右侧
export function listFirstInspectionRight(query) {
return request({
url: '/mes/inspectionReport/listFirstInspectionRight',
method: 'get',
params: query
})
}

@ -49,3 +49,19 @@ export function delDetailed(storageId) {
method: 'delete'
});
}
// 查询
export function BSKlist(data) {
return request({
url: '/wms/detailed/BSKlist',
method: 'post',
data: data
});
}
export function BSK(data) {
return request({
url: '/wms/detailed/BSK',
method: 'post',
data: data
});
}

@ -0,0 +1,576 @@
<template>
<div class="app-container">
<div id="table" v-show="showTable">
<el-form class="print-selfMutualInspection">
<el-row>
<el-col :span="5">
<img src="@/assets/logo/lanjv.png" class="lanju-logo" />
</el-col>
<el-col class="tittle-text" :span="14">
<span>中山榄菊日化实业有限公司</span>
</el-col>
<el-col :span="5"> </el-col>
</el-row>
<el-row>
<el-col class="tittle-text">
<span>产品首检记录表</span>
</el-col>
</el-row>
<br>
<el-row>
<el-col :span="9">
<div>生产车间:黑蚊香车间</div>
<br />
</el-col>
<el-col :span="9">
<div>产品名称: {{ headerParameters.productName }}</div>
<br />
</el-col>
<el-col :span="6">
<div>检查人: {{ headerParameters.checkPeople }}</div>
<br />
</el-col>
<el-col :span="9">
<div>
生产产线:
<el-select
v-model="headerParameters.lineCode"
filterable
placeholder="请选择产线"
style="width: 160px"
>
<el-option
v-for="item in lineCodeOption"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</div>
<br />
</el-col>
<el-col :span="9">
<div>
检查日期:
<el-date-picker
clearable
v-model="headerParameters.checkDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择检查日期"
>
</el-date-picker>
</div>
</el-col>
<el-col :span="6">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handlePrintPre"
>打印
</el-button>
</el-col>
</el-row>
</el-form>
<el-row>
<el-col :span="12">
<table class="bordered-table">
<tr>
<th v-for="item in leftTableTittle0" style="width:200px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in leftTableTittle" :key="item.key" :width = leftTableTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<!-- 动态渲染列名 -->
<th v-for="(index, key) in leftTableData[0]" :key="key">
{{ key }}
</th>
</tr>
<tr v-for="item in leftTableData" :key="item.id">
<!-- 动态渲染列值 -->
<td v-for="(value, key) in item" :key="key">{{ value }}</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = leftPropertyNum>{{ headerParameters.bz }}</td>
</tr>
</table>
<div>
备注:{{ headerParameters.remark }}
</div>
</el-col>
<el-col :span="12">
<table class="bordered-table">
<tr>
<th v-for="item in rightTableTittle0" style="width:200px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in rightTableTittle" :key="item.key" :width = rightTableTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<!-- 动态渲染列名 -->
<th v-for="(index, key) in rightTableData[0]" :key="key">
{{ key }}
</th>
</tr>
<tr v-for="item in rightTableData" :key="item.id">
<!-- 动态渲染列值 -->
<td v-for="(value, key) in item" :key="key">{{ value }}</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = rightPropertyNum>{{ headerParameters.bz }}</td>
</tr>
</table>
<div>
备注:{{ headerParameters.remark }}
</div>
</el-col>
</el-row>
</div>
<div id="printPage" v-show="showPrintPage">
<br />
<br />
<br />
<el-row>
<el-col :span="5">
<img src="@/assets/logo/lanjv.png" class="lanju-logo-print" />
</el-col>
<el-col class="tittle-text-print" :span="14">
<span>中山榄菊日化实业有限公司</span>
</el-col>
<el-col :span="5"> </el-col>
</el-row>
<el-row>
<el-col class="tittle-text-print">
<span>产品首检记录表</span>
</el-col>
</el-row>
<br>
<br>
<br>
<el-row>
<el-col :span="11">
<div class="text-print">生产车间:黑蚊香车间</div>
<br />
</el-col>
<el-col :span="8">
<div class="text-print" >生产产线: {{ headerParameters.lineCode }}</div>
<br />
</el-col>
<el-col :span="5">
<div class="text-print">检查人: {{ headerParameters.checkPeople }}</div>
<br />
</el-col>
<el-col :span="19">
<div class="text-print">产品名称: {{ headerParameters.productName }}</div>
<br />
</el-col>
<el-col :span="5">
<div class="text-print">检查日期: {{ headerParameters.checkDate }}</div>
<br />
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<table class="bordered-table-print" border="1">
<tr>
<th v-for="item in leftTableTittle0" style="width:200px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in leftTableTittle" :key="item.key" :width = leftPrintTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<th v-for="(index, key) in leftTableData[0]" :key="key">
{{ key }}
</th>
</tr>
<tr v-for="item in leftTableData" :key="item.id">
<td v-for="(value, key) in item" :key="key">{{ value }}</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = leftPropertyNum>{{ headerParameters.bz }}</td>
</tr>
</table>
<div>
备注:{{ headerParameters.remark }}
</div>
</el-col>
<el-col :span="12">
<table class="bordered-table-print" border="1">
<tr>
<th v-for="item in rightTableTittle0" style="width:200px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in rightTableTittle" :key="item.key" :width = rightPrintTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<th v-for="(index, key) in rightTableData[0]" :key="key">
{{ key }}
</th>
</tr>
<tr v-for="item in rightTableData" :key="item.id">
<td v-for="(value, key) in item" :key="key">{{ value }}</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = rightPropertyNum>{{ headerParameters.bz }}</td>
</tr>
</table>
<div>
备注:{{ headerParameters.remark }}
</div>
</el-col>
</el-row>
</div>
<!-- <el-table :data="tableData">
<el-table-column
v-for="(value, key) in tableData"
:key="key"
:prop="value"
:label="value"
>
</el-table-column>
</el-table>
--></div>
</template>
<script>
import {
listFirstInspectionLeft,
listFirstInspectionRight,
getSelfMutualInspectionData,
getLineCodeList,
} from "@/api/mes/selfMutualInspection";
export default {
name: "Item",
dicts: ["device_item_type", "device_loop_type"],
data() {
return {
printData: {
printable: "printPage",
ignore: ["no-print"],
},
lineCodeOption: [],
leftPropertyNum: null,
leftTableData: [],
leftTableTittle0: [],
leftTableTittle: [],
rightPropertyNum: null,
rightTableData: [],
rightTableTittle: [],
rightTableTittle0: [],
leftTableTittleWidth: null,
rightTableTittleWidth: null,
leftPrintTittleWidth: null,
rightPrintTittleWidth: null,
showPrintPage: false,
showTable: false,
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
title: "",
//
open: false,
//
queryParams: {},
//
headerParameters: {
productionWorkshop: null, //
reportName: 'ConversionReportRight', //
lineCode: null, //线
checkPeople: null, //
productName: null, //
checkDate: null, //
bz: null, //
remark: null, //
},
//
form: {},
//
rules: {},
};
},
created() {
// this.getDate();
this.getLineCode();
this.getList();
},
methods: {
//
handlePrintPre() {
this.showTable = false;//
this.showPrintPage = true;//
this.$nextTick(() => {
this.handlePrint()
})
},
//
handlePrint() {
printJS({
printable: this.printData.printable, // 'printPage', // id
type: this.printData.type || "html",
maxWidth: 1500, //
font_size: "", //
header: this.printData.header, // '',
targetStyles: ["*"],
style: "@page {margin:0 10mm};", // -
ignoreElements: this.printData.ignore || [], // ['no-print']
properties: this.printData.properties || null,
});
this.showTable = true;//
this.showPrintPage = false;//
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
if (this.headerParameters.lineCode == null) {
this.$modal.msg("您没有选择生产产线,请选择!");
} else if (this.headerParameters.checkDate == null) {
this.$modal.msg("您没有选择检查时间,请选择!");
} else {
this.getList();
}
},
getLineCode() {
getLineCodeList().then((response) => {
this.lineCodeOption = response;
});
},
/**获取默认查询时间段**/
// getDate() {
// let start = this.Fungetdate (0)
// this.headerParameters.checkDate = start;
// },
// Fungetdate (num) {
// var dd = new Date();
// dd.setDate(dd.getDate() + num);
// var y = dd.getFullYear();
// var m = dd.getMonth() + 1;//
// var d = dd.getDate();
// return y + "-" + m +"-"+d;
// },
/** 重置按钮操作 */
resetQuery() {
(this.headerParameters.productionWorkshop = null), //
(this.headerParameters.lineCode = null), //线
(this.headerParameters.checkPeople = null), //
(this.headerParameters.productName = null), //
(this.headerParameters.checkDate = null), //
(this.headerParameters.bz = null), //
(this.headerParameters.remark = null), //
// this.getDate();
this.getList();
},
/** 查询检查项维护列表 */
getList() {
this.showTable = true;//
this.showPrintPage = false;//
this.leftTableData = [];
this.leftTableTittle = [];
this.leftTableTittle0 = [];
getSelfMutualInspectionData(this.headerParameters).then((response) => {
this.headerParameters.checkPeople = response.createBy; //
this.headerParameters.productName = response.productName; //
this.headerParameters.remark = response.remark; //
this.headerParameters.bz = response.bz; //
//this.headerParameters.checkDate = response.checkDate
//线
});
listFirstInspectionLeft(this.headerParameters).then((response) => {
this.leftTableData = response;
this.leftPropertyNum = Object.keys(this.leftTableData[0]).length - 1; //
console.log('leftPropertyNum',this.leftPropertyNum);
this.leftTableTittleWidth = (440 / (this.leftPropertyNum)) + 'px';
this.leftPrintTittleWidth = (400 / (this.leftPropertyNum)) + 'px';
this.leftTableTittle0.push({
label: "项目",
key: 0,
});
for (let i = 0; i < this.leftPropertyNum; i++) {
this.leftTableTittle.push({
label: "检查时间",
key: i + 1,
});
}
});
this.rightTableData = [];
this.rightTableTittle = [];
this.rightTableTittle0 = [];
listFirstInspectionRight(this.headerParameters).then((response) => {
this.rightTableData = response;
this.rightPropertyNum = Object.keys(this.rightTableData[0]).length - 1; //
this.rightTableTittleWidth = (440 / (this.rightPropertyNum)) + 'px';
this.rightPrintTittleWidth = (400 / (this.leftPropertyNum)) + 'px';
this.rightTableTittle0.push({
label: "项目",
key: 0,
});
for (let i = 0; i < this.rightPropertyNum; i++) {
this.rightTableTittle.push({
label: "检查时间",
key: i + 1,
});
}
});
},
},
};
</script>
<style scoped>
.tittle-text {
text-align: center;
font-size: 30px;
font-weight: 800;
color: black;
}
.lanju-logo {
margin-top: 15px;
margin-left: 15px;
height: 50px;
}
.bordered-table {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 640px; /* 表格宽度 */
}
.bordered-table th,
.bordered-table td {
border: 1px solid #ddd; /* 边框样式 */
padding: 8px; /* 单元格内边距 */
text-align: center; /* 文本对齐 */
}
.bordered-table-bottom {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 640px; /* 表格宽度 */
}
.bordered-table-bottom td {
border: 1px solid #ddd; /* 边框样式 */
text-align: left; /* 文本对齐 */
width: 640px; /* 表格宽度 */
height: 35px; /* 表格高度 */
}
.bordered-table tr {
word-break:break-all;
word-wrap:break-word;
font-size: 12px;
border-collapse:collapse
}
/* 下面是和打印有关系的 */
.tittle-text-print {
text-align: center;
font-size: 50px;
font-weight: 800;
color: black;
}
.lanju-logo-print {
margin-top: 15px;
margin-left: 15px;
height: 75px;
}
.text-print {
text-align: left;
font-size: 20px;
color: black;
}
.bordered-table-print {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 600px; /* 表格宽度 */
}
.bordered-table-print td {
text-align: center; /* 文本对齐 */
}
.bordered-table-bottom-print {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 600px; /* 表格宽度 */
}
.bordered-table-bottom-print td{
text-align: left; /* 文本对齐 */
height: 35px; /* 表格宽度 */
width: 600px; /* 表格高度 */
}
.bordered-table-print tr {
word-break:break-all;
word-wrap:break-word;
font-size: 12px;
height: 35px; /* 表格高度 */
border-collapse:collapse
}
</style>

@ -0,0 +1,512 @@
<template>
<div class="app-container">
<div id="table" v-show="showTable">
<el-form class="print-selfMutualInspection">
<el-row>
<el-col :span="5">
<img src="@/assets/logo/lanjv.png" class="lanju-logo" />
</el-col>
<el-col class="tittle-text" :span="14">
<span>中山榄菊日化实业有限公司</span>
</el-col>
<el-col :span="5"> </el-col>
</el-row>
<el-row>
<el-col class="tittle-text">
<span>自检互检记录表</span>
</el-col>
</el-row>
<br>
<el-row>
<el-col :span="10">
<div>生产车间:黑蚊香车间</div>
<br />
</el-col>
<el-col :span="9">
<div>产品名称: {{ headerParameters.productName }}</div>
<br />
</el-col>
<el-col :span="5">
<div>检查人: {{ headerParameters.checkPeople }}</div>
<br />
</el-col>
<el-col :span="10">
<div>
生产产线:
<el-select
v-model="headerParameters.lineCode"
filterable
placeholder="请选择产线"
style="width: 160px"
>
<el-option
v-for="item in lineCodeOption"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</div>
<br />
</el-col>
<el-col :span="9">
<div>
检查日期:
<el-date-picker
clearable
v-model="headerParameters.checkDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择检查日期"
>
</el-date-picker>
</div>
</el-col>
<el-col :span="5">
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handlePrintPre"
>打印
</el-button>
</el-col>
</el-row>
</el-form>
<div>
<table class="bordered-table">
<tr>
<th v-for="item in tableTittle0" style="width:300px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in tableTittle" :key="item.key" :width = tableTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<!-- 动态渲染列名 -->
<th v-for="(index, key) in tableData[0]" :key="key">{{ key }}</th>
</tr>
<tr v-for="item in tableData" :key="item.id">
<!-- 动态渲染列值 -->
<td columnspan="1" v-for="(value, key) in item" :key="key">
{{ value }}
</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = propertyNum>{{ headerParameters.bz }}</td>
</tr>
<!-- <tr>
<td colspan = "1">备注</td>
<td :colspan = propertyNum>{{ headerParameters.remark }}</td>
</tr> -->
</table>
</div>
<br />
<div>
备注:{{ headerParameters.remark }}
</div>
</div>
<div id="printPage" v-show="showPrintPage">
<br />
<br />
<br />
<el-row>
<el-col :span="5">
<img src="@/assets/logo/lanjv.png" class="lanju-logo-print" />
</el-col>
<el-col class="tittle-text-print" :span="14">
<span>中山榄菊日化实业有限公司</span>
</el-col>
<el-col :span="5"> </el-col>
</el-row>
<el-row>
<el-col class="tittle-text-print">
<span>自检互检记录表</span>
</el-col>
</el-row>
<br />
<br />
<br />
<el-row>
<el-col :span="11">
<div class="text-print">生产车间:黑蚊香车间</div>
<br />
</el-col>
<el-col :span="9">
<div class="text-print">
生产产线: {{ headerParameters.lineCode }}
</div>
<br />
</el-col>
<el-col :span="4">
<div class="text-print">
检查人: {{ headerParameters.checkPeople }}
</div>
<br />
</el-col>
<el-col :span="20">
<div class="text-print">
产品名称: {{ headerParameters.productName }}
</div>
<br />
</el-col>
<el-col :span="4">
<div class="text-print">
检查日期: {{ headerParameters.checkDate }}
</div>
<br />
</el-col>
</el-row>
<row>
<el-col :span="24">
<table class="bordered-table-print" border="1">
<tr>
<th v-for="item in tableTittle0" style="width:300px" :key="item.key">
{{ item.label }}
</th>
<!-- 动态渲染列名 -->
<th v-for="item in tableTittle" :key="item.key" :width = tableTittleWidth >
{{ item.label }}
</th>
</tr>
<tr>
<th v-for="(index, key) in tableData[0]" :key="key">
{{ key }}
</th>
</tr>
<tr v-for="item in tableData" :key="item.id">
<td v-for="(value, key) in item" :key="key">{{ value }}</td>
</tr>
<tr>
<td colspan = "1">异常处理</td>
<td :colspan = propertyNum>{{ headerParameters.bz }}</td>
</tr>
<!-- <tr>
<td colspan = "1">备注</td>
<td :colspan = propertyNum>{{ headerParameters.remark }}</td>
</tr> -->
</table>
</el-col>
</row>
<div class="bottom-remark">
备注:{{ headerParameters.remark }}
</div>
</div>
<!-- <el-table :data="tableData">
<el-table-column
v-for="(value, key) in tableData"
:key="key"
:prop="value"
:label="value"
>
</el-table-column>
</el-table> -->
</div>
</template>
<script>
import {
listSelfMutualInspection,
getSelfMutualInspectionData,
getLineCodeList,
} from "@/api/mes/selfMutualInspection";
export default {
name: "Item",
dicts: ["device_item_type", "device_loop_type"],
data() {
return {
printData: {
printable: "printPage",
ignore: ["no-print"],
},
showPrintPage: false,
showTable: false,
lineCodeOption: [],
propertyNum: null,
tableTittle0: [],
tableTittle: [],
tableTittleWidth: null,
tableData: [],
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
title: "",
//
open: false,
//
queryParams: {},
//
headerParameters: {
reportName: "ConversionReport", //
productionWorkshop: null, //
lineCode: null, //线
checkPeople: null, //
productName: null, //
checkDate: null, //
bz: null, //
remark: null, //
},
//
form: {},
//
rules: {},
};
},
created() {
// this.getDate();
this.getLineCode();
this.getList();
},
methods: {
dynamicWidthStyle(){
return { width: `${1000 / this.propertyNum }px`}
},
//
handlePrintPre() {
this.showTable = false; //
this.showPrintPage = true; //
this.$nextTick(() => {
this.handlePrint();
});
},
//
handlePrint() {
printJS({
printable: this.printData.printable, // 'printPage', // id
type: this.printData.type || "html",
maxWidth: 1500, //
font_size: "", //
header: this.printData.header, // '',
targetStyles: ["*"],
style: "@page {margin:0 10mm};", // -
ignoreElements: this.printData.ignore || [], // ['no-print']
properties: this.printData.properties || null,
});
this.showTable = true; //
this.showPrintPage = false; //
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
if (this.headerParameters.lineCode == null) {
this.$modal.msg("您没有选择生产产线,请选择!");
} else if (this.headerParameters.checkDate == null) {
this.$modal.msg("您没有选择检查时间,请选择!");
} else {
this.getList();
}
},
getLineCode() {
getLineCodeList().then((response) => {
this.lineCodeOption = response;
});
},
/**获取默认查询时间段**/
// getDate() {
// let start = this.Fungetdate (0)
// this.headerParameters.checkDate = start;
// },
// Fungetdate (num) {
// var dd = new Date();
// dd.setDate(dd.getDate() + num);
// var y = dd.getFullYear();
// var m = dd.getMonth() + 1;//
// var d = dd.getDate();
// return y + "-" + m +"-"+d;
// },
/** 重置按钮操作 */
resetQuery() {
(this.headerParameters.productionWorkshop = null), //
(this.headerParameters.lineCode = null), //线
(this.headerParameters.checkPeople = null), //
(this.headerParameters.productName = null), //
(this.headerParameters.checkDate = null), //
(this.headerParameters.bz = null), //
(this.headerParameters.remark = null), //
// this.getDate();
this.getList();
},
/** 查询检查项维护列表 */
getList() {
this.showTable = true;//
this.showPrintPage = false;//
this.tableData = [];
this.tableTittle = [];
this.tableTittle0 = [];
this.propertyNum = null;
this.loading = true;
getSelfMutualInspectionData(this.headerParameters).then((response) => {
this.headerParameters.checkPeople = response.createBy; //
this.headerParameters.productName = response.productName; //
this.headerParameters.remark = response.remark; //
this.headerParameters.bz = response.bz; //
//this.headerParameters.checkDate = response.checkDate
//线
});
listSelfMutualInspection(this.headerParameters).then((response) => {
this.tableData = response;
console.log("this.tableData", this.tableData);
this.propertyNum = Object.keys(this.tableData[0]).length - 1; //
this.tableTittle0.push({
label: "项目",
key: 0,
});
for (let i = 0; i < this.propertyNum; i++) {
this.tableTittle.push({
label: "检查时间",
key: i + 1,
});
}
this.tableTittleWidth = (1000 / (this.propertyNum)) + 'px';
});
},
},
};
</script>
<style scoped>
.tittle-text {
text-align: center;
font-size: 25px;
font-weight: 800;
color: black;
}
.lanju-logo {
margin-top: 15px;
margin-left: 15px;
height: 50px;
}
.bordered-table {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 1300px; /* 表格宽度 */
}
.bordered-table th,
.bordered-table td {
border: 1px solid #ddd; /* 边框样式 */
padding: 8px; /* 单元格内边距 */
text-align: center; /* 文本对齐 */
}
.bordered-table tr {
word-break:break-all;
word-wrap:break-word;
border-collapse:collapse
}
.bordered-table-bottom {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 1300px; /* 表格宽度 */
}
.bordered-table-bottom td {
border: 1px solid #ddd; /* 边框样式 */
text-align: left; /* 文本对齐 */
width: 1300px; /* 表格宽度 */
}
/* 下面是和打印有关系的 */
.tittle-text-print {
text-align: center;
font-size: 40px;
font-weight: 800;
color: black;
}
.lanju-logo-print {
margin-top: 15px;
margin-left: 15px;
height: 75px;
}
.text-print {
text-align: left;
font-size: 20px;
color: black;
}
.bordered-table-print {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 1300px; /* 表格宽度 */
}
.bordered-table-print td {
text-align: center; /* 文本对齐 */
height: 30px; /* 表格高度 */
}
.bordered-table-bottom-print {
border-collapse: collapse; /* 确保边框合并为单一边框 */
width: 1300px; /* 表格宽度 */
}
.bordered-table-bottom-print td {
text-align: left; /* 文本对齐 */
height: 35px; /* 表格宽度 */
width: 1300px; /* 表格高度 */
}
.bottom-remark {
margin-top: 15px;
}
.bordered-table-print tr {
word-break:break-all;
word-wrap:break-word;
border-collapse:collapse
}
</style>

File diff suppressed because it is too large Load Diff

@ -0,0 +1,308 @@
<template>
<div class="app-container">
<el-dialog title="" :visible.sync="printDialogVisible" width="1000px">
<div>
<el-form inline label-width="80px">
<!-- <el-form-item label="补打板次" prop="factory">-->
<!-- <el-input v-model="idCardsNum" placeholder="请输入" style="width:100px"/>-->
<!-- </el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-check" circle @click="showSupplementPrint()"/>-->
<!-- <el-form-item label="增打批次" prop="batchCode">-->
<!-- <el-select-->
<!-- v-model="batchCode"-->
<!-- placeholder="请选择批次"-->
<!-- @change="$forceUpdate()"-->
<!-- clearable-->
<!-- style="width: 200px"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in batchCodeOption"-->
<!-- :key="item.batchCode"-->
<!-- :label="item.batchCode"-->
<!-- :value="item.batchCode"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="增打板次" prop="idCardsNumAdd">-->
<!-- <el-input v-model="idCardsNumAdd" placeholder="请输入" style="width:100px"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="增打数量" prop="batchQuantity">-->
<!-- <el-input v-model="batchQuantity" placeholder="请输入" style="width:100px"/>-->
<!-- </el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-check" circle @click="showAddPrint()"/>-->
</el-form>
</div>
<div id="printFrom" class="my-print-box">
<div v-for="(item, index) in printData.idCardList" :key="index">
<el-form class="print-card">
<el-row>
<el-col :span="7">
<img src="@/assets/logo/lanjv.png" class="report-logo" />
</el-col>
</el-row>
<el-row>
<el-col class="center-text">
<span>产品标识卡</span>
</el-col>
</el-row>
<div class="custom-divider"></div>
<el-row class="my-print-foot">
<el-col :offset="1" :span="13">
<div class="card-div2">产品名称: {{ item.productName }}</div><br />
<div class="card-div2">批次号: {{ item.batchCode }}</div><br />
<div class="card-div2">生产日期: {{ item.productDateStr }}</div><br />
<div class="card-div2">板次: {{ item.palletNo }}</div><br />
<div class="card-div2"><span>数量: {{ item.batchQuantity }}&nbsp;{{ item.unit }}</span>
<span style="margin-left: 15%;">子单数量: {{ item.umrez }}&nbsp;PC</span></div><br />
</el-col>
<el-col :offset="1" :span="9">
<canvas :id="'qrcode-' + index" class="qrcode"></canvas>
</el-col>
</el-row>
</el-form>
<div style="margin-top: 10px;">
<table align="center" border="1" cellpadding="0" cellspacing="0" width="820">
<tr class="tr-row"><td class="tr-row-1"></td><td class="tr-row-2"></td></tr>
<tr class="tr-row"><td class="tr-row-1"></td><td class="tr-row-2"></td></tr>
<tr class="tr-row"><td class="tr-row-1"></td><td class="tr-row-2"></td></tr>
</table>
</div>
<div v-if="(index + 1) % 1 === 0" class="print-page"></div>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="handlePrint(printData)"> </el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import QRCode from 'qrcode';
import {listDetailed, listDetailedunt,BSKlist,BSK} from "../../../api/wms/detailed";
export default {
name: "printID",
components: {
},
data() {
return {
idCardsNum: null,//
idCardsNumAdd: null,//
batchCode: null,//
batchQuantity: null,//
optType: undefined,
//
loading: true,
//
ids: [],
selectRow: {},
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
printDialogVisible: false,
//
printData: {
printable: "printFrom",
ignore: ["no-print"],
workCenter: "暂无数据",
factory: null,
idCardList: [],
//gridStyle:'border: 1px solid lightgray; margin-bottom: -1px;'
},
workorderCode: '',
workorderId: '',
batchCodeOption: [],
//
refreshWorkerTable: true,
//
rules: {
},
tableIndex: "tableIndex",
};
},
created() {
},
mounted() {
},
methods: {
init(workorderId){
this.workorderId = workorderId;
this.idCardsNum = null;
this.idCardsNumAdd = null;
this.batchCode = null;
this.batchQuantity = null;
this.showSupplementPrint();
},
//
// -
handlePrint(params) {
printJS({
printable: params.printable,
type: params.type || 'html',
maxWidth: 1500,
font_size: "", //
header: params.header, // '',
targetStyles: ['*'],
style: `
body { margin: 10mm; padding: 0; }
.print-page { page-break-after: always; }
`,
ignoreElements: params.ignore || [],
});
//
},
// --
async showSupplementPrint() {
console.log('执行了补充打印预览');
let params = {};
params.addFlag = '0'; //
params.workorderId = this.workorderId;
if(this.idCardsNum!=null){
params.palletNo = this.idCardsNum;
}
let response = await BSK({...params});
this.printData.idCardList = response;
this.$nextTick(() => {
this.printData.idCardList.forEach((item, index) => {
const canvas = document.getElementById('qrcode-' + index);
QRCode.toCanvas(canvas, item.palletCode, { width: 300 , margin:1 }, function (error) {
if (error) console.error(error);
console.log('success!');
});
});
})
},
// // -
// async showAddPrint() {
// console.log('');
// let params = {};
// if(this.idCardsNumAdd == null || this.batchCode == null || this.batchQuantity == null
// ||this.idCardsNumAdd == '' || this.batchCode == '' || this.batchQuantity == ''
// ){
// this.$modal.msg("");
// return;
// }else{
// //
// //
// params.batchCode = this.batchCode;//
// params.palletNo = this.idCardsNumAdd;//
// params.batchQuantity = this.batchQuantity;//
// params.addFlag = '1';//
// }
// let response = await getIdCardList({workorderCode:this.workorderCode,...params});
// this.printData.idCardList = response;
// if(this.printData.idCardList.length == 0){
// this.$modal.msg("");
// }else{
// this.$nextTick(() => {
// this.printData.idCardList.forEach((item, index) => {
// const canvas = document.getElementById('qrcode-' + index);
// QRCode.toCanvas(canvas, item.palletCode, { width: 300 , margin:1 }, function (error) {
// if (error) console.error(error);
// console.log('success!');
// });
// });
// })
// }
// }
},
};
</script>
<style scoped>
.print-btn {
margin-bottom: 15px;
margin-left: 10px;
}
.center-text {
text-align: center;
font-size: 50px;
font-weight: 800;
color: black;
}
.report-logo {
margin-top: 15px;
margin-left: 15px;
height: 70px;
}
.button-container {
text-align: right;
margin-top: 10px;
margin-right: 10px;
}
.my-print-table {
font-size: 20px;
}
.my-print-foot {
font-size: 17px;
}
.my-print-foot2 {
font-size: 19px;
}
.my-print-box{
width:100%
}
.custom-divider {
width: 100%;
height: 1px;
background-color: #a5a4a4 !important;
margin: 20px 0 !important;
-webkit-print-color-adjust: exact;
}
.print-page {
page-break-after: always;
}
@media print {
.custom-divider {
width: 100%;
height: 1px;
background-color: #a5a4a4 !important;
margin: 20px 0 !important;
-webkit-print-color-adjust: exact;
}
}
.card-div1{
font-size: 20px;
font-weight: 600;
padding-top: 14px;
}
.card-div2{
font-size: 25px;
font-weight: 700;
padding-top: 2px;
margin-left: 35px;
}
.tr-row {
height: 35px;
}
.tr-row-1 {
width: 246px;
}
.tr-row-2 {
width: 574px;
}
</style>
Loading…
Cancel
Save