7 changed files with 194 additions and 8 deletions
-
2src/api/board.js
-
1src/router/index.js
-
91src/views/modules/autoPrint/autoPrint.vue
-
2src/views/modules/print/print_package_label.js
-
6src/views/modules/production/dailyPlan.vue
-
62src/views/modules/production/scheduleForSOTask.vue
-
38src/views/modules/production/scheduleForShopOrder.vue
@ -0,0 +1,91 @@ |
|||||
|
<template> |
||||
|
<div class="mod-config"> |
||||
|
<h1>自动打印普通标签</h1> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
let autoPrint = '' //数据刷新定时器 |
||||
|
import { |
||||
|
getStockPrintList, |
||||
|
updateStockPrintFlag, |
||||
|
getPrintsList |
||||
|
} from '@/api/board.js' |
||||
|
import { |
||||
|
printMaterialLabel, |
||||
|
} from "@/views/modules/print/print_stock_label.js" |
||||
|
import { |
||||
|
printOutBoxLabel, |
||||
|
} from "@/views/modules/print/print_outBox_label.js" |
||||
|
import { |
||||
|
printPackageLabel, |
||||
|
} from "@/views/modules/print/print_package_label.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 |
||||
|
} |
||||
|
getPrintsList(ipp).then(({data}) => { |
||||
|
if (data.code == 0) { |
||||
|
let array2=[]; |
||||
|
if(data.rows2.length>0){ |
||||
|
for (let i = 0; i < data.rows2.length; i++) { |
||||
|
for (let j = 0; j <data.rows2[i].printQty ; j++) { |
||||
|
array2.push(data.rows2[i]) |
||||
|
} |
||||
|
} |
||||
|
printOutBoxLabel(array2); |
||||
|
} |
||||
|
let array3=[]; |
||||
|
if(data.rows3.length>0){ |
||||
|
for (let i = 0; i < data.rows3.length; i++) { |
||||
|
for (let j = 0; j <data.rows3[i].printQty ; j++) { |
||||
|
array3.push(data.rows3[i]) |
||||
|
} |
||||
|
} |
||||
|
printPackageLabel(array3); |
||||
|
} |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
}, |
||||
|
} |
||||
|
</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