eb8495eb by renchao@pashanhoo.com

style:打印申请书

1 parent 2d9b694d
......@@ -137,32 +137,21 @@ export default {
//根据编号获取对应信息
getPrintTemplateByCode({ tmpno: Vue.prototype.BASE_API.adapter }).then(res => {
if (res.code === 200) {
getPrintTemplateByCode({ tmpno: Vue.prototype.BASE_API.adapter + '-2' }).then(res1 => {
getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
getPrintApplicationForm(this.currentSelectProps.bsmSldy).then(infoRes => {
if (infoRes.code === 200) {
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
// 手动分页
LODOP.NewPage();
// 装载第二个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res1.result.tmpcontent);
for (let key in res1.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", res1.result[key]);
}
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
// 装载第一个模板并设置数据
LODOP.ADD_PRINT_DATA("ProgramData", res.result.tmpcontent);
for (let key in infoRes.result) {
LODOP.SET_PRINT_STYLEA(key, "CONTENT", infoRes.result[key]);
}
});
// 进行预览
LODOP.PREVIEW();
} else {
this.$message.error(infoRes.message);
}
});
} else {
this.$message.error(res.message);
......