维修单,退料单,配件入库单,领料单,新购验收单打印样式修改

This commit is contained in:
hongchao 2025-01-23 14:56:11 +08:00
parent c3fb3c7d87
commit 8f931df1b8
7 changed files with 154 additions and 70 deletions

View File

@ -6,15 +6,16 @@
:title="dialogTitle" :title="dialogTitle"
:visible.sync="dialogShowFlag" :visible.sync="dialogShowFlag"
append-to-body append-to-body
width="1000px" width="1090px"
> >
<div id="printcontent" style="height: 600px;overflow-y: scroll;padding: 0 20px;"> <div id="printcontent" style="height: 600px;overflow-y: scroll;padding: 0 20px;">
<vue-easy-print tableShow ref="printRef"> <!-- <vue-easy-print tableShow ref="printRef"> -->
<div id="checkId">
<div style="text-align: center;font-weight: 600;font-size: 16px;"> <div style="text-align: center;font-weight: 600;font-size: 16px;">
机具设备退料单 机具设备退料单
</div> </div>
<div class="order_box"> <div class="info" style="margin-top: 10px; display: flex; align-items: center;">
<div class="order_box_one"> <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div> <div>
<span>工程名称</span><span>{{ rowObj.proName }}</span> <span>工程名称</span><span>{{ rowObj.proName }}</span>
</div> </div>
@ -22,7 +23,7 @@
<span>退料时间</span><span>{{ rowObj.createTime }}</span> <span>退料时间</span><span>{{ rowObj.createTime }}</span>
</div> </div>
</div> </div>
<div class="order_box_one"> <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;text-align: right;">
<div> <div>
<span>退料单位</span><span>{{ rowObj.unitName }}</span> <span>退料单位</span><span>{{ rowObj.unitName }}</span>
</div> </div>
@ -31,12 +32,13 @@
</div> </div>
</div> </div>
</div> </div>
<el-table :data="tableData" border style="width: 100%;margin-bottom: 10px;padding: 2px;"> <el-table :data="tableData" border style="width: 100%;">
<el-table-column label="编号" align="center" type="index" /> <el-table-column label="编号" align="center" type="index" width="60px"/>
<el-table-column label="物资类型" <el-table-column label="物资类型"
align="center" align="center"
prop="materialType" prop="materialType"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
width="120px"
/> />
<el-table-column <el-table-column
label="物资名称" label="物资名称"
@ -103,19 +105,21 @@
<span>制单</span> <span>制单</span>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
<div> <div>
<el-button type="primary" @click="print">打印</el-button> <el-button type="primary" @click="print">打印</el-button>
</div> </div>
</div> </div>
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
<div style="height: 500px;overflow-y: scroll;padding: 0 20px;"> <div style="height: 500px;overflow-y: scroll;padding: 0 20px;">
<vue-easy-print tableShow ref="remarksPrintRef"> <!-- <vue-easy-print tableShow ref="remarksPrintRef"> -->
<div id="checkIdTwo">
<div class="remarks_box"> <div class="remarks_box">
<div class="remarks_box_title">退料编码明细</div> <div class="remarks_box_title">退料编码明细</div>
</div> </div>
<div class="order_box"> <div class="info" style="margin-top: 10px; display: flex; align-items: center;">
<div class="order_box_one"> <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;">
<div> <div>
<span>工程名称</span><span>{{ rowObj.proName }}</span> <span>工程名称</span><span>{{ rowObj.proName }}</span>
</div> </div>
@ -123,7 +127,7 @@
<span>退料时间</span><span>{{ rowObj.createTime }}</span> <span>退料时间</span><span>{{ rowObj.createTime }}</span>
</div> </div>
</div> </div>
<div class="order_box_one"> <div class="item" style="width: 50%;flex-shrink: 0;margin-bottom: 5px;font-size: 14px;text-align: right;">
<div> <div>
<span>退料单位</span><span>{{ rowObj.unitName }}</span> <span>退料单位</span><span>{{ rowObj.unitName }}</span>
</div> </div>
@ -132,8 +136,8 @@
</div> </div>
</div> </div>
</div> </div>
<el-table :data="tableSubData" border style="width: 100%;margin-bottom: 10px;padding: 2px;"> <el-table :data="tableSubData" border style="width: 100%;">
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" width="60px"/>
<el-table-column prop="materialType" label="物资类型" align="center"> <el-table-column prop="materialType" label="物资类型" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="materialName" label="物资名称" align="center"> <el-table-column prop="materialName" label="物资名称" align="center">
@ -159,7 +163,8 @@
<span>制单</span> <span>制单</span>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div style="margin-top: 10px"> <div style="margin-top: 10px">
<el-button type="primary" @click="remarksPrint">打印</el-button> <el-button type="primary" @click="remarksPrint">打印</el-button>
@ -242,7 +247,14 @@ export default {
this.dialogShowFlag = false; this.dialogShowFlag = false;
}, },
print() { print() {
this.$refs.printRef.print(); // this.$refs.printRef.print();
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
console.log(this.rowObj) console.log(this.rowObj)
updatePrintStatus(this.rowObj.id).then(response => { updatePrintStatus(this.rowObj.id).then(response => {
if (response.code === 200) { if (response.code === 200) {
@ -261,27 +273,34 @@ export default {
this.open = true this.open = true
}, },
remarksPrint() { remarksPrint() {
this.$refs.remarksPrintRef.print(); // this.$refs.remarksPrintRef.print();
printJS({
printable: 'checkIdTwo',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.order_box { // .order_box {
display: flex; // display: flex;
flex-direction: column; // flex-direction: column;
.order_box_one { // .order_box_one {
width: 100%; // width: 100%;
display: flex; // display: flex;
align-content: center; // align-content: center;
justify-content: space-between; // justify-content: space-between;
margin-bottom: 10px; // margin-bottom: 10px;
:last-child { // :last-child {
margin-right: 20px; // margin-right: 20px;
} // }
} // }
} // }
.order_footer { .order_footer {
margin-top: 10px; margin-top: 10px;
display: flex; display: flex;

View File

@ -136,11 +136,12 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openPrint" :visible.sync="openPrint"
width="1100px" width="1090px"
append-to-body append-to-body
> >
<div style="height: 500px; overflow-y: scroll"> <div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div <div
class="title" class="title"
style="text-align: center; font-weight: 600; font-size: 16px" style="text-align: center; font-weight: 600; font-size: 16px"
@ -189,11 +190,11 @@
<el-table <el-table
:data="printTableData" :data="printTableData"
class="table" class="table"
style="margin-top: 20px; width: 1000px; padding-bottom: 1px" style="margin-top: 20px; width: 1000px; "
border border
> >
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" /> <el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
<el-table-column <el-table-column
label="配件类型" label="配件类型"
align="center" align="center"
@ -260,7 +261,8 @@
</div> </div>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
@ -439,7 +441,14 @@ import { getToken } from '@/utils/auth'
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print() // this.$refs.remarksPrintRef.print()
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
handleExport() { handleExport() {
this.download( this.download(

View File

@ -227,11 +227,12 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openPrint" :visible.sync="openPrint"
width="1100px" width="1090px"
append-to-body append-to-body
> >
<div style="height: 500px; overflow-y: scroll"> <div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div <div
class="title" class="title"
style="text-align: center; font-weight: 600; font-size: 16px" style="text-align: center; font-weight: 600; font-size: 16px"
@ -280,11 +281,11 @@
<el-table <el-table
:data="printTableData" :data="printTableData"
class="table" class="table"
style="margin-top: 20px; width: 1000px; padding-bottom: 1px" style="margin-top: 20px; width: 1000px; "
border border
> >
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" /> <el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
<el-table-column <el-table-column
label="配件类型" label="配件类型"
align="center" align="center"
@ -351,7 +352,8 @@
</div> </div>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
@ -366,6 +368,7 @@
<script> <script>
import { getListNewBuy, deletePartInfo, getInBoundForm } from '@/api/part/partArrived'; import { getListNewBuy, deletePartInfo, getInBoundForm } from '@/api/part/partArrived';
import vueEasyPrint from "vue-easy-print"; import vueEasyPrint from "vue-easy-print";
import printJS from 'print-js';
export default { export default {
name: "Home", name: "Home",
dicts: ["part_task_status"], dicts: ["part_task_status"],
@ -538,7 +541,14 @@ export default {
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print(); // this.$refs.remarksPrintRef.print();
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */

View File

@ -137,7 +137,8 @@
<!-- 领料单弹窗 --> <!-- 领料单弹窗 -->
<el-dialog :visible.sync="open" width="800px" :title="title" append-to-body> <el-dialog :visible.sync="open" width="800px" :title="title" append-to-body>
<div style="height: 500px; overflow-y: scroll; padding: 0 20px"> <div style="height: 500px; overflow-y: scroll; padding: 0 20px">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div class="title" style="text-align: center; font-weight: 600; font-size: 16px"> <div class="title" style="text-align: center; font-weight: 600; font-size: 16px">
领料单 领料单
</div> </div>
@ -160,8 +161,8 @@
</div> </div>
</div> </div>
<div style="width: 100%;margin-top: 20px;"> <div style="width: 100%;margin-top: 20px;">
<el-table :data="leaseApplyDetails" class="table" border style="padding: 2px;"> <el-table :data="leaseApplyDetails" class="table" border >
<el-table-column label="序号" align="center" type="index" /> <el-table-column label="序号" align="center" type="index" width="60px"/>
<el-table-column label="配件类型" align="center" prop="partType" /> <el-table-column label="配件类型" align="center" prop="partType" />
<el-table-column label="配件名称" align="center" prop="partName" /> <el-table-column label="配件名称" align="center" prop="partName" />
<el-table-column label="规格型号" align="center" prop="partModel" /> <el-table-column label="规格型号" align="center" prop="partModel" />
@ -206,7 +207,8 @@
</div> </div>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="print"> </el-button> <el-button type="primary" @click="print"> </el-button>
@ -289,7 +291,14 @@ export default {
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print(); // this.$refs.remarksPrintRef.print();
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {

View File

@ -128,9 +128,10 @@
/> />
<!-- 验收单弹窗 --> <!-- 验收单弹窗 -->
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body> <el-dialog :title="title" :visible.sync="openPrint" width="1090px" append-to-body>
<div style="height: 500px; overflow-y: scroll"> <div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;"> <div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">
机具设备到货验收单 机具设备到货验收单
</div> </div>
@ -149,9 +150,9 @@
<span>到货日期{{printData.arrivalDate}}</span> <span>到货日期{{printData.arrivalDate}}</span>
</div> </div>
</div> </div>
<el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;padding-bottom: 1px;" border> <el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;" border>
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" /> <el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
<el-table-column label="物资名称" align="center" prop="maTypeName"/> <el-table-column label="物资名称" align="center" prop="maTypeName"/>
<el-table-column label="规格型号" align="center" prop="typeName"/> <el-table-column label="规格型号" align="center" prop="typeName"/>
<el-table-column label="单位" align="center" prop="unitName"/> <el-table-column label="单位" align="center" prop="unitName"/>
@ -196,7 +197,8 @@
</div> --> </div> -->
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
@ -214,6 +216,7 @@
import { downloadFile } from '@/utils/download' import { downloadFile } from '@/utils/download'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'
import vueEasyPrint from "vue-easy-print"; import vueEasyPrint from "vue-easy-print";
import printJS from 'print-js';
export default { export default {
name: "GoodsAcceptList", name: "GoodsAcceptList",
dicts: ['purchase_task_status'], dicts: ['purchase_task_status'],
@ -360,7 +363,14 @@
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print() // this.$refs.remarksPrintRef.print()
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
handleExport() { handleExport() {
this.download( this.download(

View File

@ -134,9 +134,10 @@
/> />
<!-- 验收单弹窗 --> <!-- 验收单弹窗 -->
<el-dialog :title="title" :visible.sync="openPrint" width="1100px" append-to-body> <el-dialog :title="title" :visible.sync="openPrint" width="1090px" append-to-body>
<div style="height: 500px; overflow-y: scroll"> <div style="height: 500px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div class="title" style="text-align: center;font-weight: 600;font-size: 16px;"> <div class="title" style="text-align: center;font-weight: 600;font-size: 16px;">
机具设备到货验收单 机具设备到货验收单
</div> </div>
@ -155,9 +156,9 @@
<span>到货日期{{printData.arrivalDate}}</span> <span>到货日期{{printData.arrivalDate}}</span>
</div> </div>
</div> </div>
<el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;padding-bottom: 1px;" border> <el-table :data="printTableData" class="table" style="margin-top: 20px;width: 1000px;" border>
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="序号" align="center" type="index" row="2" /> <el-table-column label="序号" align="center" type="index" row="2" width="60px"/>
<el-table-column label="物资名称" align="center" prop="maTypeName"/> <el-table-column label="物资名称" align="center" prop="maTypeName"/>
<el-table-column label="规格型号" align="center" prop="typeName"/> <el-table-column label="规格型号" align="center" prop="typeName"/>
<el-table-column label="单位" align="center" prop="unitName"/> <el-table-column label="单位" align="center" prop="unitName"/>
@ -202,7 +203,8 @@
</div> --> </div> -->
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
@ -588,7 +590,14 @@ export default {
}, },
// //
print() { print() {
this.$refs.remarksPrintRef.print(); // this.$refs.remarksPrintRef.print();
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */

View File

@ -116,11 +116,12 @@
<el-dialog <el-dialog
:title="title" :title="title"
:visible.sync="openPrint" :visible.sync="openPrint"
width="1100px" width="1090px"
append-to-body append-to-body
> >
<div style="height: 600px; overflow-y: scroll"> <div style="height: 600px; overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRef" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRef" class="print"> -->
<div id="checkId">
<div <div
class="title" class="title"
style="text-align: center; font-weight: 600; font-size: 16px" style="text-align: center; font-weight: 600; font-size: 16px"
@ -214,7 +215,7 @@
<el-table <el-table
:data="repairTicketDevice" :data="repairTicketDevice"
class="table" class="table"
style="margin-top: 20px; width: 1000px; padding-bottom: 1px" style="margin-top: 20px; width: 1000px; "
border border
> >
<!-- <el-table-column type="selection" width="55" align="center" />--> <!-- <el-table-column type="selection" width="55" align="center" />-->
@ -281,7 +282,7 @@
<el-table <el-table
:data="repairTicketPart" :data="repairTicketPart"
class="table" class="table"
style="margin-top: 20px; width: 1000px; padding-bottom: 1px" style="margin-top: 20px; width: 1000px; "
border border
> >
<el-table-column label="修理项目" align="center" prop="repairName" > <el-table-column label="修理项目" align="center" prop="repairName" >
@ -339,7 +340,8 @@
</div> </div>
</div> </div>
</div> </div>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
@ -356,14 +358,15 @@
append-to-body append-to-body
> >
<div style="overflow-y: scroll"> <div style="overflow-y: scroll">
<vue-easy-print tableShow ref="remarksPrintRefView" class="print"> <!-- <vue-easy-print tableShow ref="remarksPrintRefView" class="print"> -->
<div id="checkIdTwo">
<div <div
class="title" class="title"
style="text-align: center; font-weight: 600; font-size: 16px; margin-bottom:20px" style="text-align: center; font-weight: 600; font-size: 16px; margin-bottom:20px"
> >
维修任务单编号明细 维修任务单编号明细
</div> </div>
<el-table :data="getListViewInfo" width="600px" height="450"> <el-table :data="getListViewInfo" width="100%" border>
<el-table-column align="center" label="序号" type="index" width="55" /> <el-table-column align="center" label="序号" type="index" width="55" />
<el-table-column <el-table-column
label="类型名称" label="类型名称"
@ -395,7 +398,8 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</vue-easy-print> </div>
<!-- </vue-easy-print> -->
</div> </div>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button type="primary" @click="printView"> </el-button> <el-button type="primary" @click="printView"> </el-button>
@ -661,12 +665,26 @@ export default {
// //
print() { print() {
this.$refs.remarksPrintRef.print(); // this.$refs.remarksPrintRef.print();
printJS({
printable: 'checkId',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
// //
printView() { printView() {
this.$refs.remarksPrintRefView.print(); // this.$refs.remarksPrintRefView.print();
printJS({
printable: 'checkIdTwo',
type: 'html',
targetStyles: ['*'],
maxWidth:'1400'
//
});
}, },
handleView(row){ handleView(row){