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
39e42067
Commit
39e42067
authored
Sep 27, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实收明细 修改
parent
1cb8e77f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
127 additions
and
28 deletions
+127
-28
commission.html
application/index/view/finance/commission.html
+31
-3
commission.js
public/resource/js/commission.js
+96
-25
No files found.
application/index/view/finance/commission.html
View file @
39e42067
...
...
@@ -55,6 +55,29 @@
font-size
:
16px
;
font-weight
:
600
;
}
/*分佣方 姓名 下拉式列表*/
.user-ul
{
height
:
auto
;
float
:
left
;
position
:
absolute
;
width
:
230px
;
background
:
#fff
;
border
:
1px
solid
#ccc
;
border-top
:
0
;
left
:
3px
;
}
.user-ul
li
{
list-style
:
none
;
line-height
:
30px
;
margin-left
:
-20px
;
}
.left-phone
{
width
:
236px
;
float
:
left
;
margin-top
:
10px
;
margin-left
:
10px
;
position
:
relative
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
...
...
@@ -79,12 +102,17 @@
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"internal_address"
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=
""
>
<select
name=
"district_id"
class=
"form-control btn4 ld-Marheight"
>
<option
value=
""
>
分佣方所
在
部门
</option>
<option
value=
""
>
分佣方所
属
部门
</option>
</select>
<select
name=
"store_id"
class=
"form-control btn4 ld-Marheight"
>
<option
value=
""
>
分佣方所
在
门店
</option>
<option
value=
""
>
分佣方所
属
门店
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_name"
placeholder=
"分佣方姓名"
type=
"text"
value=
""
>
<div
class=
"left-phone"
>
<input
class=
"form-control"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"partical_name"
placeholder=
"分佣方姓名"
type=
"text"
value=
""
>
<ul
class=
"user-ul"
></ul>
</div>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="user_name" placeholder="分佣方姓名" type="text" value="">-->
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"user_phone"
placeholder=
"分佣方手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"bargain_id"
placeholder=
"成交报告id"
type=
"text"
value=
""
>
<div
class=
"clear"
></div>
...
...
public/resource/js/commission.js
View file @
39e42067
...
...
@@ -11,6 +11,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
order_id
:
0
,
//订单id
panfangData
:
null
,
maidTotalCommission
:
0
,
//应收总佣金
agent_id_phone
:
''
,
//分佣方 姓名搜索
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
+
template_tax
);
...
...
@@ -19,11 +20,13 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
},
event
:
function
()
{
var
_doc
=
$
(
document
);
$
(
"#search"
).
click
(
function
()
{
$
(
"#search"
).
click
(
function
()
{
bargain
.
getList
(
1
);
});
$
(
"#reset"
).
click
(
function
()
{
//重置
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
bargain
.
agent_id_phone
=
''
;
});
//主页面一级审核,二级审核,三级审核,结单四个tab的点击事件
//专员审核 总监审核 经理审核 出纳审核
...
...
@@ -51,8 +54,7 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
_objTemp
.
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
bargain
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="0">全部</option>'
;
var
_str
=
'<option value="">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
...
...
@@ -63,6 +65,19 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
}
else
{};
});
});
//分佣方 姓名下拉式
$
(
document
).
on
(
"input"
,
"#partical_name"
,
function
()
{
//手机号新增搜索客方
if
(
$
(
"#partical_name"
).
val
()
==
''
)
{
bargain
.
agent_id_phone
=
''
;
$
(
".user-ul"
).
html
(
''
);
}
else
{
bargain
.
search_phone
();
}
});
//点击li 列表消失
$
(
document
).
delegate
(
".addphone"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
bargain
.
addphone
(
this
);
});
//搜索按钮的事件
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
e
.
preventDefault
();
...
...
@@ -438,25 +453,6 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
}
});
},
// Timeline: function() { //获取时间轴
// $.ajax({
// 'type': 'GET',
// 'url': '/index/selectReportAll',
// data: {
// "order_id": bargain.bargain_id
// },
// dataType: "json",
// success: function(data) {
// if(data.code == 200) {
// if(data.data) {
// console.log(data.data);
// }
// } else {
// alert('获取失败!');
// }
// }
// });
// },
bargaininfoShow
:
function
()
{
//报告详情
var
bargainId
;
...
...
@@ -1045,6 +1041,38 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
}
});
},
//分佣方 姓名搜索
search_phone
:
function
()
{
//手机号新增客户
$
.
ajax
({
url
:
'/index/getBroker_new'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"phone"
:
$
(
"#partical_name"
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphone" data-id="'
+
item
.
id
+
'">'
+
item
.
id
+
'-'
+
item
.
name
+
'-'
+
item
.
phone
+
'</li>'
;
});
$
(
".user-ul"
).
html
(
user_ul
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//将li里的值 赋给input(分佣方姓名)
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
user_ht
=
$
(
obj
).
html
();
$
(
"#partical_name"
).
val
(
user_ht
);
$
(
".user-ul"
).
html
(
''
);
bargain
.
agent_id_phone
=
$
(
obj
).
attr
(
"data-id"
);
},
getList
:
function
(
pageNo
)
{
bargain
.
pageNo
=
pageNo
;
var
params
=
{};
...
...
@@ -1053,11 +1081,13 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
params
.
create_time
=
$
(
'#create_time'
)
.
val
();
params
.
end_time
=
$
(
'#end_time'
)
.
val
();
params
.
internal_address
=
$
(
'#internal_address'
).
val
();
params
.
name
=
$
(
'#user_name'
).
val
();
//
params.name = $('#user_name').val();
params
.
phone
=
$
(
'#user_phone'
).
val
();
params
.
house_number
=
$
(
'#internal_num'
).
val
();
params
.
bargain_id
=
$
(
'#bargain_id'
).
val
();
params
.
partial_id
=
bargain
.
agent_id_phone
;
//分佣方姓名 下拉式 搜索
params
.
district_id
=
$
(
"select[name='district_id'] option:selected"
).
val
();
//部门
params
.
store_id
=
$
(
"select[name='store_id'] option:selected"
).
val
();
//门店
$
.
ajax
({
url
:
'/index/partialCommissionList'
,
//获取列表
type
:
'GET'
,
...
...
@@ -1094,6 +1124,46 @@ define(['doT', 'text!temp/commission_template_tpl.html', 'text!temp/reportList_n
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
+
'&bargain_id='
+
bargain_id
);
},
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
);
$
(
'#district_id2'
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
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
);
}
}
});
},
};
return
bargain
;
});
\ 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