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
07178cb7
Commit
07178cb7
authored
Dec 12, 2018
by
zw
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/1210-v3.0.2' into 1210-v3.0.2
parents
f12592be
26808b91
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
136 additions
and
113 deletions
+136
-113
Broker.php
application/index/controller/Broker.php
+33
-31
Finance.php
application/index/controller/Finance.php
+14
-3
BrokerService.php
application/index/service/BrokerService.php
+17
-0
blackListCon.html
application/index/view/blackList/blackListCon.html
+1
-1
AAgentsBlackList.php
application/model/AAgentsBlackList.php
+6
-14
AAgentsBlackListImg.php
application/model/AAgentsBlackListImg.php
+0
-12
OPartialCommission.php
application/model/OPartialCommission.php
+0
-6
OTaxes.php
application/model/OTaxes.php
+5
-0
agent.js
public/resource/js/agent.js
+11
-14
black_list.js
public/resource/js/black_list.js
+27
-25
commissionTotal.js
public/resource/js/commissionTotal.js
+5
-0
agent_template_tpl.html
public/resource/template/agent_template_tpl.html
+7
-1
black_list_template_tpl.html
public/resource/template/black_list_template_tpl.html
+10
-6
No files found.
application/index/controller/Broker.php
View file @
07178cb7
...
@@ -911,42 +911,44 @@ class Broker extends Basic
...
@@ -911,42 +911,44 @@ class Broker extends Basic
if
(
!
isset
(
$params
[
"agents_id"
]))
{
if
(
!
isset
(
$params
[
"agents_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$service_broker
=
new
BrokerService
();
$save_data
[
'status'
]
=
4
;
$save_data
[
'id'
]
=
$params
[
'agents_id'
];
$broker_service
=
new
BrokerService
();
$data
=
$broker_service
->
updateStatus
(
$save_data
,
$this
->
userId
);
if
(
$data
[
'status'
]
==
'fail'
)
{
return
$this
->
response
(
"101"
,
$data
[
'msg'
]);
}
$m_agents_black_list
=
new
AAgentsBlackList
();
$m_agents_black_list
=
new
AAgentsBlackList
();
$m_agents_black_list_img
=
new
AAgentsBlackListImg
();
if
(
$params
[
"agents_black_list_id"
]){
//更新
$insert
[
"id"
]
=
$params
[
"agents_black_list_id"
];
//先判断是否已经存在数据
$field
=
'id,status'
;
$get_params
[
'status'
]
=
0
;
$get_params
[
'agents_id'
]
=
$params
[
"agents_id"
];
$get_data_res
=
$m_agents_black_list
->
getDatas
(
$field
,
$get_params
);
if
(
$get_data_res
){
//如果存在
$res
=
true
;
}
else
{
//不存在则新增数据
$insert
[
"agents_id"
]
=
$params
[
'agents_id'
];
$insert
[
"content"
]
=
$params
[
'content'
];
$insert
[
"content"
]
=
$params
[
'content'
];
$insert
[
"status"
]
=
0
;
$res
=
$m_agents_black_list
->
updateDatas
(
$insert
);
$res
=
$m_agents_black_list
->
saveData
(
$insert
);
if
(
$res
&&
$params
[
"img_info"
]){
if
(
$res
&&
$params
[
"img_info"
]){
foreach
(
explode
(
','
,
$params
[
"img_info"
])
as
$k
=>
$v
){
$service_broker
->
addAgentsBlackListImg
(
$params
[
"img_info"
],
$params
[
"agents_black_list_id"
]);
$insert
=
[];
}
$insert
[
"file_name"
]
=
$v
;
}
else
{
//新增
$insert
[
"father_id"
]
=
$res
;
$save_data
[
'status'
]
=
4
;
$insert
[
"type"
]
=
0
;
$save_data
[
'id'
]
=
$params
[
'agents_id'
];
$insert
[
"status"
]
=
0
;
$broker_service
=
new
BrokerService
();
$res
=
$m_agents_black_list_img
->
saveData
(
$insert
);
$data
=
$broker_service
->
updateStatus
(
$save_data
,
$this
->
userId
);
if
(
$data
[
'status'
]
==
'fail'
)
{
return
$this
->
response
(
"101"
,
$data
[
'msg'
]);
}
//先判断是否已经存在数据
$field
=
'id,status'
;
$get_params
[
'status'
]
=
0
;
$get_params
[
'agents_id'
]
=
$params
[
"agents_id"
];
$get_data_res
=
$m_agents_black_list
->
getDatas
(
$field
,
$get_params
);
if
(
$get_data_res
){
//如果存在
$res
=
true
;
}
else
{
//不存在则新增数据
$insert
[
"agents_id"
]
=
$params
[
'agents_id'
];
$insert
[
"content"
]
=
$params
[
'content'
];
$insert
[
"status"
]
=
0
;
$res
=
$m_agents_black_list
->
saveData
(
$insert
);
if
(
$res
&&
$params
[
"img_info"
]){
$service_broker
->
addAgentsBlackListImg
(
$params
[
"img_info"
],
$res
);
}
}
}
}
}
}
if
(
$res
)
{
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"成功"
);
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
}
else
{
...
@@ -1006,7 +1008,7 @@ class Broker extends Basic
...
@@ -1006,7 +1008,7 @@ class Broker extends Basic
if
(
!
isset
(
$params
[
"agents_black_list_id"
]))
{
if
(
!
isset
(
$params
[
"agents_black_list_id"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
}
$internet_path
=
CURRENT_URL
.
'
public/
static/agent_black_list/'
;
$internet_path
=
CURRENT_URL
.
'static/agent_black_list/'
;
$m_agents_black_list
=
new
AAgentsBlackList
();
$m_agents_black_list
=
new
AAgentsBlackList
();
$m_agents_black_list_img
=
new
AAgentsBlackListImg
();
$m_agents_black_list_img
=
new
AAgentsBlackListImg
();
...
...
application/index/controller/Finance.php
View file @
07178cb7
...
@@ -1640,6 +1640,7 @@ class Finance extends Basic
...
@@ -1640,6 +1640,7 @@ class Finance extends Basic
}
}
$m_partial
=
new
OPartialCommission
();
$m_partial
=
new
OPartialCommission
();
$m_tax
=
new
OTaxes
();
$fields
=
'd.income_time,c.create_time,c.id,a.agent_id,b.name,b.phone'
;
$fields
=
'd.income_time,c.create_time,c.id,a.agent_id,b.name,b.phone'
;
$commission_fields
=
'sum(practical_fee) as practical_fee,sum(cash) as cash,sum(real_fee) as real_fee,sum(service_charge) as service_charge,
$commission_fields
=
'sum(practical_fee) as practical_fee,sum(cash) as cash,sum(real_fee) as real_fee,sum(service_charge) as service_charge,
...
@@ -1649,6 +1650,9 @@ class Finance extends Basic
...
@@ -1649,6 +1650,9 @@ class Finance extends Basic
}
}
$commission_where
[
'b.income_time'
]
=
[
'between time'
,
[
$operation_start_data
,
$operation_end_data
]];
$commission_where
[
'b.income_time'
]
=
[
'between time'
,
[
$operation_start_data
,
$operation_end_data
]];
$commission_where
[
'confirm_status'
]
=
1
;
$commission_where
[
'confirm_status'
]
=
1
;
$tax_where
[
'operation_date'
]
=
[
'between time'
,
[
$operation_start_data
,
$operation_end_data
]];
$tax_where
[
'is_del'
]
=
0
;
if
(
empty
(
$this
->
params
[
'excel'
])
&&
$this
->
params
[
'excel'
]
!=
1
)
{
if
(
empty
(
$this
->
params
[
'excel'
])
&&
$this
->
params
[
'excel'
]
!=
1
)
{
$result_data
=
$m_partial
->
getCommissionTotalListV2
(
$pageNo
,
$pageSize
,
'a.agent_id desc'
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
);
$result_data
=
$m_partial
->
getCommissionTotalListV2
(
$pageNo
,
$pageSize
,
'a.agent_id desc'
,
$fields
,
$where
,
$operation_start_data
,
$operation_end_data
);
if
(
$result_data
[
'status'
]
==
'successful'
)
{
if
(
$result_data
[
'status'
]
==
'successful'
)
{
...
@@ -1664,7 +1668,11 @@ class Finance extends Basic
...
@@ -1664,7 +1668,11 @@ class Finance extends Basic
$list
[
$k
][
'real_fee'
]
=
$commission_data
[
'real_fee'
];
$list
[
$k
][
'real_fee'
]
=
$commission_data
[
'real_fee'
];
$list
[
$k
][
'service_charge'
]
=
$commission_data
[
'service_charge'
];
$list
[
$k
][
'service_charge'
]
=
$commission_data
[
'service_charge'
];
$list
[
$k
][
'charity_fund'
]
=
$commission_data
[
'charity_fund'
];
$list
[
$k
][
'charity_fund'
]
=
$commission_data
[
'charity_fund'
];
$list
[
$k
][
'over_fee'
]
=
$commission_data
[
'practical_fee'
]
-
$v
[
'fee'
];
$tax_where
[
'agent_id'
]
=
$v
[
'agent_id'
];
$fee
=
$m_tax
->
sumField
(
'fee'
,
$tax_where
);
$list
[
$k
][
'fee'
]
=
$fee
;
$list
[
$k
][
'over_fee'
]
=
$commission_data
[
'practical_fee'
]
-
$fee
;
}
}
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'list'
]
=
$list
;
$data
[
'data'
][
'total'
]
=
$m_partial
->
getCommissionTotalListTotalV2
(
$where
);
$data
[
'data'
][
'total'
]
=
$m_partial
->
getCommissionTotalListTotalV2
(
$where
);
...
@@ -1693,8 +1701,11 @@ class Finance extends Basic
...
@@ -1693,8 +1701,11 @@ class Finance extends Basic
$excel_data
[
$k
][
'cash'
]
=
$commission_data
[
'cash'
];
//现金奖
$excel_data
[
$k
][
'cash'
]
=
$commission_data
[
'cash'
];
//现金奖
$excel_data
[
$k
][
'charity_fund'
]
=
$commission_data
[
'charity_fund'
];
//慈善基金
$excel_data
[
$k
][
'charity_fund'
]
=
$commission_data
[
'charity_fund'
];
//慈善基金
$excel_data
[
$k
][
'practical_fee'
]
=
$commission_data
[
'practical_fee'
];
//实收佣金
$excel_data
[
$k
][
'practical_fee'
]
=
$commission_data
[
'practical_fee'
];
//实收佣金
$excel_data
[
$k
][
'fee'
]
=
$v
[
'fee'
];
//税费
$excel_data
[
$k
][
'over_fee'
]
=
$commission_data
[
'practical_fee'
]
-
$v
[
'fee'
];
$tax_where
[
'agent_id'
]
=
$v
[
'agent_id'
];
$fee
=
$m_tax
->
sumField
(
'fee'
,
$tax_where
);
$excel_data
[
$k
][
'fee'
]
=
$fee
;
$excel_data
[
$k
][
'over_fee'
]
=
$commission_data
[
'practical_fee'
]
-
$fee
;
}
}
$num
=
count
(
$excel_data
)
+
2
;
$num
=
count
(
$excel_data
)
+
2
;
...
...
application/index/service/BrokerService.php
View file @
07178cb7
...
@@ -13,6 +13,7 @@ use app\api_broker\service\CallPhoneService;
...
@@ -13,6 +13,7 @@ use app\api_broker\service\CallPhoneService;
use
app\api_broker\service\PushMessageService
;
use
app\api_broker\service\PushMessageService
;
use
app\index\validate\AAgentValidate
;
use
app\index\validate\AAgentValidate
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AAgentsBlackListImg
;
use
app\model\ABindingDevice
;
use
app\model\ABindingDevice
;
use
app\model\ADistrict
;
use
app\model\ADistrict
;
use
app\model\AOperatingRecords
;
use
app\model\AOperatingRecords
;
...
@@ -436,4 +437,19 @@ class BrokerService
...
@@ -436,4 +437,19 @@ class BrokerService
$remark
=
'修改为 '
.
$agent_status
[
$status
];
$remark
=
'修改为 '
.
$agent_status
[
$status
];
$result
=
$records
->
record
(
0
,
7
,
$remark
,
''
,
$id
);
$result
=
$records
->
record
(
0
,
7
,
$remark
,
''
,
$id
);
}
}
/**
* 添加黑名单图片
*/
public
function
addAgentsBlackListImg
(
$img_info
,
$father_id
){
$m_agents_black_list_img
=
new
AAgentsBlackListImg
();
foreach
(
explode
(
','
,
$img_info
)
as
$k
=>
$v
){
$insert
=
[];
$insert
[
"file_name"
]
=
$v
;
$insert
[
"father_id"
]
=
$father_id
;
$insert
[
"type"
]
=
0
;
$insert
[
"status"
]
=
0
;
$res
=
$m_agents_black_list_img
->
saveData
(
$insert
);
}
}
}
}
\ No newline at end of file
application/index/view/blackList/blackListCon.html
View file @
07178cb7
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<div
class=
"panel-heading breadcrumb"
>
<li>
<li>
<a
href=
"#"
>
业绩调整记录
</a>
<a
href=
"#"
>
黑名单列表
</a>
</li>
</li>
</div>
</div>
...
...
application/model/AAgentsBlackList.php
View file @
07178cb7
...
@@ -62,6 +62,12 @@ class AAgentsBlackList extends Model
...
@@ -62,6 +62,12 @@ class AAgentsBlackList extends Model
return
$result
;
return
$result
;
}
}
public
function
getDataById
(
$id
,
$field
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
'id'
,
$id
)
->
find
();
//dump($this->getLastSql());
return
$result
;
}
/**
/**
* 更新数据
* 更新数据
...
@@ -71,20 +77,6 @@ class AAgentsBlackList extends Model
...
@@ -71,20 +77,6 @@ class AAgentsBlackList extends Model
$result
=
$this
->
update
(
$params
);
$result
=
$this
->
update
(
$params
);
//dump($this->getLastSql());
//dump($this->getLastSql());
return
$result
;
return
$result
;
}
public
function
getDataById
(
$id
,
$field
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
'id'
,
$id
)
->
find
();
//dump($this->getLastSql());
return
$result
;
}
}
}
}
application/model/AAgentsBlackListImg.php
View file @
07178cb7
...
@@ -32,18 +32,6 @@ class AAgentsBlackListImg extends Model
...
@@ -32,18 +32,6 @@ class AAgentsBlackListImg extends Model
return
$result
;
return
$result
;
}
}
/**
* 查询数据统计
*/
public
function
getDatasTotal
(
$field
,
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
where
(
$params
)
->
count
();
//dump($this->getLastSql());
return
$result
;
}
/**
/**
...
...
application/model/OPartialCommission.php
View file @
07178cb7
...
@@ -308,12 +308,6 @@ class OPartialCommission extends BaseModel
...
@@ -308,12 +308,6 @@ class OPartialCommission extends BaseModel
$district_store
=
$m_agent
->
getStoreDistrict
(
'store_name,district_name'
,
[
'a.id'
=>
$v
[
'agent_id'
]
]);
$district_store
=
$m_agent
->
getStoreDistrict
(
'store_name,district_name'
,
[
'a.id'
=>
$v
[
'agent_id'
]
]);
$data
[
$k
][
'district_store'
]
=
$district_store
[
'district_name'
]
.
'-'
.
$district_store
[
'store_name'
];
$data
[
$k
][
'district_store'
]
=
$district_store
[
'district_name'
]
.
'-'
.
$district_store
[
'store_name'
];
//税费
$data
[
$k
][
'fee'
]
=
$m_tax
->
where
(
'operation_date'
,
'between time'
,
[
$operation_start_data
,
$operation_end_data
])
->
where
(
'agent_id'
,
$v
[
'agent_id'
])
->
where
(
'is_del'
,
0
)
->
sum
(
'fee'
);
//去除多次应分佣金
//去除多次应分佣金
$should_commission
=
$this
->
where
(
'confirm_date'
,
'between time'
,
[
$operation_start_data
,
$operation_end_data
])
$should_commission
=
$this
->
where
(
'confirm_date'
,
'between time'
,
[
$operation_start_data
,
$operation_end_data
])
->
where
(
'agent_id'
,
$v
[
'agent_id'
])
->
where
(
'agent_id'
,
$v
[
'agent_id'
])
...
...
application/model/OTaxes.php
View file @
07178cb7
...
@@ -279,4 +279,8 @@ class OTaxes extends BaseModel
...
@@ -279,4 +279,8 @@ class OTaxes extends BaseModel
$result
=
$this
->
where
(
$where_
)
->
update
(
$update_dta
);
$result
=
$this
->
where
(
$where_
)
->
update
(
$update_dta
);
return
$result
;
return
$result
;
}
}
public
function
sumField
(
$field
,
$where
)
{
return
$this
->
where
(
$where
)
->
sum
(
$field
);
}
}
}
\ No newline at end of file
public/resource/js/agent.js
View file @
07178cb7
...
@@ -118,7 +118,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -118,7 +118,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$
(
document
).
delegate
(
"#password"
,
"click"
,
function
()
{
$
(
document
).
delegate
(
"#password"
,
"click"
,
function
()
{
$
(
this
).
val
(
''
).
attr
(
'type'
,
'password'
);
$
(
this
).
val
(
''
).
attr
(
'type'
,
'password'
);
});
});
$
(
document
).
on
(
"click"
,
".black-list"
,
function
()
{
//点击黑名单
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
});
$
(
document
).
on
(
"click"
,
".phone-bundling"
,
function
()
{
//点击绑定手机
$
(
document
).
on
(
"click"
,
".phone-bundling"
,
function
()
{
//点击绑定手机
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
agent
.
getPhoneBindingList
(
browser_version
);
agent
.
getPhoneBindingList
(
browser_version
);
...
@@ -291,7 +293,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -291,7 +293,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$
(
'#file_input'
).
on
(
'change'
,
function
(){
$
(
'#file_input'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'
chat
'
);
formData
.
append
(
'type'
,
'
agent_black_list_img
'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
$
.
ajax
({
type
:
'post'
,
type
:
'post'
,
...
@@ -306,7 +308,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -306,7 +308,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
if
(
_data
.
code
==
200
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area'
).
append
(
'<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'
.
stringFormatObj
({
$
(
'#container_body_img_area'
).
append
(
'<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'0'
:
_data
.
data
.
img_path
,
'1'
:
_data
.
data
.
internet_img_name
?
urlDeal
(
_data
.
data
.
internet_img_name
):
_data
.
data
.
internet_img_name
'1'
:
'/'
+
_data
.
data
.
internet_img_name
// '1': _data.data.internet_img_name?urlDeal(_data.data.internet_img_name):_data.data.internet_img_name
}));
}));
}
else
{
}
else
{
alert
(
_data
.
msg
);
alert
(
_data
.
msg
);
...
@@ -347,24 +350,18 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
...
@@ -347,24 +350,18 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
preventDefault
();
e
.
stopPropagation
();
e
.
stopPropagation
();
var
_data
=
{};
_data
[
'content'
]
=
$
(
'.black-list-text'
).
val
();
_data
[
'agents_id'
]
=
agent
.
agent_id
;
var
imgname
=
[];
var
imgname
=
[];
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
};
console
.
log
(
imgname
.
join
(
','
));
console
.
log
(
imgname
.
join
(
','
));
var
id_pic
=
agent
.
house_fatherid
>
0
?
agent
.
house_fatherid
:
agent
.
house_id
;
_data
[
'img_info'
]
=
imgname
.
join
(
','
);
var
_data
=
{
img_id
:
id_pic
};
//无新的图片上传 不调用接口
if
(
imgname
.
join
(
','
))
{
_data
[
'img_name'
]
=
imgname
.
join
(
','
);
}
else
{
return
};
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'/index/add
ReceiptImg
'
,
url
:
'/index/add
AgentsBlackList
'
,
data
:
_data
,
data
:
_data
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
...
...
public/resource/js/black_list.js
View file @
07178cb7
...
@@ -3,6 +3,9 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -3,6 +3,9 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
pageNo
:
1
,
pageNo
:
1
,
/*第几页*/
/*第几页*/
pageSize
:
15
,
pageSize
:
15
,
agent_id
:
''
,
agents_id
:
''
,
/*每页显示多少条*/
/*每页显示多少条*/
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
...
@@ -18,7 +21,12 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -18,7 +21,12 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
$
(
"#reset"
).
click
(
function
()
{
//重置
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
document
.
getElementById
(
"form_search"
).
reset
();
});
});
//收款图片-点击添加图片事件
$
(
document
).
on
(
"click"
,
".black-list"
,
function
()
{
//点击详情
adjustment
.
agent_id
=
$
(
this
).
attr
(
"data-id"
);
adjustment
.
agents_id
=
$
(
this
).
attr
(
"data-ids"
);
adjustment
.
getaddPicList
();
});
//收款图片-点击添加图片事件
$
(
'#file_input'
).
on
(
'change'
,
function
(){
$
(
'#file_input'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
var
formData
=
new
FormData
();
...
@@ -82,20 +90,17 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -82,20 +90,17 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
};
console
.
log
(
imgname
.
join
(
','
));
var
_data
=
{};
var
id_pic
=
adjustment
.
house_fatherid
>
0
?
adjustment
.
house_fatherid
:
adjustment
.
house_id
;
var
_data
=
{
img_id
:
id_pic
};
//无新的图片上传 不调用接口
//无新的图片上传 不调用接口
if
(
imgname
.
join
(
','
))
{
if
(
imgname
.
join
(
','
)){
_data
[
'img_name'
]
=
imgname
.
join
(
','
);
_data
[
'img_info'
]
=
imgname
.
join
(
','
);
}
else
{
}
return
_data
[
'content'
]
=
$
(
'.black-list-text'
).
val
();
};
_data
[
'agents_id'
]
=
adjustment
.
agent_id
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'/index/add
ReceiptImg
'
,
url
:
'/index/add
AgentsBlackList
'
,
data
:
_data
,
data
:
_data
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
...
@@ -127,16 +132,15 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -127,16 +132,15 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
params
.
phone
=
$
(
'#user_phone'
).
val
();
params
.
phone
=
$
(
'#user_phone'
).
val
();
params
.
name
=
$
(
'#user_name'
).
val
();
params
.
name
=
$
(
'#user_name'
).
val
();
$
.
ajax
({
$
.
ajax
({
url
:
'/index/get
PerformanceRecord
List'
,
//获取列表
url
:
'/index/get
AgentsBlack
List'
,
//获取列表
type
:
'GET'
,
type
:
'GET'
,
async
:
true
,
async
:
true
,
data
:
params
,
data
:
params
,
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
);
var
temp
=
document
.
getElementById
(
'black_list_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'black_list_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#black_list_con"
).
html
(
doTtmpl
(
data
.
data
.
data
));
$
(
"#black_list_con"
).
html
(
doTtmpl
(
data
.
data
.
data
_list
));
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
adjustment
.
pageSize
,
adjustment
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
adjustment
.
pageSize
,
adjustment
.
getList
);
}
}
...
@@ -145,9 +149,9 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -145,9 +149,9 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
spandelList
:
function
(
n
)
{
//删除已经保存的图片都调用
spandelList
:
function
(
n
)
{
//删除已经保存的图片都调用
$
.
ajax
({
$
.
ajax
({
'type'
:
'POST'
,
'type'
:
'POST'
,
'url'
:
'/index/del
eteReceip
tImg'
,
'url'
:
'/index/del
AgentsBlackLis
tImg'
,
data
:
{
data
:
{
id
:
n
agents_black_list_img_
id
:
n
},
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
...
@@ -160,24 +164,22 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
...
@@ -160,24 +164,22 @@ define(['doT', 'text!temp/black_list_template_tpl.html', 'css!style/home.css', '
getaddPicList
:
function
()
{
getaddPicList
:
function
()
{
//获取收款图片
//获取收款图片
$
(
'#container_body_img_area'
).
html
(
''
);
//每回先清空所有图片
$
(
'#container_body_img_area'
).
html
(
''
);
//每回先清空所有图片
var
id_pic
=
follow
.
house_fatherid
>
0
?
follow
.
house_fatherid
:
follow
.
house_id
;
$
(
'.result2,.result'
).
remove
();
//删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$
(
'.result2,.result'
).
remove
();
//删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
'url'
:
'/index/
receiptImgList
'
,
'url'
:
'/index/
getBlackListInfo
'
,
data
:
{
data
:
{
"
id"
:
id_pic
,
"
agents_black_list_id"
:
adjustment
.
agent_id
,
},
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
$
(
'.black-list-text'
).
val
(
data
.
data
.
content
);
//渲染已经有的列表
//渲染已经有的列表
// <img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview"
for
(
i
=
0
;
i
<
data
.
data
.
img_list
.
length
;
i
++
)
{
// data-bimg='[%= it[item]["agent_img"] %]'>
for
(
i
=
0
;
i
<
data
.
data
.
length
;
i
++
)
{
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
'0'
:
data
.
data
[
i
].
id
,
'0'
:
data
.
data
.
img_list
[
i
].
agents_black_list_img_
id
,
'1'
:
data
.
data
[
i
].
img_name
?
urlDeal
(
data
.
data
[
i
].
img_name
):
data
.
data
[
i
].
img_name
'1'
:
data
.
data
.
img_list
[
i
].
internet_path
?
urlDeal
(
data
.
data
.
img_list
[
i
].
internet_path
):
data
.
data
.
img_list
[
i
].
internet_path
}));
}));
};
};
...
...
public/resource/js/commissionTotal.js
View file @
07178cb7
...
@@ -486,6 +486,7 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
...
@@ -486,6 +486,7 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
var
bargain_end_date
=
$
(
'#end_dealtime'
).
val
();
var
bargain_end_date
=
$
(
'#end_dealtime'
).
val
();
var
district_id
=
$
(
"#district_id"
).
val
();
//部门id 添加字段
var
district_id
=
$
(
"#district_id"
).
val
();
//部门id 添加字段
var
store_id
=
$
(
'#guest_stores'
).
val
();
var
store_id
=
$
(
'#guest_stores'
).
val
();
var
confirm_date
=
$
(
'#confirm_commission'
).
val
();
var
str
=
'/index/getCommissionTotalList?excel=1'
;
var
str
=
'/index/getCommissionTotalList?excel=1'
;
if
(
name
)
{
if
(
name
)
{
str
+=
'&name='
+
name
;
str
+=
'&name='
+
name
;
...
@@ -518,6 +519,10 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
...
@@ -518,6 +519,10 @@ define(['doT', 'text!temp/commissionTotal_template_tpl.html', 'css!style/home.cs
str
+=
'&store_name='
+
store_id
;
str
+=
'&store_name='
+
store_id
;
}
}
if
(
confirm_date
)
{
str
+=
'&confirm_date='
+
confirm_date
;
}
window
.
open
(
str
)
window
.
open
(
str
)
}
}
};
};
...
...
public/resource/template/agent_template_tpl.html
View file @
07178cb7
...
@@ -59,7 +59,13 @@
...
@@ -59,7 +59,13 @@
<
a
class
=
"btn1 btn-success phone-bundling btn-default-hide-display"
href
=
"#modal-phonebundling"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
绑定手机
/
电脑
<
/a
>
<
a
class
=
"btn1 btn-success phone-bundling btn-default-hide-display"
href
=
"#modal-phonebundling"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
绑定手机
/
电脑
<
/a
>
<
a
class
=
"btn1 btn-success btn-default-hide-display state-record"
href
=
"#modal-stateRecord"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
状态记录
<
/a
>
<
a
class
=
"btn1 btn-success btn-default-hide-display state-record"
href
=
"#modal-stateRecord"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
状态记录
<
/a
>
<
a
class
=
"btn1 btn-success btn-default-hide-display black-list"
href
=
"#modal-blackList"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
加黑名单
<
/a
>
[
%
if
(
it
[
item
][
"status"
]
==
4
)
{
%
]
<
a
class
=
"btn1 btn-default btn-default-hide-display"
href
=
""
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
已黑化
<
/a
>
[
%
}
else
{
%
]
<
a
class
=
"btn1 btn-success btn-default-hide-display black-list"
href
=
"#modal-blackList"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
加黑名单
<
/a
>
[
%
}
%
]
[
%
}
%
]
[
%
}
%
]
<
a
class
=
"btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"
><<<<
/a
>
<
a
class
=
"btn1 btn-default btn-default-hide-caozuo btn-default-hide-display"
><<<<
/a
>
[
%
}
%
]
[
%
}
%
]
...
...
public/resource/template/black_list_template_tpl.html
View file @
07178cb7
...
@@ -3,13 +3,17 @@
...
@@ -3,13 +3,17 @@
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
>
<
tr
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'agents_id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
<
td
>
[
%=
it
[
item
][
'phone'
]
%
]
<
/td
>
<
input
type
=
"hidden"
value
=
'[%= it[item]["agent_img"] %]'
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
img
src
=
'[%= it[item]["head_portrait"] %]'
class
=
"diagram-image J_preview"
<
td
>
[
%=
it
[
item
][
'performance_time'
]
%
]
<
/td
>
data
-
bimg
=
'[%= it[item]["head_portrait"] %]'
>
<
/td
>
<
td
>
[
%=
it
[
item
][
'name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'store_name'
]
%
]
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success black-list"
href
=
"#modal-blackList"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
详情
<
/a
>
<
a
class
=
"btn1 btn-success black-list"
href
=
"#modal-blackList"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["
agents_black_list_id"] %]'
data
-
ids
=
'[%= it[item]["agents_
id"] %]'
>
详情
<
/a
>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
...
...
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