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
633b82f4
Commit
633b82f4
authored
Aug 29, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
罚款
parent
e24b3431
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2051 additions
and
2 deletions
+2051
-2
fineMoney.html
application/index/view/finance/fineMoney.html
+708
-2
fineMoney.js
public/resource/js/fineMoney.js
+1279
-0
fineMoney_list_template_tpl.html
public/resource/template/fineMoney_list_template_tpl.html
+64
-0
No files found.
application/index/view/finance/fineMoney.html
View file @
633b82f4
罚款
{layout name="global/frame_two_tpl" /}
\ No newline at end of file
<input
type=
"hidden"
class=
"page-load"
id=
"fineMoney"
/>
<!--关联经纪人列表liudanjs文件-->
<style>
.form-group
{
margin-bottom
:
6px
;
}
.J_preview
{
width
:
30px
;
height
:
30px
;
border-radius
:
15px
;
}
/*黑名单上传图片的样式*/
.modal-body-height
{
overflow-y
:
auto
;
height
:
432px
;
}
#container_body_img_area
>
div
,
#container_body_img_area_add
>
div
{
float
:
left
;
width
:
216px
;
}
.img-pre-ul
{
padding-left
:
0
;
overflow
:
hidden
;
}
.img-pre-ul
>
li
{
list-style
:
no
;
float
:
left
;
width
:
210px
;
height
:
170px
;
overflow
:
hidden
;
margin-right
:
10px
;
margin-top
:
10px
;
}
.img-pre-ul
>
li
>
img
{
float
:
left
;
width
:
210px
;
height
:
140px
;
object-fit
:
contain
;
cursor
:
pointer
;
}
.img-pre-ul
>
li
>
a
{
float
:
left
;
width
:
210px
;
text-align
:
center
;
line-height
:
30px
;
}
/*图片点击放大预览区域的样式*/
#img_mask_area
{
position
:
fixed
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
overflow
:
hidden
;
z-index
:
1999
;
background-color
:
rgba
(
0
,
0
,
0
,
.3
);
display
:
none
;
}
#img_mask_area
>
img
{
width
:
900px
;
height
:
700px
;
object-fit
:
contain
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
margin-left
:
-450px
;
margin-top
:
-350px
;
}
.input-100-width
{
width
:
100px
!important
;
}
.list-group-item
>
.full-width-100
>
label
{
width
:
60px
;
}
.list-group-item
>
.full-pic-area
>
label
{
width
:
120px
;
}
.result
>
img
,
.result2
>
img
{
width
:
120px
;
height
:
120px
;
margin-top
:
8px
;
}
.result-reverse
>
img
,
.result-positive
>
img
,
.result-reverse-edit
>
img
,
.result-positive-edit
>
img
{
width
:
80px
;
height
:
80px
;
margin-top
:
3px
;
}
#container_body
{
position
:
relative
;
overflow
:
hidden
;
}
#file_input
,
#file_input_positive
,
#file_input_reverse
,
#file_input_positive_edit
,
#file_input_reverse_edit
{
opacity
:
0
;
position
:
absolute
;
top
:
0
;
left
:
210px
;
height
:
35px
;
width
:
80px
;
cursor
:
pointer
;
}
#file_input_positive
,
#file_input_reverse
,
#file_input_positive_edit
,
#file_input_reverse_edit
{
left
:
0px
;
}
.modal-body-width
{
width
:
800px
;
}
.span-del2
,
.span-del
,
.span-del-reverse
,
.span-del-positive
{
color
:
red
;
cursor
:
pointer
;
}
.black-list-text
{
width
:
500px
;
height
:
100px
;
vertical-align
:
top
;
margin-bottom
:
20px
;
}
/*黑名单上传图片的样式*/
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<li>
<a
href=
"#"
>
罚款账单
</a>
</li>
<!--<li class="active">经纪人列表</li>-->
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<li>
<a
href=
"#modal-add"
data-toggle=
"modal"
class=
"btn btn-default agent_add"
>
<i
class=
"icon-plus"
></i>
新增
</a>
</li>
</ul>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<td
colspan=
"14"
>
<form
id=
"form_search"
>
<span
class=
"fore-span ld-Marheight"
>
提交时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
付款时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date"
type=
"date"
>
<select
class=
"form-control btn4 ld-Marheight notice-lable"
>
<option
value=
""
>
状态
</option>
<option
value=
"1"
>
待支付
</option>
<option
value=
"2"
>
已支付
</option>
<option
value=
"3"
>
已取消
</option>
</select>
<select
class=
"form-control btn4 ld-Marheight notice-lable"
>
<option
value=
""
>
罚款项目
</option>
<option
value=
"1"
>
待支付
</option>
<option
value=
"2"
>
已支付
</option>
<option
value=
"3"
>
已取消
</option>
</select>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"罚款ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"提交人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 margin-top-ld"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"release_title"
placeholder=
"被罚款人姓名"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"export"
>
导出excel
</span>
</form>
</td>
</tr>
<tr
class=
"text-center"
>
<th
class=
"text-center"
>
罚款ID
</th>
<th
class=
"text-center"
>
罚款项目
</th>
<th
class=
"text-center"
>
提交时间
</th>
<th
class=
"text-center"
>
提交人
</th>
<th
class=
"text-center"
>
罚款金额
</th>
<th
class=
"text-center"
>
被罚款人
</th>
<th
class=
"text-center"
>
滞纳金
</th>
<th
class=
"text-center"
>
付款金额
</th>
<th
class=
"text-center"
>
状态
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
<tbody
id=
"agentlist"
>
</tbody>
</table>
<!-- 列表底部按钮 -->
<div
class=
"paginations text-right"
id=
"pagediv"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!--新增-->
<div
class=
"modal fade"
id=
"modal-add"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
id=
"title_add"
>
新增经纪人
</h4>
</div>
<div
class=
"modal-body"
style=
"height: 560px;overflow-y: auto;overflow-x: hidden;"
>
<form
class=
"form-horizontal form-horizontal-add"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
罚款金额:
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"name_add"
type=
"text"
value=
""
id=
"title_add"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
罚款类型:
</label>
<select
name=
"district_id_add"
class=
"form-control btn6"
>
<option
value=
""
>
选择罚款类型
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
处罚当事人:
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"name_add"
type=
"text"
value=
""
id=
"title_add"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
备注(选填):
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"name_add"
type=
"text"
value=
""
id=
"title_add"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-5 control-label"
>
图片上传(选填,最多4张):
</label>
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
id=
"container_body"
>
<!--<label>请选择一个图像文件:</label>-->
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input_positive"
>
<div
id=
"container_body_img_area_positive"
></div>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_add"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--编辑-->
<div
class=
"modal fade"
id=
"modal-edit"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
id=
"title"
>
经纪人编辑
</h4>
</div>
<div
class=
"modal-body"
style=
"height: 560px;overflow-y: auto;overflow-x: hidden;"
>
<form
class=
"form-horizontal form-horizontal-edit"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
罚款ID:666
</label>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
罚款金额:
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"name"
placeholder=
""
type=
"text"
value=
""
id=
"title"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
罚款类型:
</label>
<select
name=
"district_id"
class=
"form-control btn6"
disabled=
"disabled"
>
<option
value=
""
>
选择罚款类型
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
处罚当事人:
</label>
<span
style=
"margin-top: 7px;display: inline-block;"
>
99999
</span>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
提交人:
</label>
<span
style=
"margin-top: 7px;display: inline-block;"
>
99999
</span>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
提交时间:
</label>
<span
style=
"margin-top: 7px;display: inline-block;"
>
99999
</span>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
备注:
</label>
<input
class=
"form-control btn6"
data-rule-buga=
"false"
data-rule-required=
"true"
name=
"name"
placeholder=
""
type=
"text"
value=
""
id=
"title"
>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
状态:
</label>
<span
style=
"margin-top: 7px;display: inline-block;"
>
99999
</span>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-5 control-label"
>
图片上传(选填,最多4张):
</label>
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
id=
"container_body"
>
<!--<label>请选择一个图像文件:</label>-->
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input_positive_edit"
>
<div
id=
"container_body_img_area_positive_edit"
></div>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_edit"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--转勤 修改手机号-->
<div
class=
"modal fade"
id=
"modal-editPhone"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
修改手机号
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
电话(登录账号):
</label>
<input
type=
"number"
class=
"form-control btn6"
id=
"edit-phone"
value=
""
placeholder=
"填写手机号"
>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary edit-phone-save"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--变更角色-->
<div
class=
"modal fade"
id=
"modal-user"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
角色设置
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-3 control-label"
>
权限角色:
</label>
<select
name=
"status"
class=
"form-control btn6"
id=
"edit_role"
>
</select>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_user"
data-dismiss=
"modal"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--绑定手机 2.2版本-->
<div
class=
"modal fade"
id=
"modal-phonebundling"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
绑定手机/电脑
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<!--<button type="button" class="btn btn-primary del-record" style="margin: 6px;">清空解绑设备记录</button>-->
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
设备类型
</th>
<th
class=
"text-center"
>
设备型号
</th>
<th
class=
"text-center"
>
请求时间
</th>
<th
class=
"text-center"
>
绑定状态
</th>
</tr>
</thead>
<tbody
id=
'agent_phone_binding'
>
</tbody>
</table>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--绑定电脑-->
<div
class=
"modal fade"
id=
"modal-pcbundling"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
绑定电脑
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th>
绑定电脑
</th>
<th>
请求时间
</th>
<th>
电脑绑定状态
</th>
</tr>
</thead>
<tbody
id=
'agent_pc_binding'
>
</tbody>
</table>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--同城转勤-->
<div
class=
"modal fade"
id=
"modal-turncity"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
同城转门店
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal form-horizontal-turn"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属部门:
</label>
<select
name=
"district_id_city"
class=
"form-control btn6"
>
<option
value=
""
>
选择所属部门
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属门店:
</label>
<select
name=
"store_id_city"
class=
"form-control btn6"
>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
业绩调整开始时间:
</label>
<input
id=
"same_city_Start_time"
class=
"form-control btn6"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"
>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_city_turn"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--跨城市转勤-->
<div
class=
"modal fade"
id=
"modal-business"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
跨城市转勤
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal form-horizontal-turn"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属部门:
</label>
<select
name=
"district_id_business"
class=
"form-control btn6"
>
<option
value=
""
>
选择所属部门
</option>
</select>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
所属门店:
</label>
<select
name=
"store_id_business"
class=
"form-control btn6"
>
</select>
</div>
<!--<div class="form-group">
<label class="col-sm-4 control-label">业绩调整开始时间:</label>
<input id="city_Start_time" class="form-control btn6" type="text" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd HH:mm:ss'})">
</div>-->
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_user_turn"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--设置经纪人 职称-->
<div
class=
"modal fade"
id=
"modal-professionalTitle"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
设置经纪人职称
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal form-horizontal-turn"
>
<br
/>
<br
/>
<div
class=
"form-group"
>
<label
class=
"col-sm-4 control-label"
>
职称名称:
</label>
<select
id=
"professional_title_choose"
class=
"form-control btn6"
>
<option
value=
""
>
店长
</option>
<option
value=
""
>
经理
</option>
<option
value=
""
>
主任
</option>
<option
value=
""
>
顾问
</option>
<option
value=
""
>
新人
</option>
</select>
</div>
<br
/>
<br
/>
<br
/>
<br
/>
</form>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
</button>
<button
type=
"button"
class=
"btn btn-primary submit_professional_title"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--状态记录-->
<div
class=
"modal fade"
id=
"modal-stateRecord"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
状态记录
</h4>
</div>
<div
class=
"modal-body"
>
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<th
class=
"text-center"
>
状态
</th>
<th
class=
"text-center"
>
操作人
</th>
<th
class=
"text-center"
>
操作时间
</th>
</tr>
</thead>
<tbody
id=
'state_record_pc'
>
</tbody>
</table>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--黑名单-->
<div
class=
"modal fade"
id=
"modal-blackList"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-body-width"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
加黑名单
</h4>
</div>
<div
class=
"modal-body modal-body-height"
>
<ul
class=
"list-group"
>
<li
class=
"list-group-item"
>
<div>
<label>
违反公司事项(必填):
</label>
<textarea
class=
"black-list-text"
></textarea>
</div>
<div
class=
"form-group full-width-100 full-pic-area"
>
<!--input上传图片-->
<div
id=
"container_body"
>
<label>
简历等文件(选填:图片格式):
</label>
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input"
/>
<div
id=
"container_body_img_area"
></div>
</div>
</div>
<!--<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>-->
</li>
</ul>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button btn2"
class=
"btn btn-primary"
id=
"saveBtn"
>
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<div
id=
"img_mask_area"
title=
"点击任意位置可关闭"
>
<img
/>
</div>
\ No newline at end of file
public/resource/js/fineMoney.js
0 → 100644
View file @
633b82f4
define
([
'doT'
,
'text!temp/fineMoney_list_template_tpl.html'
,
'text!temp/phoneBinding_template_tpl.html'
,
'text!temp/pcBinding_template_tpl.html'
,
'css!style/home.css'
,
'pagination'
,
'bootstrapJs'
,
'ckfinder'
,
'ckfinderStart'
,
'blow-up'
],
function
(
doT
,
template
,
template_binding
,
pctemplate_binding
)
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
agent
=
{
pageNo
:
1
,
pageSize
:
15
,
agent_id
:
0
,
idArray
:
''
,
confirm_old
:
''
,
//是否转勤
editObj
:
''
,
//编辑返回的对象
init
:
function
()
{
//初始化dot
$
(
"body"
).
append
(
template
+
template_binding
+
pctemplate_binding
);
// $("select[name=agent_status]").val('0');
agent
.
getList
();
agent
.
event
();
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
document
).
on
(
"input"
,
"#district_id2_city"
,
function
()
{
//点击城市
//列表选择城市
agent
.
getDistrictList
();
});
agent
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2,[name=district_id_add],[name=district_id_business],[name=district_id_city]'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
//新增 编辑
var
_objTemp
=
_this
.
parent
().
next
().
find
(
'select'
);
_objTemp
.
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
agent
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="">选择门店</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
_objTemp
.
html
(
_str
);
_this
.
next
().
html
(
_str
);
});
}
else
{};
});
});
var
NV
=
{};
var
UA
=
navigator
.
userAgent
.
toLowerCase
();
try
{
NV
.
name
=
!-
[
1
,
]
?
'ie'
:
(
UA
.
indexOf
(
"firefox"
)
>
0
)
?
'firefox'
:
(
UA
.
indexOf
(
"chrome"
)
>
0
)
?
'chrome'
:
window
.
opera
?
'opera'
:
window
.
openDatabase
?
'safari'
:
'unkonw'
;
}
catch
(
e
)
{};
try
{
NV
.
version
=
(
NV
.
name
==
'ie'
)
?
UA
.
match
(
/msie
([\d
.
]
+
)
/
)[
1
]
:
(
NV
.
name
==
'firefox'
)
?
UA
.
match
(
/firefox
\/([\d
.
]
+
)
/
)[
1
]
:
(
NV
.
name
==
'chrome'
)
?
UA
.
match
(
/chrome
\/([\d
.
]
+
)
/
)[
1
]
:
(
NV
.
name
==
'opera'
)
?
UA
.
match
(
/opera.
([\d
.
]
+
)
/
)[
1
]
:
(
NV
.
name
==
'safari'
)
?
UA
.
match
(
/version
\/([\d
.
]
+
)
/
)[
1
]
:
'0'
;
}
catch
(
e
)
{};
try
{
NV
.
shell
=
(
UA
.
indexOf
(
'360ee'
)
>
-
1
)
?
'360极速浏览器'
:
(
UA
.
indexOf
(
'360se'
)
>
-
1
)
?
'360安全浏览器'
:
(
UA
.
indexOf
(
'qqbrowser'
)
>
-
1
)
?
'QQ浏览器'
:
(
UA
.
indexOf
(
'se'
)
>
-
1
)
?
'搜狗浏览器'
:
(
UA
.
indexOf
(
'aoyou'
)
>
-
1
)
?
'遨游浏览器'
:
(
UA
.
indexOf
(
'theworld'
)
>
-
1
)
?
'世界之窗浏览器'
:
(
UA
.
indexOf
(
'worldchrome'
)
>
-
1
)
?
'世界之窗极速浏览器'
:
(
UA
.
indexOf
(
'greenbrowser'
)
>
-
1
)
?
'绿色浏览器'
:
(
UA
.
indexOf
(
'baidu'
)
>
-
1
)
?
'百度浏览器'
:
NV
.
name
;
}
catch
(
e
)
{};
//判断 谷歌 360 application/vnd.chromium.remoting-viewer 可能为360特有
if
(
NV
.
name
==
'chrome'
){
var
is360
=
_mime
(
"type"
,
"application/vnd.chromium.remoting-viewer"
);
if
(
isChrome
()
&&
is360
)
{
NV
.
shell
=
'360浏览器'
}
//检测是否是谷歌内核(可排除360及谷歌以外的浏览器)
function
isChrome
()
{
var
ua
=
navigator
.
userAgent
.
toLowerCase
();
return
ua
.
indexOf
(
"chrome"
)
>
1
;
}
//测试mime
function
_mime
(
option
,
value
)
{
var
mimeTypes
=
navigator
.
mimeTypes
;
for
(
var
mt
in
mimeTypes
)
{
if
(
mimeTypes
[
mt
][
option
]
==
value
)
{
return
true
;
}
}
return
false
;
}
}
// alert('浏览器UA=' + UA +
// '\n\n浏览器名称=' + NV.name +
// '\n\n浏览器版本=' + NV.version +
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
var
browser_version
=
NV
.
shell
+
'/'
+
NV
.
version
;
// alert(browser_version)
$
(
'#search'
).
click
(
function
(
pageNo
)
{
agent
.
getList
(
1
);
});
//经纪人列表 导出报表
_doc
.
on
(
"click"
,
"#export"
,
function
()
{
agent
.
maintableExport
();
});
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
});
$
(
document
).
delegate
(
".agent_business"
,
"click"
,
function
()
{
//点击 编辑 跨城市转勤
$
(
".form-horizontal-turn"
)[
0
].
reset
();
//重置表单
});
$
(
document
).
delegate
(
".agent_add"
,
"click"
,
function
()
{
//点击新增
$
(
".form-horizontal-add"
)[
0
].
reset
();
//重置表单
agent
.
confirm_old
=
''
//是否转勤 置空
//置空图片
$
(
'#container_body_img_area_positive'
).
html
(
''
);
$
(
'#container_body_img_area_reverse'
).
html
(
''
);
});
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
$
(
".form-horizontal-edit"
)[
0
].
reset
();
//重置表单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
//置空图片
$
(
'#container_body_img_area_positive_edit'
).
html
(
''
);
$
(
'#container_body_img_area_reverse_edit'
).
html
(
''
);
agent
.
Edit
();
});
$
(
document
).
delegate
(
"#password"
,
"click"
,
function
()
{
$
(
this
).
val
(
''
).
attr
(
'type'
,
'password'
);
});
$
(
document
).
on
(
"click"
,
".black-list"
,
function
()
{
//点击黑名单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
on
(
"click"
,
".edit-phone-btn"
,
function
()
{
//点击修改手机号
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
$
(
'#edit-phone'
).
val
(
$
(
this
).
attr
(
"data-phone"
));
});
$
(
document
).
on
(
"click"
,
".edit-phone-save"
,
function
()
{
//保存修改手机号
agent
.
Submit_edit_phone
();
//获取编辑内容
});
$
(
document
).
on
(
"click"
,
".phone-bundling"
,
function
()
{
//点击绑定手机
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPhoneBindingList
(
browser_version
);
});
$
(
document
).
on
(
"click"
,
".del-record"
,
function
()
{
//点击绑定电脑(清除绑定)
agent
.
getPhoneBindingDelList
();
});
$
(
document
).
on
(
"click"
,
".pc-bundling"
,
function
()
{
//点击绑定电脑
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPcBindingList
();
});
$
(
document
).
on
(
"click"
,
".state-record"
,
function
()
{
//点击记录状态
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
stateRecordList
();
});
$
(
document
).
delegate
(
".submit_add"
,
"click"
,
function
(
e
)
{
//提交新增
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_add
();
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
(
e
)
{
//提交编辑
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_edit
();
});
$
(
document
).
delegate
(
".submit_user_turn"
,
"click"
,
function
(
e
)
{
//提交 编辑(跨城市 转勤)
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_edit_turn
();
});
$
(
document
).
delegate
(
".submit_city_turn"
,
"click"
,
function
(
e
)
{
//提交 编辑(跨城市 转勤)
e
.
preventDefault
();
e
.
stopPropagation
();
agent
.
Submit_edit_city_turn
();
});
$
(
document
).
delegate
(
"#role"
,
"click"
,
function
(
e
)
{
//变更角色
var
_this
=
$
(
this
);
var
_tempVal
=
_this
.
closest
(
'tr'
).
attr
(
'data-groupname'
);
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getRole
(
_tempVal
);
});
$
(
document
).
delegate
(
".submit_user"
,
"click"
,
function
()
{
//提交变更
agent
.
Submit_user
();
});
//冻结状态选中与取消事件2.9.5版本;
$
(
document
).
on
(
'click'
,
'.yetai_checkbox'
,
function
(
e
){
if
(
!
confirm
(
'是否继续?'
))
{
return
;
};
var
params
=
{};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
if
(
$
(
this
).
hasClass
(
"isCheck"
)
){
//取消选中
if
(
$
(
this
).
html
()
==
'已离职'
){
$
(
this
).
html
(
'离职'
);
params
.
type
=
0
;
}
if
(
$
(
this
).
html
()
==
'已长假'
){
$
(
this
).
html
(
'长假'
);
params
.
type
=
0
;
}
$
(
this
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
}
else
{
//选中
if
(
$
(
this
).
html
()
==
'离职'
){
$
(
this
).
html
(
'已离职'
);
$
(
this
).
next
().
html
(
'长假'
);
params
.
type
=
2
;
}
if
(
$
(
this
).
html
()
==
'长假'
){
$
(
this
).
html
(
'已长假'
);
$
(
this
).
prev
().
html
(
'离职'
);
params
.
type
=
1
;
}
$
(
this
).
siblings
(
".yetai_checkbox"
).
removeClass
(
"isCheck"
).
addClass
(
"btn-info"
).
removeClass
(
'btn-warning'
);
$
(
this
).
addClass
(
"isCheck"
).
removeClass
(
"btn-info"
).
addClass
(
'btn-warning'
);
};
$
.
ajax
({
//经纪人 离职 长假
'type'
:
'POST'
,
'url'
:
'/index/updateStatus'
,
data
:
{
"ids"
:
params
.
id
,
"status"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
data
.
msg
)
}
}
});
});
//解除自动锁定
$
(
document
).
on
(
'click'
,
'.automatic-locking'
,
function
(
e
){
var
params
=
{};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
if
(
!
confirm
(
'是否解锁此账号为正常状态?'
))
{
return
;
};
var
hideAutomatic
=
{};
hideAutomatic
=
$
(
this
);
$
.
ajax
({
//经纪人
'type'
:
'POST'
,
'url'
:
'/index/updateStatus'
,
data
:
{
"ids"
:
params
.
id
,
"status"
:
0
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
hideAutomatic
.
hide
();
// console.log( $(this));
}
else
{
alert
(
data
.
msg
)
}
}
});
});
//手机绑定状态切换
$
(
document
).
delegate
(
".is_show2"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
agent
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"允许"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_show2'
);
params
.
type
=
0
;
$
(
this
).
html
(
'解绑'
);
}
else
if
(
str
===
"解绑"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_show2'
);
params
.
type
=
1
;
$
(
this
).
html
(
'允许'
);
};
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateDevice'
,
data
:
{
"agent_id"
:
agent
.
agent_id
,
"id"
:
params
.
id
,
"operator_id"
:
user_info_obj
.
id
,
"is_forbidden"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
"禁用失败!"
)
}
}
});
});
//电脑绑定状态切换
$
(
document
).
delegate
(
".is_showpc"
,
"click"
,
function
()
{
//点击禁用
if
(
!
confirm
(
'是否继续?'
))
{
return
;
}
agent
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
params
=
{
};
params
.
id
=
$
(
this
).
attr
(
"data-id"
);
var
str
=
$
.
trim
(
$
(
this
).
html
());
if
(
str
===
"允许"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-default is_showpc'
);
params
.
type
=
0
;
$
(
this
).
html
(
'解绑'
);
}
else
if
(
str
===
"解绑"
)
{
$
(
this
).
attr
(
'class'
,
'btn1 btn-info is_showpc'
);
params
.
type
=
1
;
$
(
this
).
html
(
'允许'
);
};
$
.
ajax
({
//禁用
'type'
:
'POST'
,
'url'
:
'/index/updateDevice'
,
data
:
{
"agent_id"
:
agent
.
agent_id
,
"id"
:
params
.
id
,
"operator_id"
:
user_info_obj
.
id
,
"is_forbidden"
:
params
.
type
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
!=
200
)
{
alert
(
"禁用失败!"
)
}
}
});
});
//收款图片-点击添加图片事件
$
(
'#file_input'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'agent_black_list_img'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area'
).
append
(
'<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
'/'
+
_data
.
data
.
internet_img_name
// '1': _data.data.internet_img_name?urlDeal(_data.data.internet_img_name):_data.data.internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//图片删除事件
_doc
.
on
(
'click'
,
'.span-del,.span-del-positive,.span-del-reverse'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
this
).
parent
().
remove
();
});
//图片删除,已有的则调用接口删除
_doc
.
on
(
'click'
,
'.span-del2'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确认删除吗?'
)){
_this
.
parent
().
remove
();
agent
.
spandelList
(
_this
.
prev
().
attr
(
'data-imgid'
));
};
});
//保存上传的图片
_doc
.
on
(
'click'
,
'#saveBtn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
var
_data
=
{};
_data
[
'content'
]
=
$
(
'.black-list-text'
).
val
();
_data
[
'agents_id'
]
=
agent
.
agent_id
;
var
imgname
=
[];
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
console
.
log
(
imgname
.
join
(
','
));
_data
[
'img_info'
]
=
imgname
.
join
(
','
);
if
(
$
.
trim
(
$
(
'.black-list-text'
).
val
())
==
''
){
alert
(
'违反公司事项内容未填写!'
);
return
;
};
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/addAgentsBlackList'
,
data
:
_data
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
.
code
==
200
){
alert
(
'保存成功'
);
$
(
"#modal-blackList"
).
modal
(
'hide'
);
//提交成功后 关闭弹窗
agent
.
getList
(
0
);
}
else
{
alert
(
_data
.
msg
);
$
(
"#modal-blackList"
).
modal
(
'hide'
);
//提交成功后 关闭弹窗
agent
.
getList
(
0
);
}
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//新增经纪人 上传身份证反面图片
$
(
'#file_input_reverse'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'user_id_card'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area_reverse'
).
append
(
'<div class="result-reverse"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-reverse">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//新增经纪人 上传身份证正面图片
$
(
'#file_input_positive'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
// formData.append('AuthToken', user_info_obj.AuthToken);
formData
.
append
(
'type'
,
'user_id_card'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
// url: '/index/uploadImg',
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area_positive'
).
append
(
'<div class="result-positive"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-positive">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//编辑经纪人 上传身份证反面图片
$
(
'#file_input_reverse_edit'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'user_id_card'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area_reverse_edit'
).
append
(
'<div class="result-reverse-edit"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-reverse">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//编辑经纪人 上传身份证正面图片
$
(
'#file_input_positive_edit'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'user_id_card'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area_positive_edit'
).
append
(
'<div class="result-positive-edit"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-positive">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
},
Submit_user
:
function
()
{
//提交变更的信息
var
group_id
=
$
(
"#edit_role"
).
val
();
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updateRole'
,
data
:
{
'ids'
:
agent
.
agent_id
,
'group_id'
:
group_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{}
else
{
alert
(
"重复提交"
);
}
}
});
},
Edit
:
function
()
{
//获取
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/saveAgent'
,
//获取编辑数据
data
:
{
"id"
:
agent
.
agent_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
agent
.
editObj
=
data
.
data
;
$
(
"#edit-phone"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = id]"
).
val
(
data
.
data
.
id
);
$
(
"input[name = phone]"
).
val
(
data
.
data
.
phone
);
$
(
"input[name = name]"
).
val
(
data
.
data
.
name
);
$
(
"input[name = identity]"
).
val
(
data
.
data
.
id_card
);
//身份证号
$
(
".card-name"
).
html
(
data
.
data
.
account
);
$
(
".card-num"
).
html
(
data
.
data
.
card_no
);
$
(
".card-account"
).
html
(
data
.
data
.
bank
);
$
(
"[name = district_id]"
).
val
(
data
.
data
.
district_id
);
if
(
data
.
data
.
district_id
)
{
agent
.
getDistrictStoreList
(
data
.
data
.
district_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
$
(
"[name = store_id]"
).
html
(
_str
).
val
(
data
.
data
.
store_id
);
});
}
else
{
}
$
(
"#remarks"
).
val
(
data
.
data
.
remarks
);
$
(
"#password"
).
val
(
data
.
data
.
password
);
$
(
"#admin_off"
).
val
(
data
.
data
.
admin_off
);
$
(
"input[name='password']"
).
attr
(
'form-group'
);
if
(
data
.
data
.
sex
==
'0'
)
{
$
(
"#sex0"
).
attr
(
'checked'
,
true
);
}
else
if
(
data
.
data
.
sex
==
'1'
)
{
$
(
"#sex1"
).
attr
(
'checked'
,
true
);
}
else
{
$
(
"#sex2"
).
attr
(
'checked'
,
true
);
}
//获取正面图片
if
(
data
.
data
.
id_card_image_front
){
$
(
'#container_body_img_area_positive_edit'
).
append
(
'<div class="result-positive-edit"><img data-imgname="{0}" src="{1}" alt="" class="diagram-image J_preview"/> <span class="span-del-positive">删除</span></div>'
.
stringFormatObj
({
'0'
:
data
.
data
.
id_card_image_front
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
data
.
data
.
id_card_image_front
}));
}
//获取反面图片
if
(
data
.
data
.
id_card_image_back
){
$
(
'#container_body_img_area_reverse_edit'
).
append
(
'<div class="result-reverse-edit"><img data-imgname="{0}" src="{1}" alt="" class="diagram-image J_preview"/> <span class="span-del-reverse">删除</span></div>'
.
stringFormatObj
({
'0'
:
data
.
data
.
id_card_image_back
,
'1'
:
ServerHostImageLiu
+
'/static/user_id_card/'
+
data
.
data
.
id_card_image_back
}));
}
}
}
else
{
alert
(
'获取经纪人数据失败'
);
}
}
});
},
Submit_add
:
function
()
{
//提交新增的信息
var
params
=
{}
// params.id = agent.agent_id;
params
.
name
=
$
(
"input[name = name_add]"
).
val
();
params
.
password
=
$
(
"#password_add"
).
val
();
params
.
district_id
=
$
(
"[name = district_id_add]"
).
val
();
params
.
store_id
=
$
(
"[name = store_id_add]"
).
val
();
params
.
phone
=
$
(
"input[name = phone_add]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off_add"
).
val
();
params
.
sex
=
$
(
"input[name =sex_add]:checked"
).
val
();
params
.
remarks
=
$
(
"#remarks_add"
).
val
();
params
.
status
=
$
(
"#status_add"
).
val
();
params
.
password
=
$
(
"input[name='password_add']"
).
val
();
params
.
confirm_old
=
agent
.
confirm_old
;
//新增经纪人 正反面图片
params
.
id_card_image_front
=
$
(
'.result-positive>img'
).
attr
(
'data-imgname'
);
params
.
id_card_image_back
=
$
(
'.result-reverse>img'
).
attr
(
'data-imgname'
);
params
.
id_card
=
$
(
"input[name = identity_add]"
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'所属门店必填'
);
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
return
false
;
}
var
imgname1
=
[];
//正面图片
for
(
var
i
=
0
;
i
<
$
(
'.result-positive'
).
length
;
i
++
)
{
imgname1
[
i
]
=
$
(
'.result-positive>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
var
imgname2
=
[];
//反面图片
for
(
var
i
=
0
;
i
<
$
(
'.result-reverse'
).
length
;
i
++
)
{
imgname2
[
i
]
=
$
(
'.result-reverse>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
if
(
imgname1
.
length
>
1
||
imgname2
.
length
>
1
){
alert
(
'身份证正面图片,反面图片最多传一张'
);
return
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-add"
).
modal
(
'hide'
);
agent
.
getList
(
agent
.
pageNo
);
}
else
if
(
data
.
code
==
101
){
if
(
data
.
msg
==
'转勤'
){
layer
.
open
({
content
:
'该账号已经有相同账号,请问是否转勤?(转勤 即人员调配另外一个城市)转勤后,所有商铺和客户也都会转到新建的相同手机号里,请确定是否转勤。'
,
btn
:
[
'确定转勤'
,
'取消转勤'
],
yes
:
function
(
_index
){
layer
.
close
(
_index
);
agent
.
confirm_old
=
1
;
agent
.
Submit_add
();
}
});
}
else
{
alert
(
data
.
msg
);
}
}
else
{
}
}
});
},
Submit_edit_phone
:
function
()
{
//修改手机号
//提交编辑的信息
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
phone
=
$
(
"#edit-phone"
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/updatePhone'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-editPhone"
).
modal
(
'hide'
);
agent
.
getList
(
agent
.
pageNo
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit
:
function
()
{
//提交编辑的信息
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
district_id
=
$
(
"[name = district_id]"
).
val
();
params
.
store_id
=
$
(
"[name = store_id]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
id_card
=
$
(
"input[name = identity]"
).
val
();
//身份证号
//新增经纪人 正反面图片
params
.
id_card_image_front
=
$
(
'.result-positive-edit>img'
).
attr
(
'data-imgname'
)?
$
(
'.result-positive-edit>img'
).
attr
(
'data-imgname'
)
:
''
;
params
.
id_card_image_back
=
$
(
'.result-reverse-edit>img'
).
attr
(
'data-imgname'
)?
$
(
'.result-reverse-edit>img'
).
attr
(
'data-imgname'
)
:
''
;
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'所属门店必填'
);
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
return
false
;
}
var
imgname1
=
[];
//正面图片
for
(
var
i
=
0
;
i
<
$
(
'.result-positive-edit'
).
length
;
i
++
)
{
imgname1
[
i
]
=
$
(
'.result-positive-edit>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
var
imgname2
=
[];
//反面图片
for
(
var
i
=
0
;
i
<
$
(
'.result-reverse-edit'
).
length
;
i
++
)
{
imgname2
[
i
]
=
$
(
'.result-reverse-edit>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
if
(
imgname1
.
length
>
1
||
imgname2
.
length
>
1
){
alert
(
'身份证正面图片,反面图片最多传一张'
);
return
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-edit"
).
modal
(
'hide'
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit_city_turn
:
function
()
{
if
(
$
(
'#modal-turncity'
).
find
(
"#same_city_Start_time"
).
val
()
==
""
)
{
alert
(
"请选择业绩调整开始时间"
)
return
false
;
}
//提交编辑的信息(跨城市 转勤)
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
district_id
=
$
(
'#modal-turncity'
).
find
(
"[name = district_id_city]"
).
val
();
params
.
store_id
=
$
(
'#modal-turncity'
).
find
(
"[name = store_id_city]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
2
;
params
.
performance_time
=
$
(
'#modal-turncity'
).
find
(
"#same_city_Start_time"
).
val
()
console
.
log
(
$
(
'#modal-turncity'
).
find
(
"#same_city_Start_time"
).
val
())
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'所属门店必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-turncity"
).
modal
(
'hide'
);
//转勤 提交成功之后 关闭弹出框
$
(
"#modal-edit"
).
modal
(
'hide'
);
agent
.
getList
(
agent
.
pageNo
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
Submit_edit_turn
:
function
()
{
//提交编辑的信息(跨城市 转勤)
var
params
=
{}
params
.
id
=
agent
.
agent_id
;
params
.
name
=
$
(
"input[name = name]"
).
val
();
params
.
password
=
$
(
"#password"
).
val
();
params
.
district_id
=
$
(
'#modal-business'
).
find
(
"[name = district_id_business]"
).
val
();
params
.
store_id
=
$
(
'#modal-business'
).
find
(
"[name = store_id_business]"
).
val
();
params
.
phone
=
$
(
"input[name = phone]"
).
val
();
params
.
admin_off
=
$
(
"#admin_off"
).
val
();
params
.
sex
=
$
(
"input[name =sex]:checked"
).
val
();
params
.
remarks
=
$
(
"#remarks"
).
val
();
params
.
status
=
$
(
"#status"
).
val
();
params
.
password
=
$
(
"input[name='password']"
).
val
();
params
.
confirm_old
=
1
;
params
.
performance_time
=
$
(
'#city_Start_time'
).
val
();
if
(
params
.
phone
==
''
)
{
alert
(
'手机号必填!'
);
return
false
;
}
if
(
params
.
district_id
==
''
)
{
alert
(
'所属部门必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
store_id
==
''
)
{
alert
(
'所属门店必填'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
if
(
params
.
phone
.
length
!=
11
)
{
alert
(
'手机号码错误!'
);
$
(
"#modal-edit"
).
show
();
return
false
;
}
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/saveAgent'
,
data
:
params
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
"#modal-business"
).
modal
(
'hide'
);
//转勤 提交成功之后 关闭弹出框
$
(
"#modal-edit"
).
modal
(
'hide'
);
agent
.
getList
(
agent
.
pageNo
);
}
else
if
(
data
.
code
==
101
){
alert
(
data
.
msg
);
}
else
{
}
}
});
},
emptyInput
:
function
()
{
console
.
count
(
'emptyInput'
);
$
(
"input[name = name]"
).
val
(
''
);
$
(
"input[name = phone]"
).
val
(
''
);
$
(
"#password"
).
val
(
''
);
$
(
"[name = district_id]"
).
val
(
''
);
$
(
"[name = store_id]"
).
html
(
''
);
$
(
"input[name =sex]"
).
val
(
'0'
);
$
(
"#admin_off"
).
val
(
'0'
);
$
(
"#remarks"
).
val
(
''
);
agent
.
agent_id
=
''
;
},
getList
:
function
(
pageNo
)
{
agent
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
agent
.
pageNo
;
params
.
pageSize
=
agent
.
pageSize
;
params
.
search
=
$
(
"input[name='search']"
).
val
();
params
.
group_name
=
$
(
"input[name='groupname']"
).
val
();
params
.
district_id
=
$
(
"#district_id2"
).
val
();
params
.
store_id
=
$
(
"#guest_stores"
).
val
();
// params.site_id = $("#district_id2_city").val();//站点筛选
params
.
status
=
$
(
"select[name=agent_status]"
).
val
();
params
.
id_card
=
$
(
"#identity_id"
).
val
();
if
(
$
(
"#district_id2_city"
).
val
()){
if
(
!
$
(
"#district_id2"
).
val
()){
alert
(
'请选择部门进行搜索'
);
return
}
}
$
.
ajax
({
url
:
'/index/AgentList'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
//获取对应的id
agent
.
idArray
=
new
Array
();
for
(
var
m
=
0
;
m
<
data
.
data
.
list
.
length
;
m
++
)
{
agent
.
idArray
[
m
]
=
data
.
data
.
list
[
m
].
id
;
}
//获取对应的id
var
temp
=
document
.
getElementById
(
'fine_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agentlist"
).
html
(
doTempl
(
data
.
data
.
list
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
});
},
//导出经纪人列表
maintableExport
:
function
(
pageNo
)
{
window
.
open
(
'/index/AgentList?excel=1'
+
'&'
+
'search='
+
$
(
"input[name='search']"
).
val
()
+
'&group_name='
+
$
(
"input[name='groupname']"
).
val
()
+
'&district_id='
+
$
(
"#district_id2"
).
val
()
+
'&store_id='
+
$
(
"#guest_stores"
).
val
()
+
'&status='
+
$
(
"select[name=agent_status]"
).
val
()
+
'&id_card='
+
$
(
"#identity_id"
).
val
());
},
spandelList
:
function
(
n
)
{
//删除已经保存的图片都调用
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/deleteReceiptImg'
,
data
:
{
id
:
n
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
}
else
{}
}
});
},
//手机绑定权限
getPhoneBindingList
:
function
(
v
,
pageNo
)
{
var
params
=
{};
params
.
agent_id
=
agent
.
agent_id
;
// params.model = v;
$
.
ajax
({
url
:
'/index/deviceList'
,
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'phone_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agent_phone_binding"
).
html
(
doTempl
(
data
.
data
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
//手机绑定权限(清除绑定)
getPhoneBindingDelList
:
function
(
pageNo
)
{
var
params
=
{};
params
.
agent_id
=
agent
.
agent_id
;
$
.
ajax
({
url
:
'/index/deviceList'
,
//电脑绑定权限
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'phone_del_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#agent_phone_binding"
).
html
(
doTempl
(
data
.
data
));
console
.
log
(
555
)
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
//电脑绑定权限
getPcBindingList
:
function
(
pageNo
)
{
var
params
=
{};
params
.
agent_id
=
agent
.
agent_id
;
$
.
ajax
({
url
:
'/index/deviceList'
,
//电脑绑定权限
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'pc_binding_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
// $("#agent_pc_binding").html(doTempl(data.data));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
//记录状态
stateRecordList
:
function
(
pageNo
)
{
var
params
=
{};
params
.
agent_id
=
agent
.
agent_id
;
$
.
ajax
({
url
:
'/index/getRecordsList'
,
//电脑绑定权限
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
temp
=
document
.
getElementById
(
'state_record_list_tpl'
).
innerHTML
;
var
doTempl
=
doT
.
template
(
temp
);
$
(
"#state_record_pc"
).
html
(
doTempl
(
data
.
data
.
data
));
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
agent
.
pageSize
,
agent
.
getList
);
$
(
'.J_preview'
).
preview
();
}
})
},
getRole
:
function
(
tempval
)
{
$
.
ajax
({
url
:
'/index/getAuth2'
,
type
:
'GET'
,
data
:
{},
async
:
true
,
dataType
:
'json'
,
success
:
function
(
data
)
{
var
User_add
=
""
;
var
_tempid
;
$
.
each
(
data
.
data
.
list
,
function
(
i
,
item
)
{
User_add
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
title
+
'</option>'
;
if
(
item
.
title
==
tempval
)
{
_tempid
=
item
.
id
;
};
});
$
(
"#edit_role"
).
html
(
User_add
).
val
(
_tempid
);
}
});
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'[name=district_id]'
).
append
(
str
);
$
(
'[name=district_id_add]'
).
append
(
str
);
$
(
'[name=district_id_business]'
).
append
(
str
);
$
(
'[name=district_id_city]'
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
//获取城市所在部门
getDistrictList
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
,
"site_id"
:
$
(
'#district_id2_city'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
// var str = '';
var
str
=
'<option value="">选择部门</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'#district_id2'
).
html
(
str
);
$
(
'#guest_stores'
).
html
(
'<option value="">选择门店</option>'
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
});
},
getEvaluationList
:
function
(
n
)
{
var
_data
=
{
'agents_id'
:
n
.
join
(
','
)
}
$
.
ajax
({
url
:
'/index/agentEvaluateNumAndFraction'
,
type
:
'GET'
,
async
:
true
,
data
:
_data
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
$
(
"#agentlist tr"
).
each
(
function
(
e
)
{
//e代表索引 从0开始 eq(0)就是第一行
$
(
"#agentlist"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
9
).
html
(
data
.
data
[
e
].
agent_evaluate_num
);
//获取一列的值
$
(
"#agentlist"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
10
).
html
(
data
.
data
[
e
].
agent_evaluate_fraction
);
})
}
}
});
}
};
return
agent
;
});
\ No newline at end of file
public/resource/template/fineMoney_list_template_tpl.html
0 → 100644
View file @
633b82f4
<script
id=
"fine_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
data
-
groupname
=
"[%= it[item]['groupname'] %]"
class
=
"text-center"
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"create_time"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"id"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
<
input
type
=
"hidden"
value
=
'[%= it[item]["agent_img"] %]'
>
<
img
src
=
'[%= it[item]["agent_img"] %]'
class
=
"diagram-image J_preview no-scroll-page-img"
data
-
bimg
=
'[%= it[item]["agent_img"] %]'
>
<
/td
>
<
td
class
=
"text-center"
>
[
%
if
(
it
[
item
][
"level"
]
==
10
)
{
%
]
业务员
[
%
}
%
]
[
%
if
(
it
[
item
][
"level"
]
==
20
)
{
%
]
店长
[
%
}
%
]
[
%
if
(
it
[
item
][
"level"
]
==
30
)
{
%
]
总监
[
%
}
%
]
[
%
if
(
it
[
item
][
"level"
]
==
40
)
{
%
]
总监和店长
[
%
}
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"district_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"store_name"
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
item
][
"phone"
]
%
]
[
%
if
(
it
[
item
][
"status"
]
==
3
)
{
%
]
<
span
class
=
"btn1 btn-warning btn-xs"
>
已转勤
<
/span
>
[
%
}
%
]
<
/td
>
<
td
class
=
"number-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"score-evaluation text-center"
data
-
id
=
'[%= it[item]["id"] %]'
>--<
/td
>
<
td
class
=
"text-center"
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
取消
<
/a
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<!--记录状态-->
<script
id=
"state_record_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'remark'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
\ 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