喷印条码数据
This commit is contained in:
parent
61575da250
commit
14bb48dedd
|
|
@ -31,13 +31,14 @@
|
|||
</div>
|
||||
|
||||
<div style="margin: 9px;width:300px;display: flex;">
|
||||
<a-input v-model="addText" /> <a-button style="margin-left: 4px;" @click.stop="pageAdd()">增加条码</a-button>
|
||||
<a-input v-model="searchKey" /> <a-button style="margin-left: 4px;" @click.stop="pageSearch()">搜索</a-button>
|
||||
<a-button style="margin-left: 4px;" @click.stop="pageAdd()">新增</a-button>
|
||||
</div>
|
||||
<vxe-table border show-overflow keep-source ref="xTable" :height="table1Height" :data="detailsData"
|
||||
:row-config="{ height: 120 }" :column-config="{ resizable: true }">
|
||||
|
||||
|
||||
<vxe-column field="fileName" title="条码编号" width="160"></vxe-column>
|
||||
<vxe-column field="fileName" title="条码编号" width="180"></vxe-column>
|
||||
<vxe-column field="print_statistics" title="打印次数" width="100"></vxe-column>
|
||||
<vxe-column title="获取打印统计" width="150">
|
||||
<template #default="{ row }">
|
||||
|
|
@ -86,9 +87,9 @@ export default {
|
|||
|
||||
actions: {
|
||||
get: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/inkjet/printer/list`,
|
||||
getFiles: `${BASE_URL.BASE_URL}/InkjetPrinter/v1/tplus/text`
|
||||
getFiles: `http://36.133.149.247:9112/api/tp/getSqList`
|
||||
},
|
||||
|
||||
searchKey: '',
|
||||
currentPrint: null,
|
||||
table1Height: 300,
|
||||
addText: '',
|
||||
|
|
@ -113,7 +114,7 @@ export default {
|
|||
],
|
||||
|
||||
detailsData: [
|
||||
{ fileName: '080142-690844XAB', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
|
@ -140,6 +141,7 @@ export default {
|
|||
url: this.actions.getFiles,
|
||||
loading: "加载中...",
|
||||
data: {
|
||||
key: this.searchKey
|
||||
}
|
||||
}).then(a => {
|
||||
|
||||
|
|
@ -147,17 +149,24 @@ export default {
|
|||
|
||||
let ds = [];
|
||||
let textList = a.textList || a.data.textList || [];
|
||||
textList.forEach(text => {
|
||||
ds.push({ fileName: text, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 })
|
||||
textList.forEach(item => {
|
||||
ds.push({ fileName: item.sequance, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 })
|
||||
});
|
||||
|
||||
this.detailsData = ds;
|
||||
}
|
||||
});
|
||||
},
|
||||
pageSearch() {
|
||||
|
||||
this.filesInit();
|
||||
|
||||
|
||||
},
|
||||
pageAdd() {
|
||||
|
||||
this.detailsData = [...this.detailsData, { fileName: this.addText || '', x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }]
|
||||
|
||||
this.detailsData = [...this.detailsData, { fileName: this.searchKey, x: 0, y: 0, direction: 0, fontName: 'Arial', fontSize: 100, fontSpacing: 10 }];
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue