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
e16fc78e
Commit
e16fc78e
authored
Mar 30, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周报日报截图
parent
9f626ef4
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
537 additions
and
672 deletions
+537
-672
daily_achieve_dz.html
application/app_broker/view/index/daily_achieve_dz.html
+7
-79
weekly.html
application/app_broker/view/index/weekly.html
+48
-203
weekly_achieve_dz.html
application/app_broker/view/index/weekly_achieve_dz.html
+38
-15
weekly_achieve_mdzj.html
application/app_broker/view/index/weekly_achieve_mdzj.html
+4
-5
weekly.css
public/app/css/weekly.css
+2
-1
daily_achieve_dz.js
public/app/js/daily_achieve_dz.js
+9
-1
main.js
public/app/js/main.js
+1
-2
weekly.js
public/app/js/weekly.js
+78
-0
weekly_achieve_dz.js
public/app/js/weekly_achieve_dz.js
+285
-294
weekly_achieve_mdzj.js
public/app/js/weekly_achieve_mdzj.js
+65
-72
No files found.
application/app_broker/view/index/daily_achieve_dz.html
View file @
e16fc78e
...
...
@@ -19,69 +19,10 @@
</header>
<div
class=
"header_seat"
></div>
<div
id=
"screen_shot_area"
>
<div
id=
"titile_temp"
></div>
<div
id=
"titile_before"
></div>
<!--<div id="titile_after">
<h3>明诚二手车市场</h3>
<p><span id="span_date">2017-10-1至2017-10-10</span><span id="span_reporter">汇报人:XXX</span></p>
</div>-->
<div
id=
"titile_temp"
>
汇报人:{{userName}}
</div>
<div
id=
"titile_before"
>
今日总结 {{dateNow}}
</div>
<div
id=
"tab_table_area"
>
<section>
<!--<table border="0" cellspacing="0" cellpadding="0" class="table-type6">
<tbody>
<tr class="table-tr-header">
<td></td>
<td>房源</td>
<td>客源</td>
<td>带看</td>
<td>业绩(元)</td>
</tr>
<tr class="table-tr-yuemubiao">
<td>月目标</td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
</tr>
<tr class="table-tr-yuewancheng">
<td>月完成</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="table-tr-zhoumubiao">
<td>周目标</td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
</tr>
<tr class="table-tr-zhouwancheng">
<td>周完成</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr class="table-tr-rimubiao">
<td>日目标</td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
<td><input type="number" placeholder="填写" /></td>
</tr>
<tr class="table-tr-riwancheng">
<td>日完成</td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>-->
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"table-type1"
>
<tbody>
<tr
class=
"table-tr-header"
>
...
...
@@ -94,9 +35,9 @@
</tr>
<tr
class=
"table-tr-riwancheng"
>
<td>
日完成
</td>
<td></td>
<td>
{{fangyuan}}
</td>
<td><input
type=
"number"
placeholder=
"填写"
/></td>
<td></td>
<td>
{{daikan}}
</td>
<td><input
type=
"number"
placeholder=
"填写"
/></td>
<td><input
type=
"number"
placeholder=
"填写"
/></td>
<td><input
type=
"number"
placeholder=
"填写"
/></td>
...
...
@@ -116,20 +57,7 @@
<td>
差额
</td>
<td>
人均
</td>
</tr>
<tr
class=
""
>
<td>
业绩(元)
</td>
<td><input
type=
"number"
placeholder=
"填写"
id=
"yeji_yue_mubiao"
/></td>
<td><input
type=
"number"
placeholder=
"填写"
id=
"yeji_yue_wancheng"
/></td>
<td
id=
"chae_yeji"
></td>
<td
id=
"renjun_yeji"
></td>
</tr>
<tr
class=
""
>
<td>
实收(元)
</td>
<td><input
type=
"number"
placeholder=
"填写"
id=
"shishou_yue_mubiao"
/></td>
<td><input
type=
"number"
placeholder=
"填写"
id=
"shishou_yue_wancheng"
/></td>
<td
id=
"chae_shishou"
></td>
<td
id=
"renjun_shishou"
></td>
</tr>
<tr
is=
"my-tr1"
v-for=
"(item, index) in trArr"
v-bind:data=
"item"
:peoplenum=
"peopleNum"
:daynum=
"nowDayNum"
:key=
"item.titlename"
></tr>
</tbody>
</table>
...
...
@@ -316,11 +244,11 @@
</div>
<div
class=
"btn-area"
>
<button
id=
"btn_ok"
>
提交
</button>
<button
id=
"btn_ok"
@
click
.
stop
.
prevent=
"save"
>
提交
</button>
</div>
<div
id=
"loading_pic"
class=
"week-sp loading_pic"
>
<img
src=
"images/jz2.gif"
/>
<img
src=
"
/app/
images/jz2.gif"
/>
<p>
正在加载...
</p>
</div>
...
...
application/app_broker/view/index/weekly.html
View file @
e16fc78e
...
...
@@ -3,223 +3,67 @@
<head>
<meta
charset=
"utf-8"
/>
<title>
福居好房
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=
10
"
/>
<title>
同联商业
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=
edge,chrome=1
"
/>
<meta
name=
"viewport"
content=
"initial-scale=1, maximum-scale=1, minimum-scale=1"
>
<!--页面 禁止缩放 user-scalable=0 -->
<meta
http-equiv=
"Cache-Control"
content=
"no-siteapp"
/>
<!-- 禁止广告 -->
<meta
name=
"Keywords"
content=
""
/>
<!--关键词-->
<meta
name=
"Description"
content=
""
/>
<link
href=
"css/common.css"
rel=
"stylesheet"
>
<!--<link href="css/spl.css" rel="stylesheet">-->
<link
href=
"css/weely.css"
rel=
"stylesheet"
>
</head>
<body>
<header
id=
"header"
>
<a
class=
"ps-back"
href=
"javascript:(history.length>1?history.go(-1):window.location='/');"
></a>
<h2
id=
"title"
>
业绩周报
</h2>
<a
class=
"word-link"
href=
"javascript:;"
>
我的周报
</a>
</header>
<div
class=
"header_seat"
></div>
<div
class=
"weekly_time"
>
<ul>
<li>
<span
class=
"weekly_span"
>
<body
style=
"display: none;"
>
<div
id=
"app"
>
<header
id=
"header"
>
<a
class=
"ps-back"
href=
"javascript:;"
@
click
.
prevent
.
stop=
"pageBack"
></a>
<h2
id=
"title"
>
业绩周报
</h2>
<a
class=
"word-link"
href=
"weekly_my"
>
我的周报
</a>
</header>
<div
class=
"header_seat"
></div>
<div
class=
"weekly_time"
>
<ul>
<li>
<span
class=
"weekly_span"
>
</span>
<p
class=
"weekly_p"
>
请选择业绩时间
</p>
</li>
<li>
<img
src=
"
images/ic_start.png"
class=
"ic_star"
>
<p
class=
"time_p"
>
<span
class=
"time_p1"
>
<p
class=
"weekly_p"
>
请选择业绩时间
</p>
</li>
<li>
<img
src=
"/app/
images/ic_start.png"
class=
"ic_star"
>
<p
class=
"time_p"
>
<span
class=
"time_p1"
>
开始
</span>
<input
type=
"date"
name=
"date"
class=
"name_date"
value=
""
id=
"datePicker
"
>
</p>
<input
type=
"date"
v-model
.
trim=
"dateStart"
name=
"date"
class=
"name_date"
id=
"datePicker"
@
change=
"changeDate('0')
"
>
</p>
</li>
<li>
<p
class=
"time_p2"
>
<span
class=
"time_p1"
>
</li>
<li>
<p
class=
"time_p2"
>
<span
class=
"time_p1"
>
结束
</span>
<input
type=
"date"
name=
"date"
class=
"name_date"
value=
""
id=
"datePicker2
"
>
</p>
</li>
</ul>
</div>
<div
class=
"weekly_time liudan"
>
<ul>
<li>
<span
class=
"weekly_span"
>
<input
type=
"date"
v-model
.
trim=
"dateEnd"
name=
"date"
class=
"name_date"
id=
"datePicker2"
@
change=
"changeDate('1')
"
>
</p>
</li>
</ul>
</div>
<div
class=
"weekly_time liudan"
>
<ul>
<li>
<span
class=
"weekly_span"
>
</span>
<p
class=
"weekly_p"
>
请选择你要汇报的楼盘(可多选)
</p>
</li>
<p
class=
"weekly_p"
>
请选择你要汇报的楼盘(可多选)
</p>
</li>
</ul>
</ul>
</div>
<button
class=
"weekly_btn"
@
click
.
prevent
.
stop=
"goToNewPage"
>
确认
</button>
</div>
<!--<div class="weekly_lp liudan">
<ul id="uc_03" class="ui-choose choose-type-right" multiple="multiple">
</ul>
</div>-->
<button
class=
"weekly_btn"
>
确认
</button>
<!--编辑器输出1-->
<script
src=
"js/jquery.js"
charset=
"utf-8"
></script>
<!--<script src="js/commonsrc.js" charset="utf-8"></script>-->
<script
type=
"text/javascript"
src=
"js/layer.js"
></script>
<script
src=
"/app/js/common.js"
charset=
"utf-8"
></script>
<script>
$
(
function
()
{
//创建一个当前日期对象
var
dd
=
new
Date
();
//格式化日,如果小于9,前面补0
var
y
=
dd
.
getFullYear
();
var
m
=
(
dd
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
dd
.
getMonth
()
+
1
):(
dd
.
getMonth
()
+
1
);
//获取当前月份的日期,不足10补0
var
d
=
dd
.
getDate
()
<
10
?
"0"
+
dd
.
getDate
():
dd
.
getDate
();
//获取当前几号,不足10补0
//拼装完整日期格式
var
today
=
y
+
"-"
+
m
+
"-"
+
d
;
//完成赋值
$
(
'#datePicker2'
).
val
(
today
);
addDate
(
today
,
6
);
function
addDate
(
date1
,
days
){
var
d
=
new
Date
(
date1
);
d
.
setDate
(
d
.
getDate
()
-
days
);
var
m
=
(
d
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
d
.
getMonth
()
+
1
):(
d
.
getMonth
()
+
1
);
//获取当前月份的日期,不足10补0
var
ddd
=
d
.
getDate
()
<
10
?
"0"
+
d
.
getDate
():
d
.
getDate
();
var
today2
=
d
.
getFullYear
()
+
'-'
+
m
+
'-'
+
ddd
;
$
(
'#datePicker'
).
val
(
today2
);
}
function
addDate1
(
date1
,
days
){
var
d
=
new
Date
(
date1
);
d
.
setDate
(
d
.
getDate
()
+
days
);
var
m
=
(
d
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
d
.
getMonth
()
+
1
):(
d
.
getMonth
()
+
1
);
//获取当前月份的日期,不足10补0
var
ddd
=
d
.
getDate
()
<
10
?
"0"
+
d
.
getDate
():
d
.
getDate
();
var
today2
=
d
.
getFullYear
()
+
'-'
+
m
+
'-'
+
ddd
;
$
(
'#datePicker2'
).
val
(
today2
);
}
$
(
"#datePicker"
).
on
(
"change"
,
function
(){
date1
=
$
(
'#datePicker'
).
val
();
addDate1
(
date1
,
6
)
});
var
_appToken
=
getUrlParam
(
"token"
);
if
(
_appToken
!==
null
)
{
$
(
document
).
on
(
'click'
,
'.ps-back'
,
function
(
e
)
{
e
.
preventDefault
();
if
(
device
.
isIos
())
{
location
.
href
=
"abcd"
;
//传给app用
}
else
if
(
device
.
isAndroid
())
{
try
{
window
.
android
.
onBackPressed
();
}
catch
(
e
)
{
console
.
log
(
'window.android.onBackPressed未能执行'
);
}
}
else
{
console
.
log
(
'other device'
);
}
});
h5PageC
(
_appToken
,
function
(
data
)
{
loadMain
();
});
}
else
{
loadMain
();
}
function
loadMain
()
{
var
_userInfo
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'userinfo'
)));
//如果之前有存储的用户输入数据,则打开询问框
var
_mdzjZbData
=
localStorage
.
getItem
(
'mdzjZbData'
)
==
null
?
''
:
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'mdzjZbData'
)));
//用户输入的存储
if
(
_mdzjZbData
&&
_mdzjZbData
[
'userId'
]
==
localStorage
.
getItem
(
'id'
)){
layer
.
open
({
content
:
'您有未完成的内容,是否继续?'
,
btn
:
[
'前往'
,
'留在本页'
],
yes
:
function
(
_index
){
var
urlEn
=
encodeURIComponent
(
JSON
.
stringify
({
'startdate'
:
_mdzjZbData
[
'searchTimeStart'
],
'enddate'
:
_mdzjZbData
[
'searchTimeEnd'
]
}));
var
_addAppStr
=
(
_appToken
!==
null
)
?
'appEnter=1&'
:
''
;
//判断是否是app访问的,进行一些处理
location
.
href
=
"weekly_achieve_mdzj.html?"
+
_addAppStr
+
'weekly_data='
+
urlEn
;
layer
.
close
(
_index
);
}
});
};
//判断是否案场
$
(
'.word-link'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_addAppStr
=
(
_appToken
!==
null
)
?
'?appEnter=1'
:
''
;
//判断是否是app访问的,进行一些处理
location
.
href
=
'weekly_my.html'
+
_addAppStr
;
});
$
(
'.weekly_btn'
).
click
(
function
(
e
)
{
//获取起始时间
var
startdate
=
$
(
"#datePicker"
).
val
();
//获取结束时间
var
enddate
=
$
(
"#datePicker2"
).
val
();
if
(
""
==
startdate
)
{
$
(
"#datePicker"
).
focus
();
layer
.
open
({
content
:
'起始时间不能为空'
,
skin
:
'msg'
,
time
:
2
});
return
;
}
if
(
""
==
enddate
)
{
$
(
"#datePicker2"
).
focus
();
layer
.
open
({
content
:
'截止时间不能为空'
,
skin
:
'msg'
,
time
:
2
});
return
;
}
var
timedate1
=
(
new
Date
(
startdate
)).
getTime
();
var
timedate2
=
(
new
Date
(
enddate
)).
getTime
();
//如果起始时间大于截止时间
if
(
timedate1
>
timedate2
)
{
layer
.
open
({
content
:
'起始时间不能大于截止时间'
,
skin
:
'msg'
,
time
:
2
});
return
;
}
var
data
=
{
'startdate'
:
startdate
,
'enddate'
:
enddate
};
var
urlEn
=
encodeURIComponent
(
JSON
.
stringify
(
data
));
var
_addAppStr
=
(
_appToken
!==
null
)
?
'appEnter=1&'
:
''
;
//判断是否是app访问的,进行一些处理
if
(
_userInfo
[
'level'
]
==
40
){
//level为40,代表门店总监
location
.
href
=
"weekly_achieve_mdzj.html?"
+
_addAppStr
+
'weekly_data='
+
urlEn
;
}
else
if
(
_userInfo
[
'level'
]
==
30
){
location
.
href
=
"weekly_achieve_dz.html?"
+
_addAppStr
+
'weekly_data='
+
urlEn
;
}
else
{
layerTipsX
(
'不是店长或总监'
);
}
});
}
});
</script>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/weekly.js"
data-main=
"/app/js/main"
defer
async=
"true"
></script>
</body>
</html>
</html>
\ No newline at end of file
application/app_broker/view/index/weekly_achieve_dz.html
View file @
e16fc78e
...
...
@@ -4,18 +4,17 @@
<head>
<meta
charset=
"utf-8"
/>
<title>
同联商业
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=
10
"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=
edge,chrome=1
"
/>
<meta
name=
"Keywords"
content=
""
/>
<meta
name=
"Description"
content=
""
/>
<link
rel=
"stylesheet"
href=
"css/common.css?rev=14ba5c1d4b1452ee5b804c1b98270acc"
>
<link
href=
"css/report_achieve.css?rev=f35c8b19b60dbb59b7b1235e44a8b75b"
rel=
"stylesheet"
>
</head>
<body>
<header
id=
"header"
>
<body
style=
"display: none;"
>
<div
id=
"app"
>
<header
id=
"header"
>
<a
class=
"ps-back"
href=
"javascript:(history.length>1?history.go(-1):window.location='/');"
></a>
<h2
id=
"title"
>
业绩周报
</h2>
<a
class=
"word-link"
href=
"
javascript:;
"
>
我的周报
</a>
<a
class=
"word-link"
href=
"
weekly_my
"
>
我的周报
</a>
</header>
<div
class=
"header_seat"
></div>
<div
id=
"screen_shot_area"
>
...
...
@@ -28,6 +27,26 @@
<div
id=
"tab_table_area"
>
<section>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"table-type8"
>
<tbody>
<tr
class=
"table-tr-single"
><td
colspan=
"4"
>
月数据
</td></tr>
<tr
is=
"my-tr1"
v-for=
"(item, index) in trArr"
v-bind:data=
"item"
:peoplenum=
"peopleNum"
:key=
"item.titlename"
></tr>
<!--<tr class="">
<td>本月业绩(元)</td>
<td><input type="number" placeholder="填写" /></td>
<td>人均业绩(元)</td>
<td></td>
</tr>
<tr class="">
<td>本月实收(元)</td>
<td><input type="number" placeholder="填写" /></td>
<td>人均实收(元)</td>
<td></td>
</tr>-->
<tr
class=
"table-tr-single"
><td
colspan=
"4"
>
周数据
</td></tr>
</tbody>
</table>
<table
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
class=
"table-type1"
>
<tbody>
<tr
class=
"table-tr-header"
>
...
...
@@ -169,21 +188,24 @@
</div>
<div
class=
"btn-area"
>
<button
id=
"btn_ok"
>
提交
</button>
<button
id=
"btn_ok"
@
click
.
stop
.
prevent=
"save"
>
提交
</button>
</div>
<div
id=
"loading_pic"
class=
"week-sp loading_pic"
>
<img
src=
"images/jz2.gif"
/>
<img
src=
"
/app/
images/jz2.gif"
/>
<p>
正在加载...
</p>
</div>
</div>
<script
type=
"text/javascript"
src=
"js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/layer.js"
></script>
<script
src=
"js/photo/lrz.all.bundle.js"
></script>
<script
type=
"text/javascript"
src=
"js/html2canvas.min.js"
></script>
<script
src=
"js/commonsrc.js?rev=9b53924ba8c611229acb21bed2e6eb52"
charset=
"utf-8"
></script>
<script
src=
"js/common.js?rev=3de1803db9bae97b86043d9c32b1fd0e"
charset=
"utf-8"
></script>
<script
src=
"js/weekly_achieve_dz.js?rev=5e477609b4c6b0ba7c630a19f144f0ca"
charset=
"utf-8"
></script>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/weekly_achieve_dz.js"
data-main=
"/app/js/main"
data-norem=
"yes"
defer
async=
"true"
></script>
<script
type=
"text/x-template"
id=
"tr1"
>
<
tr
>
<
td
>
{{
data
.
titlename
}}
<
/td
>
<
td
><
input
type
=
"number"
placeholder
=
"填写"
v
-
model
.
number
=
"wancheng"
/><
/td
>
<
td
>
{{
data
.
titlename2
}}
<
/td
>
<
td
>
{{
renjun
}}
<
/td
>
<
/tr
>
</script>
</body>
</html>
\ No newline at end of file
application/app_broker/view/index/weekly_achieve_mdzj.html
View file @
e16fc78e
...
...
@@ -7,15 +7,15 @@
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=10"
/>
<meta
name=
"Keywords"
content=
""
/>
<meta
name=
"Description"
content=
""
/>
<link
rel=
"stylesheet"
href=
"css/common.css?rev=14ba5c1d4b1452ee5b804c1b98270acc"
>
<link
href=
"css/report_achieve.css?rev=f35c8b19b60dbb59b7b1235e44a8b75b"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"
/app/
css/common.css?rev=14ba5c1d4b1452ee5b804c1b98270acc"
>
<link
href=
"
/app/
css/report_achieve.css?rev=f35c8b19b60dbb59b7b1235e44a8b75b"
rel=
"stylesheet"
>
</head>
<body>
<header
id=
"header"
>
<a
class=
"ps-back"
href=
"javascript:(history.length>1?history.go(-1):window.location='/');"
></a>
<h2
id=
"title"
>
业绩周报
</h2>
<a
class=
"word-link"
href=
"
javascript:;
"
>
我的周报
</a>
<a
class=
"word-link"
href=
"
weekly_my
"
>
我的周报
</a>
</header>
<div
class=
"header_seat"
></div>
<div
id=
"screen_shot_area"
>
...
...
@@ -234,13 +234,12 @@
</div>
<div
id=
"loading_pic"
class=
"week-sp loading_pic"
>
<img
src=
"images/jz2.gif"
/>
<img
src=
"
/app/
images/jz2.gif"
/>
<p>
正在加载...
</p>
</div>
<script
type=
"text/javascript"
src=
"/app/js/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"/app/js/layer.js"
></script>
<script
src=
"/app/js/lrz.all.bundle.js"
></script>
<script
type=
"text/javascript"
src=
"/app/js/html2canvas.min.js"
></script>
<!--<script src="js/commonsrc.js?rev=9b53924ba8c611229acb21bed2e6eb52" charset="utf-8"></script>-->
<script
src=
"/app/js/common.js?rev=3de1803db9bae97b86043d9c32b1fd0e"
charset=
"utf-8"
></script>
...
...
public/app/css/weely.css
→
public/app/css/wee
k
ly.css
View file @
e16fc78e
...
...
@@ -65,7 +65,8 @@ body{
float
:
left
;
margin-left
:
0.76rem
;
font-weight
:
400
;
width
:
6.44rem
;
/*width: 6.44rem;*/
width
:
85.5%
;
}
.weekly_lp
{
width
:
100%
;
...
...
public/app/js/daily_achieve_dz.js
View file @
e16fc78e
...
...
@@ -17,17 +17,24 @@ require(['vue', 'html2canvas', 'css!style/report_achieve.css', 'jquery0325', 'co
},
{
'titlename'
:
'实收(元)'
}],
peopleNum
:
1
,
nowDayNum
:
parseInt
(
new
Date
().
getDate
()),
canClickFlag
:
true
},
components
:
{
'my-tr1'
:
{
props
:
[
'data'
],
props
:
[
'data'
,
'peoplenum'
,
'daynum'
],
template
:
'#tr1'
,
data
:
function
()
{
return
{
mubiao
:
''
,
wancheng
:
''
}
},
computed
:
{
renjun
:
function
()
{
return
dealJineNum
(
this
.
wancheng
/
this
.
peoplenum
*
30
/
this
.
daynum
);
}
}
}
},
...
...
@@ -84,6 +91,7 @@ require(['vue', 'html2canvas', 'css!style/report_achieve.css', 'jquery0325', 'co
if
(
_data
[
'code'
]
==
'200'
)
{
_this
.
fangyuan
=
_data
.
data
.
house_num
;
_this
.
daikan
=
_data
.
data
.
follow_up_num
;
_this
.
peopleNum
=
Number
(
_data
.
data
.
agent_total
);
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
...
...
public/app/js/main.js
View file @
e16fc78e
...
...
@@ -9,8 +9,7 @@ require.config({
'vconsole'
:
'js/vconsole.min'
,
'common'
:
'js/common'
,
'style'
:
'css'
,
'layer'
:
'js/layer'
,
'jquery'
:
'js/jquery.min'
'layer'
:
'js/layer'
},
'shim'
:
{
'jquery0325'
:
{
...
...
public/app/js/weekly.js
0 → 100644
View file @
e16fc78e
'use strict'
;
require
([
'vue'
,
'css!style/weekly.css'
,
'jquery0325'
,
'common'
],
function
(
Vue
)
{
var
_appToken
=
getUrlParam
(
'token'
);
var
vm
=
new
Vue
({
el
:
'#app'
,
data
:
{
testBtn
:
null
,
dateStart
:
''
,
dateEnd
:
''
},
created
:
function
()
{
var
_this
=
this
;
document
.
body
.
style
.
display
=
'block'
;
if
(
_appToken
!==
null
)
{
h5PageC
(
_appToken
,
function
(
data
)
{
_this
.
loadMain
();
});
}
else
{
_this
.
loadMain
();
}
},
methods
:
{
loadMain
:
function
()
{
var
_this
=
this
;
_this
.
dateEnd
=
backNowDate
();
_this
.
dateStart
=
_this
.
countDate
(
_this
.
dateEnd
,
6
,
'jian'
);
_this
.
userLevel
=
localStorage
.
getItem
(
'level'
);
},
pageBack
:
function
()
{
if
(
_appToken
!==
null
)
{
Compatible
({
hrefIos
:
'abcd'
,
paraIos
:
{
'route'
:
"aabb"
,
'url'
:
'back'
},
fnAndroid
:
function
()
{
window
.
android
.
onBackPressed
();
},
fn
:
function
()
{
console
.
warn
(
'error'
);
}
});
}
else
{
history
.
go
(
-
1
);
}
},
countDate
:
function
(
date1
,
days
,
countType
)
{
var
d
=
new
Date
(
date1
);
if
(
countType
===
'jia'
)
{
d
.
setDate
(
d
.
getDate
()
+
days
);
}
else
if
(
countType
===
'jian'
)
{
d
.
setDate
(
d
.
getDate
()
-
days
);
}
else
{};
var
m
=
(
d
.
getMonth
()
+
1
)
<
10
?
"0"
+
(
d
.
getMonth
()
+
1
)
:
(
d
.
getMonth
()
+
1
);
//获取当前月份的日期,不足10补0
var
ddd
=
d
.
getDate
()
<
10
?
"0"
+
d
.
getDate
()
:
d
.
getDate
();
return
d
.
getFullYear
()
+
'-'
+
m
+
'-'
+
ddd
;
},
changeDate
:
function
(
changeType
){
var
_this
=
this
;
if
(
changeType
===
'0'
)
{
_this
.
dateEnd
=
_this
.
countDate
(
_this
.
dateStart
,
6
,
'jia'
);
}
else
if
(
changeType
===
'1'
)
{
_this
.
dateStart
=
_this
.
countDate
(
_this
.
dateEnd
,
6
,
'jian'
);
}
else
{};
},
goToNewPage
:
function
(){
var
_this
=
this
,
urlEn
=
encodeURIComponent
(
JSON
.
stringify
({
'startdate'
:
_this
.
dateStart
,
'enddate'
:
_this
.
dateEnd
}));
location
.
href
=
'weekly_achieve_'
+
(
_this
.
level
==
40
?
'mdzj'
:
'dz'
)
+
'?weekly_data='
+
urlEn
;
}
}
});
});
\ No newline at end of file
public/app/js/weekly_achieve_dz.js
View file @
e16fc78e
$
(
function
()
{
//做适配处理,和其他页面方法不一致
'use strict'
;
require
([
'vue'
,
'html2canvas'
,
'css!style/report_achieve.css'
,
'jquery0325'
,
'common'
],
function
(
Vue
,
html2canvas
)
{
$
(
'title'
).
after
(
'<meta name="viewport" content="width=device-width,initial-scale='
+
(
window
.
screen
.
width
/
750
)
+
',maximum-scale=2.0,user-scalable=0" />'
);
$
(
document
.
body
).
show
(
);
var
_appToken
=
getUrlParam
(
'token'
);
var
_canClickFlag
=
true
;
//提交按钮是否可点击
var
_timeStampObj
=
$
(
'#time_stamp_area'
);
//时间区域div获取
var
_titleBeforeObj
=
$
(
'#titile_before'
);
//titile区域截图前后的div获取
var
_titleTempObj
=
$
(
'#titile_temp'
);
//titile汇报人
var
_btnOkObj
=
$
(
'#btn_ok'
);
//提交按钮
var
loadItem
=
$
(
"#loading_pic"
);
//loading图
var
_appEnter
=
getUrlParam
(
'appEnter'
);
//代表此页面在app里看到
var
_doc
=
$
(
document
);
var
_weekly_data
=
JSON
.
parse
(
decodeURIComponent
(
getUrlParam
(
'weekly_data'
)));
//从url获取所需的参数,解码,转json格式
loadMain
();
var
_token
=
localStorage
.
getItem
(
'token'
);
var
_id
=
localStorage
.
getItem
(
'id'
);
var
_userInfo
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'userinfo'
)));
//用户信息
function
loadMain
()
{
var
_token
=
localStorage
.
getItem
(
'token'
);
var
_id
=
localStorage
.
getItem
(
'id'
);
var
_userInfo
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'userinfo'
)));
//用户信息
//一些信息自动填写
_titleBeforeObj
.
html
(
_weekly_data
[
'startdate'
]
+
' 至 '
+
_weekly_data
[
'enddate'
]);
_titleTempObj
.
html
(
'汇报人:'
+
localStorage
.
getItem
(
'realname'
));
var
vm
=
new
Vue
({
el
:
'#app'
,
data
:
{
testBtn
:
null
,
trArr
:
[{
'titlename'
:
'本月业绩(元)'
,
'titlename2'
:
'人均业绩(元)'
,
},
{
'titlename'
:
'本月实收(元)'
,
'titlename2'
:
'人均实收(元)'
,
}],
peopleNum
:
1
},
components
:
{
'my-tr1'
:
{
props
:
[
'data'
,
'peoplenum'
],
template
:
'#tr1'
,
data
:
function
()
{
return
{
wancheng
:
''
}
},
computed
:
{
renjun
:
function
()
{
return
dealJineNum
(
this
.
wancheng
/
this
.
peoplenum
);
}
}
}
},
created
:
function
()
{
var
_this
=
this
;
document
.
body
.
style
.
display
=
'block'
;
_this
.
loadMain
();
},
methods
:
{
loadMain
:
function
()
{
var
_vueThis
=
this
;
//一些信息自动填写
_titleBeforeObj
.
html
(
_weekly_data
[
'startdate'
]
+
' 至 '
+
_weekly_data
[
'enddate'
]);
_titleTempObj
.
html
(
'汇报人:'
+
localStorage
.
getItem
(
'username'
));
$
.
ajax
({
type
:
"POST"
,
url
:
ServerHost
+
'/Worktable/shop_week
'
,
data
:
{
// 'token': _token
,
'father_id'
:
_userInfo
[
'father_id
'
],
'startdate'
:
_weekly_data
[
'startdate'
],
'enddate'
:
_weekly_data
[
'enddate'
]
}
,
timeout
:
30000
,
dataType
:
"json"
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
==
'object'
)
{
if
(
data
[
'state'
]
==
0
)
{
$
.
ajax
({
type
:
"POST"
,
url
:
ServerHostTempC
+
'/broker/dayStatement
'
,
data
:
{
'agent_id'
:
_userInfo
[
'id'
]
,
'time_start'
:
_weekly_data
[
'startdate
'
],
'time_end'
:
_weekly_data
[
'enddate'
]
},
timeout
:
30000
,
dataType
:
"json"
,
beforeSend
:
function
()
{}
,
success
:
function
(
data
)
{
if
(
typeof
data
==
'object'
)
{
if
(
data
[
'code'
]
==
200
)
{
_vueThis
.
peopleNum
=
data
.
data
.
agent_total
;
$
(
'.table-tr-benzhouwancheng'
).
html
(
'<td>本周完成</td><td>{fangyuan}</td><td><input type="number" placeholder="填写" /></td><td>{daikan}</td><td><input type="number" placeholder="填写" /></td><td>{renshu}</td>'
.
stringFormatObj
({
'fangyuan'
:
data
[
'house_count
'
],
'daikan'
:
data
[
'v4
'
],
'renshu'
:
data
[
'user_sum
'
]
}));
$
(
'.table-tr-benzhouwancheng'
).
html
(
'<td>本周完成</td><td>{fangyuan}</td><td><input type="number" placeholder="填写" /></td><td>{daikan}</td><td><input type="number" placeholder="填写" /></td><td>{renshu}</td>'
.
stringFormatObj
({
'fangyuan'
:
data
[
'data'
][
'house_num
'
],
'daikan'
:
data
[
'data'
][
'follow_up_num
'
],
'renshu'
:
data
[
'data'
][
'agent_total
'
]
}));
var
_htmlGroupInfo
=
''
;
$
.
each
(
data
[
'user'
],
function
(
i
,
item
)
{
_htmlGroupInfo
+=
'<tr><td>{0}</td><td>{1}</td><td><input type="number" placeholder="填写" /></td><td>{2}</td><td><input type="number" placeholder="填写" /></td></tr>'
.
stringFormatObj
({
'0'
:
item
[
'realname'
],
'1'
:
item
[
'house_c'
],
'2'
:
item
[
'v4'
]
});
});
$
(
'#groupInfoArea'
).
after
((
_htmlGroupInfo
===
''
)
?
'<tr><td colspan="5" style="font-weight: normal;line-height: 60px;">暂无</td></tr>'
:
_htmlGroupInfo
);
var
_htmlGroupInfo
=
''
;
//
$.each(data['user'], function(i, item) {
//
_htmlGroupInfo += '<tr><td>{0}</td><td>{1}</td><td><input type="number" placeholder="填写" /></td><td>{2}</td><td><input type="number" placeholder="填写" /></td></tr>'.stringFormatObj({
//
'0': item['realname'],
//
'1': item['house_c'],
//
'2': item['v4']
//
});
//
});
$
(
'#groupInfoArea'
).
after
((
_htmlGroupInfo
===
''
)
?
'<tr><td colspan="5" style="font-weight: normal;line-height: 60px;">暂无</td></tr>'
:
_htmlGroupInfo
);
}
else
{
layer
.
open
({
content
:
data
.
msg
,
skin
:
'msg'
,
time
:
2
});
}
else
{
layerTipsX
(
data
.
msg
);
}
};
},
error
:
function
()
{
layerTipsX
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时'
);
}
}
};
},
error
:
function
()
{
layer
.
open
({
content
:
'error'
,
skin
:
'msg'
,
time
:
2
});
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
"timeout"
)
{
//处理超时的逻辑
layer
.
open
({
content
:
'请求超时'
,
skin
:
'msg'
,
time
:
2
});
}
}
});
_doc
.
on
(
'click'
,
'.div-textarea'
,
function
(
e
)
{
var
_this
=
$
(
this
);
if
(
_this
.
html
()
===
'点击填写'
)
{
_this
.
html
(
''
).
addClass
(
'color-submit'
);
}
});
_doc
.
on
(
'click'
,
'.div-textarea'
,
function
(
e
)
{
var
_this
=
$
(
this
);
if
(
_this
.
html
()
===
'点击填写'
)
{
_this
.
html
(
''
).
addClass
(
'color-submit'
);
}
});
_doc
.
on
(
'blur'
,
'.div-textarea'
,
function
(
e
)
{
var
_this
=
$
(
this
);
if
(
_this
.
html
()
===
''
)
{
_this
.
html
(
'点击填写'
).
removeClass
(
'color-submit'
);
}
});
_doc
.
on
(
'input'
,
'.table-tr-benzhoumubiao>td:nth-of-type(2)>input,.table-tr-benzhoumubiao>td:nth-of-type(4)>input,.table-tr-benzhoumubiao>td:nth-of-type(6)>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_new_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_old_num
=
parseFloat
(
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
next
().
find
(
'td'
).
eq
(
_index
).
html
());
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
){
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
){
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
});
_doc
.
on
(
'input'
,
'.table-tr-benzhoumubiao>td:nth-of-type(3)>input,.table-tr-benzhoumubiao>td:nth-of-type(5)>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_new_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_old_num_temp
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
next
().
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_old_num_temp
!==
''
){
var
_old_num
=
parseFloat
(
_old_num_temp
);
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
){
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
){
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_doc
.
on
(
'blur'
,
'.div-textarea'
,
function
(
e
)
{
var
_this
=
$
(
this
);
if
(
_this
.
html
()
===
''
)
{
_this
.
html
(
'点击填写'
).
removeClass
(
'color-submit'
);
}
});
_doc
.
on
(
'input'
,
'.table-tr-benzhoumubiao>td:nth-of-type(2)>input,.table-tr-benzhoumubiao>td:nth-of-type(4)>input,.table-tr-benzhoumubiao>td:nth-of-type(6)>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_new_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_old_num
=
parseFloat
(
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
next
().
find
(
'td'
).
eq
(
_index
).
html
());
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
)
{
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
)
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
}
});
_doc
.
on
(
'input'
,
'.table-tr-benzhouwancheng>td>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_old_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_new_num_temp
=
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
prev
().
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_new_num_temp
!==
''
){
var
_new_num
=
parseFloat
(
_new_num_temp
);
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
){
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
){
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
});
_doc
.
on
(
'input'
,
'.table-tr-benzhoumubiao>td:nth-of-type(3)>input,.table-tr-benzhoumubiao>td:nth-of-type(5)>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_new_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_old_num_temp
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
next
().
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_old_num_temp
!==
''
)
{
var
_old_num
=
parseFloat
(
_old_num_temp
);
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
)
{
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
)
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-benzhoumubiao'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
}
}
else
{
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
}
});
_doc
.
on
(
'input'
,
'.table-tr-fakuanbiaozhun>td>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_index
=
_this
.
parent
().
index
();
var
_tempVal
=
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
prevAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
();
if
(
_tempVal
!==
''
){
var
_chae
=
Number
(
_tempVal
);
var
_fakuanBiaozhun
=
Number
(
_this
.
val
());
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
){
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
});
function
dealJineNum
(
num
){
if
(
parseInt
(
num
)
==
num
){
return
num
;
}
else
{
return
Number
((
num
).
toFixed
(
2
));
}
};
});
//我的周报链接添加
$
(
'.word-link'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_addAppStr
=
(
_appEnter
==
1
)
?
'?appEnter=1'
:
''
;
//判断是否是app访问的,进行一些处理
location
.
href
=
'weekly_my.html'
+
_addAppStr
;
});
_doc
.
on
(
'input'
,
'.table-tr-benzhouwancheng>td>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_old_num
=
Number
(
_this
.
val
());
var
_index
=
_this
.
parent
().
index
();
var
_new_num_temp
=
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
prev
().
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_new_num_temp
!==
''
)
{
var
_new_num
=
parseFloat
(
_new_num_temp
);
var
_chae
=
_new_num
-
_old_num
;
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
(
_chae
);
var
_tempVal
=
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanbiaozhun'
).
find
(
'td'
).
eq
(
_index
).
find
(
'input'
).
val
();
if
(
_tempVal
!==
''
)
{
var
_fakuanBiaozhun
=
Number
(
_tempVal
);
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
)
{
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-benzhouwancheng'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_btnOkObj
.
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
_canClickFlag
)
{
_canClickFlag
=
false
;
//提交的过程中,关闭这个按钮的提交操作
layer
.
open
({
type
:
2
,
content
:
'加载中'
}
});
_btnOkObj
.
html
(
'提交ing...'
);
_titleTempObj
.
show
();
// _titleBeforeObj.hide();
// _titleAfterObj.show();
$
(
"body,html"
).
animate
({
scrollTop
:
0
},
0
);
//必须把页面滚动到最顶部,不然截图会不完整
var
_temp_date
=
new
Date
();
_timeStampObj
.
show
().
html
(
'生成时间:'
+
_temp_date
.
toLocaleDateString
()
+
' '
+
_temp_date
.
toLocaleTimeString
());
saveHtml2Image
(
"screen_shot_area"
);
}
else
{
layer
.
open
({
content
:
'图片生成中,请耐心等待'
,
skin
:
'msg'
,
time
:
2
_doc
.
on
(
'input'
,
'.table-tr-fakuanbiaozhun>td>input'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_index
=
_this
.
parent
().
index
();
var
_tempVal
=
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
prevAll
(
'.table-tr-chae'
).
find
(
'td'
).
eq
(
_index
).
html
();
if
(
_tempVal
!==
''
)
{
var
_chae
=
Number
(
_tempVal
);
var
_fakuanBiaozhun
=
Number
(
_this
.
val
());
if
(
_chae
>=
0
&&
_fakuanBiaozhun
>=
0
)
{
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
dealJineNum
(
_chae
*
_fakuanBiaozhun
));
}
else
{
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
}
else
{
_this
.
closest
(
'.table-tr-fakuanbiaozhun'
).
nextAll
(
'.table-tr-fakuanjine'
).
find
(
'td'
).
eq
(
_index
).
html
(
''
);
}
});
return
false
;
}
},
save
:
function
()
{
var
_timeStampObj
=
$
(
'#time_stamp_area'
);
//时间区域div获取
var
_titleBeforeObj
=
$
(
'#titile_before'
);
//titile区域截图前后的div获取
var
_titleTempObj
=
$
(
'#titile_temp'
);
//titile汇报人
var
_btnOkObj
=
$
(
'#btn_ok'
);
//提交按钮
var
loadItem
=
$
(
"#loading_pic"
);
//loading图
});
if
(
_canClickFlag
)
{
_canClickFlag
=
false
;
//提交的过程中,关闭这个按钮的提交操作
layer
.
open
({
type
:
2
,
content
:
'加载中'
});
_btnOkObj
.
html
(
'提交ing...'
);
_titleTempObj
.
show
();
// _titleBeforeObj.hide();
// _titleAfterObj.show();
function
saveHtml2Image
(
objId
)
{
var
obj
=
$
(
"#"
+
objId
);
var
width
=
obj
.
width
();
var
height
=
obj
.
height
();
html2canvas
(
obj
,
{
width
:
width
,
height
:
height
,
background
:
"rgba(255,255,255,1)"
,
onrendered
:
function
(
canvas
)
{
_titleTempObj
.
hide
();
// _titleBeforeObj.show();
// _titleAfterObj.hide();
_timeStampObj
.
hide
();
$
(
"body,html"
).
animate
({
scrollTop
:
0
},
0
);
//必须把页面滚动到最顶部,不然截图会不完整
var
dataUrl
=
canvas
.
toDataURL
(
'image/jpeg'
);
console
.
log
(
dataUrl
.
length
);
// var _temp_img = new Image(
);
// _temp_img.src = dataUrl;
// $(document.body).append(_temp_img
);
uploadimg_x
(
dataUrl
)
;
var
_temp_date
=
new
Date
(
);
_timeStampObj
.
show
().
html
(
'生成时间:'
+
_temp_date
.
toLocaleDateString
()
+
' '
+
_temp_date
.
toLocaleTimeString
()
);
saveHtml2Image
(
"screen_shot_area"
);
}
else
{
layerTipsX
(
'图片生成中,请耐心等待'
);
return
false
;
}
});
};
//业绩周报上传截图
function
uploadimg_x
(
img
,
fn
)
{
var
_currentDate
=
new
Date
();
var
_endTime
=
_currentDate
.
getFullYear
()
+
'-'
+
dealDate
(
_currentDate
.
getMonth
()
+
1
)
+
'-'
+
dealDate
(
_currentDate
.
getDate
());
//house_id 在组长和市场部总监时传的是楼盘id集合,在组员,案场经理,置业顾问时传的是0
//type 传1代表的是日报,不传或传0代表的是周报
$
.
ajax
({
url
:
ServerHost
+
"/Worktable/weekwork_img"
,
type
:
'POST'
,
data
:
{
'img'
:
img
,
'token'
:
_token
,
'house_id'
:
0
,
'startdate'
:
_weekly_data
[
'startdate'
],
'enddate'
:
_weekly_data
[
'enddate'
],
'table'
:
'agent'
,
'type'
:
0
},
async
:
false
,
dataType
:
"json"
,
success
:
function
(
data
)
{
layer
.
closeAll
();
_btnOkObj
.
html
(
'提交'
);
_canClickFlag
=
true
;
//可以再次点提交
if
(
typeof
data
===
'object'
)
{
console
.
log
(
ServerHost
+
'/weekwork_img/'
+
data
.
imgname
);
if
(
data
.
status
==
'1'
)
{
layer
.
open
({
content
:
data
.
msg
,
btn
:
[
'确定'
],
yes
:
function
(
_index
)
{
layer
.
close
(
_index
);
}
});
}
else
{
layer
.
open
({
content
:
data
.
msg
,
btn
:
[
'确定'
],
yes
:
function
(
_index
)
{
layer
.
close
(
_index
);
}
});
function
saveHtml2Image
(
objId
)
{
var
obj
=
$
(
"#"
+
objId
);
var
width
=
obj
.
width
();
var
height
=
obj
.
height
();
html2canvas
(
obj
,
{
width
:
width
,
height
:
height
,
background
:
"rgba(255,255,255,1)"
,
onrendered
:
function
(
canvas
)
{
_titleTempObj
.
hide
();
_timeStampObj
.
hide
();
var
dataUrl
=
canvas
.
toDataURL
(
'image/jpeg'
);
console
.
log
(
dataUrl
.
length
);
uploadimg_x
(
dataUrl
);
}
});
};
}
else
{
layer
.
open
({
content
:
'图标保存失败'
,
skin
:
'msg'
,
time
:
2
});
}
},
error
:
function
(
returndata
)
{
layer
.
closeAll
();
_btnOkObj
.
html
(
'提交'
);
_canClickFlag
=
true
;
//可以再次点提交
layer
.
open
({
content
:
'截图保存失败'
,
skin
:
'msg'
,
time
:
2
//业绩周报上传截图
function
uploadimg_x
(
img
,
fn
)
{
var
_currentDate
=
new
Date
();
var
_endTime
=
_currentDate
.
getFullYear
()
+
'-'
+
dealDate
(
_currentDate
.
getMonth
()
+
1
)
+
'-'
+
dealDate
(
_currentDate
.
getDate
());
//house_id 在组长和市场部总监时传的是楼盘id集合,在组员,案场经理,置业顾问时传的是0
//type 传1代表的是日报,不传或传0代表的是周报
$
.
ajax
({
url
:
ServerHost
+
"/broker/weekWorkImg"
,
type
:
'POST'
,
data
:
{
'img'
:
img
,
'agent_id'
:
_id
,
'AuthToken'
:
_token
,
'start_date'
:
_weekly_data
[
'startdate'
],
'end_date'
:
_weekly_data
[
'enddate'
],
'type'
:
0
},
async
:
false
,
dataType
:
"json"
,
success
:
function
(
data
)
{
layer
.
closeAll
();
_btnOkObj
.
html
(
'提交'
);
_canClickFlag
=
true
;
//可以再次点提交
if
(
typeof
data
===
'object'
)
{
console
.
log
(
data
.
data
);
if
(
data
.
code
==
'200'
)
{
layer
.
open
({
content
:
'截图成功'
,
btn
:
[
'确定'
],
yes
:
function
(
_index
)
{
layer
.
close
(
_index
);
}
});
}
else
{
layer
.
open
({
content
:
data
.
msg
,
btn
:
[
'确定'
],
yes
:
function
(
_index
)
{
layer
.
close
(
_index
);
}
});
}
}
else
{
layerTipsX
(
'data type error'
);
}
},
error
:
function
(
returndata
)
{
layer
.
closeAll
();
_btnOkObj
.
html
(
'提交'
);
_canClickFlag
=
true
;
//可以再次点提交
layerTipsX
(
'截图保存失败 enter error'
);
}
});
}
}
);
}
}
}
}
);
});
\ No newline at end of file
public/app/js/weekly_achieve_mdzj.js
View file @
e16fc78e
...
...
@@ -262,11 +262,11 @@ $(function() {
$
.
ajax
({
type
:
"POST"
,
url
:
ServerHost
+
'/Worktable/boss_shop_weekwork
'
,
url
:
ServerHost
TempC
+
'/broker/dayStatement
'
,
data
:
{
'
token'
:
_token
,
'
startdate
'
:
_weekly_data
[
'startdate'
],
'
enddate
'
:
_weekly_data
[
'enddate'
]
'
agent_id'
:
_id
,
'
time_start
'
:
_weekly_data
[
'startdate'
],
'
time_end
'
:
_weekly_data
[
'enddate'
]
},
timeout
:
30000
,
dataType
:
"json"
,
...
...
@@ -275,10 +275,10 @@ $(function() {
},
success
:
function
(
data
)
{
if
(
typeof
data
==
'object'
)
{
if
(
data
[
'
status'
]
==
0
)
{
if
(
data
[
'
code'
]
==
20
0
)
{
_tableFirstObj
.
find
(
'.renshu_shangzhou'
).
html
(
data
[
'
count'
][
'lastweek
'
]);
_tableFirstObj
.
find
(
'.renshu_benzhou'
).
html
(
data
[
'
count'
][
'week
'
]);
_tableFirstObj
.
find
(
'.renshu_shangzhou'
).
html
(
data
[
'
data'
][
'agent_total
'
]);
_tableFirstObj
.
find
(
'.renshu_benzhou'
).
html
(
data
[
'
data'
][
'agent_total
'
]);
var
_htmlGroupInfo
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
...
...
@@ -402,14 +402,14 @@ $(function() {
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_tableObj
=
_this
.
closest
(
'table'
);
_tableObj
.
find
(
'.yeji_renjun'
).
html
(
dealJineNum
(
Number
(
_this
.
val
())
/
Number
(
_tableObj
.
find
(
'.renshu_benzhou'
).
html
())
*
30
/
_dayNum
));
_tableObj
.
find
(
'.yeji_renjun'
).
html
(
dealJineNum
(
Number
(
_this
.
val
())
/
Number
(
_tableObj
.
find
(
'.renshu_benzhou'
).
html
())));
});
_doc
.
on
(
'input'
,
'.shishou_muqian'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_tableObj
=
_this
.
closest
(
'table'
);
_tableObj
.
find
(
'.shishou_renjun'
).
html
(
dealJineNum
(
Number
(
_this
.
val
())
/
Number
(
_tableObj
.
find
(
'.renshu_benzhou'
).
html
())
*
30
/
_dayNum
));
_tableObj
.
find
(
'.shishou_renjun'
).
html
(
dealJineNum
(
Number
(
_this
.
val
())
/
Number
(
_tableObj
.
find
(
'.renshu_benzhou'
).
html
())));
_tableObj
.
find
(
'.yingkui'
).
html
(
dealJineNum
((
Number
(
_this
.
val
())
-
Number
(
_tableObj
.
find
(
'.renshu_benzhou'
).
html
())
*
8000
)
/
30
*
_dayNum
));
});
_doc
.
on
(
'input'
,
'.yeji_benzhou'
,
function
(
e
)
{
...
...
@@ -433,13 +433,6 @@ $(function() {
}
});
//我的周报链接添加
$
(
'.word-link'
).
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
location
.
href
=
'weekly_my.html'
+
((
_appEnter
==
1
)
?
'?appEnter=1'
:
''
);
//判断是否是app访问的,进行一些处理
});
_btnOkObj
.
click
(
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -458,44 +451,47 @@ $(function() {
var
_temp_date
=
new
Date
();
_timeStampObj
.
show
().
html
(
'生成时间:'
+
_temp_date
.
toLocaleDateString
()
+
' '
+
_temp_date
.
toLocaleTimeString
());
var
_objTemp
=
$
(
'#tab_table_area>section>table'
);
var
_arrTemp
=
[];
!
function
funTemp
(
count
)
{
clearInterval
(
_timer
);
//先移除定时器,等截图完成之后再开启
if
(
count
>=
_objTemp
.
length
)
{
console
.
log
(
_arrTemp
);
var
obj
=
$
(
'#time_stamp_area'
);
html2canvas
(
obj
,
{
width
:
obj
.
width
(),
height
:
obj
.
height
(),
background
:
"rgba(255,255,255,1)"
,
onrendered
:
function
(
canvas
)
{
var
dataUrl
=
canvas
.
toDataURL
(
'image/jpeg'
);
console
.
log
(
dataUrl
.
length
);
_arrTemp
.
push
(
dataUrl
);
_titleTempObj
.
hide
();
_timeStampObj
.
hide
();
uploadimg_x
(
_arrTemp
);
return
false
;
}
});
}
else
{
var
obj
=
$
(
_objTemp
[
count
]);
html2canvas
(
obj
,
{
width
:
obj
.
width
(),
height
:
obj
.
height
(),
background
:
"rgba(255,255,255,1)"
,
onrendered
:
function
(
canvas
)
{
var
dataUrl
=
canvas
.
toDataURL
(
'image/jpeg'
);
console
.
log
(
dataUrl
.
length
);
_arrTemp
.
push
(
dataUrl
);
funTemp
(
++
count
);
}
});
}
}(
0
);
saveHtml2Image
(
"screen_shot_area"
);
// var _objTemp = $('#tab_table_area>section>table');
//
// var _arrTemp = [];
// ! function funTemp(count) {
// clearInterval(_timer);//先移除定时器,等截图完成之后再开启
// if(count >= _objTemp.length) {
// console.log(_arrTemp);
// var obj = $('#time_stamp_area');
// html2canvas(obj, {
// width: obj.width(),
// height: obj.height(),
// background: "rgba(255,255,255,1)",
// onrendered: function(canvas) {
// var dataUrl = canvas.toDataURL('image/jpeg');
// console.log(dataUrl.length);
// _arrTemp.push(dataUrl);
// _titleTempObj.hide();
// _timeStampObj.hide();
// uploadimg_x(_arrTemp);
// return false;
// }
// });
//
// } else {
// var obj = $(_objTemp[count]);
// html2canvas(obj, {
// width: obj.width(),
// height: obj.height(),
// background: "rgba(255,255,255,1)",
// onrendered: function(canvas) {
// var dataUrl = canvas.toDataURL('image/jpeg');
// console.log(dataUrl.length);
// _arrTemp.push(dataUrl);
// funTemp(++count);
// }
// });
// }
// }(0);
// saveHtml2Image("screen_shot_area");
}
else
{
...
...
@@ -509,17 +505,18 @@ $(function() {
});
function
saveHtml2Image
(
obj
Dom
)
{
//
var obj = $("#" + objId);
var
obj
=
$
(
objDom
);
function
saveHtml2Image
(
obj
Id
)
{
var
obj
=
$
(
"#"
+
objId
);
//
var obj = $(objDom);
var
width
=
obj
.
width
();
var
height
=
obj
.
height
();
html2canvas
(
obj
,
{
width
:
width
,
height
:
height
/
2
,
height
:
height
,
background
:
"rgba(255,255,255,1)"
,
onrendered
:
function
(
canvas
)
{
_titleTempObj
.
hide
();
_timeStampObj
.
hide
();
var
dataUrl
=
canvas
.
toDataURL
(
'image/jpeg'
);
console
.
log
(
dataUrl
.
length
);
// var _temp_img = new Image();
...
...
@@ -553,19 +550,15 @@ $(function() {
];
$
.
ajax
({
url
:
ServerHost
+
"/Worktable/weekwork_i
mg"
,
url
:
ServerHost
TempC
+
"/broker/weekWorkI
mg"
,
type
:
'POST'
,
data
:
{
'img'
:
img
,
'token'
:
_token
,
'house_id'
:
0
,
'startdate'
:
_weekly_data
[
'startdate'
],
'enddate'
:
_weekly_data
[
'enddate'
],
'table'
:
'agent'
,
'type'
:
0
,
'img_type'
:
1
,
'level'
:
10
,
'content'
:
_textData
.
join
(
'|||'
)
'AuthToken'
:
_token
,
'agent_id'
:
_id
,
'start_date'
:
_weekly_data
[
'startdate'
],
'end_date'
:
_weekly_data
[
'enddate'
],
'type'
:
0
},
async
:
false
,
dataType
:
"json"
,
...
...
@@ -574,12 +567,12 @@ $(function() {
_btnOkObj
.
html
(
'提交'
);
_canClickFlag
=
true
;
//可以再次点提交
if
(
typeof
data
===
'object'
)
{
console
.
log
(
ServerHost
+
'/weekwork_img/'
+
data
.
imgname
);
if
(
data
.
status
==
'1'
)
{
if
(
data
.
code
==
'200'
)
{
console
.
log
(
data
.
data
);
localStorage
.
removeItem
(
'mdzjZbData'
);
//claerLocalTxt(); //清除本地存储的文字相关
layer
.
open
({
content
:
data
.
msg
,
content
:
'截图成功'
,
btn
:
[
'确定'
],
yes
:
function
(
_index
)
{
_timer
=
setInterval
(
autoLocalStorage
,
120000
);
//截图成功之后再开启
...
...
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