|
|
@ -42,7 +42,18 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
|
|
|
<crudOperation :permission="permission" /> |
|
|
|
<crudOperation :permission="permission"> |
|
|
|
<el-button |
|
|
|
slot="right" |
|
|
|
class="filter-item" |
|
|
|
type="success" |
|
|
|
icon="el-icon-printer" |
|
|
|
size="mini" |
|
|
|
@click="print" |
|
|
|
> |
|
|
|
打印 |
|
|
|
</el-button> |
|
|
|
</crudOperation> |
|
|
|
<!--表单组件--> |
|
|
|
<el-dialog |
|
|
|
:before-close="crud.cancelCU" |
|
|
@ -144,6 +155,7 @@ import rrOperation from '@crud/RR.operation' |
|
|
|
import crudOperation from '@crud/CRUD.operation' |
|
|
|
import udOperation from '@crud/UD.operation' |
|
|
|
import pagination from '@crud/Pagination' |
|
|
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs' |
|
|
|
|
|
|
|
const defaultForm = { |
|
|
|
storagevehicle_id: null, |
|
|
@ -270,6 +282,26 @@ export default { |
|
|
|
}, |
|
|
|
formattType(row) { |
|
|
|
return this.dict.label.storagevehicle_type[row.storagevehicle_type] |
|
|
|
}, |
|
|
|
print() { |
|
|
|
const _selectData = this.$refs.table.selection |
|
|
|
if (!_selectData || _selectData.length < 1) { |
|
|
|
this.crud.notify('请选择一条记录', CRUD.NOTIFICATION_TYPE.INFO) |
|
|
|
return |
|
|
|
} |
|
|
|
for (let i = 0; i < _selectData.length; i++) { |
|
|
|
const code = _selectData[i].storagevehicle_code |
|
|
|
const LODOP = getLodop() |
|
|
|
LODOP.SET_SHOW_MODE('HIDE_DISBUTTIN_SETUP', 1)// 隐藏那些无效按钮 |
|
|
|
// 打印纸张大小设置https://www.it610.com/article/2094844.html |
|
|
|
LODOP.SET_PRINT_PAGESIZE(1, '50mm', '30mm', '') |
|
|
|
// LODOP.ADD_PRINT_RECT('0mm', '0mm', '48mm', '28mm', 0, 1) |
|
|
|
LODOP.ADD_PRINT_BARCODE('4.3mm', '8.2mm', '40mm', '20mm', '128Auto', code) |
|
|
|
// LODOP.PREVIEW()// 预览 |
|
|
|
LODOP.PRINT()// 打印 |
|
|
|
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS) |
|
|
|
this.crud.toQuery() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|