5 changed files with 99 additions and 24 deletions
-
1src/api/board.js
-
1src/router/index.js
-
18src/views/modules/autoPrint/autoPrintStockHunlian.vue
-
91src/views/modules/autoPrint/autoPrintStockHunlianReturn.vue
-
12src/views/modules/print/print_inspect_labelForB.js
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<h1>自动打印库存标签</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
let autoPrint = '' //数据刷新定时器 |
||||
|
import { |
||||
|
getStockPrintListHunlianReturn, |
||||
|
updateStockPrintFlag |
||||
|
} from '@/api/board.js' |
||||
|
import { |
||||
|
printMaterialLabel, |
||||
|
} from "@/views/modules/print/print_stock_label.js" |
||||
|
import { |
||||
|
printMaterialLabelReturn, |
||||
|
} from "@/views/modules/print/print_stock_labelReturn.js" |
||||
|
import { |
||||
|
printMaterialLabelPreview, |
||||
|
} from "@/views/modules/print/print_stock_label_preview.js" |
||||
|
export default { |
||||
|
name: 'autoPrintStock', |
||||
|
data () { |
||||
|
return { |
||||
|
ip:this.$route.query.ip |
||||
|
} |
||||
|
}, |
||||
|
mounted () { |
||||
|
this.refreshTable () |
||||
|
}, |
||||
|
methods: { |
||||
|
refreshTable () { |
||||
|
autoPrint = setInterval(() => { |
||||
|
this.printStock() |
||||
|
}, 3000) |
||||
|
}, |
||||
|
printStock(){ |
||||
|
let ipp='no' |
||||
|
if(this.ip){ |
||||
|
ipp=this.ip |
||||
|
} |
||||
|
getStockPrintListHunlianReturn(ipp).then(({data}) => { |
||||
|
if (data.code == 0) { |
||||
|
if(data.rows8.length>0){ |
||||
|
let array8=[]; |
||||
|
for (let i = 0; i < data.rows8.length; i++) { |
||||
|
for (let j = 0; j <data.rows8[i].printQty ; j++) { |
||||
|
array8.push(data.rows8[i]) |
||||
|
} |
||||
|
} |
||||
|
printMaterialLabelReturn(array8); |
||||
|
for (let i = 0; i < data.rows8.length; i++) { |
||||
|
let inData={ |
||||
|
transNo:data.rows8[i].transNo, |
||||
|
site:data.rows8[i].site |
||||
|
} |
||||
|
updateStockPrintFlag(inData).then(({data}) => { |
||||
|
|
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style > |
||||
|
|
||||
|
|
||||
|
.board2 .el-table .cell { |
||||
|
line-height: 13px; |
||||
|
font-size: 12px; |
||||
|
height: 13px; |
||||
|
padding: 0px; |
||||
|
} |
||||
|
|
||||
|
.board2 .el-table .success-row { |
||||
|
background: #1bb61b; |
||||
|
} |
||||
|
.board2 .el-table .false-row { |
||||
|
/*background: #cbcb14;*/ |
||||
|
background: #db1212; |
||||
|
} |
||||
|
.board2 .el-table .yellow-row{ |
||||
|
background: #ffff00; |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue