|
@@ -0,0 +1,144 @@
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="visible"
|
|
|
+ append-to-body
|
|
|
+ width="297mm"
|
|
|
+ >
|
|
|
+ <pdf-exporter ref="pdfExporter" id="tag-purchase-order-export-pdf" class="flex column layout-gap" style="min-height:100%;height:600px;margin:0 calc(var(--layout-gap) * -1);padding:var(--layout-gap);color:#000000;">
|
|
|
+ <LogoImageView></LogoImageView>
|
|
|
+ <div class="text-center" style="font-size:16px;font-weight:600;">标签采购订单</div>
|
|
|
+ <div class="flex valign-center">
|
|
|
+ <div>采购单编号:</div>
|
|
|
+ <VueBarcode v-if="data" :value="data.orderNo" format="CODE128" :height="40" :font-size="14"></VueBarcode>
|
|
|
+ </div>
|
|
|
+ <div style="width:100%;">
|
|
|
+ <table cellspacing="0" cellpadding="0" border="0" class="origin-table">
|
|
|
+ <colgroup>
|
|
|
+ <col />
|
|
|
+ <col width="200" />
|
|
|
+ <col />
|
|
|
+ <col />
|
|
|
+ <col />
|
|
|
+ <col />
|
|
|
+ </colgroup>
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th><div class="cell">序号</div></th>
|
|
|
+ <th><div class="cell">标签类型</div></th>
|
|
|
+ <th><div class="cell">需采购数量(个)</div></th>
|
|
|
+ <th><div class="cell">总价(元)</div></th>
|
|
|
+ <th><div class="cell">采购人员</div></th>
|
|
|
+ <th><div class="cell">采购日期</div></th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody>
|
|
|
+ <tr v-if="data">
|
|
|
+ <td align="center"><div class="cell">{{ 1 }}</div></td>
|
|
|
+ <td align="center"><div class="cell">{{ data. tagTypeName}}</div></td>
|
|
|
+ <td align="center"><div class="cell">{{ data. number}}</div></td>
|
|
|
+ <td align="center"><div class="cell">{{ data. amount}}</div></td>
|
|
|
+ <td align="center"><div class="cell">{{ data. buyerName}}</div></td>
|
|
|
+ <td align="center"><div class="cell">{{ data. formatDataTime}}</div></td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ <td><div class="cell"></div></td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+ <div class="flex-1 fit-size order-table-footer" style="padding:0 40px;">
|
|
|
+ <label>制单人:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>日期:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>需求单位物资部门(签章):</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>日期:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>签收人:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>日期:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>现场交接人:</label>
|
|
|
+ <div></div>
|
|
|
+
|
|
|
+ <label>日期:</label>
|
|
|
+ <div></div>
|
|
|
+ </div>
|
|
|
+ </pdf-exporter>
|
|
|
+
|
|
|
+ <template #footer>
|
|
|
+ <div class="flex center dialog-footer">
|
|
|
+ <el-button
|
|
|
+ @click="onCloseBtnClick"
|
|
|
+ >关闭</el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="onExportPdfBtnClick"
|
|
|
+ >导出</el-button>
|
|
|
+
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ @click="onPrintBtnClick"
|
|
|
+ >打印</el-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import BasePage from '@@/utils/BasePage'
|
|
|
+
|
|
|
+import VueBarcode from 'vue-barcode'
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: 'DialogTagPurchaseOrderExport',
|
|
|
+ extends: BasePage,
|
|
|
+ components: {
|
|
|
+ VueBarcode
|
|
|
+ },
|
|
|
+ data: () => ({
|
|
|
+ visible: false,
|
|
|
+ data: null
|
|
|
+ }),
|
|
|
+ methods: {
|
|
|
+ open (data) {
|
|
|
+ this.data = data
|
|
|
+ this.visible = true
|
|
|
+ },
|
|
|
+ async onExportPdfBtnClick () {
|
|
|
+ const { data } = this
|
|
|
+ await this.$refs.pdfExporter.export(`标签采购订单_${data.orderNo}_${data.buyerName}`)
|
|
|
+ this.close()
|
|
|
+ },
|
|
|
+ close () {
|
|
|
+ this.visible = false
|
|
|
+ },
|
|
|
+ onCloseBtnClick () {
|
|
|
+ this.close()
|
|
|
+ },
|
|
|
+ onPrintBtnClick () {
|
|
|
+ this.$refs.pdfExporter.print()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+.order-table-footer {
|
|
|
+ display: grid;
|
|
|
+ grid-template-columns: repeat(4, max-content auto);
|
|
|
+}
|
|
|
+</style>
|