Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
confucius
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
confucius
Commits
1dbd5f81
Commit
1dbd5f81
authored
Nov 12, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
ab10abb4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
73 additions
and
2 deletions
+73
-2
PlatformAccount.vue
src/pages/financial/PlatformAccount.vue
+22
-2
index.js
src/utils/index.js
+51
-0
No files found.
src/pages/financial/PlatformAccount.vue
View file @
1dbd5f81
...
...
@@ -406,7 +406,7 @@ export default {
Commission
:
[
{
required
:
true
,
message
:
this
.
$t
(
'rule.qsrptsxufei'
),
trigger
:
"blur"
},
{
pattern
:
this
.
$commonUtils
.
Regex
.
el_IsdecimalTrr
,
pattern
:
/^
\d
+
(\.\d{0,8})?
$/
,
message
:
this
.
$t
(
'rule.qsrzqxufei'
)
}
],
...
...
@@ -419,7 +419,7 @@ export default {
Initialbalance
:
[
{
required
:
true
,
message
:
this
.
$t
(
'rule.qsrcsyue'
),
trigger
:
"blur"
},
{
pattern
:
this
.
$commonUtils
.
Regex
.
el_IsInventer
,
pattern
:
/^
(\-
|
\+?)\d
+
(\.\d
+
)?
$/
,
message
:
this
.
$t
(
'rule.qsrzqdyue'
)
}
],
...
...
@@ -1167,6 +1167,26 @@ export default {
},
InitTime
()
{
},
calcPageSize
(
itemHeight
){
let
yuHeight
=
itemHeight
try
{
let
obj
=
null
document
.
querySelectorAll
(
'.frame-box'
).
forEach
(
x
=>
{
if
(
x
.
style
.
display
!=
'none'
)
{
obj
=
x
}
})
let
dom
=
obj
.
offsetHeight
yuHeight
=
dom
-
(
obj
.
querySelector
(
'.v-table-header'
)
?
obj
.
querySelector
(
'.v-table-header'
).
offsetHeight
:
39
)
-
50
//减去面包屑,减去表格头部,减去分页,减去偏量
//减去其它同级元素
obj
.
childNodes
[
0
].
childNodes
.
forEach
(
x
=>
{
if
(
x
.
className
&&
x
.
className
.
indexOf
(
'v-table-views'
)
==
-
1
)
{
yuHeight
-=
x
.
offsetHeight
?
x
.
offsetHeight
:
0
}
})
}
catch
(
error
)
{}
return
Math
.
floor
(
yuHeight
/
itemHeight
)
}
},
mounted
()
{
...
...
src/utils/index.js
View file @
1dbd5f81
...
...
@@ -466,4 +466,55 @@ export function downloadFileWithBuffer(data, name, type) {
downloadElement
.
click
()
// 点击下载
document
.
body
.
removeChild
(
downloadElement
)
// 下载完成移除元素
window
.
URL
.
revokeObjectURL
(
href
)
// 释放掉blob对象
}
//ERP本地缓存
export
function
getLocalStorage
(){
var
localStorageData
=
window
.
localStorage
[
"userInfo"
];
if
(
localStorageData
!==
undefined
&&
localStorageData
!=
'undefined'
)
{
return
JSON
.
parse
(
localStorageData
);
}
else
{
return
null
;
}
}
export
function
apipost
(
cmd
,
msg
,
successCall
,
faildCall
,
isOnline
){
var
timestamp
=
(
new
Date
()).
valueOf
();
var
encodeMsg
=
encodeURIComponent
(
JSON
.
stringify
(
msg
)).
toLowerCase
();
var
token
=
""
;
var
key
=
""
;
if
(
this
.
getLocalStorage
()
!=
null
)
{
token
=
this
.
getLocalStorage
().
Token
;
key
=
this
.
getLocalStorage
().
SecretKey
;
}
var
md5Str
=
md5
(
`cmd=
${
cmd
}
&msg=
${
encodeMsg
}
×tamp=
${
timestamp
}
&token=
${
token
}
&key=
${
key
}
`
);
var
postData
=
{
"msg"
:
msg
,
"cmd"
:
cmd
,
"timestamp"
:
timestamp
,
"token"
:
token
,
"sign"
:
md5Str
,
"languageId"
:
tempLanguage
}
// return reuest({
// method:'post',
// })
this
.
$http
.
post
(
apiurl
,
postData
,
{
headers
:
{
'Content-Type'
:
'application/json'
,
'Referer-Viitto'
:
this
.
$route
.
path
}
})
.
then
(
res
=>
{
if
(
res
.
data
.
resultCode
==
10000
||
res
.
data
.
resultCode
==
10001
)
{
}
else
if
(
res
.
resultCode
==
10005
)
{
}
else
{
successCall
(
res
);
}
},
faildCall
)
}
\ No newline at end of file
Write
Preview
Markdown
is supported
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