Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
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
hujun
tl_estate
Commits
52e743e5
Commit
52e743e5
authored
Jul 01, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
876d00f4
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
commission.js
public/resource/js/commission.js
+35
-0
No files found.
public/resource/js/commission.js
View file @
52e743e5
...
@@ -12,6 +12,41 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'css!style/home.css', '
...
@@ -12,6 +12,41 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'css!style/home.css', '
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
document
.
body
).
append
(
template
);
$
(
document
.
body
).
append
(
template
);
//初始化收佣日期
function
getPreMonth
(
date
)
{
var
arr
=
date
.
split
(
'-'
);
var
year
=
arr
[
0
];
var
month
=
arr
[
1
];
var
day
=
arr
[
2
];
var
days
=
new
Date
(
year
,
month
,
0
);
days
=
days
.
getDate
();
var
year2
=
year
;
var
month2
=
parseInt
(
month
)
-
1
;
if
(
month2
==
0
)
{
year2
=
parseInt
(
year2
)
-
1
;
month2
=
12
;
}
var
day2
=
day
;
var
days2
=
new
Date
(
year2
,
month2
,
0
);
days2
=
days2
.
getDate
();
if
(
day2
>
days2
)
{
day2
=
days2
;
}
if
(
month2
<
10
)
{
month2
=
'0'
+
month2
;
}
var
t2
=
year2
+
'-'
+
month2
+
'-'
+
day2
;
return
t2
;
}
//初始化时间
var
myDate
=
new
Date
();
var
y
=
myDate
.
getFullYear
();
var
m
=
myDate
.
getMonth
()
+
1
;
var
d
=
myDate
.
getDate
();
var
day_end
=
y
+
'-'
+
(
m
<
10
?
(
'0'
+
m
)
:
m
)
+
'-'
+
(
d
<
10
?
(
'0'
+
d
)
:
d
);
var
day_start
=
getPreMonth
(
day_end
);
$
(
'#create_time'
).
val
(
day_start
);
$
(
'#end_time'
).
val
(
day_end
);
bargain
.
getList
(
1
);
bargain
.
getList
(
1
);
bargain
.
event
();
bargain
.
event
();
},
},
...
...
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