提交 1b4d745b authored 作者: 钟是志's avatar 钟是志

打印功能调整

上级 14400a35
......@@ -173,16 +173,19 @@ export default class ViewPrint extends Component {
let LODOPObj = window.LODOP;
LODOPObj.On_Return_Remain = true;
LODOPObj.On_Return = (TaskId, Value) => {
console.log(TaskId);
if (Number(Value) === 1) {
message.info(`正在打印第${printIndex + 1}张, 共${viewData.length}张`);
message.info(`正在打印第${this.state.printIndex + 1}张, 共${viewData.length}张`);
this.printedDataSave(printIndex);
}
this.setState({ printIndex: this.state.printIndex + 1 }, () => {
if (this.state.printIndex < length) {
this.printOne();
} else {
LODOPObj.On_Return_Remain = false;
this.setState({
loading: false,
printIndex: 0,
});
}
});
......@@ -251,6 +254,7 @@ export default class ViewPrint extends Component {
name={'打印设备选择'}
handleClick={() => {
window.LODOP.SELECT_PRINTER();
debugger;
this.setState({
preaparePrint: true,
});
......@@ -262,6 +266,10 @@ export default class ViewPrint extends Component {
handleClick={() => {
if (!preaparePrint) {
message.warning('请先选择打印设备');
window.LODOP.SELECT_PRINTER();
this.setState({
preaparePrint: true,
});
return false;
}
this.printPreview();
......@@ -272,6 +280,10 @@ export default class ViewPrint extends Component {
name={'打印'}
handleClick={() => {
if (!preaparePrint) {
window.LODOP.SELECT_PRINTER();
this.setState({
preaparePrint: true,
});
message.warning('请先选择打印设备');
return false;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论