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

优化序列号打印

parent 4a3e73fc
...@@ -220,8 +220,9 @@ import {postPrintPdf} from "@/utils/ruoyi" ...@@ -220,8 +220,9 @@ import {postPrintPdf} from "@/utils/ruoyi"
handlePrint(){}, handlePrint(){},
printQrCode() { printQrCode() {
let detail = [] let detail = []
const promise = []
this.selectRow.forEach((s,i)=>{ this.selectRow.forEach((s,i)=>{
const res = updateQrcodeRecord({...s, ...{printTime: s.printTime + 1}}) promise.push(updateQrcodeRecord({...s, ...{printTime: s.printTime + 1}}))
detail.push({ detail.push({
"barcode": s.qrcode, "barcode": s.qrcode,
"showText" : '', "showText" : '',
...@@ -233,12 +234,16 @@ import {postPrintPdf} from "@/utils/ruoyi" ...@@ -233,12 +234,16 @@ import {postPrintPdf} from "@/utils/ruoyi"
"gp":i+1 "gp":i+1
}) })
}); });
Promise.all(promise).then(res => {
this.getList();
})
postPrintPdf( postPrintPdf(
"qrcode-50*50-2", "qrcode-50*50-2",
{ {
detail detail
} }
); );
}, },
/** 查询产品序列号打印记录列表 */ /** 查询产品序列号打印记录列表 */
getList() { getList() {
......
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