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
74ca281d
Commit
74ca281d
authored
May 29, 2018
by
xishifeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣4
parent
e9d5c566
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
29 deletions
+95
-29
Finance.php
application/index/controller/Finance.php
+1
-1
account_statement.html
application/index/view/finance/account_statement.html
+1
-1
reportList.js
public/resource/js/reportList.js
+81
-17
reportList_maid_template_tpl.html
public/resource/template/reportList_maid_template_tpl.html
+12
-10
No files found.
application/index/controller/Finance.php
View file @
74ca281d
...
...
@@ -645,7 +645,7 @@ class Finance extends Basic
*/
public
function
addRealIncome
()
{
if
(
empty
(
$this
->
params
[
'bargain_id'
])
||
empty
(
$this
->
params
[
'is_account_commission'
]))
{
if
(
empty
(
$this
->
params
[
'bargain_id'
])
||
!
isset
(
$this
->
params
[
'is_account_commission'
]))
{
return
$this
->
response
(
101
,
'请求参数错误'
);
}
...
...
application/index/view/finance/account_statement.html
View file @
74ca281d
...
...
@@ -242,7 +242,7 @@
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-info"
data-dismiss=
"modal"
class=
"pass-modal-btn-pass"
>
<button
type=
"button"
class=
"btn btn-info"
data-dismiss=
"modal"
class=
"pass-modal-btn-pass"
id=
"pass_ok_btn"
>
确定
</button>
</div>
...
...
public/resource/js/reportList.js
View file @
74ca281d
...
...
@@ -78,12 +78,12 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
});
//点击通过,修改全局bargain_id,弹出框出来
_doc
.
delegate
(
"[href=
\"
#modal-pass
\"
]"
,
"click"
,
function
()
{
_doc
.
on
(
'click'
,
'[href=
\
"#modal-pass
\
"]'
,
function
()
{
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
});
//点击通过,确定按钮触发的事件
_doc
.
delegate
(
".pass-modal-btn-pass"
,
"click"
,
function
()
{
_doc
.
on
(
'click'
,
'#pass_ok_btn'
,
function
()
{
bargain
.
pass
();
});
...
...
@@ -236,14 +236,19 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
_doc
.
on
(
'click'
,
'#maid_ok_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
maidConfirmOk
();
if
(
bargain
.
mainTabIndex
===
2
){
bargain
.
maidConfirmOk
(
1
);
}
else
{
alert
(
'财务第三级审核人员才能确认分佣!'
);
}
});
//详情弹出框,分佣提成里,点击保存触发的事件
_doc
.
on
(
'click'
,
'#maid_save_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
maidSave
();
// bargain.maidSave();
bargain
.
maidConfirmOk
(
0
);
});
//详情弹出框,分佣提成里,点击增加实收按钮
...
...
@@ -256,6 +261,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$
.
each
(
_temp
,
function
(
i
,
v
)
{
if
(
v
.
innerHTML
==
''
){
_flag
=
true
;
return
false
;
};
});
};
...
...
@@ -591,28 +597,82 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
});
},
maidConfirmOk
:
function
(){
maidTest
:
function
(
type
){
var
_stopFlag
=
false
;
var
_num
=
0
;
var
_data
=
{
'bargain_id'
:
bargain
.
bargain_id
,
//成交报告id
'is_account_commission'
:
type
//0是保存,1是确认分佣
};
var
_parObj
=
$
(
'#maid_new_table_list>tr'
);
if
(
_parObj
.
length
>
0
){
$
.
each
(
_parObj
,
function
(
i
,
v
)
{
console
.
count
(
'$v'
);
var
_$v
=
$
(
v
);
var
_agendId
=
_$v
.
attr
(
'data-agentid'
);
//经纪人id
var
_role
=
_$v
.
attr
(
'data-role'
);
//盘方等类型
var
_scaleVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-span-scale'
).
html
());
//分佣比例
var
_shouldCommissionVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-td-should-commission'
).
html
());
//应分佣金
if
(
_scaleVal
==
''
||
_shouldCommissionVal
==
''
){
_stopFlag
=
true
;
}
else
{
var
_parObj2
=
_$v
.
find
(
'.detail-modal-maid-mix-td>div'
);
if
(
_parObj2
.
length
>
0
){
$
.
each
(
_parObj2
,
function
(
i2
,
v2
)
{
console
.
count
(
'$v2'
);
var
_$v2
=
$
(
v2
);
var
_cid
=
_$v2
.
attr
(
'data-id'
);
_cid
=
_cid
?
_cid
:
0
;
var
_sfyj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-real-fee'
).
html
());
var
_sxf
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-service-charge'
).
html
());
var
_csjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-charity-fund'
).
html
());
var
_xjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-cash'
).
html
());
var
_ssyj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-practical-fee'
).
html
());
if
(
_sfyj
==
''
||
_sxf
==
''
||
_csjj
==
''
||
_xjj
==
''
||
_ssyj
==
''
){
_stopFlag
=
true
;
}
else
{
_data
[
'commission_date['
+
_num
+
']'
]
=
{
'agent_id'
:
_agendId
,
//业务员id
'role'
:
_role
,
//盘方等角色类型
'scale'
:
Number
(
_scaleVal
),
//分佣比例
'should_commission'
:
_shouldCommissionVal
,
//应分佣金
'commission_id'
:
_cid
,
//子记录id
'real_fee'
:
_sfyj
,
//实分佣金
'service_charge'
:
_sxf
,
//手续费
'charity_fund'
:
_csjj
,
//慈善基金
'cash'
:
_xjj
,
//现金奖
'practical_fee'
:
_ssyj
//实收佣金
};
_num
++
;
}
});
}
else
{
}
}
});
};
return
{
'flag'
:
_stopFlag
,
'data'
:
_data
}
},
maidConfirmOk
:
function
(
type
){
var
_back
=
bargain
.
maidTest
(
type
);
if
(
!
_back
.
flag
){
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/addRealIncome'
,
data
:
{
'bargain_id'
:
bargain
.
bargain_id
,
'practical_fee'
:
bargain
.
bargain_id
,
'cash'
:
bargain
.
bargain_id
,
'service_charge'
:
bargain
.
bargain_id
,
'charity_fund'
:
bargain
.
bargain_id
,
'real_fee'
:
bargain
.
bargain_id
,
'confirm_date'
:
bargain
.
bargain_id
,
'should_commission'
:
bargain
.
bargain_id
,
'scale'
:
bargain
.
bargain_id
},
data
:
_back
.
data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
type
===
0
?
'保存成功'
:
'确认成功'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
...
...
@@ -630,6 +690,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
};
}
});
}
else
{
alert
(
'请填写完整'
);
}
},
maidSave
:
function
(){
...
...
public/resource/template/reportList_maid_template_tpl.html
View file @
74ca281d
<script
id=
"reportList_maid_list_tpl"
type=
"text/template"
>
[
%
if
(
it
[
'data'
]
&&
it
[
'data'
].
length
&&
it
[
'data'
].
length
>
0
)
{
%
]
[
%
for
(
var
i
in
it
[
'data'
]){
%
]
<
tr
class
=
"text-center"
data
-
id
=
"[%= it['data'][i]['id'] %]"
>
<
tr
class
=
"text-center"
data
-
id
=
"[%= it['data'][i]['id'] %]"
data
-
agentid
=
"[%= it['data'][i]['agent_id'] %]"
data
-
role
=
"[%= it['data'][i]['role'] %]"
>
<
td
>
[
%=
it
[
'data'
][
i
][
'role_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'agent'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'district_store'
]
%
]
<
/td
>
<
td
contenteditable
class
=
"detail-modal-maid-span-scale"
>
[
%=
it
[
'data'
][
i
][
'scale'
]
%
]
%
<
/td
>
<
td
contenteditable
class
=
"detail-modal-maid-
span
-should-commission"
>
[
%=
it
[
'data'
][
i
][
'scale_fee'
]
%
]
<
/td
>
<
td
><
span
contenteditable
class
=
"detail-modal-maid-span-scale"
>
[
%=
it
[
'data'
][
i
][
'scale'
]
%
]
<
/span><span>%</
span
>
<
/td
>
<
td
contenteditable
class
=
"detail-modal-maid-
td
-should-commission"
>
[
%=
it
[
'data'
][
i
][
'scale_fee'
]
%
]
<
/td
>
<
td
colspan
=
"6"
class
=
"detail-modal-maid-mix-td oh"
>
[
%
if
(
it
[
'data'
][
i
][
'partial_commission'
]
&&
it
[
'data'
][
i
][
'partial_commission'
].
length
&&
it
[
'data'
][
i
][
'partial_commission'
].
length
>
0
)
{
%
]
<
div
class
=
"oh"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
>
2
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-service-charge"
>
2
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-charity-fund"
>
2
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-cash"
>
2
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-practical-fee"
>
2
<
/span
>
<
span
class
=
"detail-modal-maid-span-time"
>
4
<
/span
>
[
%
for
(
var
j
in
it
[
'data'
][
i
][
'partial_commission'
]){
%
]
<
div
class
=
"oh"
data
-
id
=
"[%= it['data'][i]['partial_commission'][j]['id'] %]"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'real_fee'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-service-charge"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'service_charge'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-charity-fund"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'charity_fund'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-cash"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'cash'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-practical-fee"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'practical_fee'
]
%
]
<
/span
>
<
span
class
=
"detail-modal-maid-span-time"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'confirm_date'
]
%
]
<
/span
>
<
/div
>
[
%
}
%
]
[
%
}
else
{
%
]
<
div
class
=
"oh"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
><
/span
>
...
...
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