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
761be730
Commit
761be730
authored
May 29, 2018
by
xishifeng
Committed by
hujun
May 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分佣
parent
93c6c4d9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
45 deletions
+51
-45
reportList.js
public/resource/js/reportList.js
+48
-43
reportList_maid_template_tpl.html
public/resource/template/reportList_maid_template_tpl.html
+3
-2
No files found.
public/resource/js/reportList.js
View file @
761be730
...
@@ -599,11 +599,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -599,11 +599,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
},
},
maidTest
:
function
(
type
){
maidTest
:
function
(
type
){
var
_stopFlag
=
false
;
var
_stopFlag
=
false
;
var
_num
=
0
;
var
_data
=
[];
var
_data
=
{
'bargain_id'
:
bargain
.
bargain_id
,
//成交报告id
'is_account_commission'
:
type
//0是保存,1是确认分佣
};
var
_parObj
=
$
(
'#maid_new_table_list>tr'
);
var
_parObj
=
$
(
'#maid_new_table_list>tr'
);
if
(
_parObj
.
length
>
0
){
if
(
_parObj
.
length
>
0
){
$
.
each
(
_parObj
,
function
(
i
,
v
)
{
$
.
each
(
_parObj
,
function
(
i
,
v
)
{
...
@@ -613,6 +609,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -613,6 +609,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
var
_role
=
_$v
.
attr
(
'data-role'
);
//盘方等类型
var
_role
=
_$v
.
attr
(
'data-role'
);
//盘方等类型
var
_scaleVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-span-scale'
).
html
());
//分佣比例
var
_scaleVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-span-scale'
).
html
());
//分佣比例
var
_shouldCommissionVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-td-should-commission'
).
html
());
//应分佣金
var
_shouldCommissionVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-td-should-commission'
).
html
());
//应分佣金
var
_dataTemp
=
{
'bargain_id'
:
_$v
.
attr
(
'data-id'
),
//成交报告id
'last_commission_id'
:
_$v
.
attr
(
'lastid'
)?
_$v
.
attr
(
'lastid'
):
0
,
//最后一个提交的记录id
'is_account_commission'
:
type
//0是保存,1是确认分佣
};
if
(
_scaleVal
==
''
||
_shouldCommissionVal
==
''
){
if
(
_scaleVal
==
''
||
_shouldCommissionVal
==
''
){
_stopFlag
=
true
;
_stopFlag
=
true
;
}
else
{
}
else
{
...
@@ -622,7 +623,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -622,7 +623,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
console
.
count
(
'$v2'
);
console
.
count
(
'$v2'
);
var
_$v2
=
$
(
v2
);
var
_$v2
=
$
(
v2
);
var
_cid
=
_$v2
.
attr
(
'data-id'
);
var
_cid
=
_$v2
.
attr
(
'data-id'
);
_cid
=
_cid
?
_cid
:
0
;
_cid
=
_cid
?
_cid
:
0
;
//如果没有这个id,则为新增,传0
var
_sfyj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-real-fee'
).
html
());
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
_sxf
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-service-charge'
).
html
());
var
_csjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-charity-fund'
).
html
());
var
_csjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-charity-fund'
).
html
());
...
@@ -631,7 +632,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -631,7 +632,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
if
(
_sfyj
==
''
||
_sxf
==
''
||
_csjj
==
''
||
_xjj
==
''
||
_ssyj
==
''
){
if
(
_sfyj
==
''
||
_sxf
==
''
||
_csjj
==
''
||
_xjj
==
''
||
_ssyj
==
''
){
_stopFlag
=
true
;
_stopFlag
=
true
;
}
else
{
}
else
{
_data
[
'commission_date['
+
_num
+
']'
]
=
{
_data
Temp
[
'commission_date['
+
i2
+
']'
]
=
{
'agent_id'
:
_agendId
,
//业务员id
'agent_id'
:
_agendId
,
//业务员id
'role'
:
_role
,
//盘方等角色类型
'role'
:
_role
,
//盘方等角色类型
'scale'
:
Number
(
_scaleVal
),
//分佣比例
'scale'
:
Number
(
_scaleVal
),
//分佣比例
...
@@ -643,60 +644,64 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
...
@@ -643,60 +644,64 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'cash'
:
_xjj
,
//现金奖
'cash'
:
_xjj
,
//现金奖
'practical_fee'
:
_ssyj
//实收佣金
'practical_fee'
:
_ssyj
//实收佣金
};
};
_num
++
;
}
}
});
});
}
else
{
}
else
{
}
}
}
};
_data
.
push
(
_dataTemp
);
});
});
};
};
return
{
return
{
'flag'
:
_stopFlag
,
'flag'
:
_stopFlag
,
'
data
'
:
_data
'
list
'
:
_data
}
}
},
},
maidConfirmOk
:
function
(
type
){
maidConfirmOk
:
function
(
type
){
var
_back
=
bargain
.
maidTest
(
type
);
var
_back
=
bargain
.
maidTest
(
type
);
console
.
log
(
_back
);
if
(
!
_back
.
flag
){
if
(
!
_back
.
flag
){
$
.
ajax
({
var
_len
=
_back
.
list
.
length
;
type
:
'POST'
,
!
function
funTemp
(
count
)
{
url
:
'/index/addRealIncome'
,
if
(
count
>=
_len
)
{
data
:
_back
.
data
,
alert
(
type
===
0
?
'保存成功'
:
'确认成功'
);
timeout
:
30000
,
bargain
.
maidShow
();
dataType
:
'json'
,
}
else
{
beforeSend
:
function
()
{},
$
.
ajax
({
success
:
function
(
_data
)
{
type
:
'POST'
,
if
(
typeof
_data
===
'object'
)
{
url
:
'/index/addRealIncome'
,
if
(
_data
[
'code'
]
==
'200'
)
{
data
:
_back
.
list
[
count
],
alert
(
type
===
0
?
'保存成功'
:
'确认成功'
);
timeout
:
30000
,
bargain
.
maidShow
();
dataType
:
'json'
,
}
else
{
beforeSend
:
function
()
{},
layerTipsX
(
_data
[
'msg'
]);
success
:
function
(
_data
)
{
}
if
(
typeof
_data
===
'object'
)
{
}
else
{
if
(
_data
[
'code'
]
==
'200'
)
{
layerTipsX
(
'数据错误'
);
funTemp
(
++
count
);
};
}
else
{
},
layerTipsX
(
_data
[
'msg'
]);
error
:
function
()
{
}
layerTipsX
(
'enter error'
);
}
else
{
},
layerTipsX
(
'数据错误'
);
complete
:
function
(
xhr
,
textStatus
){
};
if
(
textStatus
===
'timeout'
)
{
},
//处理超时的逻辑
error
:
function
()
{
layerTipsX
(
'请求超时,请重试'
);
layerTipsX
(
'enter error'
);
};
},
}
complete
:
function
(
xhr
,
textStatus
){
});
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
}
}(
0
);
}
else
{
}
else
{
alert
(
'请填写完整'
);
alert
(
'请填写完整'
);
}
}
},
maidSave
:
function
(){
},
},
newAddTax
:
function
(
obj
)
{
newAddTax
:
function
(
obj
)
{
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
...
...
public/resource/template/reportList_maid_template_tpl.html
View file @
761be730
<script
id=
"reportList_maid_list_tpl"
type=
"text/template"
>
<script
id=
"reportList_maid_list_tpl"
type=
"text/template"
>
[
%
if
(
it
[
'data'
]
&&
it
[
'data'
].
length
&&
it
[
'data'
].
length
>
0
)
{
%
]
[
%
if
(
it
[
'data'
]
&&
it
[
'data'
].
length
&&
it
[
'data'
].
length
>
0
)
{
%
]
[
%
var
dealT
=
function
(
g
){
if
(
g
&&
(
g
!=
"null"
)){
return
g
}
else
{
return
""
}};
%
]
[
%
for
(
var
i
in
it
[
'data'
]){
%
]
[
%
for
(
var
i
in
it
[
'data'
]){
%
]
<
tr
class
=
"text-center"
data
-
id
=
"[%= it['data'][i]['id'] %]"
data
-
agentid
=
"[%= it['data'][i]['agent_id'] %]"
data
-
role
=
"[%= it['data'][i]['role'] %]"
>
<
tr
class
=
"text-center"
data
-
id
=
"[%= it['data'][i]['id'] %]"
data
-
agentid
=
"[%= it['data'][i]['agent_id'] %]"
data
-
role
=
"[%= it['data'][i]['role'] %]"
data
-
lastid
=
"[%= it['data'][i]['last_commission_id'] %]"
>
<
td
>
[
%=
it
[
'data'
][
i
][
'role_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'role_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'agent'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'agent'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'district_store'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'district_store'
]
%
]
<
/td
>
...
@@ -16,7 +17,7 @@
...
@@ -16,7 +17,7 @@
<
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-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-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
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
>
<
span
class
=
"detail-modal-maid-span-time"
>
[
%=
dealT
(
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'confirm_date'
])
%
]
<
/span
>
<
/div
>
<
/div
>
[
%
}
%
]
[
%
}
%
]
[
%
}
else
{
%
]
[
%
}
else
{
%
]
...
...
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