Commit b9eb8954 authored by 沈翠玲's avatar 沈翠玲

序列号打印

parent e664eaf8
......@@ -88,7 +88,7 @@
plain
icon="el-icon-print"
size="mini"
@click="handlePrint"
@click="printQrCode"
v-hasPermi="['pro:qrcodeRecord:print']"
>打印</el-button>
</el-col>
......@@ -102,7 +102,7 @@
<el-table-column label="产品名称" align="center" prop="itemName" />
<el-table-column label="客户名称" align="center" prop="clientName" />
<el-table-column label="产品描述" align="center" prop="itemDesc" />
<el-table-column label="序列号" align="center" prop="clientCode" />
<el-table-column label="序列号" align="center" prop="qrcode" />
<el-table-column label="创建日期" align="center" prop="createTime" />
<el-table-column label="打印次数" align="center" prop="printTime" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
......@@ -173,7 +173,8 @@
</template>
<script>
import { listQrcodeRecord, getQrcodeRecord, delQrcodeRecord, addQrcodeRecord, updateQrcodeRecord } from "@/api/mes/pro/qrcodeRecord";
import { listQrcodeRecord, getQrcodeRecord, delQrcodeRecord, addQrcodeRecord, updateQrcodeRecord } from "@/api/mes/pro/qrcodeRecord";
import {postPrintPdf} from "@/utils/ruoyi"
export default {
name: "QrcodeRecord",
......@@ -183,6 +184,7 @@
loading: true,
// 选中数组
ids: [],
selectRow: [],
// 非单个禁用
single: true,
// 非多个禁用
......@@ -216,6 +218,28 @@
},
methods: {
handlePrint(){},
printQrCode() {
let detail = []
this.selectRow.forEach((s,i)=>{
const res = updateQrcodeRecord({...s, ...{printTime: s.printTime + 1}})
detail.push({
"barcode": s.qrcode,
"showText" : '',
"gp": i+1
})
detail.push({
"barcode": s.qrcode,
"showText" : '',
"gp":i+1
})
});
postPrintPdf(
"qrcode-50*50-2",
{
detail
}
);
},
/** 查询产品序列号打印记录列表 */
getList() {
this.loading = true;
......@@ -249,6 +273,7 @@
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.recordId)
this.selectRow = selection;
this.single = selection.length!==1
this.multiple = !selection.length
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment