Browse Source

打印历史记录 2022-05-15 sxm

master
[li_she] 4 years ago
parent
commit
17f93dbb54
  1. 5
      src/api/print/labelHist.js
  2. 209
      src/views/modules/labelPrint/label-hist.vue

5
src/api/print/labelHist.js

@ -0,0 +1,5 @@
import { createAPI } from "@/utils/httpRequest.js";
// 获取打印历史记录
export const getLabelPrintHistList = data => createAPI(`/labelHist/getLabelPrintHistList`,'post',data)

209
src/views/modules/labelPrint/label-hist.vue

@ -0,0 +1,209 @@
<template>
<div class="mod-oss">
<el-form inline="inline" label-position="top">
<el-form-item :label="'用户ID'">
<el-input v-model="query.userid"></el-input>
</el-form-item>
<el-form-item :label="'标签编号'">
<el-input v-model="query.reportid"></el-input>
</el-form-item>
<el-form-item :label="'卷号/订单号'">
<el-input v-model="query.keyinfo"></el-input>
</el-form-item>
<el-form-item :label="'打印功能'">
<el-input v-model="query.printfrom"></el-input>
</el-form-item>
<el-form-item :label="'创建日期'">
<el-date-picker value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" style="width: 120px;" v-model="query.startDate"></el-date-picker> -
<el-date-picker value-format="yyyy-MM-dd 00:00:00" format="yyyy-MM-dd" style="width: 120px;" v-model="query.endDate"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button style="margin-top: 22px" @click="getDataList()" type="primary">{{ buttons.select }}</el-button>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="dataList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
v-for="(item,index) in columnList" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:min-width="item.columnWidth"
:show-tooltip-when-overflow="true"
:label="item.columnLabel">
<template slot-scope="scope">
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {
getLabelPrintHistList
} from '@/api/print/labelHist.js';
export default {
data() {
return {
height: 365,
dataListLoading: true,
dataList: [],
query:{
startDate:'',
endDate:'',
userid:'',
printfrom: '',
keyinfo:'',
reportid:'',
},
columnList: [
{
tableId: "common1001",
tableName: "common",
columnProp: "reportid",
columnLabel: "标签编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "printfrom",
columnLabel: "打印功能",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "keyinfo",
columnLabel: "卷号/订单号",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
}, {
tableId: "common1001",
tableName: "common",
columnProp: "userid",
columnLabel: "用户ID",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
},{
tableId: "common1001",
tableName: "common",
columnProp: "createdate",
columnLabel: "打印时间",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
},{
tableId: "common1001",
tableName: "common",
columnProp: "printdetail",
columnLabel: "打印内容备注",
columnHidden: false,
columnImage: false,
columnSortable: false,
columnWidth: null,
format: null,
functionId: this.$route.meta.menuId,
sortLv: 0,
status: true,
fixed: false,
serialNumber: null,
columnType: null,
align: null
},
],
buttons: {
settingPrint: "设置打印机",
operate: "操作",
select: "查询",
},
buttonList: []
}
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 150;
})
},
activated() {
this.getDataList()
},
methods: {
//
getDataList() {
getLabelPrintHistList(this.query).then(({data}) =>{
this.dataList = data.dataList
this.dataListLoading = false
})
},
},
created() {
}
}
</script>
Loading…
Cancel
Save