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
e5331a1b
Commit
e5331a1b
authored
Aug 27, 2018
by
xinyuandu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限修改
parent
872994e4
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
141 additions
and
1103 deletions
+141
-1103
.project
.project
+15
-0
Index.php
application/app_broker/controller/Index.php
+4
-0
account_statement.html
application/index/view/finance/account_statement.html
+3
-178
route.php
application/route.php
+1
-0
houseList.js
public/resource/js/houseList.js
+18
-1
reportList.js
public/resource/js/reportList.js
+99
-923
user.js
public/resource/js/user.js
+1
-1
No files found.
.project
View file @
e5331a1b
...
@@ -5,6 +5,11 @@
...
@@ -5,6 +5,11 @@
<projects>
<projects>
</projects>
</projects>
<buildSpec>
<buildSpec>
<buildCommand>
<name>
com.aptana.editor.php.aptanaPhpBuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<buildCommand>
<name>
com.aptana.ide.core.unifiedBuilder
</name>
<name>
com.aptana.ide.core.unifiedBuilder
</name>
<arguments>
<arguments>
...
@@ -13,6 +18,7 @@
...
@@ -13,6 +18,7 @@
</buildSpec>
</buildSpec>
<natures>
<natures>
<nature>
com.aptana.projects.webnature
</nature>
<nature>
com.aptana.projects.webnature
</nature>
<nature>
com.aptana.editor.php.phpNature
</nature>
</natures>
</natures>
<filteredResources>
<filteredResources>
<filter>
<filter>
...
@@ -60,5 +66,14 @@
...
@@ -60,5 +66,14 @@
<arguments>
1.0-name-matches-false-false-node_modules
</arguments>
<arguments>
1.0-name-matches-false-false-node_modules
</arguments>
</matcher>
</matcher>
</filter>
</filter>
<filter>
<id>
1534838163404
</id>
<name></name>
<type>
26
</type>
<matcher>
<id>
org.eclipse.ui.ide.multiFilter
</id>
<arguments>
1.0-name-matches-false-false-node_modules
</arguments>
</matcher>
</filter>
</filteredResources>
</filteredResources>
</projectDescription>
</projectDescription>
application/app_broker/controller/Index.php
View file @
e5331a1b
...
@@ -208,6 +208,10 @@ class Index
...
@@ -208,6 +208,10 @@ class Index
return
view
(
'index/download_b'
);
return
view
(
'index/download_b'
);
}
}
public
function
edit_modal
()
{
return
view
(
'index/edit_modal'
);
}
/* public function index()
/* public function index()
{
{
...
...
application/index/view/finance/account_statement.html
View file @
e5331a1b
...
@@ -97,186 +97,11 @@
...
@@ -97,186 +97,11 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 弹出框 详情 -->
<div
class=
"modal fade"
id=
"modal_detail"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<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 detail-modal-header-tab"
>
<a
href=
"javascript:;"
class=
"btn btn-info"
>
成交信息
</a>
<a
href=
"javascript:;"
class=
"btn btn-default"
>
分佣提成
</a>
<a
href=
"javascript:;"
class=
"btn btn-default"
>
开票税费
</a>
</h4>
</div>
<div
class=
"modal-body detail-modal-body"
>
<div>
<div
class=
"detail-modal-body-sec"
>
<form
class=
"detail-modal-bargaininfo-form"
>
<div
class=
"detail-modal-bargaininfo-main-left"
>
<span>
商铺类型:
</span>
<span
id=
"bargaininfo_shop_type"
></span>
<br
/>
<span>
商铺地址:
</span><span
id=
"bargaininfo_internal_address"
></span><br>
<span>
业态:
</span>
<input
class=
"form-control"
id=
"bargaininfo_yetai"
type=
"text"
><br>
<span>
客户姓名:
</span><span
id=
"bargaininfo_user_name"
></span><br>
<span>
成交类型:
</span>
<select
class=
"form-control"
id=
"bargaininfo_type"
>
<option
value=
"10"
>
出租
</option>
<option
value=
"20"
>
增佣
</option>
<option
value=
"30"
>
代理
</option>
<option
value=
"40"
>
好处费
</option>
</select>
<br
/>
<span>
应收总佣金:
</span>
<input
class=
"form-control"
id=
"bargaininfo_total_commission"
type=
"number"
>
元
<br>
</div>
<div
class=
"detail-modal-bargaininfo-main-right"
>
<span>
是否开业:
</span>
<select
class=
"form-control"
id=
"bargaininfo_is_open"
>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
<br
/>
<span>
商铺号:
</span><span
id=
"bargaininfo_shop_num"
></span><br>
<!--<span>预计收款时间:</span><span id="bargaininfo_expect_payback_time"></span><br>-->
<span>
预计收款时间:
</span><input
type=
"date"
id=
"bargaininfo_expect_payback_time"
placeholder=
"请输入"
><br>
<span>
客户电话:
</span><span
id=
"bargaininfo_user_phone"
></span><br>
<span>
成交日期:
</span><span
id=
"bargaininfo_create_time"
></span><br>
<span>
成交价:
</span>
<input
class=
"form-control"
id=
"bargaininfo_chengjiao_price"
type=
"number"
>
元
</div>
<div
class=
"detail-modal-bargaininfo-commission-inputpar"
>
<div
class=
"detail-modal-bargaininfo-commission-addarea"
>
<div
class=
"form-group detail-modal-bargaininfo-commission-sec"
>
<label
class=
""
>
实收佣金:
</label>
<div
class=
"input-group"
>
<input
type=
"number"
class=
"form-control"
placeholder=
"请输入"
>
<div
class=
"input-group-addon"
>
元
</div>
</div>
<label
class=
""
>
收佣日期:
</label>
<div
class=
"input-group"
>
<input
type=
"date"
class=
"form-control"
placeholder=
"请输入"
>
</div>
<!--<mark href="javascript:;" class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png" /></mark>-->
</div>
</div>
<div
id=
"bargaininfo_commission_add_btn"
>
<img
src=
"/resource/image/jia2@2x.png"
/>
</div>
</div>
<div>
<span
class=
"detail-modal-bargaininfo-span-beizhu"
>
备注:
</span>
<textarea
id=
"bargaininfo_beizhu"
></textarea>
</div>
</form>
<div
class=
"tc"
>
<button
type=
"button"
class=
"btn btn-primary"
id=
"bargaininfo_btn_save"
>
保存
</button>
</div>
</div>
<div
class=
"detail-modal-body-sec"
>
<div
class=
"detail-modal-maid-top-btn-area oh"
>
<a
class=
"btn btn-success"
id=
"maid_new_btn"
href=
"#modal_new_maid"
data-toggle=
"modal"
>
新增
</a>
<a
id=
"maid_add_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
增加实收
</a>
<a
id=
"maid_count_btn"
class=
"btn btn-primary"
title=
"可自动计算实收佣金和合计"
>
计算
</a>
</div>
<p
class=
"text-right"
id=
"maid_count_tips_p"
><span>
提示:
</span>
点击
<span>
计算
</span>
按钮可自动计算
<span>
实收佣金
</span>
和
<span>
合计
</span>
的内容
</p>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
id=
"maid_table_main"
>
<thead>
<tr>
<th
class=
"text-center"
>
分佣方
</th>
<th
class=
"text-center"
>
业务员
</th>
<th
class=
"text-center"
>
所属部门/门店
</th>
<th
class=
"text-center"
>
分佣比例
</th>
<th
class=
"text-center"
>
应分佣金(元)
</th>
<th
class=
"text-center"
>
预分佣金(元)
</th>
<th
class=
"text-center"
>
手续费(元)
</th>
<th
class=
"text-center"
>
慈善基金(元)
</th>
<th
class=
"text-center"
>
现金奖(元)
</th>
<th
class=
"text-center"
>
实收佣金(元)
</th>
<th
class=
"text-center"
>
确认时间
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"maid_new_table_list"
>
<!--<tr>
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>
</td>
</tr>
<tr>
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>
</td>
</tr>-->
</tbody>
<tfoot>
<tr>
<td
class=
"text-center"
>
合计
</td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
id=
"maid_count_total_rate"
></td>
<td
class=
"text-center"
id=
"maid_count_total_yingfen"
></td>
<td
class=
"text-center"
id=
"maid_count_total_yufen"
></td>
<td
class=
"text-center"
id=
"maid_count_total_shouxu"
></td>
<td
class=
"text-center"
id=
"maid_count_total_cishan"
></td>
<td
class=
"text-center"
id=
"maid_count_total_xianjin"
></td>
<td
class=
"text-center"
id=
"maid_count_total_shishou"
></td>
<td
class=
"text-center"
></td>
<td
class=
"text-center"
></td>
</tr>
</tfoot>
</table>
<div
class=
"detail-modal-maid-bottom-btn-area text-right"
>
<a
id=
"maid_ok_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
确认分佣
</a>
<div
class=
"modal fade"
id=
"modal_detail"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
style=
"width :100% ;height : 100%"
>
<a
id=
"maid_save_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
保存
</a>
<iframe
class=
"iframe-detail"
style=
"width :100% ;height : 100%"
></iframe>
</div>
<!--分佣提成-->
</div>
<div
class=
"detail-modal-body-sec"
>
<div>
<div
class=
"tc"
>
<a
class=
"btn btn-success"
href=
"#modal_new_tax"
data-toggle=
"modal"
>
新增开票
</a>
</div>
<div
id=
"tax_main_box"
>
<!--内容为模板生成-->
</div>
</div>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
</div>
<!-- 弹出框 通过 -->
<!-- 弹出框 通过 -->
<div
class=
"modal fade"
id=
"modal-pass"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-pass"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog button-center-bargain"
>
<div
class=
"modal-dialog button-center-bargain"
>
...
...
application/route.php
View file @
e5331a1b
...
@@ -52,6 +52,7 @@ Route::group('app_broker', [
...
@@ -52,6 +52,7 @@ Route::group('app_broker', [
'customerinfo_details_new'
=>
[
'app_broker/index/customerinfo_details_new'
,
[
'method'
=>
'get'
]
],
'customerinfo_details_new'
=>
[
'app_broker/index/customerinfo_details_new'
,
[
'method'
=>
'get'
]
],
'download_b'
=>
[
'app_broker/index/download_b'
,
[
'method'
=>
'get'
]
],
'download_b'
=>
[
'app_broker/index/download_b'
,
[
'method'
=>
'get'
]
],
'imagebody'
=>
[
'app_broker/index/imagebody'
,
[
'method'
=>
'get'
]
],
'imagebody'
=>
[
'app_broker/index/imagebody'
,
[
'method'
=>
'get'
]
],
'edit_modal'
=>
[
'app_broker/index/edit_modal'
,
[
'method'
=>
'get'
]
],
]);
]);
Route
::
group
(
'index'
,
[
Route
::
group
(
'index'
,
[
...
...
public/resource/js/houseList.js
View file @
e5331a1b
...
@@ -24,6 +24,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -24,6 +24,8 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
isFollowupSaving
:
false
,
isFollowupSaving
:
false
,
detailTabIndex
:
0
,
//查看 弹出框 tab切换 初始化
detailTabIndex
:
0
,
//查看 弹出框 tab切换 初始化
all_shop
:
true
,
// false: 本人商铺,true:所有商铺
all_shop
:
true
,
// false: 本人商铺,true:所有商铺
is_exclusive_type
:
0
,
//0非独家 1:独家
auth_edit_exclusive
:
0
,
//0:无独家权限 1:有独家权限
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
business
.
getDistrict
();
business
.
getDistrict
();
...
@@ -130,6 +132,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -130,6 +132,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"#myModalLabel"
).
html
(
"设置案场权限人"
);
$
(
"#myModalLabel"
).
html
(
"设置案场权限人"
);
// 传入data-id
// 传入data-id
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
business
.
auth_edit_exclusive
=
$
(
this
).
attr
(
"data-exclusive"
);
business
.
type
=
"1"
;
business
.
type
=
"1"
;
business
.
Anch
();
//获取手机号名字的
business
.
Anch
();
//获取手机号名字的
});
});
...
@@ -462,6 +465,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -462,6 +465,7 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
$
(
"#end_date_dujia"
).
val
(
data
.
data
.
agent_end_time
);
$
(
"#end_date_dujia"
).
val
(
data
.
data
.
agent_end_time
);
$
(
"#exclusive"
).
val
(
data
.
data
.
name
);
$
(
"#exclusive"
).
val
(
data
.
data
.
name
);
business
.
exclusive_id
=
data
.
data
.
id
;
business
.
exclusive_id
=
data
.
data
.
id
;
business
.
is_exclusive_type
=
data
.
data
.
is_exclusive_type
;
//是否独家
var
img_url
=
""
;
var
img_url
=
""
;
$
.
each
(
data
[
'data'
][
'exclusive_img'
],
function
(
i
,
item
)
{
$
.
each
(
data
[
'data'
][
'exclusive_img'
],
function
(
i
,
item
)
{
var
local_img
=
location
.
origin
+
'/resource/lib/Attachments/images/'
+
item
.
img_name
;
var
local_img
=
location
.
origin
+
'/resource/lib/Attachments/images/'
+
item
.
img_name
;
...
@@ -512,9 +516,22 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
...
@@ -512,9 +516,22 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
}
}
$
(
"#modal-dujia"
).
addClass
(
"yz"
);
$
(
"#modal-dujia"
).
addClass
(
"yz"
);
var
url
=
""
;
if
(
business
.
is_exclusive_type
==
0
){
if
(
business
.
auth_edit_exclusive
==
0
)
{
url
=
"/index/editExclusive"
}
else
{
url
=
"/index/addExclusive"
}
}
else
if
(
business
.
is_exclusive_type
==
1
){
url
=
"/index/editExclusive"
}
else
{
// nothing to do ;
}
$
.
ajax
({
$
.
ajax
({
'type'
:
'POST'
,
'type'
:
'POST'
,
'url'
:
'/index/editExclusive'
,
'url'
:
url
,
data
:
{
data
:
{
"houses_id"
:
business
.
house_id
,
//楼盘Id
"houses_id"
:
business
.
house_id
,
//楼盘Id
"is_exclusive_type"
:
$
(
"#sel_dujia"
).
val
(),
//是否独家
"is_exclusive_type"
:
$
(
"#sel_dujia"
).
val
(),
//是否独家
...
...
public/resource/js/reportList.js
View file @
e5331a1b
...
@@ -18,6 +18,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -18,6 +18,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
},
},
event
:
function
()
{
event
:
function
()
{
var
_doc
=
$
(
document
);
var
_doc
=
$
(
document
);
$
(
'#modal_detail'
).
on
(
'show.bs.modal'
,
function
(){
});
//主页面一级审核,二级审核,三级审核,结单四个tab的点击事件
//主页面一级审核,二级审核,三级审核,结单四个tab的点击事件
//专员审核 总监审核 经理审核 出纳审核
//专员审核 总监审核 经理审核 出纳审核
_doc
.
on
(
'click'
,
'.maintable-top-sub-tr>a'
,
function
(
e
){
_doc
.
on
(
'click'
,
'.maintable-top-sub-tr>a'
,
function
(
e
){
...
@@ -31,6 +35,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -31,6 +35,15 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
bargain
.
getList
(
1
);
bargain
.
getList
(
1
);
});
});
_doc
.
on
(
'click'
,
'.details-btn'
,
function
()
{
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
$
(
'.iframe-detail'
).
attr
(
'src'
,
'/app_broker/edit_modal?bargain_id='
+
bargain
.
bargain_id
);
$
(
'.detail-modal-header-tab>a:nth-of-type(1)'
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
bargain
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
bargain
.
bargaininfoShow
();
});
//搜索按钮的事件
//搜索按钮的事件
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -97,318 +110,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -97,318 +110,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
bargain
.
passBack
();
bargain
.
passBack
();
});
});
//点击详情按钮事件,获取报告详情
_doc
.
on
(
'click'
,
'.details-btn'
,
function
()
{
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
$
(
'.detail-modal-header-tab>a:nth-of-type(1)'
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
bargain
.
detailTabIndex
=
0
;
$
(
'.detail-modal-body-sec:nth-of-type(1)'
).
show
().
siblings
().
hide
();
bargain
.
bargaininfoShow
();
});
//详情弹出框里的tab点击事件,成交信息,分佣提成,开票税费
_doc
.
on
(
'click'
,
'.detail-modal-header-tab>a'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
_this
.
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
bargain
.
detailTabIndex
=
_this
.
index
();
$
(
'.detail-modal-body-sec:nth-of-type('
+
(
bargain
.
detailTabIndex
+
1
)
+
')'
).
show
().
siblings
().
hide
();
if
(
bargain
.
detailTabIndex
==
0
){
bargain
.
bargaininfoShow
();
}
else
if
(
bargain
.
detailTabIndex
==
1
){
bargain
.
maidShow
();
}
else
{
bargain
.
taxShow
();
}
});
//详情弹出框,成交信息里的实收佣金相关的事件
var
_iYJAAObj
=
$
(
'.detail-modal-bargaininfo-commission-addarea'
);
_doc
.
on
(
'click'
,
'#bargaininfo_commission_add_btn>img'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
$
(
'.detail-modal-bargaininfo-commission-addarea>div'
).
length
>=
5
){
alert
(
'最多添加5条'
);
return
false
;
}
else
{
_iYJAAObj
.
append
(
'<div class="form-group detail-modal-bargaininfo-commission-sec"><label class="">实收佣金:</label><div class="input-group"><input type="number"class="form-control"placeholder="请输入"><div class="input-group-addon">元</div></div><label class="">收佣日期:</label><div class="input-group"><input type="date"class="form-control"placeholder="请输入"></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></mark></div>'
);
};
});
//详情弹出框,成交信息里的实收佣金相关的事件,点击x删除这条
_doc
.
on
(
'click'
,
'.detail-modal-bargaininfo-commission-cancel-pic'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
this
).
parent
().
remove
();
});
//详情弹出框,点击成交信息确定
_doc
.
delegate
(
"#bargaininfo_btn_save"
,
"click"
,
function
()
{
bargain
.
bargaininfoSave
();
});
//详情弹出框,点击开票税费下的新增税费,弹出框出来
_doc
.
on
(
'click'
,
'[href=
\
"#modal_new_tax
\
"]'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
bargain
.
newAddTax
({
'type'
:
_this
.
attr
(
'data-recordid'
)?
'edit'
:
'new'
,
'id'
:
_this
.
attr
(
'data-recordid'
)
});
});
//详情弹出框,新增开票税费,金额输入框输入后,自动计算税费
_doc
.
on
(
'input'
,
'#addtax_commission_input'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_trObj
=
$
(
'.addtax-modal-tax-table-datatr'
);
$
.
each
(
_trObj
,
function
(
i
,
v
)
{
v
.
childNodes
[
3
].
innerHTML
=
dealJineNum
(
Number
(
v
.
childNodes
[
2
].
innerHTML
.
split
(
'%'
)[
0
])
*
0.01
*
Number
(
$
.
trim
(
_this
.
val
()))
*
0.1
);
});
});
//详情弹出框,新增开票税费,点击确定时的提交
_doc
.
on
(
'click'
,
'#addtax_commission_addok'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
newAddTaxOk
();
});
//详情弹出框,点击删除时的提交
_doc
.
on
(
'click'
,
'.detail-modal-shuiFee-del-btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确认删除吗?'
)){
bargain
.
delTaxOk
(
$
(
this
).
attr
(
'data-recordid'
));
}
else
{
}
});
//详情弹出框,分佣提成里,点击新增
_doc
.
on
(
'click'
,
'#maid_new_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'#modal_new_maid'
).
removeAttr
(
'data-id'
).
find
(
'.modal-title'
).
html
(
'新增分佣提成'
);
bargain
.
newAddMaid
();
});
//详情弹出框,分佣提成里,点击编辑
_doc
.
on
(
'click'
,
'.detail-modal-maid-a-edit'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
'data-id'
);
$
(
'#modal_new_maid'
).
attr
(
'data-id'
,
_id
).
find
(
'.modal-title'
).
html
(
'编辑分佣提成'
);
bargain
.
newAddMaid
(
function
(){
bargain
.
getMaidInfo
(
_id
);
});
});
//详情弹出框,分佣提成里,点击新增,分佣方选择时触发的事件
_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
(
dealJineNum
(
_rateTemp
*
bargain
.
maidTotalCommission
/
100
));
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'
,
'.detail-modal-maid-a-del'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
if
(
confirm
(
'确认删除吗?'
)){
var
_id
=
_this
.
closest
(
'tr'
).
attr
(
'data-id'
);
bargain
.
deletMaid
(
_id
);
};
});
//详情弹出框,分佣提成里,点击新增,分佣方选择,弹出选择列表触发的事件
_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
();
var
_id
=
$
(
'#modal_new_maid'
).
attr
(
'data-id'
);
if
(
_id
===
undefined
){
//新增
bargain
.
newAddMaidOk
();
}
else
{
//编辑
bargain
.
editMaidOk
();
}
});
//详情弹出框,分佣提成里,点击确认分佣触发的事件
_doc
.
on
(
'click'
,
'#maid_ok_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
maidConfirmOk
(
1
);
// if(bargain.mainTabIndex === 2){
// bargain.maidConfirmOk(1);
// }else{
// alert('财务第三级审核人员才能确认分佣!');
// }
});
//详情弹出框,分佣提成里,点击保存触发的事件
_doc
.
on
(
'click'
,
'#maid_save_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
maidConfirmOk
(
0
);
});
//详情弹出框,分佣提成里,点击增加实收按钮
_doc
.
on
(
'click'
,
'#maid_add_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_temp
=
$
(
'.detail-modal-maid-span-time'
);
var
_flag
=
false
;
if
(
_temp
&&
_temp
.
length
&&
_temp
.
length
>
0
){
$
.
each
(
_temp
,
function
(
i
,
v
)
{
if
(
v
.
innerHTML
==
''
){
_flag
=
true
;
return
false
;
};
});
};
if
(
_flag
){
alert
(
'前边一组收佣尚未确认分佣或成交信息里没有对应的实收佣金'
);
}
else
{
layer
.
open
({
content
:
'确认增加吗?'
,
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
_index
){
$
(
'.detail-modal-maid-mix-td'
).
append
(
document
.
getElementById
(
'reportList_maid_sub1_list_tpl'
).
innerHTML
);
layer
.
close
(
_index
);
}
});
};
});
//详情弹出框,分佣提成里,点击计算执行的方法
_doc
.
on
(
'click'
,
'#maid_count_btn'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
maidCount
(
1
);
//1为正常计算的时候
});
//新增分佣提成,业务员input输入搜索,点击之后赋值
_doc
.
on
(
'click'
,
'#addmaid_input_ywy+ul>li'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
attr
(
'data-id'
);
_this
.
parent
().
prev
().
val
(
_this
.
html
()).
attr
(
'data-id'
,
_id
);
bargain
.
getDepart
(
_id
,
function
(
obj
){
$
(
'#addmaid_input_shop'
).
val
(
obj
.
district_name
+
'-'
+
obj
.
store_name
);
});
_this
.
parent
().
html
(
''
).
hide
();
});
//新增分佣提成,业务员input输入搜索
var
_ajaxObjTel
=
null
;
var
_addmaid_input_servantObj
=
$
(
'#addmaid_input_servant'
);
_doc
.
on
(
'input'
,
'#addmaid_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
()
{
//alert('error');
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
};
}
});
}
else
{
_this
.
next
().
hide
();
}
});
//时间轴点击事件
//时间轴点击事件
_doc
.
on
(
'click'
,
'a[href="#modal-time"]'
,
function
(
e
){
_doc
.
on
(
'click'
,
'a[href="#modal-time"]'
,
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
...
@@ -468,38 +169,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -468,38 +169,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
return
25
;
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
({
'type'
:
'GET'
,
'type'
:
'GET'
,
...
@@ -519,140 +189,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -519,140 +189,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}
}
});
});
},
},
bargaininfoShow
:
function
()
{
//报告详情
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/bargainInfo'
,
data
:
{
"id"
:
bargain
.
bargain_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
'#bargaininfo_shop_type'
).
html
(
data
.
data
.
shop_type
==
'1'
?
'街铺'
:
'商场'
);
$
(
'#bargaininfo_is_open'
).
val
(
data
.
data
.
is_open
);
$
(
'#bargaininfo_beizhu'
).
val
(
data
.
data
.
content
);
$
(
"#bargaininfo_user_phone"
).
html
(
hideTel
(
data
.
data
.
user_phone
));
$
(
"#bargaininfo_user_name"
).
html
(
data
.
data
.
user_name
);
$
(
"#bargaininfo_internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
"#bargaininfo_shop_num"
).
html
(
data
.
data
.
house_number
);
$
(
"#bargaininfo_type"
).
val
(
data
.
data
.
trade_type
);
$
(
"#bargaininfo_total_commission"
).
val
(
data
.
data
.
commission
);
$
(
"#bargaininfo_create_time"
).
html
(
data
.
data
.
create_time
);
$
(
"#bargaininfo_expect_payback_time"
).
val
(
data
.
data
.
estimated_receipt_date
);
$
(
"#bargaininfo_yetai"
).
val
(
data
.
data
.
industry_type
);
$
(
"#bargaininfo_chengjiao_price"
).
val
(
data
.
data
.
price
);
bargain
.
maidTotalCommission
=
Number
(
data
.
data
.
commission
);
//总佣金
bargain
.
order_id
=
Number
(
data
.
data
.
order_id
);
//订单id
var
_inputAreaTempObj
=
$
(
'.detail-modal-bargaininfo-commission-addarea'
);
if
(
data
.
data
.
practical_fee
){
if
(
data
.
data
.
practical_fee
.
length
>
0
){
_inputAreaTempObj
.
html
(
''
);
}
else
{
_inputAreaTempObj
.
html
(
'<div class="form-group detail-modal-bargaininfo-commission-sec"><label class="">实收佣金:</label><div class="input-group"><input type="number"class="form-control"placeholder="请输入"><div class="input-group-addon">元</div></div><label class="">收佣日期:</label><div class="input-group"><input type="date"class="form-control"placeholder="请输入"></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></mark></div>'
);
};
$
.
each
(
data
.
data
.
practical_fee
,
function
(
i
,
v
)
{
_inputAreaTempObj
.
append
(
'<div data-id="{id}" class="form-group detail-modal-bargaininfo-commission-sec"><label class="">实收佣金:</label><div class="input-group"><input type="number"class="form-control"placeholder="请输入"value="{0}"><div class="input-group-addon">元</div></div><label class="">收佣日期:</label><div class="input-group"><input type="date"class="form-control"placeholder="请输入"value="{1}"></div></div>'
.
stringFormatObj
({
'0'
:
v
.
money
,
'1'
:
v
.
income_time
,
'id'
:
v
.
fee_id
}));
});
};
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
bargaininfoSave
:
function
()
{
//修改报告详情
var
_data
=
{
'id'
:
bargain
.
bargain_id
,
'commission'
:
$
.
trim
(
$
(
'#bargaininfo_total_commission'
).
val
()),
'content'
:
$
.
trim
(
$
(
'#bargaininfo_beizhu'
).
val
()),
'is_open'
:
$
(
'#bargaininfo_is_open'
).
val
(),
'trade_type'
:
$
(
'#bargaininfo_type'
).
val
(),
'industry_type'
:
$
.
trim
(
$
(
'#bargaininfo_yetai'
).
val
()),
'price'
:
$
(
'#bargaininfo_chengjiao_price'
).
val
(),
'estimated_receipt_date'
:
$
(
'#bargaininfo_expect_payback_time'
).
val
(),
'step'
:
bargain
.
mainTabIndex
+
1
};
$
.
each
(
$
(
'.detail-modal-bargaininfo-commission-sec'
),
function
(
i
,
v
)
{
_data
[
'practical_fee['
+
i
+
']'
]
=
{
'fee_id'
:
v
.
getAttribute
(
'data-id'
)?
v
.
getAttribute
(
'data-id'
):
0
,
'fee'
:
$
.
trim
(
$
(
v
).
find
(
'input'
).
eq
(
0
).
val
()),
'operation_date'
:
$
.
trim
(
$
(
v
).
find
(
'input'
).
eq
(
1
).
val
())
};
});
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/editBargainInfo'
,
data
:
_data
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'修改成功'
);
bargain
.
bargaininfoShow
();
//bargain.getList(0);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
maidShow
:
function
()
{
$
(
'#maid_new_btn'
).
hide
();
//默认隐藏新增按钮
$
(
"#maid_new_table_list"
).
html
(
''
);
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/commissionList'
,
data
:
{
'id'
:
bargain
.
bargain_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
$
(
"#maid_new_table_list"
).
html
(
doT
.
template
(
$
(
'#reportList_maid_list_tpl'
).
html
())(
_data
));
var
_isShowAddBtnFlag
=
true
;
$
.
each
(
$
(
'.detail-modal-maid-span-time'
),
function
(
i
,
v
)
{
if
(
v
.
innerHTML
){
_isShowAddBtnFlag
=
false
;
};
});
//如果确认时间都有,都不为空,则把新增按钮显示出来
if
(
_isShowAddBtnFlag
){
$
(
'#maid_new_btn'
).
show
();
};
bargain
.
maidCount
(
2
);
//计算合计的内容
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
//通过
//通过
pass
:
function
()
{
//点击通过
pass
:
function
()
{
//点击通过
var
a_url
=
''
;
var
a_url
=
''
;
...
@@ -665,307 +204,59 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -665,307 +204,59 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
// if(bargain.mainTabIndex == 2) {
// if(bargain.mainTabIndex == 2) {
// a_url = "/index/checkReportMajordomo/2"
// a_url = "/index/checkReportMajordomo/2"
// };
// };
// if(bargain.mainTabIndex == 3) {
// if(bargain.mainTabIndex == 3) {
// a_url = "/index/checkReportCashier/3"
// a_url = "/index/checkReportCashier/3"
// };
// };
//审核来源 1.成交报告申请结单 2.待撤销(退款) 3.申请撤销成交报告
//审核来源 1.成交报告申请结单 2.待撤销(退款) 3.申请撤销成交报告
//成交报告状态 10已提交 20待撤销
//成交报告状态 10已提交 20待撤销
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
a_url
,
data
:
{
"id"
:
bargain
.
bargain_id
,
"source"
:
1
,
"status"
:
10
,
"remark"
:
$
.
trim
(
$
(
"#pass_beizhu"
).
val
()),
'step'
:
bargain
.
mainTabIndex
+
1
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
//bargain.getList(1);
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
//撤销成交报告 通过
passBack
:
function
()
{
//点击通过
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/backOutToOne'
,
data
:
{
"bargain_id"
:
bargain
.
bargain_id
,
"content"
:
$
.
trim
(
$
(
"#pass_cexiao"
).
val
())
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
bargain
.
getList
(
bargain
.
pageNo
);
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
// 开票税费
taxShow
:
function
()
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getTallAge'
,
data
:
{
'bargain_id'
:
bargain
.
bargain_id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
$
(
"#tax_main_box"
).
html
(
doT
.
template
(
$
(
'#reportList_shuiFee_list_tpl'
).
html
())(
_data
.
data
));
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
// 获取之前的分佣信息
getMaidInfo
:
function
(
id
)
{
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getBargainCommission'
,
data
:
{
'bargain_id'
:
id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
$
(
'#addmaid_input_servant'
).
val
(
_data
.
data
.
role
);
$
(
'#addmaid_input_ywy'
).
val
(
_data
.
data
.
name
+
'-'
+
_data
.
data
.
phone
).
attr
(
'data-id'
,
_data
.
data
.
agent_id
);
$
(
'#addmaid_input_ratio'
).
val
(
_data
.
data
.
scale
);
$
(
'#addmaid_input_cash'
).
val
(
_data
.
data
.
scale_fee
);
bargain
.
getDepart
(
_data
.
data
.
agent_id
,
function
(
obj
){
$
(
'#addmaid_input_shop'
).
val
(
obj
.
district_name
+
'-'
+
obj
.
store_name
);
});
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
newAddMaid
:
function
(
fn
){
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/searchOrderAgents'
,
data
:
{
'order_id'
:
bargain
.
order_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
);
fn
&&
fn
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
//新增时,点确定按钮
newAddMaidOk
:
function
(){
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
'type'
:
'POST'
,
url
:
'/index/addBargain'
,
'url'
:
a_url
,
data
:
{
data
:
{
'id'
:
bargain
.
bargain_id
,
"id"
:
bargain
.
bargain_id
,
'agent_id'
:
$
(
'#addmaid_input_ywy'
).
attr
(
'data-id'
),
"source"
:
1
,
'scale_fee'
:
$
(
'#addmaid_input_cash'
).
val
(),
"status"
:
10
,
'role'
:
$
(
'#addmaid_input_servant'
).
val
(),
"remark"
:
$
.
trim
(
$
(
"#pass_beizhu"
).
val
()),
'scale'
:
$
(
'#addmaid_input_ratio'
).
val
(),
'step'
:
bargain
.
mainTabIndex
+
1
'step'
:
bargain
.
mainTabIndex
+
1
,
'source'
:
1
},
},
timeout
:
30000
,
dataType
:
"json"
,
dataType
:
'json'
,
success
:
function
(
data
)
{
beforeSend
:
function
()
{},
if
(
data
.
code
==
200
)
{
success
:
function
(
_data
)
{
if
(
data
.
data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
//bargain.getList(1);
alert
(
'新增成功!'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
}
else
{
}
else
{
layerTipsX
(
'数据错误'
);
alert
(
'获取失败!'
);
};
}
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
});
});
},
},
//
编辑时,点确定按钮
//
撤销成交报告 通过
editMaidOk
:
function
(){
passBack
:
function
()
{
//点击通过
$
.
ajax
({
$
.
ajax
({
type
:
'POST'
,
'type'
:
'POST'
,
url
:
'/index/getBargainCommission
'
,
'url'
:
'/index/backOutToOne
'
,
data
:
{
data
:
{
'bargain_id'
:
$
(
'#modal_new_maid'
).
attr
(
'data-id'
),
"bargain_id"
:
bargain
.
bargain_id
,
'agent_id'
:
$
(
'#addmaid_input_ywy'
).
attr
(
'data-id'
),
"content"
:
$
.
trim
(
$
(
"#pass_cexiao"
).
val
())
'scale_fee'
:
$
(
'#addmaid_input_cash'
).
val
(),
'role'
:
$
(
'#addmaid_input_servant'
).
val
(),
'scale'
:
$
(
'#addmaid_input_ratio'
).
val
()
},
},
timeout
:
30000
,
dataType
:
"json"
,
dataType
:
'json'
,
success
:
function
(
data
)
{
beforeSend
:
function
()
{},
if
(
data
.
code
==
200
)
{
success
:
function
(
_data
)
{
if
(
data
.
data
)
{
if
(
typeof
_data
===
'object'
)
{
bargain
.
getList
(
bargain
.
pageNo
);
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'编辑成功!'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
}
else
{
}
else
{
layerTipsX
(
'数据错误'
);
alert
(
'获取失败!'
);
};
}
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
});
});
},
},
maidCount
:
function
(
type
){
//计算每个实收佣金
var
_rateTotal
=
0
;
//分佣比例
var
_yingfenTotal
=
0
;
//应分佣金
var
_yufenTotal
=
0
;
//预分佣金
var
_shouxuTotal
=
0
;
//手续费
var
_cishanTotal
=
0
;
//慈善基金
var
_xianjinTotal
=
0
;
//现金奖
var
_shishouTotal
=
0
;
//实收佣金
//计算实收佣金
if
(
type
===
1
){
//如果是而类型1,则计算每个实收佣金,和合计
$
.
each
(
$
(
'.detail-modal-maid-span-practical-fee'
),
function
(
i
,
v
)
{
var
_vObj
=
$
(
v
);
var
a
=
Number
(
_vObj
.
parent
().
find
(
'.detail-modal-maid-span-real-fee'
).
html
());
//预分佣金
var
b
=
Number
(
_vObj
.
parent
().
find
(
'.detail-modal-maid-span-service-charge'
).
html
());
//手续费
var
c
=
Number
(
_vObj
.
parent
().
find
(
'.detail-modal-maid-span-charity-fund'
).
html
());
//慈善基金
var
d
=
Number
(
_vObj
.
parent
().
find
(
'.detail-modal-maid-span-cash'
).
html
());
//现金奖
var
_smallTotal
=
dealJineNum
(
a
-
b
-
c
-
d
);
_shishouTotal
+=
_smallTotal
;
_vObj
.
html
(
_smallTotal
);
});
$
(
'#maid_count_total_shishou'
).
html
(
dealJineNum
(
_shishouTotal
));
}
else
if
(
type
===
2
){
//如果是类型2,则直接计算合计
$
.
each
(
$
(
'.detail-modal-maid-span-practical-fee'
),
function
(
i
,
v
)
{
_shishouTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_shishou'
).
html
(
dealJineNum
(
_shishouTotal
));
}
else
{}
//计算分佣比例
$
.
each
(
$
(
'.detail-modal-maid-span-scale'
),
function
(
i
,
v
)
{
_rateTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_rate'
).
html
(
_rateTotal
+
'%'
);
//计算应分佣金
$
.
each
(
$
(
'.detail-modal-maid-td-should-commission'
),
function
(
i
,
v
)
{
_yingfenTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_yingfen'
).
html
(
dealJineNum
(
_yingfenTotal
));
//计算预分佣金
$
.
each
(
$
(
'.detail-modal-maid-span-real-fee'
),
function
(
i
,
v
)
{
_yufenTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_yufen'
).
html
(
dealJineNum
(
_yufenTotal
));
//计算手续费
$
.
each
(
$
(
'.detail-modal-maid-span-service-charge'
),
function
(
i
,
v
)
{
_shouxuTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_shouxu'
).
html
(
dealJineNum
(
_shouxuTotal
));
//计算慈善基金
$
.
each
(
$
(
'.detail-modal-maid-span-charity-fund'
),
function
(
i
,
v
)
{
_cishanTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_cishan'
).
html
(
dealJineNum
(
_cishanTotal
));
//计算现金奖
$
.
each
(
$
(
'.detail-modal-maid-span-cash'
),
function
(
i
,
v
)
{
_xianjinTotal
+=
Number
(
$
(
v
).
html
());
});
$
(
'#maid_count_total_xianjin'
).
html
(
dealJineNum
(
_xianjinTotal
));
},
maidTest
:
function
(
type
){
maidTest
:
function
(
type
){
var
_stopFlag
=
false
;
var
_stopFlag
=
false
;
var
_data
=
[];
var
_data
=
[];
...
@@ -1041,50 +332,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -1041,50 +332,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'list'
:
_data
'list'
:
_data
}
}
},
},
maidConfirmOk
:
function
(
type
){
var
_back
=
bargain
.
maidTest
(
type
);
//获取处理的数据
if
(
!
_back
.
flag
){
var
_len
=
_back
.
list
.
length
;
!
function
funTemp
(
count
)
{
if
(
count
>=
_len
)
{
//如果递归执行完毕则执行这条
alert
(
type
===
0
?
'保存成功'
:
'确认成功'
);
bargain
.
maidShow
();
}
else
{
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/addRealIncome'
,
data
:
_back
.
list
[
count
],
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
funTemp
(
++
count
);
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
}
}(
0
);
}
else
{
alert
(
_back
.
tips
);
}
},
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'
]);
...
@@ -1149,130 +397,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -1149,130 +397,8 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}
}
});
});
},
},
newAddTaxOk
:
function
(){
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
var
_data
=
{
'bargain_id'
:
bargain
.
bargain_id
,
'total_fee'
:
$
.
trim
(
$
(
'#addtax_commission_input'
).
val
()),
'operation_date'
:
$
(
'#addtax_date'
).
val
()
};
if
(
_tempTableObj
.
attr
(
'data-type'
)
===
'edit'
){
_data
[
'id'
]
=
_tempTableObj
.
attr
(
'data-recordid'
);
};
$
.
each
(
$
(
'.addtax-modal-tax-table-datatr'
),
function
(
i
,
v
)
{
_data
[
'tax['
+
i
+
']'
]
=
{
'fee'
:
v
.
childNodes
[
3
].
innerHTML
,
'agent_id'
:
v
.
getAttribute
(
'data-agentid'
),
'role'
:
v
.
getAttribute
(
'data-role'
),
'scale'
:
v
.
childNodes
[
2
].
innerHTML
.
split
(
'%'
)[
0
]
};
if
(
_tempTableObj
.
attr
(
'data-type'
)
===
'edit'
){
_data
[
'tax['
+
i
+
']'
][
'fee_id'
]
=
v
.
getAttribute
(
'data-feeid'
);
};
});
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/addTallAge'
,
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
if
(
_tempTableObj
.
attr
(
'data-type'
)
===
'edit'
){
alert
(
'编辑成功!'
);
}
else
{
alert
(
'新增成功!'
);
};
bargain
.
taxShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
//删除开票税费调用接口
delTaxOk
:
function
(
id
)
{
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/delTaxes'
,
data
:
{
'taxes_id'
:
id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'删除成功!'
);
bargain
.
taxShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
//分佣提成,删除
deletMaid
:
function
(
id
){
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/delPartialCommission'
,
data
:
{
'partial_id'
:
id
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'删除成功'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
});
},
//转到一级审核
//转到一级审核
transFirstExamine
:
function
(){
transFirstExamine
:
function
(){
$
.
ajax
({
$
.
ajax
({
...
@@ -1431,6 +557,56 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
...
@@ -1431,6 +557,56 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}
}
});
});
},
},
bargaininfoShow
:
function
()
{
//报告详情
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/bargainInfo'
,
data
:
{
"id"
:
this
.
bargain_id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
$
(
'#bargaininfo_shop_type'
).
html
(
data
.
data
.
shop_type
==
'1'
?
'街铺'
:
'商场'
);
$
(
'#bargaininfo_is_open'
).
val
(
data
.
data
.
is_open
);
$
(
'#bargaininfo_beizhu'
).
val
(
data
.
data
.
content
);
$
(
"#bargaininfo_user_phone"
).
html
(
hideTel
(
data
.
data
.
user_phone
));
$
(
"#bargaininfo_user_name"
).
html
(
data
.
data
.
user_name
);
$
(
"#bargaininfo_internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
"#bargaininfo_shop_num"
).
html
(
data
.
data
.
house_number
);
$
(
"#bargaininfo_type"
).
val
(
data
.
data
.
trade_type
);
$
(
"#bargaininfo_total_commission"
).
val
(
data
.
data
.
commission
);
$
(
"#bargaininfo_create_time"
).
html
(
data
.
data
.
create_time
);
$
(
"#bargaininfo_expect_payback_time"
).
val
(
data
.
data
.
estimated_receipt_date
);
$
(
"#bargaininfo_yetai"
).
val
(
data
.
data
.
industry_type
);
$
(
"#bargaininfo_chengjiao_price"
).
val
(
data
.
data
.
price
);
this
.
maidTotalCommission
=
Number
(
data
.
data
.
commission
);
//总佣金
this
.
order_id
=
Number
(
data
.
data
.
order_id
);
//订单id
var
_inputAreaTempObj
=
$
(
'.detail-modal-bargaininfo-commission-addarea'
);
if
(
data
.
data
.
practical_fee
){
if
(
data
.
data
.
practical_fee
.
length
>
0
){
_inputAreaTempObj
.
html
(
''
);
}
else
{
_inputAreaTempObj
.
html
(
'<div class="form-group detail-modal-bargaininfo-commission-sec"><label class="">实收佣金:</label><div class="input-group"><input type="number"class="form-control"placeholder="请输入"><div class="input-group-addon">元</div></div><label class="">收佣日期:</label><div class="input-group"><input type="date"class="form-control"placeholder="请输入"></div><mark href="javascript:;"class="detail-modal-bargaininfo-commission-cancel-pic"><img src="/resource/image/search_gb.png"/></mark></div>'
);
};
$
.
each
(
data
.
data
.
practical_fee
,
function
(
i
,
v
)
{
_inputAreaTempObj
.
append
(
'<div data-id="{id}" class="form-group detail-modal-bargaininfo-commission-sec"><label class="">实收佣金:</label><div class="input-group"><input type="number"class="form-control"placeholder="请输入"value="{0}"><div class="input-group-addon">元</div></div><label class="">收佣日期:</label><div class="input-group"><input type="date"class="form-control"placeholder="请输入"value="{1}"></div></div>'
.
stringFormatObj
({
'0'
:
v
.
money
,
'1'
:
v
.
income_time
,
'id'
:
v
.
fee_id
}));
});
};
}
}
else
{
alert
(
'获取失败!'
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
url
:
'/index/getDistrictStoreList'
,
...
...
public/resource/js/user.js
View file @
e5331a1b
...
@@ -1308,7 +1308,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
...
@@ -1308,7 +1308,7 @@ define(['doT', 'text!temp/user_template_tpl.html', 'css!style/home.css', 'ckfind
params
.
industry_type
=
$
(
".industry_type_two_1"
).
val
();
params
.
industry_type
=
$
(
".industry_type_two_1"
).
val
();
params
.
price_demand
=
$
(
".price_demand_1"
).
val
();
params
.
price_demand
=
$
(
".price_demand_1"
).
val
();
params
.
area_demand
=
$
(
".area_demand_1"
).
val
();
params
.
area_demand
=
$
(
".area_demand_1"
).
val
();
params
.
referrer_id
=
user
.
user_id_edit_introduce
;
params
.
referrer_id
=
user
.
user_id_edit_introduce
?
user
.
user_id_edit_introduce
:
""
;
params
.
referrer_source
=
10
;
params
.
referrer_source
=
10
;
if
(
$
(
'#user_city_edit'
).
val
()
==
310100
){
if
(
$
(
'#user_city_edit'
).
val
()
==
310100
){
params
.
city
=
'上海市'
;
params
.
city
=
'上海市'
;
...
...
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