Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CRM
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
华国豪
CRM
Commits
2c009371
Commit
2c009371
authored
May 19, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整排行榜
parent
bc533da4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
863 additions
and
681 deletions
+863
-681
first.png
src/assets/img/cust/first.png
+0
-0
second.png
src/assets/img/cust/second.png
+0
-0
thrid.png
src/assets/img/cust/thrid.png
+0
-0
Home.vue
src/components/Home.vue
+819
-657
main.js
src/main.js
+44
-24
No files found.
src/assets/img/cust/first.png
0 → 100644
View file @
2c009371
4.47 KB
src/assets/img/cust/second.png
0 → 100644
View file @
2c009371
5.35 KB
src/assets/img/cust/thrid.png
0 → 100644
View file @
2c009371
5.34 KB
src/components/Home.vue
View file @
2c009371
This diff is collapsed.
Click to expand it.
src/main.js
View file @
2c009371
...
...
@@ -108,20 +108,20 @@ Vue.prototype.DateDiff = function (sDate1, sDate2) {
//价钱格式化,三位数逗号分隔,保留两位小数
Vue
.
prototype
.
moneyFormat
=
function
(
value
)
{
if
(
!
value
)
{
return
0.00
}
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
let
x1
=
x
[
0
];
let
x2
=
x
.
length
>
1
?
'.'
+
x
[
1
]
:
''
;
var
rgx
=
/
(\d
+
)(\d{3})
/
;
while
(
rgx
.
test
(
x1
))
{
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
},
if
(
!
value
)
{
return
0.00
}
let
nStr
=
Number
(
value
).
toFixed
(
2
)
nStr
+=
''
;
let
x
=
nStr
.
split
(
'.'
);
let
x1
=
x
[
0
];
let
x2
=
x
.
length
>
1
?
'.'
+
x
[
1
]
:
''
;
var
rgx
=
/
(\d
+
)(\d{3})
/
;
while
(
rgx
.
test
(
x1
))
{
x1
=
x1
.
replace
(
rgx
,
'$1'
+
','
+
'$2'
);
}
return
x1
+
x2
;
},
// 注册
Vue
.
filter
(
'priceFormat'
,
function
(
value
)
{
...
...
@@ -174,15 +174,15 @@ Vue.filter("YMDHMS", function (date) {
})
Vue
.
prototype
.
random_string
=
function
(
len
)
{
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
maxPos
=
chars
.
length
;
var
pwd
=
''
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
pwd
+=
chars
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
maxPos
));
}
return
pwd
;
},
len
=
len
||
32
;
var
chars
=
'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678'
;
var
maxPos
=
chars
.
length
;
var
pwd
=
''
;
for
(
let
i
=
0
;
i
<
len
;
i
++
)
{
pwd
+=
chars
.
charAt
(
Math
.
floor
(
Math
.
random
()
*
maxPos
));
}
return
pwd
;
},
//上传文件到文件服务器
Vue
.
prototype
.
UploadSelfFileT
=
function
(
path
,
files
,
successCall
)
{
...
...
@@ -220,7 +220,7 @@ Vue.prototype.random_string = function (len) {
*/
Vue
.
prototype
.
UploadLocalSystem
=
function
(
params
,
fileObj
,
successCall
)
{
let
that
=
this
;
let
url
=
that
.
domainManager
().
PostUrl
+
"/api/Upload/Index"
;
let
url
=
that
.
domainManager
().
PostUrl
+
"/api/Upload/Index"
;
let
formData
=
new
FormData
()
if
(
params
)
{
formData
.
append
(
"params"
,
JSON
.
stringify
(
params
));
...
...
@@ -279,6 +279,26 @@ Vue.prototype.checkInteger = function (item, filed) {
item
[
filed
]
=
value
;
}
Vue
.
prototype
.
formatDate
=
function
(
date
,
fmt
,
type
)
{
//type : 类型 0:时间为秒 1:时间为毫秒
let
ret
;
const
opt
=
{
"Y+"
:
date
.
getFullYear
().
toString
(),
// 年
"M+"
:
(
date
.
getMonth
()
+
1
).
toString
(),
// 月
"d+"
:
date
.
getDate
().
toString
(),
// 日
"h+"
:
date
.
getHours
().
toString
(),
// 时
"m+"
:
date
.
getMinutes
().
toString
(),
// 分
"s+"
:
date
.
getSeconds
().
toString
()
// 秒
// 有其他格式化字符需求可以继续添加,必须转化成字符串
};
for
(
let
k
in
opt
)
{
ret
=
new
RegExp
(
"("
+
k
+
")"
).
exec
(
fmt
);
if
(
ret
)
{
fmt
=
fmt
.
replace
(
ret
[
1
],
(
ret
[
1
].
length
==
1
)
?
(
opt
[
k
])
:
(
opt
[
k
].
padStart
(
ret
[
1
].
length
,
"0"
)))
};
};
return
fmt
;
}
new
Vue
({
router
,
store
,
...
...
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