综合办公系统
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

technicalPrint.vue 4.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. <template>
  2. <div>
  3. <div id="printTechnical">
  4. <h2 class="text-center title">技术交底记录表</h2>
  5. <table border="1">
  6. <tr>
  7. <td :colspan="1" class="fontbold">项目名称</td>
  8. <td :colspan="4">{{ form.projectName }}</td>
  9. <td :colspan="2" class="fontbold">项目编号</td>
  10. <td :colspan="2">{{ form.projectNumber }}</td>
  11. </tr>
  12. <tr>
  13. <td :colspan="1" class="fontbold">承担部门</td>
  14. <td :colspan="4">{{ getDeptNames(form.undertakingDept) }}</td>
  15. <td :colspan="2" class="fontbold">项目负责人</td>
  16. <td :colspan="2">{{ getUserName(form.projectLeader) }}</td>
  17. </tr>
  18. <tr>
  19. <td :colspan="1" class="fontbold">接受交底人</td>
  20. <td :colspan="8">{{ getUserName(form.disclosureAccepter) }}</td>
  21. </tr>
  22. <tr>
  23. <td :colspan="1" class="fontbold">技术交底内容</td>
  24. <td :colspan="8" style="white-space: pre-wrap;">{{ form.content }}</td>
  25. </tr>
  26. <tr>
  27. <td :colspan="1" class="fontbold">技术交底意见</td>
  28. <td :colspan="4">{{ form.disclosureComment }}</td>
  29. <td :colspan="2" style="text-align:left;min-width:120px;">签名:<span class="auditor">{{
  30. getUserName(form.disclosurer) }}</span></td>
  31. <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.disclosureTime }}</td>
  32. </tr>
  33. <tr>
  34. <td :colspan="1" class="fontbold">接受交底意见</td>
  35. <td :colspan="4">{{ form.acceptComment }}</td>
  36. <td :colspan="2" style="text-align:left;min-width:120px;">
  37. 签名:<span class="auditor">{{ getUserName(form.disclosureAccepter) }}</span>
  38. </td>
  39. <td :colspan="2" style="text-align:left;width:240px;">日期:{{ form.acceptTime }}</td>
  40. </tr>
  41. </table>
  42. </div>
  43. <div class="text-center mt20">
  44. <el-button type="primary" v-print="print">确认打印</el-button>
  45. <el-button @click="$emit('cancel')">取消</el-button>
  46. </div>
  47. </div>
  48. </template>
  49. <script>
  50. export default {
  51. props: {
  52. form: {
  53. type: Object
  54. }
  55. },
  56. data() {
  57. return {
  58. settleSum: {},
  59. deptSettleList: [],
  60. deductionsList: [],
  61. actualSumSettle: '',
  62. undertakingDept: [],
  63. print: {
  64. id: 'printTechnical',
  65. popTitle: '技术交底记录表', // 打印配置页上方标题
  66. extraHead: '', //最上方的头部文字,附加在head标签上的额外标签,使用逗号分隔
  67. preview: false, // 是否启动预览模式,默认是false(开启预览模式,可以先预览后打印)
  68. previewTitle: '', // 打印预览的标题(开启预览模式后出现),
  69. previewPrintBtnLabel: '', // 打印预览的标题的下方按钮文本,点击可进入打印(开启预览模式后出现)
  70. zIndex: '', // 预览的窗口的z-index,默认是 20002(此值要高一些,这涉及到预览模式是否显示在最上面)
  71. previewBeforeOpenCallback() { }, //预览窗口打开之前的callback(开启预览模式调用)
  72. previewOpenCallback() { }, // 预览窗口打开之后的callback(开启预览模式调用)
  73. beforeOpenCallback() { }, // 开启打印前的回调事件
  74. openCallback() { }, // 调用打印之后的回调事件
  75. closeCallback() { }, //关闭打印的回调事件(无法确定点击的是确认还是取消)
  76. url: '',
  77. standard: '',
  78. extraCss: ''
  79. }
  80. }
  81. },
  82. }
  83. </script>
  84. <style lang="scss" scoped>
  85. table {
  86. /*边框*/
  87. /* border: 1px solid black; */
  88. width: 90%;
  89. // text-align: center;
  90. border-collapse: collapse;
  91. margin: 0 auto;
  92. /*设置背景颜色*/
  93. /* background-color: #bfa; */
  94. td {
  95. padding: 5px;
  96. // line-height: 30px;
  97. }
  98. }
  99. .header {
  100. font-family: '黑体';
  101. font-size: 16px;
  102. font-weight: bold;
  103. line-height: 30px;
  104. }
  105. .bg {
  106. background-color: #eee;
  107. -webkit-print-color-adjust: exact;
  108. }
  109. .title {
  110. font-family: '黑体';
  111. font-size: 20px;
  112. font-weight: bold;
  113. line-height: 30px;
  114. }
  115. .fontbold {
  116. font-weight: bold;
  117. min-width: 150px;
  118. text-align: center;
  119. }
  120. .conment-width {
  121. // max-width: 200px;
  122. }
  123. @page {
  124. size: auto;
  125. /* 去除页脚 */
  126. margin-bottom: 0;
  127. // 横向A4
  128. // size:A4 landscape;
  129. }
  130. @media print {
  131. #print table {
  132. width: 100%;
  133. }
  134. }
  135. </style>