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
dce29980
authored
2024-05-27 16:24:44 +0800
by
jiaozeping@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
打印审批表
1 parent
f68c37f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletions
src/views/workflow/main/spyj/index.vue
src/views/workflow/main/spyj/index.vue
View file @
dce2998
...
...
@@ -6,6 +6,11 @@
<
template
>
<div
class=
"spyj"
v-Loading=
"loading"
>
<div
class=
"box"
>
<div
style=
"text-align:left"
>
<el-button
type=
"primary"
@
click=
"handlePrint()"
>
打印
</el-button>
</div>
<div
class=
"spyj_title"
>
<div
class=
"righttitle"
>
审批表
</div>
</div>
...
...
@@ -66,12 +71,31 @@
<el-button
type=
"primary"
:disabled=
"shows"
@
click=
"onSubmit()"
>
保存
</el-button>
</div>
</div>
<!-- 打印模板需要此模块 -->
<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
{
saveSpyjBySlsq
,
getSpyjList
}
from
"@/api/opinion.js"
;
import
{
saveSpyjBySlsq
,
getSpyjList
,
getSpyjdy
}
from
"@/api/opinion.js"
;
import
{
mapGetters
}
from
"vuex"
;
import
{
getNewDatesh
}
from
"@/utils/util"
;
import
Vue
from
'vue'
import
{
getLodop
}
from
"@/utils/LodopFuncs"
;
import
{
getPrintTemplateByCode
}
from
"@/api/print"
;
import
{
getPrintApplicationForm
}
from
"@/api/workFlow.js"
;
export
default
{
computed
:
{
...
mapGetters
([
"dqhj"
,
"yjsqOptions"
,
"userInfo"
]),
...
...
@@ -225,6 +249,31 @@
this
.
$set
(
this
.
tableData
[
this
.
currentindex
],
"shyj"
,
val
);
}
},
handlePrint
(){
getPrintTemplateByCode
({
tmpno
:
'spb'
}).
then
(
res
=>
{
if
(
res
.
code
===
200
)
{
getSpyjdy
(
this
.
propsParam
.
bsmBusiness
).
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
>
...
...
Please
register
or
sign in
to post a comment