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
25875113
Commit
25875113
authored
May 28, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣1
parent
4ff06a88
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
258 additions
and
23 deletions
+258
-23
account_statement.html
application/index/view/finance/account_statement.html
+28
-12
report_list.css
public/resource/css/report_list.css
+31
-4
reportList.js
public/resource/js/reportList.js
+199
-7
No files found.
application/index/view/finance/account_statement.html
View file @
25875113
...
@@ -199,8 +199,9 @@
...
@@ -199,8 +199,9 @@
</tbody>
</tbody>
</table>
</table>
<div>
<div
class=
"detail-modal-maid-bottom-btn-area text-right"
>
<a
id=
"maid_ok_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
确认分佣
</a>
<a
id=
"maid_ok_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
确认分佣
</a>
<a
id=
"maid_save_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
保存
</a>
</div>
</div>
<!--分佣提成-->
<!--分佣提成-->
</div>
</div>
...
@@ -292,8 +293,8 @@
...
@@ -292,8 +293,8 @@
<div
class=
"modal-body"
id=
"addmaid_input_area"
>
<div
class=
"modal-body"
id=
"addmaid_input_area"
>
<div>
<div>
<span>
分佣方:
</span>
<span>
分佣方:
</span>
<select
class=
"form-control
form-control-one"
id=
"is_carefully_chosen
"
>
<select
class=
"form-control
"
id=
"addmaid_input_servant
"
>
<option
value=
"
0
"
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<option
value=
"1"
>
盘方
</option>
<option
value=
"1"
>
盘方
</option>
<option
value=
"2"
>
客方
</option>
<option
value=
"2"
>
客方
</option>
<option
value=
"3"
>
反签
</option>
<option
value=
"3"
>
反签
</option>
...
@@ -302,25 +303,40 @@
...
@@ -302,25 +303,40 @@
</select>
</select>
</div>
</div>
<div>
<div>
<span>
业务员:
</span><input
class=
"form-control
form-control-one"
type=
"text
"
/>
<span>
业务员:
</span><input
class=
"form-control
"
type=
"text"
id=
"addmaid_input_ywy
"
/>
</div>
</div>
<div>
<div>
<span>
所属门店:
</span><input
class=
"form-control
form-control-one"
type=
"text
"
/>
<span>
所属门店:
</span><input
class=
"form-control
"
type=
"text"
id=
"addmaid_input_shop
"
/>
</div>
</div>
<div>
<div>
<span>
分佣比例:
</span><input
class=
"form-control
form-control-one"
type=
"text"
/>
%
<span>
分佣比例:
</span><input
class=
"form-control
"
type=
"number"
id=
"addmaid_input_ratio"
/><span>
%
</span>
</div>
</div>
<div>
<div>
<span>
应分佣金:
</span><input
class=
"form-control
form-control-one"
type=
"text"
/>
元
<span>
应分佣金:
</span><input
class=
"form-control
"
type=
"number"
id=
"addmaid_input_cash"
/><span>
元
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
<div
href=
"#modal_new_maid_select"
data-toggle=
"modal"
>
打开盘方业务员选择框
</div>
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"addmaid_ok_btn"
>
确定
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"new-commission"
>
</div>
确定
</div>
</button>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 弹出框 分佣提成新增,选择盘方,多个的时候选择一业务员 -->
<div
class=
"modal fade"
id=
"modal_new_maid_select"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
data-backdrop=
'static'
>
<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"
>
<ul
id=
"addmaid_select_ul"
>
</ul>
</div>
</div>
</div>
</div>
<!-- /.modal-content -->
<!-- /.modal-content -->
...
...
public/resource/css/report_list.css
View file @
25875113
...
@@ -112,6 +112,9 @@ addtax_
...
@@ -112,6 +112,9 @@ addtax_
/*详情弹出框,分佣提成*/
/*详情弹出框,分佣提成*/
.detail-modal-maid-top-btn-area
{
.detail-modal-maid-top-btn-area
{
padding
:
0
10px
10px
;
padding
:
0
10px
10px
;
}
.detail-modal-maid-bottom-btn-area
>
a
{
}
}
[
href
=
"#modal_new_maid"
]
{
[
href
=
"#modal_new_maid"
]
{
float
:
left
;
float
:
left
;
...
@@ -192,14 +195,38 @@ addtax_
...
@@ -192,14 +195,38 @@ addtax_
/********************/
/********************/
/*新增分佣提成弹框部分样式*/
/*新增分佣提成弹框部分样式*/
#addmaid_input_area
>
div
{
overflow
:
hidden
;
padding
:
5px
0
;
}
#addmaid_input_area
>
div
>
span
{
float
:
left
;
height
:
34px
;
line-height
:
34px
;
}
#addmaid_input_area
>
div
>
select
,
#addmaid_input_area
>
div
>
input
{
float
:
left
;
width
:
40%
;
}
#addmaid_input_area
>
div
>
span
:nth-of-type
(
1
)
{
#addmaid_input_area
>
div
>
span
:nth-of-type
(
1
)
{
display
:
inline-block
;
display
:
inline-block
;
width
:
50px
;
width
:
80px
;
}
#addmaid_input_area
>
div
>
span
:nth-of-type
(
2
)
{
padding-left
:
10px
;
}
[
href
=
"#modal_new_maid_select"
]
{
display
:
none
;
}
}
.form-control-one
{
#addmaid_select_ul
{
display
:
inline-block
;
list-style
:
none
;
width
:
40%
;
}
#addmaid_select_ul
>
li
{
height
:
50px
;
line-height
:
50px
;
cursor
:
pointer
;
}
}
...
...
public/resource/js/reportList.js
View file @
25875113
...
@@ -7,6 +7,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -7,6 +7,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
mainTabIndex
:
0
,
mainTabIndex
:
0
,
detailTabIndex
:
0
,
detailTabIndex
:
0
,
bargain_id
:
''
,
bargain_id
:
''
,
panfangData
:
null
,
maidTotalCommission
:
0
,
//应收总佣金
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
document
.
body
).
append
(
template
+
template_tax
+
template_maid
);
$
(
document
.
body
).
append
(
template
+
template_tax
+
template_maid
);
...
@@ -32,7 +34,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -32,7 +34,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
$
(
"#maintable_reset"
).
click
();
//先重置输入框
bargain
.
getList
(
1
);
//一级审核搜索
bargain
.
getList
(
1
);
//一级审核搜索
});
});
...
@@ -137,12 +138,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -137,12 +138,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain
.
bargaininfoSave
();
bargain
.
bargaininfoSave
();
});
});
//详情弹出框,点击新增分佣提成
_doc
.
delegate
(
"#new-commission"
,
"click"
,
function
()
{
bargain
.
newCommission
();
bargain
.
Caozuo
();
});
//详情弹出框,点击开票税费下的新增税费,弹出框出来
//详情弹出框,点击开票税费下的新增税费,弹出框出来
_doc
.
on
(
'click'
,
'[href=
\
"#modal_new_tax
\
"]'
,
function
(
e
){
_doc
.
on
(
'click'
,
'[href=
\
"#modal_new_tax
\
"]'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -172,6 +167,85 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -172,6 +167,85 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain
.
newAddTaxOk
();
bargain
.
newAddTaxOk
();
});
});
//详情弹出框,分佣提成里,点击新增
_doc
.
on
(
'click'
,
'[href="#modal_new_maid"]'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
newAddMaid
();
});
//详情弹出框,分佣提成里,点击新增,分佣方选择时触发的事件
_doc
.
on
(
'input'
,
'#addmaid_input_servant'
,
function
(
e
){
var
_this
=
$
(
this
);
$
(
'#addmaid_input_ywy'
).
val
(
''
);
//先置空
$
(
'#addmaid_input_shop'
).
val
(
''
);
//先置空
if
(
_this
.
val
()
===
''
){
}
else
if
(
_this
.
val
()
===
'5'
){
}
else
{
var
_rateTemp
=
bargain
.
getDefaultRadio
(
_this
.
val
());
$
(
'#addmaid_input_ratio'
).
val
(
_rateTemp
);
$
(
'#addmaid_input_cash'
).
val
(
_rateTemp
*
bargain
.
maidTotalCommission
);
var
_arrTemp
=
bargain
.
panfangData
.
filter
(
function
(
item
,
index
,
array
){
return
(
item
.
role
==
_this
.
val
());
});
if
(
_arrTemp
.
length
===
0
){
return
false
;
}
else
if
(
_arrTemp
.
length
===
1
){
$
(
'#addmaid_input_ywy'
).
val
(
_arrTemp
[
0
].
name
+
'-'
+
_arrTemp
[
0
].
phone
).
attr
(
'data-id'
,
_arrTemp
[
0
].
id
);
bargain
.
getDepart
(
_arrTemp
[
0
].
id
,
function
(
obj
){
$
(
'#addmaid_input_shop'
).
val
(
obj
.
district_name
+
'-'
+
obj
.
store_name
);
});
}
else
{
$
(
'[href="#modal_new_maid_select"]'
).
click
();
var
_tempHtml
=
''
;
$
.
each
(
_arrTemp
,
function
(
i
,
v
)
{
_tempHtml
+=
'<li data-data="{data}">{0}-{1}</li>'
.
stringFormatObj
({
'data'
:
encodeURIComponent
(
JSON
.
stringify
(
v
)),
'0'
:
v
.
name
,
'1'
:
v
.
phone
});
});
$
(
'#addmaid_select_ul'
).
html
(
_tempHtml
);
}
}
});
//详情弹出框,分佣提成里,点击新增,分佣方选择,弹出选择列表触发的事件
_doc
.
on
(
'click'
,
'#addmaid_select_ul>li'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_dataTemp
=
JSON
.
parse
(
decodeURIComponent
(
_this
.
attr
(
'data-data'
)));
$
(
'#addmaid_input_ywy'
).
val
(
_dataTemp
.
name
+
'-'
+
_dataTemp
.
phone
).
attr
(
'data-id'
,
_dataTemp
.
id
);
bargain
.
getDepart
(
_dataTemp
.
id
,
function
(
obj
){
$
(
'#addmaid_input_shop'
).
val
(
obj
.
district_name
+
'-'
+
obj
.
store_name
);
});
_this
.
closest
(
'.modal-content'
).
find
(
'button.close'
).
click
();
});
//详情弹出框,分佣提成里,点击新增,点击保存触发的事件
_doc
.
on
(
'click'
,
'#addmaid_ok_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
newAddMaidOk
();
});
//详情弹出框,分佣提成里,点击确认分佣触发的事件
_doc
.
on
(
'click'
,
'#maid_ok_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
MaidOk
();
});
//详情弹出框,分佣提成里,点击保存触发的事件
_doc
.
on
(
'click'
,
'#maid_save_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
MaidSave
();
});
//详情弹出框,分佣提成里,点击增加实收按钮
//详情弹出框,分佣提成里,点击增加实收按钮
_doc
.
on
(
'click'
,
'#maid_new_btn'
,
function
(
e
){
_doc
.
on
(
'click'
,
'#maid_new_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -185,6 +259,53 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -185,6 +259,53 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
}
});
});
});
});
},
getDefaultRadio
:
function
(
v
){
switch
(
Number
(
v
)){
case
1
:
return
25
;
case
2
:
return
30
;
case
3
:
return
35
;
case
4
:
return
10
;
default
:
return
25
;
}
},
getDepart
:
function
(
s
,
fn
){
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getAgentDistrictStore'
,
data
:
{
'id'
:
s
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
fn
&&
fn
(
_data
.
data
);
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
},
Timeline
:
function
()
{
//获取时间轴
Timeline
:
function
()
{
//获取时间轴
$
.
ajax
({
$
.
ajax
({
...
@@ -227,6 +348,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -227,6 +348,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$
(
"#bargaininfo_total_commission"
).
val
(
data
.
data
.
commission
);
$
(
"#bargaininfo_total_commission"
).
val
(
data
.
data
.
commission
);
$
(
"#bargaininfo_create_time"
).
html
(
data
.
data
.
create_time
);
$
(
"#bargaininfo_create_time"
).
html
(
data
.
data
.
create_time
);
bargain
.
maidTotalCommission
=
Number
(
data
.
data
.
commission
);
var
_inputAreaTempObj
=
$
(
'.detail-modal-bargaininfo-commission-addarea'
);
var
_inputAreaTempObj
=
$
(
'.detail-modal-bargaininfo-commission-addarea'
);
if
(
data
.
data
.
practical_fee
&&
data
.
data
.
practical_fee
.
length
>
0
){
if
(
data
.
data
.
practical_fee
&&
data
.
data
.
practical_fee
.
length
>
0
){
_inputAreaTempObj
.
html
(
''
);
_inputAreaTempObj
.
html
(
''
);
...
@@ -384,6 +507,75 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -384,6 +507,75 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
}
});
});
},
},
newAddMaid
:
function
(){
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/searchBargainAgents'
,
data
:
{
'bargain_id'
:
bargain
.
bargain_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
bargain
.
panfangData
=
_data
.
data
;
console
.
log
(
bargain
.
panfangData
);
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
newAddMaidOk
:
function
(){
console
.
log
(
7789
);
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/addBargain'
,
data
:
{
'id'
:
bargain
.
bargain_id
,
'scale_fee'
:
$
(
'#addmaid_input_cash'
).
val
(),
'role'
:
$
(
'#addmaid_input_servant'
).
val
(),
'scale'
:
$
(
'#addmaid_input_ratio'
).
val
()
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
newAddTax
:
function
(
obj
)
{
newAddTax
:
function
(
obj
)
{
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
_tempTableObj
.
attr
(
'data-type'
,
obj
[
'type'
]);
_tempTableObj
.
attr
(
'data-type'
,
obj
[
'type'
]);
...
...
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