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
2abc594b
Commit
2abc594b
authored
Jun 25, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
a4995892
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
963 additions
and
4 deletions
+963
-4
Index.php
application/app_broker/controller/Index.php
+8
-2
bargaininfo_detail_static_pc_office.html
...roker/view/index/bargaininfo_detail_static_pc_office.html
+203
-0
submit_report_pc_office.html
...cation/app_broker/view/index/submit_report_pc_office.html
+164
-0
route.php
application/route.php
+2
-0
bargaininfo_detail_static_pc.js
public/app/js/bargaininfo_detail_static_pc.js
+1
-1
bargaininfo_detail_static_pc_office.js
public/app/js/bargaininfo_detail_static_pc_office.js
+256
-0
submit_report_pc.js
public/app/js/submit_report_pc.js
+1
-1
submit_report_pc_office.js
public/app/js/submit_report_pc_office.js
+328
-0
No files found.
application/app_broker/controller/Index.php
View file @
2abc594b
...
...
@@ -186,12 +186,18 @@ class Index
{
return
view
(
'index/bargaininfo_detail_static_pc'
);
}
public
function
bargaininfo_detail_static_pc_office
()
{
return
view
(
'index/bargaininfo_detail_static_pc_office'
);
}
public
function
submit_report_pc
()
{
return
view
(
'index/submit_report_pc'
);
}
public
function
submit_report_pc_office
()
{
return
view
(
'index/submit_report_pc_office'
);
}
public
function
shop_detail_pc
()
{
return
view
(
'index/shop_detail_pc'
);
...
...
application/app_broker/view/index/bargaininfo_detail_static_pc_office.html
0 → 100644
View file @
2abc594b
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
同联商业
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
<meta
name=
"Keywords"
content=
""
/>
<meta
name=
"Description"
content=
""
/>
</head>
<body
class=
"body-pc"
style=
"display: none;"
>
<div
id=
"app"
>
<nav
class=
"oh"
>
<a
href=
"javascript:;"
class=
"btn-pc"
@
click=
"tabMain(0)"
:class=
"{'btn-info-pc':mainInit == 0}"
>
成交信息
</a>
<a
href=
"javascript:;"
class=
"btn-pc"
@
click=
"tabMain(1)"
:class=
"{'btn-info-pc':mainInit == 1}"
>
分佣提成
</a>
<a
href=
"javascript:;"
class=
"btn-pc"
@
click=
"tabMain(2)"
:class=
"{'btn-info-pc':mainInit == 2}"
>
开票税费
</a>
</nav>
<main>
<section
v-show=
"mainInit == 0"
>
<div
class=
"sec1-area1 oh"
>
<ul>
<li
v-if=
'is_office != 2'
>
<div>
房源类型:
</div>
<div>
{{detailData.shop_type=='1'?'街铺':'商场'}}
</div>
</li>
<li
v-if=
'is_office == 2'
>
<div>
房源类型:
</div>
<div>
{{detailData.type}}
</div>
</li>
<li>
<div>
商铺地址:
</div>
<div>
{{detailData.internal_address}}
<button
v-if=
"otherBtn!='no'"
class=
"btn-pc btn-info-pc btn-show-shop-detail"
@
click
.
stop
.
prevent=
"showShopDetail"
>
商铺
</button></div>
</li>
<li>
<div>
业态:
</div>
<div>
{{detailData.industry_type}}
</div>
</li>
<li>
<div>
客户姓名:
</div>
<div>
{{detailData.user_name}}
</div>
</li>
<li>
<div>
成交类型:
</div>
<div>
{{dealDoneType(detailData.trade_type)}}
</div>
</li>
<li>
<div>
应收总佣金:
</div>
<div>
{{detailData.commission}}元
</div>
</li>
</ul>
<ul>
<li>
</li>
<li>
<div>
商铺号:
</div>
<div>
{{detailData.house_number}}
</div>
</li>
<li>
<div>
预计收款时间:
</div>
<div>
{{detailData.estimated_receipt_date}}
</div>
</li>
<li>
<div>
客户电话:
</div>
<div>
{{hidePhone(detailData.user_phone)}}
<button
v-if=
"otherBtn!='no'"
class=
"btn-pc btn-info-pc btn-show-customer-detail"
@
click
.
stop
.
prevent=
"showCustomerDetail"
>
客户
</button></div>
</li>
<li>
<div>
成交日期:
</div>
<div>
{{detailData.create_time}}
</div>
</li>
<li>
<div>
成交价:
</div>
<div>
{{detailData.price}}元
</div>
</li>
</ul>
</div>
<div
class=
"sec1-area2"
>
<ul>
<li
class=
"flex"
v-for=
"(item, index) in detailData.practical_fee"
:key=
"index"
:data-id=
"item.fee_id"
>
<div><span>
实收佣金:
</span>
{{item.money}}元
</div>
<div><span>
收佣日期:
</span>
{{item.income_time}}
</div>
</li>
</ul>
</div>
<div
class=
"sec1-area3"
>
<ul>
<li>
备注:{{detailData.content}}
</li>
</ul>
</div>
</section>
<section
v-show=
"mainInit == 1"
>
<table
class=
"fenyong-ticheng-main-table"
>
<thead>
<tr>
<th>
分佣ID
</th>
<th>
分佣方
</th>
<th>
业务员
</th>
<th>
所属门店
</th>
<th>
分佣比例
</th>
<th>
应分佣金(元)
</th>
<th>
预分佣金(元)
</th>
<th>
手续费(元)
</th>
<th>
慈善基金(元)
</th>
<th>
现金奖(元)
</th>
<th>
实收佣金(元)
</th>
<th>
收佣日期
</th>
<th>
确认时间
</th>
</tr>
</thead>
<tbody
v-if=
"Array.isArray(fenyongData) && fenyongData.length>0"
>
<tr
v-for=
"(item, index) in fenyongData"
:key=
"index"
:data-id=
"item.id"
>
<td>
{{item.id}}
</td>
<td>
{{item.role_name}}
</td>
<td>
{{item.agent}}
</td>
<td>
{{item.district_store}}
</td>
<td
class=
"detail-modal-maid-span-scale"
>
{{item.scale}}%
</td>
<td
class=
"detail-modal-maid-td-should-commission"
>
{{item.scale_fee}}
</td>
<td
colspan=
"7"
class=
"fenyong-ticheng-mix-td"
v-if=
"item.partial_commission&&item.partial_commission.length&&item.partial_commission.length>0"
>
<div
data-id=
"354"
v-for=
"(item2, index2) in item.partial_commission"
>
<span>
{{item2.real_fee}}
</span>
<span>
{{item2.service_charge}}
</span>
<span>
{{item2.charity_fund}}
</span>
<span>
{{item2.cash}}
</span>
<span>
{{item2.practical_fee}}
</span>
<span
v-if=
"!item2.income_time||(item2.income_time.length&&item.income_time.length<1)"
></span>
<span
v-else
>
{{item2.income_time.income_time}}
</span>
<span
v-if=
'item2.confirm_date'
>
{{item2.confirm_date.split(' ')[0]}}
</span>
</div>
</td>
<td
colspan=
"7"
class=
"fenyong-ticheng-mix-td"
v-else
>
<div>
<span
class=
"detail-modal-maid-span-real-fee"
></span>
<span
class=
"detail-modal-maid-span-service-charge"
>
0
</span>
<span
class=
"detail-modal-maid-span-charity-fund"
>
0
</span>
<span
class=
"detail-modal-maid-span-cash"
>
0
</span>
<span
class=
"detail-modal-maid-span-practical-fee"
></span>
<span></span>
<span></span>
</div>
</td>
</tr>
</tbody>
<tbody
v-else
>
<tr>
<td
colspan=
"13"
>
暂无数据
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>
合计
</td>
<td></td>
<td></td>
<td></td>
<td
id=
"maid_count_total_rate"
></td>
<td
id=
"maid_count_total_yingfen"
></td>
<td
id=
"maid_count_total_yufen"
></td>
<td
id=
"maid_count_total_shouxu"
></td>
<td
id=
"maid_count_total_cishan"
></td>
<td
id=
"maid_count_total_xianjin"
></td>
<td
id=
"maid_count_total_shishou"
></td>
<td></td>
<td></td>
</tr>
</tfoot>
</table>
</section>
<section
v-show=
"mainInit == 2"
>
<div
v-if=
"Array.isArray(shuifeiData) && shuifeiData.length>0"
>
<table
v-for=
"(item, index) in shuifeiData"
class=
"shuifei-list-table"
>
<tbody>
<tr>
<td>
开票金额
</td>
<td>
{{item.total_fee}}
</td>
<td>
开票日期
</td>
<td>
{{item.operation_date}}
</td>
</tr>
<tr>
<td>
分佣方
</td>
<td>
业务员
</td>
<td>
分佣比例
</td>
<td>
税费
</td>
</tr>
<tr
v-for=
"(item2, index2) in item.fee_list"
:data-feeid=
"item2.fee_id"
>
<td>
{{getInfoType(item2.role)}}
</td>
<td>
{{item2.name+'-'+item2.phone}}
</td>
<td>
{{item2.scale}}
</td>
<td>
{{item2.fee}}
</td>
</tr>
</tbody>
</table>
</div>
<div
v-else
class=
"tc"
>
暂无数据
</div>
</section>
</main>
</div>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/bargaininfo_detail_static_pc_office.js"
data-main=
"/app/js/main"
data-norem=
"yes"
defer
async=
"true"
></script>
</body>
</html>
\ No newline at end of file
application/app_broker/view/index/submit_report_pc_office.html
0 → 100644
View file @
2abc594b
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
同联商业
</title>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0"
/>
<meta
name=
"Keywords"
content=
""
/>
<meta
name=
"Description"
content=
""
/>
</head>
<body
style=
"display: none;"
>
<div
id=
"app"
>
<main>
<section
class=
"list-area1 oh"
>
<ul>
<li
v-if=
"false"
>
<div>
客户姓名:
</div>
<div>
QQQQ
</div>
</li>
<li
v-if=
"false"
>
<div>
商铺类型:
</div>
<div>
商场
</div>
</li>
<li>
<div>
商铺号:
</div>
<div
class=
"flex-center"
>
<input
type=
"number"
v-model=
"house_number"
placeholder=
"请输入"
/>
</div>
</li>
<li>
<div>
业态品牌:
</div>
<div
class=
"flex-center"
>
<input
type=
"text"
v-model
.
trim=
"industry_type"
placeholder=
"请输入"
/>
</div>
</li>
<li>
<div>
成交价:
</div>
<div
class=
"flex-center"
>
<input
type=
"number"
v-model=
"price"
placeholder=
"请输入"
/>
</div>
<div>
元
</div>
</li>
<li>
<div>
预计收款时间:
</div>
<div
class=
"flex-center"
>
<input
type=
"date"
v-model=
"estimated_receipt_date"
placeholder=
"请输入"
/>
</div>
</li>
</ul>
<ul>
<li
v-if=
"false"
>
<div>
客户电话:
</div>
<div>
QQQQ
</div>
</li>
<li
v-if=
"false"
>
<div>
商铺地址:
</div>
<div>
bbbb
</div>
</li>
<!--<li>
<div>是否开业:</div>
<div class="arrow-select-pc flex-center">
<select v-model="is_open">
<option value="">请选择</option>
<option value="1">是</option>
<option value="0">否</option>
</select>
</div>
</li>-->
<li>
<div>
成交类型:
</div>
<div
class=
"arrow-select-pc flex-center"
>
<select
v-model=
"trade_type"
>
<option
value=
""
>
请选择
</option>
<option
value=
"10"
>
出租
</option>
<option
value=
"20"
>
增佣
</option>
<option
value=
"30"
>
代理
</option>
<option
value=
"40"
>
好处费
</option>
</select>
</div>
</li>
<li>
<div>
应收佣金:
</div>
<div
class=
"flex-center"
>
<input
type=
"number"
v-model
.
trim=
"commission"
id=
"commission_input"
placeholder=
"请输入"
/>
</div>
<div>
元
</div>
</li>
</ul>
</section>
<section
class=
"list-area2"
>
<p>
分佣提成
</p>
<ul></ul>
<div
class=
"fenyong-add-area flex-center"
>
<img
src=
"/app/images/jia2@2x.png"
>
</div>
</section>
<section
class=
"btn-area"
>
<div></div>
<div
class=
"flex-center"
>
<a
href=
"javascript:;"
@
click=
"save"
>
提交
</a>
</div>
</section>
</main>
</div>
<script
id=
"fenyong_li_tpl"
type=
"text/template"
>
<
li
class
=
"fenyong-li por"
>
<
ul
class
=
"flex"
>
<
li
class
=
"fenyong-sub-li flex"
>
<
div
>
分佣方:
<
/div
>
<
div
class
=
"arrow-select-pc flex-center"
>
<
select
class
=
"fenyong-fang"
>
<
option
value
=
""
>
请选择
<
/option
>
<
option
value
=
"1"
>
盘方
<
/option
>
<
option
value
=
"2"
>
客方
<
/option
>
<
option
value
=
"3"
>
反签
<
/option
>
<
option
value
=
"4"
>
独家
<
/option
>
<
option
value
=
"5"
>
合作方
<
/option
>
<!--<
option
value
=
"6"
>
APP
盘下载方
<
/option>--
>
<
option
value
=
"7"
>
APP
客下载方
<
/option
>
<
/select
>
<
/div
>
<
div
><
/div
>
<
/li
>
<
li
class
=
"fenyong-sub-li flex"
>
<
div
>
业务员:
<
/div
>
<
div
class
=
"flex-center por"
>
<
input
type
=
"text"
class
=
"add_input_ywy"
placeholder
=
"请输入姓名或手机号"
/>
<
ul
><
/ul
>
<
/div
>
<
div
><
/div
>
<
/li
>
<
/ul
>
<
ul
class
=
"flex"
>
<
li
class
=
"fenyong-sub-li flex"
>
<
div
>
分佣比例:
<
/div
>
<
div
class
=
"flex-center"
>
<
input
type
=
"number"
class
=
"fenyong-rate"
placeholder
=
"请填写"
/>
<
/div
>
<
div
>%<
/div
>
<
/li
>
<
li
class
=
"fenyong-sub-li flex"
>
<
div
>
应分佣金:
<
/div
>
<
div
class
=
"flex-center"
>
<
input
type
=
"number"
class
=
"yingfen-yongjin"
placeholder
=
"请填写"
/>
<
/div
>
<
div
>
元
<
/div
>
<
/li
>
<
/ul
>
<
mark
class
=
"poa"
><
img
src
=
"/app/images/search_gb.png"
><
/mark
>
<
/li
>
</script>
<script
src=
"/app/js/libs/require.min.js"
data-js=
"/app/js/submit_report_pc_office.js"
data-main=
"/app/js/main"
data-norem=
"yes"
defer
async=
"true"
></script>
</body>
</html>
\ No newline at end of file
application/route.php
View file @
2abc594b
...
...
@@ -51,8 +51,10 @@ Route::group('app_broker', [
'shop_detail_pc'
=>
[
'app_broker/index/shop_detail_pc'
,
[
'method'
=>
'get'
]],
'office_detail_pc'
=>
[
'app_broker/index/office_detail_pc'
,
[
'method'
=>
'get'
]],
'submit_report_pc'
=>
[
'app_broker/index/submit_report_pc'
,
[
'method'
=>
'get'
]],
'submit_report_pc_office'
=>
[
'app_broker/index/submit_report_pc_office'
,
[
'method'
=>
'get'
]],
'customer_genjin_detail_pc'
=>
[
'app_broker/index/customer_genjin_detail_pc'
,
[
'method'
=>
'get'
]],
'bargaininfo_detail_static_pc'
=>
[
'app_broker/index/bargaininfo_detail_static_pc'
,
[
'method'
=>
'get'
]],
'bargaininfo_detail_static_pc_office'
=>
[
'app_broker/index/bargaininfo_detail_static_pc_office'
,
[
'method'
=>
'get'
]],
'customerinfo_customer_add'
=>
[
'app_broker/index/customerinfo_customer_add'
,
[
'method'
=>
'get'
]],
'customerinfo_details_new'
=>
[
'app_broker/index/customerinfo_details_new'
,
[
'method'
=>
'get'
]],
'agent_pingjia'
=>
[
'app_broker/index/agent_pingjia'
,
[
'method'
=>
'get'
]],
...
...
public/app/js/bargaininfo_detail_static_pc.js
View file @
2abc594b
...
...
@@ -62,7 +62,7 @@ require(['vue', 'css!style/bargaininfo_detail_static_pc.css', 'jquery0325', 'com
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
isOfficeUrl
,
'url'
:
'/index/commissionList'
,
data
:
{
'id'
:
order_id
},
...
...
public/app/js/bargaininfo_detail_static_pc_office.js
0 → 100644
View file @
2abc594b
'use strict'
;
require
([
'vue'
,
'css!style/bargaininfo_detail_static_pc.css'
,
'jquery0325'
,
'common'
],
function
(
Vue
)
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
order_id
=
getUrlParam
(
'orderid'
);
//获取订单id
var
other_btn
=
getUrlParam
(
'otherbtn'
);
//是否显示其他按钮,如商铺详情等
var
isOffice
=
getUrlParam
(
'type'
);
//获取办公楼 商铺
var
isOfficeUrl
=
''
;
//获取办公楼 商铺接口
console
.
log
(
other_btn
);
var
_doc
=
$
(
document
);
console
.
log
(
user_info_obj
);
console
.
log
(
order_id
);
var
vm
=
new
Vue
({
el
:
'#app'
,
data
:
{
user_info_obj
,
mainInit
:
0
,
otherBtn
:
other_btn
,
detailData
:
{},
fenyongData
:
[],
shuifeiData
:
[],
is_office
:
isOffice
},
created
:
function
()
{
var
_thisV
=
this
;
document
.
body
.
style
.
display
=
'block'
;
console
.
log
(
_thisV
.
otherBtn
);
_thisV
.
getDeatil
();
},
mounted
:
function
()
{
var
_thisV
=
this
;
_thisV
.
$nextTick
(
function
()
{
});
},
methods
:
{
tabMain
(
n
)
{
let
_thisV
=
this
;
_thisV
.
mainInit
=
n
;
if
(
n
==
0
)
{
//获取成交信息
_thisV
.
getDeatil
();
}
else
if
(
n
==
1
)
{
//获取分佣提成
_thisV
.
getFenyong
();
}
else
if
(
n
==
2
)
{
//获取开票税费
_thisV
.
getShuifei
();
}
else
{
};
},
getFenyong
()
{
let
_thisV
=
this
;
//获取分佣提成
if
(
isOffice
==
2
){
isOfficeUrl
=
'/office_index/commissionList'
;
_thisV
.
otherBtn
=
'no'
;
}
else
{
isOfficeUrl
=
'/index/commissionList'
;
}
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/office_index/commissionList'
,
data
:
{
'id'
:
order_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
_thisV
.
fenyongData
=
data
.
data
;
_thisV
.
maidCount
();
};
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
maidCount
:
function
()
{
let
_thisV
=
this
;
var
_rateTotal
=
0
;
//分佣比例
var
_yingfenTotal
=
0
;
//应分佣金
var
_yufenTotal
=
0
;
//预分佣金
var
_shouxuTotal
=
0
;
//手续费
var
_cishanTotal
=
0
;
//慈善基金
var
_xianjinTotal
=
0
;
//现金奖
var
_shishouTotal
=
0
;
//实收佣金
$
.
each
(
_thisV
.
fenyongData
,
function
(
i
,
v
)
{
_rateTotal
+=
Number
(
v
.
scale
);
//分佣比例
_yingfenTotal
+=
Number
(
v
.
scale_fee
);
//应分佣金
if
(
Array
.
isArray
(
v
.
partial_commission
))
{
$
.
each
(
v
.
partial_commission
,
function
(
ii
,
vv
)
{
_yufenTotal
+=
Number
(
vv
.
real_fee
);
//预分佣金
_shouxuTotal
+=
Number
(
vv
.
service_charge
);
//手续费
_cishanTotal
+=
Number
(
vv
.
charity_fund
);
//慈善基金
_xianjinTotal
+=
Number
(
vv
.
cash
);
//现金奖
_shishouTotal
+=
Number
(
vv
.
practical_fee
);
//实收佣金
});
};
});
$
(
'#maid_count_total_rate'
).
html
(
dealJineNum
(
_rateTotal
)
+
'%'
);
//分佣比例
$
(
'#maid_count_total_yingfen'
).
html
(
dealJineNum
(
_yingfenTotal
));
//应分佣金
$
(
'#maid_count_total_yufen'
).
html
(
dealJineNum
(
_yufenTotal
));
//预分佣金
$
(
'#maid_count_total_shouxu'
).
html
(
dealJineNum
(
_shouxuTotal
));
//手续费
$
(
'#maid_count_total_cishan'
).
html
(
dealJineNum
(
_cishanTotal
));
//慈善基金
$
(
'#maid_count_total_xianjin'
).
html
(
dealJineNum
(
_xianjinTotal
));
//现金奖
$
(
'#maid_count_total_shishou'
).
html
(
dealJineNum
(
_shishouTotal
));
//实收佣金
},
getShuifei
()
{
//获取开票税费
let
_thisV
=
this
;
if
(
isOffice
==
2
){
isOfficeUrl
=
'/office_index/getTallAge'
;
_thisV
.
otherBtn
=
'no'
;
}
else
{
isOfficeUrl
=
'/index/getTallAge'
;
}
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
isOfficeUrl
,
data
:
{
'bargain_id'
:
order_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
_thisV
.
shuifeiData
=
data
.
data
;
};
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
getDeatil
()
{
//获取成交信息
let
_thisV
=
this
;
if
(
isOffice
==
2
){
isOfficeUrl
=
'/office_index/bargainInfo'
;
_thisV
.
otherBtn
=
'no'
;
}
else
{
isOfficeUrl
=
'/index/bargainInfo'
;
}
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
isOfficeUrl
,
data
:
{
'id'
:
order_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
_thisV
.
detailData
=
data
.
data
;
localStorage
.
setItem
(
'tlPcModalTempShopId'
,
data
.
data
.
house_id
);
//存储临时商铺id
localStorage
.
setItem
(
'tlPcModalTempCustomerId'
,
data
.
data
.
user_id
);
//存储临时客户id
};
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
dealDoneType
(
n
)
{
switch
(
String
(
n
))
{
case
'10'
:
return
'出租'
;
break
;
case
'20'
:
return
'增佣'
;
break
;
case
'30'
:
return
'代理'
;
break
;
case
'40'
:
return
'好处费'
;
break
;
default
:
return
''
;
break
;
}
},
dealfangyuanType
(
n
)
{
switch
(
String
(
n
))
{
case
'1'
:
return
'写字楼'
;
break
;
case
'2'
:
return
'商住两用'
;
break
;
case
'3'
:
return
'园区'
;
break
;
case
'4'
:
return
'洋房'
;
break
;
case
'5'
:
return
'联合办公'
;
break
;
case
'6'
:
return
'厂房'
;
break
;
default
:
return
''
;
break
;
}
},
getInfoType
(
r
)
{
switch
(
Number
(
r
))
{
case
1
:
return
"盘方"
;
case
2
:
return
"客方"
;
case
3
:
return
"反签"
;
case
4
:
return
"独家"
;
case
5
:
return
"合作方"
;
default
:
return
"未定义"
}
},
hidePhone
(
t
)
{
return
hideTel
(
t
);
},
showCustomerDetail
()
{
let
_thisV
=
this
;
if
(
_thisV
.
otherBtn
==
'no'
){
}
else
{
window
.
parent
.
document
.
querySelector
(
'a[href="#modal_user_detail"]'
).
click
();
}
},
showShopDetail
()
{
let
_thisV
=
this
;
if
(
_thisV
.
otherBtn
==
'no'
){
}
else
{
window
.
parent
.
document
.
querySelector
(
'a[href="#modal_shop_detail"]'
).
click
();
}
}
}
});
});
\ No newline at end of file
public/app/js/submit_report_pc.js
View file @
2abc594b
...
...
@@ -295,7 +295,7 @@ require(['vue', 'css!style/submit_report_pc.css', 'jquery0325', 'common'], funct
}
$
.
ajax
({
type
:
'POST'
,
url
:
urlOffice
,
//约带看记录 对接接口
url
:
"/broker/bargain"
,
//约带看记录 对接接口
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
...
...
public/app/js/submit_report_pc_office.js
0 → 100644
View file @
2abc594b
'use strict'
;
require
([
'vue'
,
'css!style/submit_report_pc.css'
,
'jquery0325'
,
'common'
],
function
(
Vue
,
VConsole
)
{
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
order_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
getUrlParam
(
'packdata'
)));
//获取订单相关信息
var
_doc
=
$
(
document
);
console
.
log
(
user_info_obj
);
console
.
log
(
order_info_obj
);
var
isOffice
=
getUrlParam
(
'type'
);
var
urlOffice
=
''
;
var
vm
=
new
Vue
({
el
:
'#app'
,
data
:
{
user_info_obj
,
order_info_obj
,
house_number
:
''
,
//商铺编号
is_open
:
''
,
//是否开业
industry_type
:
''
,
//业态
trade_type
:
''
,
//成交类型
price
:
''
,
//成交价格
commission
:
''
,
//佣金
estimated_receipt_date
:
''
//预计收款时间
},
created
:
function
()
{
var
_this
=
this
;
document
.
body
.
style
.
display
=
'block'
;
$
(
'.list-area2>ul'
).
append
(
$
(
'#fenyong_li_tpl'
).
html
());
},
mounted
:
function
()
{
var
_thisV
=
this
;
_thisV
.
$nextTick
(
function
(){
var
_commissionObj
=
$
(
'#commission_input'
);
var
_ajaxObjTel
=
null
;
_doc
.
on
(
'input'
,
'.add_input_ywy'
,
function
()
{
var
_$this
=
$
(
this
);
//当分佣方的值为5,合作方的时候,才能查询
var
_thisVal
=
$
.
trim
(
_$this
.
val
());
_$this
.
removeAttr
(
'data-id'
);
//移除之前携带的信息
if
(
_thisVal
!=
''
)
{
_ajaxObjTel
&&
_ajaxObjTel
.
abort
();
_ajaxObjTel
=
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getBroker_new'
,
data
:
{
'phone'
:
$
.
trim
(
_$this
.
val
())
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
[
'data'
].
length
>
0
)
{
var
_htmlTemp
=
''
;
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
_htmlTemp
+=
'<li data-id="{3}">{0}-{1}</li>'
.
stringFormatObj
({
'0'
:
item
[
'name'
],
'1'
:
item
[
'phone'
],
'3'
:
item
[
'id'
]
});
});
_$this
.
next
().
show
().
html
(
_htmlTemp
);
}
else
{
_$this
.
next
().
html
(
''
);
};
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
else
{
_$this
.
next
().
hide
();
}
});
//业务员选择输入框,输入后的下拉列表项点击
_doc
.
on
(
'click'
,
'.add_input_ywy+ul>li'
,
function
()
{
var
_$this
=
$
(
this
);
var
_id
=
_$this
.
attr
(
'data-id'
);
_$this
.
parent
().
prev
().
val
(
_$this
.
html
()).
attr
(
'data-id'
,
_id
);
_$this
.
parent
().
html
(
''
).
hide
();
});
//选择盘方后自动选择
_doc
.
on
(
'input'
,
'.fenyong-fang'
,
function
(
e
){
var
_this
=
$
(
this
);
var
_parObj
=
_this
.
closest
(
'.fenyong-li'
);
_parObj
.
find
(
'.fenyong-rate'
).
val
(
''
);
//先置空
_parObj
.
find
(
'.yingfen-yongjin'
).
val
(
''
);
//先置空
if
(
_this
.
val
()
===
''
){
}
else
{
var
_rateTemp
=
_thisV
.
getDefaultRadio
(
_this
.
val
());
_parObj
.
find
(
'.fenyong-rate'
).
val
(
_rateTemp
);
var
_tempValCommission
=
_commissionObj
.
val
();
if
(
_tempValCommission
==
''
){
}
else
{
_parObj
.
find
(
'.yingfen-yongjin'
).
val
(
dealJineNum
(
_tempValCommission
*
_rateTemp
/
100
));
}
}
});
//填写分佣比例后自动填写
_doc
.
on
(
'input'
,
'.fenyong-rate'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_parObj
=
_this
.
closest
(
'.fenyong-li'
);
if
(
_this
.
val
()
===
''
){
_parObj
.
find
(
'.yingfen-yongjin'
).
val
(
''
);
//先置空
}
else
{
var
_tempValCommission
=
_commissionObj
.
val
();
if
(
_tempValCommission
==
''
){
_parObj
.
find
(
'.yingfen-yongjin'
).
val
(
''
);
//先置空
}
else
{
_parObj
.
find
(
'.yingfen-yongjin'
).
val
(
dealJineNum
(
_tempValCommission
*
(
_this
.
val
())
/
100
));
}
}
});
//应收佣金的输入监听事件
_commissionObj
.
on
(
'input'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
$
.
each
(
$
(
'.fenyong-li'
),
function
(
i
,
v
){
var
_$v
=
$
(
v
);
var
_tempRate
=
_$v
.
find
(
'.fenyong-rate'
).
val
();
if
(
_tempRate
==
''
){
_$v
.
find
(
'.yingfen-yongjin'
).
val
(
''
);
}
else
{
_$v
.
find
(
'.yingfen-yongjin'
).
val
(
dealJineNum
(
_this
.
val
()
*
_tempRate
/
100
));
}
});
});
//增加符号点击事件
_doc
.
on
(
'click'
,
'.fenyong-add-area>img'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
$
(
'.fenyong-li'
).
length
>=
5
){
alert
(
'最多添加5条'
);
return
false
;
}
else
{
$
(
'.list-area2>ul'
).
append
(
$
(
'#fenyong_li_tpl'
).
html
());
};
});
//删除符号点击事件
_doc
.
on
(
'click'
,
'.fenyong-li>mark'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确认删除吗?'
)){
$
(
this
).
parent
().
remove
();
};
});
});
},
methods
:
{
getDefaultRadio
(
v
)
{
//1,盘方
//2,客方
//3,反签
//4,独家
//5,合作方
//6,APP盘下载方
//7,APP客下载方
switch
(
Number
(
v
)){
case
1
:
return
25
;
case
2
:
return
30
;
case
3
:
return
40
;
case
4
:
return
100
;
case
6
:
return
5
;
case
7
:
return
5
;
default
:
return
25
;
}
},
save
()
{
//是否对客户公开 保存后 刷新商铺详情页面
var
_this
=
this
;
if
(
_this
.
house_number
==
''
){
alert
(
'请填写商铺号'
);
return
false
;
};
// if(_this.is_open == ''){
// alert('请填写是否开业');
// return false;
// };
if
(
_this
.
industry_type
==
''
){
alert
(
'请填写业态'
);
return
false
;
};
if
(
_this
.
trade_type
==
''
){
alert
(
'请填写成交类型'
);
return
false
;
};
if
(
_this
.
commission
==
''
){
alert
(
'请填写佣金'
);
return
false
;
};
if
(
_this
.
estimated_receipt_date
==
''
){
alert
(
'请填写预计收款时间'
);
return
false
;
};
var
_data
=
{
'AuthToken'
:
_this
.
user_info_obj
.
AuthToken
,
//当前账号id
'submit_agent_id'
:
_this
.
user_info_obj
.
id
,
//当前账号id
'submit_agent_name'
:
_this
.
user_info_obj
.
name
,
//当前账号昵称
'report_id'
:
_this
.
order_info_obj
.
id
,
//成交报告id
'order_id'
:
_this
.
order_info_obj
.
order_id
,
//订单id
'order_no'
:
_this
.
order_info_obj
.
order_no
,
//订单编号
'house_number'
:
_this
.
house_number
,
//商铺编号
// 'is_open': _this.is_open,//是否开业
'industry_type'
:
_this
.
industry_type
,
//业态
'trade_type'
:
_this
.
trade_type
,
//成交类型
'price'
:
_this
.
price
,
//成交价格
'commission'
:
_this
.
commission
,
//佣金
'estimated_receipt_date'
:
(
new
Date
(
_this
.
estimated_receipt_date
).
getTime
())
/
1000
//预计收款时间
};
var
_subLiObj
=
$
(
'.fenyong-li'
);
var
_isBreak
=
false
;
var
_dataArr
=
[];
var
_fanqianNum
=
0
;
$
.
each
(
_subLiObj
,
function
(
i
,
v
)
{
var
_$v
=
$
(
v
);
var
_role
=
_$v
.
find
(
'.fenyong-fang'
).
val
();
var
_agent_id
=
_$v
.
find
(
'.add_input_ywy'
).
attr
(
'data-id'
);
var
_scale
=
_$v
.
find
(
'.fenyong-rate'
).
val
();
var
_scale_fee
=
_$v
.
find
(
'.yingfen-yongjin'
).
val
();
if
(
_role
==
''
){
alert
(
'请填写分佣方'
);
_isBreak
=
true
;
return
false
;
};
if
(
_role
==
'3'
){
_fanqianNum
+=
1
;
};
if
(
_fanqianNum
>
1
){
alert
(
'反签方只能有一个'
);
_isBreak
=
true
;
return
false
;
};
if
(
!
_agent_id
){
alert
(
'请填写业务员'
);
_isBreak
=
true
;
return
false
;
};
if
(
_scale
==
''
){
alert
(
'请填写分佣比例'
);
_isBreak
=
true
;
return
false
;
};
if
(
_scale_fee
==
''
){
alert
(
'请填写应分佣金'
);
_isBreak
=
true
;
return
false
;
};
_dataArr
.
push
({
'role'
:
_role
,
'agent_id'
:
_agent_id
,
'scale'
:
_scale
,
'scale_fee'
:
_scale_fee
,
});
});
if
(
_isBreak
){
//未验证通过,跳出函数
return
false
;
};
_data
[
'commission_arr'
]
=
JSON
.
stringify
(
_dataArr
);
if
(
isOffice
==
2
){
//type=2 办公楼
urlOffice
=
"/office/bargain"
;
}
else
{
urlOffice
=
"/broker/bargain"
;
}
$
.
ajax
({
type
:
'POST'
,
url
:
"/office/bargain"
,
//约带看记录 对接接口
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
alert
(
'提交成功'
);
$
(
'#modal-report'
,
parent
.
document
).
find
(
'.close'
).
click
();
}
else
{
alert
(
data
[
'msg'
]);
};
}
else
{
alert
(
'数据错误'
);
};
},
error
:
function
()
{
alert
(
'error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
}
});
});
\ 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