Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
JSH ERP
Commits
c6548bdb
Commit
c6548bdb
authored
Sep 13, 2021
by
季圣华
Browse files
优化单据明细页面
parent
e8acccd4
Changes
2
Hide whitespace changes
Inline
Side-by-side
jshERP-web/src/views/bill/dialog/BillDetail.vue
View file @
c6548bdb
...
@@ -1101,9 +1101,12 @@
...
@@ -1101,9 +1101,12 @@
},
},
methods
:
{
methods
:
{
initPlatform
()
{
initPlatform
()
{
getPlatformConfigByKey
(
{
"
platformKey
"
:
"
bill_print_flag
"
}).
then
((
res
)
=>
{
getPlatformConfigByKey
({
"
platformKey
"
:
"
bill_print_flag
"
}).
then
((
res
)
=>
{
if
(
res
&&
res
.
code
==
200
)
{
if
(
res
&&
res
.
code
===
200
)
{
this
.
billPrintFlag
=
res
.
data
.
platformValue
===
'
1
'
?
true
:
false
if
(
this
.
billType
===
'
采购订单
'
||
this
.
billType
===
'
采购入库
'
||
this
.
billType
===
'
采购退货出库
'
||
this
.
billType
===
'
销售订单
'
||
this
.
billType
===
'
销售出库
'
||
this
.
billType
===
'
销售退货入库
'
)
{
this
.
billPrintFlag
=
res
.
data
.
platformValue
===
'
1
'
?
true
:
false
}
}
}
})
})
},
},
...
@@ -1154,8 +1157,14 @@
...
@@ -1154,8 +1157,14 @@
},
},
//三联打印预览
//三联打印预览
handlePrint
()
{
handlePrint
()
{
this
.
$refs
.
modalDetail
.
show
(
this
.
model
,
this
.
billType
);
getPlatformConfigByKey
({
"
platformKey
"
:
"
bill_print_url
"
}).
then
((
res
)
=>
{
this
.
$refs
.
modalDetail
.
title
=
this
.
billType
+
"
-三联打印预览
"
;
if
(
res
&&
res
.
code
===
200
)
{
let
billPrintUrl
=
res
.
data
.
platformValue
+
'
?no=
'
+
this
.
model
.
number
let
billPrintHeight
=
this
.
dataSource
.
length
*
46
+
300
this
.
$refs
.
modalDetail
.
show
(
this
.
model
,
billPrintUrl
,
billPrintHeight
);
this
.
$refs
.
modalDetail
.
title
=
this
.
billType
+
"
-三联打印预览
"
;
}
})
}
}
}
}
}
}
...
...
jshERP-web/src/views/bill/dialog/BillPrintIframe.vue
View file @
c6548bdb
<
template
>
<
template
>
<div></div>
<a-modal
:title=
"title"
:width=
"width"
:visible=
"visible"
@
cancel=
"handleCancel"
cancelText=
"关闭"
wrapClassName=
"ant-modal-cust-warp"
style=
"top:5%;height: 100%;overflow-y: hidden"
>
<template
slot=
"footer"
>
<a-button
key=
"back"
@
click=
"handleCancel"
>
取消
</a-button>
</
template
>
<a-form
:form=
"form"
>
<
template
>
<iframe
:src=
"billPrintUrl"
width=
"100%"
:height=
"height"
frameborder=
"0"
scrolling=
"no"
></iframe>
</
template
>
<
template
>
<a-row>
<a-col>
<a-form-item>
<a-input
v-decorator=
"['id']"
hidden
/>
</a-form-item>
</a-col>
</a-row>
</
template
>
</a-form>
</a-modal>
</template>
</template>
<
script
>
<
script
>
import
Vue
from
'
vue
'
import
pick
from
'
lodash.pick
'
import
{
ACCESS_TOKEN
}
from
"
@/store/mutation-types
"
import
{
mixinDevice
}
from
'
@/utils/mixin.js
'
export
default
{
export
default
{
name
:
"
BillPrintIframe
"
,
name
:
'
BillPrintIframe
'
,
inject
:[
'
closeCurrent
'
],
mixins
:
[
mixinDevice
],
data
()
{
data
()
{
return
{
return
{
url
:
""
,
title
:
"
三联打印预览
"
,
id
:
""
,
width
:
'
1550px
'
,
height
:
""
visible
:
false
,
billPrintUrl
:
''
,
height
:
""
,
model
:
{},
form
:
this
.
$form
.
createForm
(
this
),
loading
:
false
}
}
},
},
created
()
{
created
()
{
this
.
goUrl
()
},
updated
()
{
this
.
goUrl
()
},
watch
:
{
$route
(
to
,
from
)
{
this
.
goUrl
();
}
},
},
methods
:
{
methods
:
{
show
(
record
,
type
)
{
show
(
record
,
billPrintUrl
,
billPrintHeight
)
{
this
.
height
=
billPrintHeight
this
.
billPrintUrl
=
billPrintUrl
this
.
visible
=
true
;
this
.
model
=
Object
.
assign
({},
record
);
this
.
$nextTick
(()
=>
{
this
.
form
.
setFieldsValue
(
pick
(
this
.
model
,
'
id
'
))
});
},
handleCancel
()
{
this
.
close
()
},
},
goUrl
()
{
close
()
{
let
url
=
this
.
$route
.
meta
.
url
this
.
$emit
(
'
close
'
);
this
.
id
=
this
.
$route
.
path
this
.
visible
=
false
;
if
(
this
.
isMobile
())
{
this
.
height
=
800
}
else
{
this
.
height
=
document
.
documentElement
.
clientHeight
-
130
}
console
.
log
(
"
------url------
"
+
url
)
console
.
log
(
"
------token------
"
+
Vue
.
ls
.
get
(
ACCESS_TOKEN
))
if
(
url
!==
null
&&
url
!==
undefined
)
{
//外部url加入token
let
token
=
Vue
.
ls
.
get
(
ACCESS_TOKEN
);
this
.
url
=
url
+
'
?token=
'
+
token
;
}
}
}
}
}
}
}
</
script
>
</
script
>
<
style
>
<
style
scoped
>
</
style
>
</
style
>
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment