add:仓位增加打印功能
This commit is contained in:
@@ -109,16 +109,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
<!-- <el-button-->
|
<el-button
|
||||||
<!-- slot="right"-->
|
slot="right"
|
||||||
<!-- class="filter-item"-->
|
class="filter-item"
|
||||||
<!-- type="warning"-->
|
type="success"
|
||||||
<!-- icon="el-icon-check"-->
|
icon="el-icon-printer"
|
||||||
<!-- size="mini"-->
|
size="mini"
|
||||||
<!-- @click="openOneCreate"-->
|
@click="print"
|
||||||
<!-- >-->
|
>
|
||||||
<!-- 一键生成-->
|
打印
|
||||||
<!-- </el-button>-->
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
|
|
||||||
<!--表单组件-->
|
<!--表单组件-->
|
||||||
@@ -274,9 +274,7 @@
|
|||||||
style="width: 100%;"
|
style="width: 100%;"
|
||||||
@selection-change="crud.selectionChangeHandler"
|
@selection-change="crud.selectionChangeHandler"
|
||||||
>
|
>
|
||||||
<!--
|
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
-->
|
|
||||||
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
<el-table-column prop="struct_code" label="仓位编码" :min-width="flexWidth('struct_code',crud.data,'仓位编码')" />
|
||||||
<el-table-column prop="struct_name" label="仓位名称" :min-width="flexWidth('struct_name',crud.data,'仓位名称')" />
|
<el-table-column prop="struct_name" label="仓位名称" :min-width="flexWidth('struct_name',crud.data,'仓位名称')" />
|
||||||
<el-table-column prop="simple_name" label="仓位简称" :min-width="flexWidth('simple_name',crud.data,'仓位简称')" />
|
<el-table-column prop="simple_name" label="仓位简称" :min-width="flexWidth('simple_name',crud.data,'仓位简称')" />
|
||||||
@@ -347,6 +345,7 @@ import udOperation from '@crud/UD.operation'
|
|||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import OneCreateDialog from '@/views/wms/basedata/structattr/OneCreateDialog'
|
import OneCreateDialog from '@/views/wms/basedata/structattr/OneCreateDialog'
|
||||||
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
import crudSectattr from '@/views/wms/basedata/sectattr/sectattr'
|
||||||
|
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
|
||||||
|
|
||||||
const defaultForm = {
|
const defaultForm = {
|
||||||
struct_id: null,
|
struct_id: null,
|
||||||
@@ -559,6 +558,26 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
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].struct_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()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user