This commit is contained in:
zds
2022-11-09 11:31:41 +08:00
parent 305f6942ee
commit a9417c3800
3 changed files with 64 additions and 33 deletions

View File

@@ -122,6 +122,16 @@
>
仓位同步
</el-button>
<el-button
slot="right"
class="filter-item"
type="success"
icon="el-icon-printer"
size="mini"
@click="print"
>
打印
</el-button>
</crudOperation>
<!--表单组件-->
<el-dialog
@@ -268,6 +278,7 @@ import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import checkoutbill from '@/api/wms/st/core/outbill/checkoutbill'
import { getLodop } from '@/assets/js/lodop/LodopFuncs'
const defaultForm = { point_id: null, point_code: null, point_name: null, area_type: null, point_type: '00', point_status: '00', lock_type: '00', vehicle_code: null, source_id: null, remark: null, is_used: null, is_delete: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null }
export default {
@@ -366,6 +377,24 @@ export default {
}).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].point_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_BARCODE('4.3mm', '8.2mm', '40mm', '20mm', '128Auto', code)
LODOP.PRINT()// 打印
this.crud.notify('打印成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.toQuery()
}
},
sync() {
this.syncLoading = true
crudPoint.syncStruct().then(() => {