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
909ca13f
Commit
909ca13f
authored
Jun 01, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣提成列表修改
parent
955bc2cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
395 additions
and
346 deletions
+395
-346
commission_total.html
application/index/view/finance/commission_total.html
+17
-5
commission.js
public/resource/js/commission.js
+1
-0
commissionTotal.js
public/resource/js/commissionTotal.js
+377
-341
No files found.
application/index/view/finance/commission_total.html
View file @
909ca13f
...
@@ -26,6 +26,11 @@
...
@@ -26,6 +26,11 @@
width
:
340px
;
width
:
340px
;
line-height
:
36px
;
line-height
:
36px
;
}
}
.left-btn
{
float
:
left
;
}
.right
{
.right
{
line-height
:
36px
;
line-height
:
36px
;
...
@@ -57,6 +62,9 @@
...
@@ -57,6 +62,9 @@
height
:
500px
;
height
:
500px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
}
.clear
{
clear
:
both
;
}
</style>
</style>
<div
id=
"page-content-wrapper"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -86,11 +94,14 @@
...
@@ -86,11 +94,14 @@
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<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_dealtime"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_dealtime"
name=
"end_date"
type=
"date"
>
<select
class=
"form-control btn4 ld-Marheight"
id=
"deal_status"
>
<
!--<
select class="form-control btn4 ld-Marheight" id="deal_status">
<option value="-1">请选择部门</option>
<option value="-1">请选择部门</option>
<option value="10">市场一部</option>
<option value="10">市场一部</option>
<option value="20">市场二部</option>
<option value="20">市场二部</option>
</select>
</select>-->
<select
name=
"qx-store"
class=
"form-control btn2 ld-Marheight"
id=
"qx-store"
>
<option
value=
""
selected=
"selected"
>
选择部门
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"store_name"
placeholder=
"所属门店名称"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"store_name"
placeholder=
"所属门店名称"
type=
"text"
value=
""
>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_num" placeholder="商铺号" type="text" value="">-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="internal_num" placeholder="商铺号" type="text" value="">-->
...
@@ -101,10 +112,11 @@
...
@@ -101,10 +112,11 @@
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"create_ticketTime"
name=
"start_date"
type=
"date"
>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"create_ticketTime"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<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_ticketTime"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_ticketTime"
name=
"end_date"
type=
"date"
>
<div
class=
"clear"
></div>
<span
class=
"btn btn-info btn3"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3
"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3
"
id=
"reset"
>
重置
</span>
<span
class=
"btn btn-info btn3"
id=
"export"
>
导出excel
</span>
<span
class=
"btn btn-info btn3
"
id=
"export"
>
导出excel
</span>
</form>
</form>
</td>
</td>
</tr>
</tr>
...
...
public/resource/js/commission.js
View file @
909ca13f
...
@@ -1412,6 +1412,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s
...
@@ -1412,6 +1412,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_s
});
});
},
},
exportList
:
function
(
pageNo
)
{
exportList
:
function
(
pageNo
)
{
console
.
log
(
6
);
//导出分佣提成列表
//导出分佣提成列表
bargain
.
pageNo
=
pageNo
;
bargain
.
pageNo
=
pageNo
;
var
create_time
=
$
(
'#create_time'
).
val
();
var
create_time
=
$
(
'#create_time'
).
val
();
...
...
public/resource/js/commissionTotal.js
View file @
909ca13f
define
([
'doT'
,
'text!temp/commissionTotal_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
define
([
'doT'
,
'text!temp/commissionTotal_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
business
=
{
business
=
{
pageNo
:
1
,
pageNo
:
1
,
/*第几页*/
/*第几页*/
pageSize
:
10
,
pageSize
:
10
,
/*每页显示多少条*/
/*每页显示多少条*/
id
:
''
,
id
:
''
,
house_id
:
''
,
house_id
:
''
,
type
:
''
,
type
:
''
,
valueCurrent
:
''
,
valueCurrent
:
''
,
ajaxObj
:
''
,
ajaxObj
:
''
,
stopstatus
:
true
,
stopstatus
:
true
,
ldHtml
:
$
(
'.phone_list'
),
ldHtml
:
$
(
'.phone_list'
),
boxphoto
:
''
,
boxphoto
:
''
,
exclusive_id
:
0
,
exclusive_id
:
0
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
"body"
).
append
(
template
);
$
(
"body"
).
append
(
template
);
business
.
getList
();
business
.
getList
();
business
.
event
();
business
.
event
();
},
business
.
getDistrict
();
event
:
function
()
{
},
var
_doc
=
$
(
document
);
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
var
_doc
=
$
(
document
);
business
.
getList
(
1
);
$
(
"#search"
).
click
(
function
()
{
});
business
.
getList
(
1
);
$
(
"#export"
).
click
(
function
()
{
//导出列表
});
business
.
exportList
();
$
(
"#export"
).
click
(
function
()
{
//导出列表
});
business
.
exportList
();
});
$
(
"#reset"
).
click
(
function
()
{
//重置
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
document
.
getElementById
(
"form_search"
).
reset
();
});
});
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
".del_modal"
,
"click"
,
function
()
{
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
business
.
id
=
$
(
this
).
attr
(
"data-id"
);
});
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作记录
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击操作记录
business
.
Caozuo
();
business
.
Caozuo
();
});
});
// 时间轴
// 时间轴
$
(
document
).
delegate
(
".timeline"
,
"click"
,
function
()
{
//时间轴
$
(
document
).
delegate
(
".timeline"
,
"click"
,
function
()
{
//时间轴
// business.house_id = $ (this).attr ("data-id");
// business.house_id = $ (this).attr ("data-id");
business
.
Timeline
();
business
.
Timeline
();
});
});
// 编辑
// 编辑
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击编辑
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
Edit
();
business
.
Edit
();
});
});
$
(
document
).
delegate
(
".is_pass"
,
"click"
,
function
()
{
//点击编辑
$
(
document
).
delegate
(
".is_pass"
,
"click"
,
function
()
{
//点击编辑
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
console
.
log
(
follow
.
house_id
);
console
.
log
(
follow
.
house_id
);
});
});
$
(
document
).
delegate
(
"#confirm_edit"
,
"click"
,
function
()
{
//点击编辑确定
$
(
document
).
delegate
(
"#confirm_edit"
,
"click"
,
function
()
{
//点击编辑确定
business
.
confirmEdit
();
business
.
confirmEdit
();
});
});
$
(
document
).
delegate
(
"#new-commission"
,
"click"
,
function
()
{
//点击分佣提成
$
(
document
).
delegate
(
"#new-commission"
,
"click"
,
function
()
{
//点击分佣提成
business
.
newCommission
();
business
.
newCommission
();
business
.
Caozuo
();
business
.
Caozuo
();
});
});
//table切换
//table切换
$
(
document
).
delegate
(
"#information"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#information"
,
"click"
,
function
()
{
business
.
Information
();
business
.
Information
();
});
});
$
(
document
).
delegate
(
"#fees"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#fees"
,
"click"
,
function
()
{
console
.
log
(
business
.
house_id
);
console
.
log
(
business
.
house_id
);
business
.
Fees
();
business
.
Fees
();
});
});
$
(
document
).
delegate
(
"#records"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#records"
,
"click"
,
function
()
{
business
.
Records
();
business
.
Records
();
});
});
},
Timeline
:
function
()
{
//获取时间轴
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/selectReportAll'
,
data
:
{
"order_id"
:
business
.
house_id
},
},
dataType
:
"json"
,
Timeline
:
function
()
{
//获取时间轴
success
:
function
(
data
)
{
$
.
ajax
({
if
(
data
.
code
==
200
)
{
'type'
:
'GET'
,
if
(
data
.
data
)
{
'url'
:
'/index/selectReportAll'
,
console
.
log
(
data
.
data
);
data
:
{
"order_id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
console
.
log
(
data
.
data
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
}
}
else
{
});
alert
(
'获取失败!'
);
}
}
});
},
Edit
:
function
()
{
//报告详情
$
(
".Tswitch"
).
eq
(
0
).
show
();
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
"#information"
).
removeClass
(
"btn-default"
);
$
(
"#information"
).
addClass
(
"btn-info"
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
console
.
log
(
business
.
house_id
);
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/bargainInfo'
,
data
:
{
"id"
:
business
.
house_id
},
},
dataType
:
"json"
,
Edit
:
function
()
{
//报告详情
success
:
function
(
data
)
{
$
(
".Tswitch"
).
eq
(
0
).
show
();
if
(
data
.
code
==
200
)
{
$
(
".Tswitch"
).
eq
(
1
).
hide
();
if
(
data
.
data
)
{
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
".create_time"
).
html
(
data
.
data
.
create_time
);
$
(
"#information"
).
removeClass
(
"btn-default"
);
$
(
".user_phone"
).
html
(
data
.
data
.
user_phone
);
$
(
"#information"
).
addClass
(
"btn-info"
);
$
(
".user_name"
).
html
(
data
.
data
.
user_name
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
".internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
".internal_title"
).
html
(
data
.
data
.
internal_title
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
".commission"
).
val
(
data
.
data
.
commission
);
$
(
"#records"
).
addClass
(
"btn-default"
);
$
(
".practical_fee"
).
val
(
data
.
data
.
practical_fee
);
console
.
log
(
business
.
house_id
);
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/bargainInfo'
,
data
:
{
"id"
:
business
.
house_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
".create_time"
).
html
(
data
.
data
.
create_time
);
$
(
".user_phone"
).
html
(
data
.
data
.
user_phone
);
$
(
".user_name"
).
html
(
data
.
data
.
user_name
);
$
(
".internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
".internal_title"
).
html
(
data
.
data
.
internal_title
);
$
(
".commission"
).
val
(
data
.
data
.
commission
);
$
(
".practical_fee"
).
val
(
data
.
data
.
practical_fee
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
}
}
else
{
});
alert
(
'获取失败!'
);
}
}
});
},
confirmEdit
:
function
()
{
//修改报告详情
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/editBargainInfo'
,
data
:
{
"id"
:
business
.
house_id
,
"scale_fee"
:
$
(
".commission"
).
val
(),
"practical_fee"
:
$
(
".practical_fee"
).
val
()
},
},
dataType
:
"json"
,
confirmEdit
:
function
()
{
//修改报告详情
success
:
function
(
data
)
{
$
.
ajax
(
{
if
(
data
.
code
==
200
)
{
'type'
:
'POST'
,
if
(
data
.
data
)
{}
'url'
:
'/index/editBargainInfo'
,
}
else
{
data
:
{
alert
(
'获取失败!'
);
"id"
:
business
.
house_id
,
}
"scale_fee"
:
$
(
".commission"
).
val
(),
}
"practical_fee"
:
$
(
".practical_fee"
).
val
()
});
},
}
,
dataType
:
"json"
,
Caozuo
:
function
()
{
//分佣提成获取跟进详情的数据
success
:
function
(
data
)
{
console
.
log
(
business
);
if
(
data
.
code
==
200
)
{
console
.
log
(
business
.
house_id
);
if
(
data
.
data
)
{}
$
.
ajax
(
{
}
else
{
'type'
:
'GET'
,
alert
(
'获取失败!'
);
'url'
:
'/index/commissionList'
,
}
data
:
{
}
"id"
:
business
.
house_id
});
},
},
dataType
:
"json"
,
Caozuo
:
function
()
{
//分佣提成获取跟进详情的数据
success
:
function
(
data
)
{
console
.
log
(
business
);
if
(
data
.
code
==
200
)
{
console
.
log
(
business
.
house_id
);
if
(
data
.
data
)
{
$
.
ajax
({
var
caozuo_table
=
""
;
'type'
:
'GET'
,
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
'url'
:
'/index/commissionList'
,
caozuo_table
+=
'<tr><td>'
+
item
.
role
+
'</td><td>'
+
item
.
agent_name
+
'</td><td>'
+
item
.
store_name
+
data
:
{
'</td><td>'
+
item
.
scale
+
'</td><td>'
+
item
.
scale_fee
+
'</td><td>'
+
item
.
practical_fee
+
'</td><td>'
+
item
.
content
+
'</td></tr>'
;
"id"
:
business
.
house_id
});
},
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
dataType
:
"json"
,
$
(
"#caozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
success
:
function
(
data
)
{
var
temp
=
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
();
//获取一列的值
if
(
data
.
code
==
200
)
{
if
(
temp
==
'null'
)
{
if
(
data
.
data
)
{
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
(
" "
)
var
caozuo_table
=
""
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
role
+
'</td><td>'
+
item
.
agent_name
+
'</td><td>'
+
item
.
store_name
+
'</td><td>'
+
item
.
scale
+
'</td><td>'
+
item
.
scale_fee
+
'</td><td>'
+
item
.
practical_fee
+
'</td><td>'
+
item
.
content
+
'</td></tr>'
;
});
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
$
(
"#caozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
var
temp
=
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
();
//获取一列的值
if
(
temp
==
'null'
)
{
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
(
" "
)
}
});
}
}
});
}
else
{
alert
(
'获取失败!'
);
}
}
}
}
else
{
});
alert
(
'获取失败!'
);
}
}
});
},
Records
:
function
()
{
//分佣提成数据
$
(
".Tswitch"
).
eq
(
0
).
hide
();
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
".Tswitch"
).
eq
(
2
).
show
();
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
(
"#information"
).
addClass
(
"btn-default"
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
"#records"
).
removeClass
(
"btn-default"
);
$
(
"#records"
).
addClass
(
"btn-info"
);
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/payLogList'
,
data
:
{
"id"
:
business
.
house_id
},
},
dataType
:
"json"
,
Records
:
function
()
{
//分佣提成数据
success
:
function
(
data
)
{
$
(
".Tswitch"
).
eq
(
0
).
hide
();
if
(
data
.
code
==
200
)
{
$
(
".Tswitch"
).
eq
(
1
).
hide
();
if
(
data
.
data
)
{
$
(
".Tswitch"
).
eq
(
2
).
show
();
var
caozuo_table
=
""
;
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
$
(
"#information"
).
addClass
(
"btn-default"
);
caozuo_table
+=
'<tr><td>'
+
item
.
create_time
+
'</td><td>'
+
item
.
money
+
'</td><td>'
+
item
.
type
+
$
(
"#fees"
).
removeClass
(
"btn-info"
);
'</td><td>'
+
item
.
pay_type
+
'</td><td>'
+
item
.
agent_name
+
'</td></tr>'
;
$
(
"#fees"
).
addClass
(
"btn-default"
);
});
$
(
"#records"
).
removeClass
(
"btn-default"
);
$
(
"#tcaozuo_table"
).
html
(
caozuo_table
);
$
(
"#records"
).
addClass
(
"btn-info"
);
$
(
"#tcaozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
$
.
ajax
({
var
temp_one
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
();
'type'
:
'GET'
,
var
temp
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
();
//获取一列的值
'url'
:
'/index/payLogList'
,
var
temp_two
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
();
data
:
{
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
"id"
:
business
.
house_id
if
(
temp
*
1
==
10
)
{
},
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"支付宝"
)
dataType
:
"json"
,
}
success
:
function
(
data
)
{
if
(
temp
*
1
==
20
)
{
if
(
data
.
code
==
200
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"微信"
)
if
(
data
.
data
)
{
}
var
caozuo_table
=
""
;
if
(
temp
*
1
==
30
)
{
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"pos机器"
)
caozuo_table
+=
'<tr><td>'
+
item
.
create_time
+
'</td><td>'
+
item
.
money
+
'</td><td>'
+
item
.
type
+
}
'</td><td>'
+
item
.
pay_type
+
'</td><td>'
+
item
.
agent_name
+
'</td></tr>'
;
if
(
temp
*
1
==
40
)
{
});
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"转账"
)
$
(
"#tcaozuo_table"
).
html
(
caozuo_table
);
}
$
(
"#tcaozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
if
(
temp
*
1
==
50
)
{
var
temp_one
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
();
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"现金"
)
var
temp
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
();
//获取一列的值
}
var
temp_two
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
();
if
(
temp
*
1
==
60
)
{
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"其他"
)
if
(
temp
*
1
==
10
)
{
}
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"支付宝"
)
}
if
(
temp
*
1
==
20
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"微信"
)
}
if
(
temp
*
1
==
30
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"pos机器"
)
}
if
(
temp
*
1
==
40
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"转账"
)
}
if
(
temp
*
1
==
50
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"现金"
)
}
if
(
temp
*
1
==
60
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"其他"
)
}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
if
(
temp_two
*
1
==
10
)
{
if
(
temp_two
*
1
==
10
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"意向金"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"意向金"
)
}
}
if
(
temp_two
*
1
==
20
)
{
if
(
temp_two
*
1
==
20
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"定金"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"定金"
)
}
}
if
(
temp_two
*
1
==
30
)
{
if
(
temp_two
*
1
==
30
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"保管金"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"保管金"
)
}
}
if
(
temp_two
*
1
==
40
)
{
if
(
temp_two
*
1
==
40
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"押金"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"押金"
)
}
}
if
(
temp_two
*
1
==
50
)
{
if
(
temp_two
*
1
==
50
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"租金"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"租金"
)
}
}
if
(
temp_two
*
1
==
60
)
{
if
(
temp_two
*
1
==
60
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"进场费"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"进场费"
)
}
}
if
(
temp_two
*
1
==
70
)
{
if
(
temp_two
*
1
==
70
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"转让费"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"转让费"
)
}
}
if
(
temp_two
*
1
==
80
)
{
if
(
temp_two
*
1
==
80
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"其他"
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"其他"
)
};
};
if
(
temp_one
==
'null'
)
{
if
(
temp_one
==
'null'
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
" "
)
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
" "
)
}
}
});
});
}
}
else
{
alert
(
'获取失败!'
);
}
}
}
}
else
{
});
alert
(
'获取失败!'
);
}
}
});
},
newCommission
:
function
()
{
//新增分佣提成
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addBargain'
,
data
:
{
"id"
:
business
.
house_id
,
"role"
:
$
(
"#is_carefully_chosen"
).
val
(),
"scale"
:
$
(
"#commission-rate"
).
val
(),
"scale_fee"
:
$
(
"#should-commission"
).
val
(),
},
},
dataType
:
"json"
,
newCommission
:
function
()
{
//新增分佣提成
success
:
function
(
data
)
{
$
.
ajax
({
if
(
data
.
code
==
200
)
{
'type'
:
'POST'
,
if
(
data
.
data
)
{
'url'
:
'/index/addBargain'
,
console
.
log
(
666
);
data
:
{
"id"
:
business
.
house_id
,
"role"
:
$
(
"#is_carefully_chosen"
).
val
(),
"scale"
:
$
(
"#commission-rate"
).
val
(),
"scale_fee"
:
$
(
"#should-commission"
).
val
(),
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
console
.
log
(
666
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
}
}
else
{
});
alert
(
'获取失败!'
);
},
}
// table切换
}
Information
:
function
()
{
});
$
(
".Tswitch"
).
eq
(
0
).
show
();
},
$
(
".Tswitch"
).
eq
(
1
).
hide
();
// table切换
$
(
".Tswitch"
).
eq
(
2
).
hide
();
Information
:
function
()
{
$
(
"#information"
).
removeClass
(
"btn-default"
);
$
(
".Tswitch"
).
eq
(
0
).
show
();
$
(
"#information"
).
addClass
(
"btn-info"
);
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
"#information"
).
removeClass
(
"btn-default"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#information"
).
addClass
(
"btn-info"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
},
$
(
"#fees"
).
addClass
(
"btn-default"
);
Fees
:
function
()
{
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
".Tswitch"
).
eq
(
0
).
hide
();
$
(
"#records"
).
addClass
(
"btn-default"
);
$
(
".Tswitch"
).
eq
(
1
).
show
();
},
$
(
".Tswitch"
).
eq
(
2
).
hide
();
Fees
:
function
()
{
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
(
".Tswitch"
).
eq
(
0
).
hide
();
$
(
"#information"
).
addClass
(
"btn-default"
);
$
(
".Tswitch"
).
eq
(
1
).
show
();
$
(
"#fees"
).
removeClass
(
"btn-default"
);
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
"#fees"
).
addClass
(
"btn-info"
);
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#information"
).
addClass
(
"btn-default"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
$
(
"#fees"
).
removeClass
(
"btn-default"
);
$
(
"#fees"
).
addClass
(
"btn-info"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
},
getList
:
function
(
pageNo
)
{
business
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
business
.
pageNo
;
params
.
pageSize
=
business
.
pageSize
;
params
.
name
=
$
(
'#user_name'
).
val
();
params
.
phone
=
$
(
'#user_phone'
).
val
();
params
.
commission_start_date
=
$
(
'#create_time'
).
val
();
params
.
commission_end_date
=
$
(
'#end_time'
).
val
();
params
.
deal_start_date
=
$
(
'#create_dealtime'
).
val
();
params
.
deal_end_date
=
$
(
'#end_dealtime'
).
val
();
params
.
operation_start_date
=
$
(
'#create_ticketTime'
).
val
();
params
.
operation_end_date
=
$
(
'#end_ticketTime'
).
val
();
params
.
district_id
=
$
(
'#user_phone'
).
val
();
params
.
store_name
=
$
(
'#store_name'
).
val
();
$
.
ajax
({
url
:
'/index/getCommissionTotalList'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
data
);
var
temp
=
document
.
getElementById
(
'commissionTotal_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#business_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
console
.
log
(
data
.
data
.
list
);
/*分页代码*/
},
add_page
(
data
.
data
.
total
,
pageNo
,
business
.
pageSize
,
business
.
getList
);
getList
:
function
(
pageNo
)
{
}
business
.
pageNo
=
pageNo
;
});
var
params
=
{};
},
params
.
pageNo
=
business
.
pageNo
;
exportList
:
function
(
pageNo
)
{
params
.
pageSize
=
business
.
pageSize
;
business
.
pageNo
=
pageNo
;
params
.
name
=
$
(
'#user_name'
).
val
();
var
create_time
=
$
(
'#create_time'
).
val
();
params
.
phone
=
$
(
'#user_phone'
).
val
();
var
end_time
=
$
(
'#end_time'
).
val
();
params
.
commission_start_date
=
$
(
'#create_time'
).
val
();
var
internal_address
=
$
(
'#internal_address'
).
val
();
params
.
commission_end_date
=
$
(
'#end_time'
).
val
();
var
agent
=
$
(
'#user_name'
).
val
();
params
.
deal_start_date
=
$
(
'#create_dealtime'
).
val
();
var
user_phone
=
$
(
'#user_phone'
).
val
();
params
.
deal_end_date
=
$
(
'#end_dealtime'
).
val
();
var
house_number
=
$
(
'#internal_num'
).
val
();
params
.
operation_start_date
=
$
(
'#create_ticketTime'
).
val
();
window
.
open
(
'/index/exportExcel?create_time='
+
create_time
+
'&end_time='
+
end_time
+
'&internal_address='
+
internal_address
+
'&name='
+
agent
+
'&phone='
+
user_phone
+
'&house_number='
+
house_number
);
params
.
operation_end_date
=
$
(
'#end_ticketTime'
).
val
();
params
.
district_id
=
$
(
"#qx-store option:selected"
).
val
();
//部门id 添加字段
params
.
store_name
=
$
(
'#store_name'
).
val
();
},
$
.
ajax
({
url
:
'/index/getCommissionTotalList'
,
//获取列表
type
:
'GET'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
console
.
log
(
data
);
var
temp
=
document
.
getElementById
(
'commissionTotal_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#business_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
console
.
log
(
data
.
data
.
list
);
};
/*分页代码*/
return
business
;
add_page
(
data
.
data
.
total
,
pageNo
,
business
.
pageSize
,
business
.
getList
);
});
}
\ No newline at end of file
});
},
getDistrict
:
function
(
name
)
{
$
.
ajax
({
url
:
'/index/getDistrictListByName'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
50
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
_html
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
n
)
{
if
(
n
.
district_name
==
name
&&
(
typeof
name
!=
undefined
))
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
else
{
_html
+=
'<option value="'
+
n
.
id
+
'">'
+
n
.
district_name
+
'</option>'
;
}
});
$
(
"#ss-store"
).
html
(
_html
);
$
(
"#qx-store"
).
append
(
_html
);
// $("#qx-store").html(_html);
}
else
{
alert
(
'获取部门信息失败'
);
}
}
});
},
exportList
:
function
(
pageNo
)
{
console
.
log
(
2
);
business
.
pageNo
=
pageNo
;
var
excel_two
=
1
;
var
name
=
$
(
'#user_name'
).
val
();
var
phone
=
$
(
'#user_phone'
).
val
();
var
commission_start_date
=
$
(
'#create_time'
).
val
();
var
commission_end_date
=
$
(
'#end_time'
).
val
();
var
deal_start_date
=
$
(
'#create_dealtime'
).
val
();
var
deal_end_date
=
$
(
'#end_dealtime'
).
val
();
var
operation_start_date
=
$
(
'#create_ticketTime'
).
val
();
var
operation_end_date
=
$
(
'#end_ticketTime'
).
val
();
// var district_id = $('#user_phone').val();
var
district_id
=
$
(
"#qx-store option:selected"
).
val
();
//部门id 添加字段
var
store_name
=
$
(
'#store_name'
).
val
();
window
.
open
(
'/index/getCommissionTotalList?'
+
'excel = '
+
excel_two
+
' &name = '
+
name
+
' &phone = '
+
phone
+
' &commission_start_date = '
+
commission_start_date
+
'& commission_end_date = '
+
commission_end_date
+
' &deal_start_date = '
+
deal_start_date
+
' &deal_end_date = '
+
deal_end_date
+
' &operation_start_date = '
+
operation_start_date
+
' &operation_end_date = '
+
operation_end_date
+
' &district_id = '
+
district_id
+
' &store_name = '
+
store_name
);
},
};
return
business
;
});
\ 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