Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
69b87965
authored
2023-11-22 17:09:40 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
style:打印申请书
1 parent
eb8495eb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
119 additions
and
21 deletions
src/views/workflow/components/dialog/sqs.vue
src/views/workflow/mixin/index.js
src/views/workflow/components/dialog/sqs.vue
0 → 100644
View file @
69b8796
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-11-22 17:09:14
-->
<
template
>
<div>
<el-button
type=
"primary"
@
click=
"handlePrint(1)"
>
打印第1页
</el-button>
<el-button
type=
"primary"
@
click=
"handlePrint(2)"
>
打印第2页
</el-button>
<!-- 打印模板需要此模块 -->
<object
id=
"LODOP_OB"
classid=
"clsid:2105C259-1E0C-4534-8141-A753534CB4CA"
v-show=
"false"
>
<embed
id=
"LODOP_EM"
type=
"application/x-print-lodop"
width=
"820"
height=
"450"
pluginspage=
"install_lodop32.exe"
/>
</object>
</div>
</
template
>
<
script
>
import
Vue
from
'vue'
import
{
getLodop
}
from
"@/utils/LodopFuncs"
;
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
import
{
getPrintApplicationForm
}
from
"@/api/workFlow.js"
;
export
default
{
props
:
{
formData
:
{
type
:
Object
,
default
:
()
=>
{
return
{}
}
}
},
data
()
{
return
{
}
},
methods
:
{
handlePrint
(
val
)
{
if
(
val
==
1
)
{
getPrintTemplateByCode
({
tmpno
:
Vue
.
prototype
.
BASE_API
.
adapter
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
getPrintApplicationForm
(
this
.
formData
.
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
.
PREVIEW
();
}
else
{
this
.
$message
.
error
(
infoRes
.
message
);
}
});
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
}
else
{
getPrintTemplateByCode
({
tmpno
:
Vue
.
prototype
.
BASE_API
.
adapter
+
'-2'
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
getPrintApplicationForm
(
this
.
formData
.
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
.
PREVIEW
();
}
else
{
this
.
$message
.
error
(
infoRes
.
message
);
}
});
}
else
{
this
.
$message
.
error
(
res
.
message
);
}
})
}
}
}
}
</
script
>
\ No newline at end of file
src/views/workflow/mixin/index.js
View file @
69b8796
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-11-22 1
3:18:47
* @LastEditTime: 2023-11-22 1
7:05:55
*/
import
Vue
from
'vue'
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
...
...
@@ -134,29 +134,32 @@ export default {
this
.
$popupDialog
(
"证书修改"
,
"workflow/components/dialog/zsxg"
,
{
bsmSlsq
:
this
.
bsmSlsq
,
},
'55%'
,
true
)
break
;
case
"B6"
:
this
.
$popupDialog
(
"打印申请书"
,
"workflow/components/dialog/sqs"
,
{
bsmSldy
:
this
.
currentSelectProps
.
bsmSldy
},
'30%'
,
true
)
//根据编号获取对应信息
getPrintTemplateByCode
({
tmpno
:
Vue
.
prototype
.
BASE_API
.
adapter
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
getPrintApplicationForm
(
this
.
currentSelectProps
.
bsmSldy
).
then
(
infoRes
=>
{
if
(
infoRes
.
code
===
200
)
{
let
LODOP
=
getLodop
(
document
.
getElementById
(
'LODOP_OB'
),
document
.
getElementById
(
'LODOP_EM'
));
//
getPrintTemplateByCode({ tmpno: Vue.prototype.BASE_API.adapter }).then(res => {
//
if (res.code === 200) {
//
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.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
);
}
})
//
// 进行预览
//
LODOP.PREVIEW();
//
} else {
//
this.$message.error(infoRes.message);
//
}
//
});
//
} else {
//
this.$message.error(res.message);
//
}
//
})
break
;
case
"B7"
:
this
.
$popupDialog
(
"证书领取"
,
"workflow/components/dialog/zslq"
,
...
...
Please
register
or
sign in
to post a comment