Blame view

src/views/inventory/adjustHeader/dialog/printDialog.vue 2.38 KB
yuanshuhui authored
1
2
3
4
5
<template>
  <el-dialog
    title="调整单打印"
    :visible.sync="visible"
    :showprint="showprint"
yuanshuhui authored
6
    width="800px"
yuanshuhui authored
7
8
9
    append-to-body
    @close="$emit('update:showprint', false)"
  >
yuanshuhui authored
10
11
12
13
14
15
16
17
    <div ref="print">
      <el-row>
        <el-col :span="10"
          ><div>{{ parseTime(printDate) }}</div></el-col
        >
        <el-col :span="4"><div class="ad-sheet">调整单</div></el-col>
        <el-col :span="10">
          <div class="pull-right">
yuanshuhui authored
18
            <barcode
yuanshuhui authored
19
20
21
22
23
24
25
26
27
              text="AD2020102300005"
              width="1"
              height="70"
              fontSize="12"
              marginTop="-30"
              format="code128"
            ></barcode>
          </div>
        </el-col>
yuanshuhui authored
28
      </el-row>
yuanshuhui authored
29
30
31
32
33
34
35
36
      <el-row class="no-print">
        <el-button
          size="mini"
          type="primary"
          icon="el-icon-printer"
          @click="print"
          class="pull-right"
          >打印</el-button
yuanshuhui authored
37
        >
yuanshuhui authored
38
39
      </el-row>
yuanshuhui authored
40
      <el-divider></el-divider>
yuanshuhui authored
41
42
43
44
45
46
47
48
49
50
51

      <el-table :data="detailList">
        <el-table-column label="容器" align="left" prop="companyCode" />
        <el-table-column label="明细id" align="left" prop="locationCode" />
        <el-table-column label="物料编码" align="left" prop="materialCode" />
        <el-table-column label="物料名称" align="left" prop="materialName" />
        <el-table-column label="系统数" align="left" prop="materialName" />
        <el-table-column label="实际数" align="left" prop="qty" />
        <el-table-column label="差异数" align="left" prop="materialUnit" />
        <el-table-column label="调整数" align="left" prop="materialUnit" />
        <el-table-column label="条码" align="left" prop="materialUnit" />
yuanshuhui authored
52
53
54
55
56
57
58
59
60
61
62
63
      </el-table>
    </div>
  </el-dialog>
</template>

<script>
export default {
  props: {
    showprint: {
      type: Boolean,
      default: false,
    },
yuanshuhui authored
64
65
66
    printlist: {
      type: Array,
    },
yuanshuhui authored
67
68
69
  },
  data() {
    return {
yuanshuhui authored
70
      printDate: new Date(),
yuanshuhui authored
71
      visible: this.showprint,
yuanshuhui authored
72
      detailList: this.printlist,
yuanshuhui authored
73
74
75
76
77
78
    };
  },
  watch: {
    showprint() {
      this.visible = this.showprint;
    },
yuanshuhui authored
79
80
81
82
83
84
85
86
87
    printlist() {
      this.detailList = this.printlist;
    },
  },

  methods: {
    print() {
      this.$print(this.$refs.print);
    },
yuanshuhui authored
88
89
90
91
92
  },
};
</script>

<style lang="scss" scoped>
yuanshuhui authored
93
94
.no-print {
  margin-top: 15px;
yuanshuhui authored
95
96
}
.ad-sheet {
yuanshuhui authored
97
  font-size: 22px;
yuanshuhui authored
98
99
100
  text-align: center;
}
</style>