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

序列号打印

parent 6b98d008
...@@ -35,6 +35,15 @@ export function updateQrcodeRecord(data) { ...@@ -35,6 +35,15 @@ export function updateQrcodeRecord(data) {
}) })
} }
// 修改打印次数
export function editList(data) {
return request({
url: '/pro/qrcodeRecord/editList',
method: 'put',
data: data
})
}
// 删除产品序列号打印记录 // 删除产品序列号打印记录
export function delQrcodeRecord(recordId) { export function delQrcodeRecord(recordId) {
return request({ return request({
......
...@@ -290,6 +290,7 @@ import { ...@@ -290,6 +290,7 @@ import {
delQrcodeRecord, delQrcodeRecord,
addQrcodeRecord, addQrcodeRecord,
updateQrcodeRecord, updateQrcodeRecord,
editList
} from '@/api/mes/pro/qrcodeRecord' } from '@/api/mes/pro/qrcodeRecord'
import { postBatchPrintPdf } from '@/utils/ruoyi' import { postBatchPrintPdf } from '@/utils/ruoyi'
export default { export default {
...@@ -382,9 +383,7 @@ export default { ...@@ -382,9 +383,7 @@ export default {
this.$message.warning(this.$t('没有配置标签模版')) this.$message.warning(this.$t('没有配置标签模版'))
} }
this.selectRow.forEach((s, i) => { this.selectRow.forEach((s, i) => {
promise.push( promise.push(s.recordId)
updateQrcodeRecord({ ...s, ...{ printTime: s.printTime + 1 } })
)
detail.push({ detail.push({
detail: [{ detail: [{
barcode: s.qrcode, barcode: s.qrcode,
...@@ -395,7 +394,7 @@ export default { ...@@ -395,7 +394,7 @@ export default {
}) })
postBatchPrintPdf(this.selectRow[0].templateName, detail) postBatchPrintPdf(this.selectRow[0].templateName, detail)
if (promise.length > 0) { if (promise.length > 0) {
Promise.all(promise).then((res) => { editList(promise).then((res) => {
this.getList() this.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