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
6bd1734b
Commit
6bd1734b
authored
Nov 18, 2020
by
Mac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款单
parent
46f98eac
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
93 additions
and
34 deletions
+93
-34
addReceivablesDocuments.vue
...es/financial/financalDocument/addReceivablesDocuments.vue
+64
-34
erpindex.js
src/utils/erpindex.js
+29
-0
No files found.
src/pages/financial/financalDocument/addReceivablesDocuments.vue
View file @
6bd1734b
This diff is collapsed.
Click to expand it.
src/utils/erpindex.js
View file @
6bd1734b
...
...
@@ -273,6 +273,35 @@ export default{
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
},
//验证只能输入整数【负数:isMinus传true】
Vue
.
prototype
.
checkInteger
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
this
.
$commonUtils
.
Regex
.
isInteger
,
""
);
//是否允许负数
if
(
isMinus
&&
t
==
'-'
)
{
value
=
'-'
+
value
;
}
item
[
filed
]
=
value
;
},
//验证只能输入2位小数【负数:isMinus传true】
Vue
.
prototype
.
checkPrice
=
function
(
item
,
filed
,
isMinus
)
{
var
value
=
""
+
item
[
filed
];
//转字符串
var
t
=
value
.
charAt
(
0
);
value
=
value
.
replace
(
/
[^\d
.
]
/g
,
""
);
//清除“数字”和“.”以外的字符
value
=
value
.
replace
(
/
\.{2,}
/g
,
"."
);
//只保留第一个. 清除多余的
value
=
value
.
replace
(
"."
,
"$#$"
)
.
replace
(
/
\.
/g
,
""
)
.
replace
(
"$#$"
,
"."
);
value
=
value
.
replace
(
/^
(\-)
*
(\d
+
)\.(\d\d)
.*$/
,
'$1$2.$3'
);
//只能输入两个小数
//如果第一位是负号,则允许添加 如果不允许添加负号 可以把这块注释掉
//是否允许负数
if
(
isMinus
&&
t
==
'-'
)
{
value
=
'-'
+
value
;
}
item
[
filed
]
=
value
;
}
}
...
...
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