rev:新增原材料盘点、损溢;老车间包装
This commit is contained in:
@@ -165,6 +165,16 @@
|
||||
>
|
||||
导入
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="success"
|
||||
icon="el-icon-printer"
|
||||
size="mini"
|
||||
@click="print"
|
||||
>
|
||||
打印
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
@@ -470,6 +480,8 @@ import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||
import AddDialog from '@/views/wms/product_manage/workorder/AddDialog'
|
||||
import UploadDialog from '@/views/wms/product_manage/workorder/UploadDialog'
|
||||
import ReplaceDeviceDialog from '@/views/wms/product_manage/workorder/ReplaceDeviceDialog'
|
||||
import orderExt from '@/views/wms/product_manage/workorder/orderExt'
|
||||
import {getLodop} from '@/assets/js/lodop/LodopFuncs'
|
||||
|
||||
const defaultForm = {
|
||||
workorder_id: null,
|
||||
@@ -630,6 +642,38 @@ export default {
|
||||
const day = d.getDate() < 10 ? '0' + d.getDate() : d.getDate()
|
||||
return [year, month, day].join('-') + ' ' + ['18', '30', '00'].join(':')
|
||||
},
|
||||
print() {
|
||||
debugger
|
||||
if (this.crud.selections.length <= 0 || this.crud.selections.length > 1) {
|
||||
this.$message('请选择一条工单进行打印!')
|
||||
return
|
||||
}
|
||||
let a = this.crud.selections[0]
|
||||
orderExt.getExtList(a).then(res => {
|
||||
if (res.length == 0 || !res) {
|
||||
this.crud.notify('该工单需要打印的箱数为0', CRUD.NOTIFICATION_TYPE.INFO)
|
||||
return
|
||||
}
|
||||
res.forEach((item) => {
|
||||
const LODOP = getLodop()
|
||||
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮
|
||||
// 打印纸张大小设置https://www.it610.com/article/2094844.html
|
||||
LODOP.SET_PRINT_PAGESIZE(1, '80mm', '50mm', '')
|
||||
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1)
|
||||
LODOP.ADD_PRINT_BARCODE('10mm', '12mm', '60mm', '25mm', '128Auto', item.bar_code)
|
||||
LODOP.SET_PRINT_STYLEA(0, 'ShowBarText', 0)
|
||||
LODOP.ADD_PRINT_TEXT('35mm', '22mm', '40mm', '20mm', item.bar_code.substring(0, 9))
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||
LODOP.ADD_PRINT_TEXT('42mm', '25mm', '40mm', '20mm', item.bar_code.substring(9, 16))
|
||||
console.log(item.barcode)
|
||||
LODOP.SET_PRINT_STYLEA(0, 'FontSize', 20)
|
||||
LODOP.PRINT()// 打印
|
||||
// LODOP.PREVIEW()
|
||||
})
|
||||
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
})
|
||||
this.crud.toQuery()
|
||||
},
|
||||
queryClassId() {
|
||||
const param = {
|
||||
'class_idStr': this.class_idStr
|
||||
|
||||
Reference in New Issue
Block a user