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
60fb6402
Commit
60fb6402
authored
Aug 14, 2018
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改撤销成交报告
parent
114f801d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1682 additions
and
586 deletions
+1682
-586
wait_backout.html
application/index/view/finance/wait_backout.html
+309
-174
waitBackout.js
public/resource/js/waitBackout.js
+1238
-398
wait_backout_template_tpl.html
public/resource/template/wait_backout_template_tpl.html
+135
-14
No files found.
application/index/view/finance/wait_backout.html
View file @
60fb6402
{layout name="global/frame_tpl" /}
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"waitBackout"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"waitBackout"
/>
<style>
<style
type=
"text/css"
>
#note_text
{
.clear
{
width
:
80%
;
clear
:
both
;
margin-left
:
48px
;
margin-top
:
-20px
;
}
}
#note_text_re
{
width
:
80%
;
margin-left
:
48px
;
margin-top
:
-20px
;
}
.Tswitch_one
{
display
:
none
;
}
.Tswitch_two
{
display
:
none
;
}
.left
{
float
:
left
;
width
:
340px
;
line-height
:
36px
;
}
.right
{
line-height
:
36px
;
}
.btn_2
{
width
:
60px
;
display
:
inline-block
;
height
:
26px
;
padding
:
3px
6px
}
.edit_new
{
float
:
right
;
margin-bottom
:
5px
;
margin-top
:
-10px
;
}
.form-control-one
{
display
:
inline-block
;
width
:
40%
;
}
#form_search
{
line-height
:
48px
;
}
.modal-body-two
{
height
:
500px
;
overflow-y
:
scroll
;
}
</style>
</style>
<div
id=
"page-content-wrapper"
>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
@@ -56,32 +11,70 @@
...
@@ -56,32 +11,70 @@
<div
class=
""
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-heading breadcrumb"
>
<div
class=
"panel-heading breadcrumb"
>
<li><a
href=
"#"
>
成交报告-待撤销
</a></li>
<li>
<a
href=
"#"
>
成交报告撤销
</a>
</li>
</div>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<div
class=
"table-responsive"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<thead>
<tr>
<tr>
<td
colspan=
"9
"
>
<td
colspan=
"9"
class=
"maintable-top-sub-tr
"
>
<a
class=
"btn btn-info liudan_pic_btn"
id=
"commissioner"
>
专员
审核
</a>
<a
class=
"btn btn-info liudan_pic_btn"
>
第一级
审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
id=
"manager"
>
经理
审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
>
第二级
审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
id=
"director"
>
总监
审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
>
第三级
审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
id=
"cashier"
>
出纳审核
</a>
<a
class=
"btn btn-default liudan_pic_btn"
>
已撤销
</a>
</td>
</td>
</tr>
</tr>
<!--三级审核的搜索功能-->
<tr>
<tr>
<td
colspan=
"9"
>
<form
id=
"maintable_form_search"
>
<span
class=
"fore-span"
>
商铺类型:
</span>
<select
class=
"form-control btn2"
name=
"maintable_shop_type"
id=
"maintable_shop_type"
>
<option
value=
"-1"
>
请选择
</option>
<option
value=
"0"
>
商场
</option>
<option
value=
"1"
>
街铺
</option>
</select>
<select
class=
"form-control btn2"
name=
"maintable_shop_type"
id=
"maintable_deal_type"
>
<option
value=
""
>
成交类型
</option>
<option
value=
"10"
>
出租
</option>
<option
value=
"20"
>
增佣
</option>
<option
value=
"30"
>
代理费
</option>
<option
value=
"40"
>
好处费
</option>
</select>
<span
class=
"fore-span margin-left-10"
>
撤销提交时间:
</span>
<input
class=
"form-control btn4"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_create_time"
name=
"start_date"
type=
"date"
>
<span
class=
"fore-span margin-left-10"
>
至
</span>
<input
class=
"form-control btn4"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_end_time"
name=
"end_date"
type=
"date"
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_shop_num"
placeholder=
"商铺编号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"maintable_user_report_id"
placeholder=
"成交报告ID"
type=
"text"
value=
""
>
<!--<div class="clear">
</div>-->
<span
class=
"btn btn-info btn3 search"
id=
"maintable_search"
>
搜索
</span>
<span
class=
"btn btn-info btn3"
id=
"maintable_reset"
>
重置
</span>
<!--<span class="btn btn-info btn3" id="maintable_export">导出excel</span>-->
</form>
</td>
</tr>
<tr
class=
"maintable-tr-bar"
>
<th
class=
"text-center"
>
成交报告ID
</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>
<th
class=
"text-center"
>
撤销原因
</th>
<th
class=
"text-center"
>
操作
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</tr>
</thead>
</thead>
<tbody
class=
"text-center"
id=
"follow
_list"
>
<tbody
class=
"text-center"
id=
"maintable
_list"
>
</tbody>
</tbody>
</table>
</table>
...
@@ -97,82 +90,185 @@
...
@@ -97,82 +90,185 @@
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 弹出框
编辑
-->
<!-- 弹出框
详情
-->
<div
class=
"modal fade"
id=
"modal
-edit
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal
_detail
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
×
</button>
</button>
<h4
class=
"modal-title
"
>
<h4
class=
"modal-title detail-modal-header-tab
"
>
<
span
class=
"btn btn-info"
id=
"information"
>
成交信息
</span
>
<
a
href=
"javascript:;"
class=
"btn btn-info"
>
成交信息
</a
>
<
span
class=
"btn btn-default caozuo"
id=
"fees"
>
分佣提成
</span
>
<
a
href=
"javascript:;"
class=
"btn btn-default"
>
分佣提成
</a
>
<
span
class=
"btn btn-default"
id=
"records"
>
收款记录
</span
>
<
a
href=
"javascript:;"
class=
"btn btn-default"
>
开票税费
</a
>
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body modal-body-two"
>
<div
class=
"modal-body detail-modal-body"
>
<div
class=
"Tswitch"
>
<div>
<div
class=
"left"
>
<div
class=
"detail-modal-body-sec"
>
<span>
商铺地址:
</span><span
class=
"internal_address"
></span><br>
<form
class=
"detail-modal-bargaininfo-form"
>
<span>
客户姓名:
</span><span
class=
"user_name"
></span><br>
<div
class=
"detail-modal-bargaininfo-main-left"
>
<span>
应收总佣金:
</span>
<input
class=
"form-control btn_2 commission"
type=
"text"
>
元
<br>
<span>
商铺类型:
</span>
<span>
实收佣金:
</span>
<input
class=
"form-control btn_2 practical_fee"
type=
"text"
>
元
<br>
<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>
<div
class=
"right"
>
<div
class=
"detail-modal-bargaininfo-main-right"
>
<span>
商铺名称:
</span><span
class=
"internal_title"
></span><br>
<span>
是否开业:
</span>
<span>
客户电话:
</span><span
class=
"user_phone"
></span><br>
<select
class=
"form-control"
id=
"bargaininfo_is_open"
>
<span>
提交日期:
</span><span
class=
"create_time"
></span><br>
<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>
<input
type=
"hidden"
class=
"page-pass"
/>
<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>
</div>
<div
class=
"Tswitch Tswitch_one"
>
<label
class=
""
>
收佣日期:
</label>
<!--分佣提成-->
<div
class=
"input-group"
>
<a
class=
"btn btn-success edit_new"
href=
"#modal-new"
data-toggle=
"modal"
>
新增
</a>
<input
type=
"date"
class=
"form-control"
placeholder=
"请输入"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
id=
"caozuo_hide"
>
</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>
<thead>
<tr>
<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>
<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>
</tr>
</thead>
</thead>
<tbody
class=
"text-center"
id=
"caozuo_table"
>
<tbody
class=
"text-center"
id=
"maid_new_table_list"
>
<!--<tr>
</table>
<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>
</div>
</td>
<div
class=
"Tswitch Tswitch_two"
>
</tr>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
id=
"tcaozuo_hide"
>
<tr>
<thead>
<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>
<tr>
<th
class=
"text-center"
>
入账时间
</th>
<td
class=
"text-center"
>
合计
</td>
<th
class=
"text-center"
>
入账金额(元)
</th>
<td
class=
"text-center"
></td>
<th
class=
"text-center"
>
入账类型
</th>
<td
class=
"text-center"
></td>
<th
class=
"text-center"
>
入账方式
</th>
<td
class=
"text-center"
id=
"maid_count_total_rate"
></td>
<th
class=
"text-center"
>
操作人
</th>
<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>
</tr>
</thead>
</tfoot>
<tbody
class=
"text-center"
id=
"tcaozuo_table"
>
</table>
</table>
<div
class=
"detail-modal-maid-bottom-btn-area text-right"
>
<a
id=
"maid_ok_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
确认分佣
</a>
<a
id=
"maid_save_btn"
class=
"btn btn-primary"
data-toggle=
"modal"
>
保存
</a>
</div>
</div>
<br><br><br><br>
<!--分佣提成-->
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"detail-modal-body-sec"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
<div>
</button>
<div
class=
"tc"
>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"confirm_edit"
>
<a
class=
"btn btn-success"
href=
"#modal_new_tax"
data-toggle=
"modal"
>
新增开票
</a>
确定
</div>
</button>
<div
id=
"tax_main_box"
>
<!--内容为模板生成-->
</div>
</div>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</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"
>
...
@@ -188,22 +284,24 @@
...
@@ -188,22 +284,24 @@
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<label
class=
"control-label"
>
备注:
</label>
<label
class=
"control-label"
>
备注:
</label>
<textarea
class=
"form-control"
rows=
"5"
id=
"note_text
"
></textarea>
<textarea
class=
"form-control"
rows=
"5"
id=
"pass_beizhu
"
></textarea>
<!-- <span class="use-span text-danger">(必填)</span> -->
<!-- <span class="use-span text-danger">(必填)</span> -->
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
</button>
<button
type=
"button"
class=
"btn btn-info"
data-dismiss=
"modal"
id=
"confirm_pass
"
>
<button
type=
"button"
class=
"btn btn-info"
data-dismiss=
"modal"
class=
"pass-modal-btn-pass"
id=
"pass_ok_btn
"
>
确定
确定
</button>
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>
<!-- /.modal -->
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- 弹出框
跟进
-->
<!-- 弹出框
时间轴
-->
<div
class=
"modal fade"
id=
"modal-
follow
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-
time
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
...
@@ -211,95 +309,131 @@
...
@@ -211,95 +309,131 @@
×
×
</button>
</button>
<h4
class=
"modal-title"
>
<h4
class=
"modal-title"
>
跟进
时间轴
</h4>
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
class=
"iframe-div-parent"
>
<label
class=
"control-label"
>
备注:
</label>
<iframe
class=
"iframe-time-line"
></iframe>
<textarea
class=
"form-control"
rows=
"5"
id=
"note_text_re"
></textarea>
<!-- <span class="use-span text-danger">(必填)</span> -->
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"confirm_follow"
>
确定
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- 弹出框
时间
-->
<!-- 弹出框
分佣提成新增
-->
<div
class=
"modal fade"
id=
"modal
-timeline
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal
_new_maid
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
×
<h4
class=
"modal-title"
>
新增分佣提成
</h4>
</button>
<h4
class=
"modal-title"
>
时间轴
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
id=
"del_msg"
>
<div
class=
"modal-body"
id=
"addmaid_input_area"
>
时间轴
<div>
<span>
分佣方:
</span>
<select
class=
"form-control"
id=
"addmaid_input_servant"
>
<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
class=
"po-relative"
>
<span>
业务员:
</span><input
class=
"form-control"
type=
"text"
id=
"addmaid_input_ywy"
/>
<ul>
<!--<li data-id="5755">5755-测试-小杨业务员-17621975554</li>
<li data-id="5755">5755-测试-小杨业务员-17621975554</li>-->
</ul>
</div>
<div>
<span>
所属门店:
</span><input
class=
"form-control"
type=
"text"
id=
"addmaid_input_shop"
/>
</div>
<div>
<span>
分佣比例:
</span><input
class=
"form-control"
type=
"number"
id=
"addmaid_input_ratio"
/><span>
%
</span>
</div>
<div>
<span>
应分佣金:
</span><input
class=
"form-control"
type=
"number"
id=
"addmaid_input_cash"
/><span>
元
</span>
</div>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
关闭
<div
href=
"#modal_new_maid_select"
data-toggle=
"modal"
>
打开盘方业务员选择框
</div>
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"addmaid_ok_btn"
>
确定
</button>
<button
type=
"button"
class=
"btn btn-primary"
id=
" "
>
删除
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>
<!-- /.modal -->
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
<!-- 分佣提成新增 -->
<div
class=
"modal fade"
id=
"modal-new"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<!-- 弹出框 分佣提成新增,选择盘方,多个的时候选择一业务员 -->
<div
class=
"modal fade"
id=
"modal_new_maid_select"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
data-backdrop=
'static'
>
<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"
>
选择一业务员
</h4>
</div>
<div
class=
"modal-body"
>
<ul
id=
"addmaid_select_ul"
>
</ul>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- 弹出框 开票税费新增 -->
<div
class=
"modal fade"
id=
"modal_new_tax"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
×
</button>
</button>
<h4
class=
"modal-title"
>
<h4
class=
"modal-title"
>
新增开票
</h4>
新增分佣提成
</h4>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
id=
""
>
<div>
<!-- 新增分佣提成 -->
<div>
<form
id=
"form_search"
>
<div
class=
"form-group addtax-modal-tax-commission-sec"
>
分佣方:
<select
class=
"form-control form-control-one"
id=
"is_carefully_chosen"
>
<label
class=
""
>
开票金额:
</label>
<option
value=
"0"
>
请选择
</option>
<div
class=
"input-group"
><input
type=
"number"
class=
"form-control"
placeholder=
"请输入"
id=
"addtax_commission_input"
>
<option
value=
"1"
>
盘方
</option>
<div
class=
"input-group-addon"
>
元
</div>
<option
value=
"2"
>
客方
</option>
</div>
<option
value=
"3"
>
反签
</option>
<label
class=
""
>
开票日期:
</label>
<option
value=
"4"
>
独家
</option>
<div
class=
"input-group"
><input
type=
"date"
class=
"form-control"
placeholder=
"请输入"
id=
"addtax_date"
></div>
<option
value=
"5"
>
合作方
</option>
</div>
</select><br>
<div>
<span>
业务员:
</span><input
class=
"form-control form-control-one"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
" "
placeholder=
""
type=
"text"
value=
""
><br>
<table
class=
"table-haveborder addtax-modal-tax-table"
>
<span>
所属门店:
</span><input
class=
"form-control form-control-one"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
" "
placeholder=
""
type=
"text"
value=
""
><br>
<!--<tr>
<span>
分佣比例:
</span><input
class=
"form-control form-control-one"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"commission-rate"
placeholder=
""
type=
"text"
value=
""
><br>
<td>分佣方</td>
<span>
应分佣金:
</span><input
class=
"form-control form-control-one"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"should-commission"
placeholder=
""
type=
"text"
value=
""
><br>
<td>业务员</td>
</form>
<td>分佣比例</td>
<!-- 新增分佣提成 -->
<td>税费</td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>-->
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"addtax_commission_addok"
>
确定
</button>
<button
type=
"button"
class=
"btn btn-primary"
data-dismiss=
"modal"
id=
"new-commission"
>
确定
</button>
</div>
</div>
</div>
<!-- /.modal-content -->
</div>
</div>
<!-- /.modal -->
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
\ No newline at end of file
public/resource/js/waitBackout.js
View file @
60fb6402
define
([
'doT'
,
'text!temp/wait_backout_template_tpl.html'
,
'css!style/home.css'
,
'css!style/report_list.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
,
template_tax
,
template_maid
,
template_maid_sub1
)
{
define
([
'doT'
,
'text!temp/wait_backout_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
'pagination'
,
'bootstrapJs'
],
function
(
doT
,
template
)
{
bargain
=
{
follow
=
{
pageNo
:
1
,
pageNo
:
1
,
/*第几页*/
/*第几页*/
pageSize
:
10
,
pageSize
:
10
,
/*每页显示多少条*/
/*每页显示多少条*/
id
:
''
,
mainTabIndex
:
0
,
house_id
:
''
,
detailTabIndex
:
0
,
type
:
''
,
bargain_id
:
''
,
valueCurrent
:
''
,
order_id
:
0
,
//订单id
ajaxObj
:
''
,
panfangData
:
null
,
stopstatus
:
true
,
maidTotalCommission
:
0
,
//应收总佣金
boxphoto
:
''
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
document
.
body
).
append
(
template
);
$
(
document
.
body
).
append
(
template
);
follow
.
getList
(
0
);
bargain
.
getList
(
1
);
follow
.
event
();
bargain
.
event
();
},
},
event
:
function
()
{
event
:
function
()
{
$
(
"#search"
).
click
(
function
()
{
var
_doc
=
$
(
document
);
follow
.
getList
(
1
);
//主页面一级审核,二级审核,三级审核,结单四个tab的点击事件
//专员审核 总监审核 经理审核 出纳审核
_doc
.
on
(
'click'
,
'.maintable-top-sub-tr>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
.
mainTabIndex
=
_this
.
index
();
console
.
log
(
bargain
.
mainTabIndex
);
bargain
.
getList
(
1
);
});
});
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
//搜索按钮的事件
_doc
.
on
(
'click'
,
'#maintable_search'
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
getList
(
1
);
//一级审核搜索
});
});
// 时间轴
$
(
document
).
delegate
(
".timeline"
,
"click"
,
function
()
{
//时间轴
//搜索的重置
follow
.
Timeline
();
$
(
"#maintable_reset"
).
click
(
function
()
{
document
.
getElementById
(
"maintable_form_search"
).
reset
();
});
});
// 编辑
$
(
document
).
delegate
(
".edit"
,
"click"
,
function
()
{
//点击操作跟进详情
//时间轴按钮
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
_doc
.
on
(
"click"
,
".timeline"
,
function
()
{
follow
.
Edit
();
bargain
.
Timeline
();
});
});
$
(
document
).
delegate
(
".is_pass"
,
"click"
,
function
()
{
//点击编辑
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
//转到一级审核
console
.
log
(
follow
.
house_id
);
_doc
.
on
(
'click'
,
'.maintable-btn-trans-one'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
layer
.
open
({
content
:
'确定转到一级审核?'
,
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
_index
){
bargain
.
transFirstExamine
();
layer
.
close
(
_index
);
}
});
});
$
(
document
).
delegate
(
"#confirm_edit"
,
"click"
,
function
()
{
//点击操作跟进详情
follow
.
confirmEdit
();
});
});
$
(
document
).
delegate
(
".caozuo"
,
"click"
,
function
()
{
//点击分佣提成
follow
.
Caozuo
();
//结单
_doc
.
on
(
'click'
,
'.maintable-btn-account'
,
function
(
e
){
e
.
preventDefault
();
e
.
stopPropagation
();
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
layer
.
open
({
content
:
'确定结单?'
,
btn
:
[
'确定'
,
'取消'
],
yes
:
function
(
_index
){
bargain
.
account
();
layer
.
close
(
_index
);
}
});
});
//通过
$
(
document
).
delegate
(
"#confirm_pass"
,
"click"
,
function
()
{
//点击通过
follow
.
confirmPass
();
});
});
// 点击新增分佣提成
$
(
document
).
delegate
(
"#new-commission"
,
"click"
,
function
()
{
//点击分佣提成
//点击通过,修改全局bargain_id,弹出框出来
follow
.
newCommission
();
_doc
.
on
(
'click'
,
'[href=
\
"#modal-pass
\
"]'
,
function
()
{
follow
.
Caozuo
(
);
bargain
.
bargain_id
=
$
(
this
).
closest
(
'tr'
).
attr
(
"data-id"
);
});
});
//table切换
$
(
document
).
delegate
(
"#information"
,
"click"
,
function
()
{
//点击操作跟进详情
//点击通过,确定按钮触发的事件
follow
.
Information
();
_doc
.
on
(
'click'
,
'#pass_ok_btn'
,
function
()
{
bargain
.
pass
();
});
});
$
(
document
).
delegate
(
"#fees"
,
"click"
,
function
()
{
//点击操作跟进详情
follow
.
Fees
();
//点击详情按钮事件,获取报告详情
_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
();
});
});
$
(
document
).
delegate
(
"#records"
,
"click"
,
function
()
{
//点击操作跟进详情
follow
.
Records
();
//详情弹出框里的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
();
}
});
});
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
//提交
follow
.
Submit_follow
();
//详情弹出框,成交信息里的实收佣金相关的事件
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>'
);
};
});
});
//专员审核 总监审核 经理审核 出纳审核
$
(
document
).
delegate
(
"#commissioner"
,
"click"
,
function
()
{
//点击操作跟进详情
//详情弹出框,成交信息里的实收佣金相关的事件,点击x删除这条
follow
.
Commissioner
();
_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
();
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
){
e
.
preventDefault
();
e
.
stopPropagation
();
var
_this
=
$
(
this
);
var
_id
=
_this
.
closest
(
'tr'
).
data
(
'orderid'
);
console
.
log
(
_id
);
$
(
'.iframe-time-line'
).
attr
(
'src'
,
'/app_broker/timeline_pc?order_id='
+
_id
);
});
var
_doc
=
$
(
document
);
bargain
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'[name=district_id],#district_id2'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
_this
.
val
();
_this
.
next
().
html
(
''
);
//先清空
//新增 编辑
var
_objTemp
=
_this
.
parent
().
next
().
find
(
'select'
);
_objTemp
.
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
bargain
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
// var _str = '';
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
});
$
(
document
).
delegate
(
"#manager"
,
"click"
,
function
()
{
//点击操作跟进详情
_objTemp
.
html
(
_str
);
follow
.
Manager
();
_this
.
next
().
html
(
_str
);
});
});
$
(
document
).
delegate
(
"#director"
,
"click"
,
function
()
{
//点击操作跟进详情
}
else
{};
follow
.
Director
();
});
});
$
(
document
).
delegate
(
"#cashier"
,
"click"
,
function
()
{
//出纳审核
follow
.
Cashier
();
});
});
},
},
Timeline
:
function
(){
//获取时间轴
getDefaultRadio
:
function
(
v
){
//1,盘方
//2,客方
//3,反签
//4,独家
//5,合作方
//6,APP盘下载方
//7,APP客下载方
switch
(
Number
(
v
)){
case
1
:
return
25
;
case
2
:
return
30
;
case
3
:
return
35
;
case
4
:
return
100
;
case
6
:
return
5
;
case
7
:
return
5
;
default
:
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
()
{
//获取时间轴
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
'url'
:
'/index/selectReportAll'
,
'url'
:
'/index/selectReportAll'
,
data
:
{
"order_id"
:
follow
.
house_id
},
data
:
{
"order_id"
:
bargain
.
bargain_id
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
if
(
data
.
data
)
{
console
.
log
(
data
.
data
);
console
.
log
(
data
.
data
);
}
}
}
else
{
}
else
{
...
@@ -97,25 +509,51 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
...
@@ -97,25 +509,51 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
}
}
});
});
},
},
Edit
:
function
(){
//报告详情
bargaininfoShow
:
function
()
{
//报告详情
$
(
".Tswitch"
).
eq
(
0
).
show
();
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
'type'
:
'GET'
,
'url'
:
'/index/bargainInfo'
,
'url'
:
'/index/bargainInfo'
,
data
:
{
"id"
:
follow
.
house_id
},
data
:
{
"id"
:
bargain
.
bargain_id
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
if
(
data
.
data
)
{
$
(
".create_time"
).
html
(
data
.
data
.
create_time
);
$
(
'#bargaininfo_shop_type'
).
html
(
data
.
data
.
shop_type
==
'1'
?
'街铺'
:
'商场'
);
$
(
".user_phone"
).
html
(
data
.
data
.
user_phone
);
$
(
'#bargaininfo_is_open'
).
val
(
data
.
data
.
is_open
);
$
(
".user_name"
).
html
(
data
.
data
.
user_name
);
$
(
'#bargaininfo_beizhu'
).
val
(
data
.
data
.
content
);
$
(
".internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
"#bargaininfo_user_phone"
).
html
(
hideTel
(
data
.
data
.
user_phone
));
$
(
".internal_title"
).
html
(
data
.
data
.
internal_title
);
$
(
"#bargaininfo_user_name"
).
html
(
data
.
data
.
user_name
);
$
(
".commission"
).
val
(
data
.
data
.
commission
);
$
(
"#bargaininfo_internal_address"
).
html
(
data
.
data
.
internal_address
);
$
(
".practical_fee"
).
val
(
data
.
data
.
practical_fee
);
$
(
"#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
{
}
else
{
alert
(
'获取失败!'
);
alert
(
'获取失败!'
);
...
@@ -123,56 +561,121 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
...
@@ -123,56 +561,121 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
}
}
});
});
},
},
confirmEdit
:
function
(){
//修改报告详情
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
({
$
.
ajax
({
'type'
:
'POST'
,
'type'
:
'POST'
,
'url'
:
'/index/editBargainInfo'
,
'url'
:
'/index/editBargainInfo'
,
data
:
{
"id"
:
follow
.
house_id
,
data
:
_data
,
"scale_fee"
:
$
(
".commission"
).
val
(),
"practical_fee"
:
$
(
".practical_fee"
).
val
()
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
}
alert
(
'修改成功'
);
bargain
.
bargaininfoShow
();
//bargain.getList(0);
}
else
{
}
else
{
alert
(
'获取失败!'
);
alert
(
data
.
msg
);
}
}
}
}
});
});
},
},
//通过
maidShow
:
function
()
{
confirmPass
:
function
(){
//点击通过
$
(
'#maid_new_btn'
).
hide
();
//默认隐藏新增按钮
console
.
log
(
$
(
'.btn-info'
).
index
());
$
(
"#maid_new_table_list"
).
html
(
''
);
var
a_url
;
$
.
ajax
({
if
(
$
(
'.btn-info'
).
index
()
==
0
){
type
:
'GET'
,
a_url
=
"/index/checkReportAttache/0"
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
(
$
(
'.btn-info'
).
index
()
==
1
)
{
});
a_url
=
"/index/checkReportManager/1"
//如果确认时间都有,都不为空,则把新增按钮显示出来
if
(
_isShowAddBtnFlag
){
$
(
'#maid_new_btn'
).
show
();
};
};
if
(
$
(
'.btn-info'
).
index
()
==
2
)
{
bargain
.
maidCount
(
2
);
//计算合计的内容
a_url
=
"/index/checkReportMajordomo/2"
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
layerTipsX
(
'数据错误'
);
};
};
if
(
$
(
'.btn-info'
).
index
()
==
3
)
{
},
a_url
=
"/index/checkReportCashier/3"
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
};
// console.log($('.btn-info').index());
}
console
.
log
(
follow
.
house_id
);
});
},
//通过
pass
:
function
()
{
//点击通过
var
a_url
=
''
;
if
(
bargain
.
mainTabIndex
==
0
)
{
a_url
=
"/index/checkReportAttache/0"
};
if
(
bargain
.
mainTabIndex
==
1
)
{
a_url
=
"/index/checkReportManager/1"
};
// if(bargain.mainTabIndex == 2) {
// a_url = "/index/checkReportMajordomo/2"
// };
// if(bargain.mainTabIndex == 3) {
// a_url = "/index/checkReportCashier/3"
// };
//审核来源 1.成交报告申请结单 2.待撤销(退款) 3.申请撤销成交报告
//成交报告状态 10已提交 20待撤销
$
.
ajax
({
$
.
ajax
({
'type'
:
'POST'
,
'type'
:
'POST'
,
'url'
:
a_url
,
'url'
:
a_url
,
data
:
{
"id"
:
follow
.
house_id
,
data
:
{
"source"
:
1
,
"id"
:
bargain
.
bargain_id
,
"status"
:
10
,
"source"
:
1
,
"remark"
:
$
(
"#note_text"
).
val
(),
"status"
:
10
,
"remark"
:
$
.
trim
(
$
(
"#pass_beizhu"
).
val
()),
'step'
:
bargain
.
mainTabIndex
+
1
},
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
){
success
:
function
(
data
)
{
if
(
data
.
code
==
200
){
if
(
data
.
code
==
200
)
{
if
(
data
.
data
)
{
if
(
data
.
data
)
{
console
.
log
(
666
);
//bargain.getList(1);
}
}
}
else
{
}
else
{
alert
(
'获取失败!'
);
alert
(
'获取失败!'
);
...
@@ -181,404 +684,740 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
...
@@ -181,404 +684,740 @@ define(['doT', 'text!temp/wait_backout_template_tpl.html', 'css!style/home.css',
});
});
},
},
Caozuo
:
function
(){
//分佣提成获取跟进详情的数据
// 开票税费
taxShow
:
function
()
{
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
type
:
'GET'
,
'url'
:
'/index/commissionList'
,
url
:
'/index/getTallAge'
,
data
:
{
"id"
:
follow
.
house_id
},
data
:
{
dataType
:
"json"
,
'bargain_id'
:
bargain
.
bargain_id
success
:
function
(
data
){
},
if
(
data
.
code
==
200
){
timeout
:
30000
,
if
(
data
.
data
)
{
dataType
:
'json'
,
var
caozuo_table
=
""
;
beforeSend
:
function
()
{},
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
success
:
function
(
_data
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
role
+
'</td><td>'
+
item
.
agent_name
+
'</td><td>'
+
item
.
store_name
if
(
typeof
_data
===
'object'
)
{
+
'</td><td>'
+
item
.
scale
+
'</td><td>'
+
item
.
scale_fee
+
'</td><td>'
+
item
.
practical_fee
+
'</td><td>'
+
item
.
content
+
'</td></tr>'
;
if
(
_data
[
'code'
]
==
'200'
)
{
});
$
(
"#tax_main_box"
).
html
(
doT
.
template
(
$
(
'#reportList_shuiFee_list_tpl'
).
html
())(
_data
.
data
));
$
(
"#caozuo_table"
).
html
(
caozuo_table
);
}
else
{
$
(
"#caozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
layerTipsX
(
_data
[
'msg'
]);
var
temp
=
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
();
//获取一列的值
if
(
temp
==
'null'
){
$
(
"#caozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
6
).
html
(
" "
)
}
}
});
}
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
{
}
else
{
alert
(
'获取失败!'
);
layerTipsX
(
_data
[
'msg'
]
);
}
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
});
});
},
},
Records
:
function
(){
//分佣提成数据
newAddMaid
:
function
(
fn
){
$
(
".Tswitch"
).
eq
(
0
).
hide
();
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
".Tswitch"
).
eq
(
2
).
show
();
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
(
"#information"
).
addClass
(
"btn-default"
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
"#records"
).
removeClass
(
"btn-default"
);
$
(
"#records"
).
addClass
(
"btn-info"
);
$
.
ajax
({
$
.
ajax
({
'type'
:
'GET'
,
type
:
'GET'
,
'url'
:
'/index/payLogList'
,
url
:
'/index/searchOrderAgents'
,
data
:
{
"id"
:
follow
.
house_id
},
data
:
{
dataType
:
"json"
,
'order_id'
:
bargain
.
order_id
success
:
function
(
data
){
},
if
(
data
.
code
==
200
){
timeout
:
30000
,
if
(
data
.
data
)
{
dataType
:
'json'
,
var
caozuo_table
=
""
;
beforeSend
:
function
()
{},
$
.
each
(
data
[
'data'
],
function
(
i
,
item
)
{
success
:
function
(
_data
)
{
caozuo_table
+=
'<tr><td>'
+
item
.
create_time
+
'</td><td>'
+
item
.
money
+
'</td><td>'
+
item
.
type
if
(
typeof
_data
===
'object'
)
{
+
'</td><td>'
+
item
.
pay_type
+
'</td><td>'
+
item
.
agent_name
+
'</td></tr>'
;
if
(
_data
[
'code'
]
==
'200'
)
{
});
bargain
.
panfangData
=
_data
.
data
;
$
(
"#tcaozuo_table"
).
html
(
caozuo_table
);
console
.
log
(
bargain
.
panfangData
);
$
(
"#tcaozuo_table tr"
).
each
(
function
(
e
)
{
//不能为空
fn
&&
fn
();
var
temp_one
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
();
}
else
{
var
temp
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
();
//获取一列的值
layerTipsX
(
_data
[
'msg'
]);
var
temp_two
=
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
();
// 支付方式 10支付宝 20 微信 30pos机器 40转账 50现金 60其他
if
(
temp
*
1
==
10
){
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"支付宝"
)
}
}
if
(
temp
*
1
==
20
){
}
else
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"微信"
)
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
if
(
temp
*
1
==
30
){
});
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"pos机器"
)
},
//新增时,点确定按钮
newAddMaidOk
:
function
(){
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/addBargain'
,
data
:
{
'id'
:
bargain
.
bargain_id
,
'agent_id'
:
$
(
'#addmaid_input_ywy'
).
attr
(
'data-id'
),
'scale_fee'
:
$
(
'#addmaid_input_cash'
).
val
(),
'role'
:
$
(
'#addmaid_input_servant'
).
val
(),
'scale'
:
$
(
'#addmaid_input_ratio'
).
val
(),
'step'
:
bargain
.
mainTabIndex
+
1
,
'source'
:
1
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'新增成功!'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
if
(
temp
*
1
==
40
){
}
else
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"转账"
)
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
if
(
temp
*
1
==
50
){
});
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"现金"
)
},
//编辑时,点确定按钮
editMaidOk
:
function
(){
$
.
ajax
({
type
:
'POST'
,
url
:
'/index/getBargainCommission'
,
data
:
{
'bargain_id'
:
$
(
'#modal_new_maid'
).
attr
(
'data-id'
),
'agent_id'
:
$
(
'#addmaid_input_ywy'
).
attr
(
'data-id'
),
'scale_fee'
:
$
(
'#addmaid_input_cash'
).
val
(),
'role'
:
$
(
'#addmaid_input_servant'
).
val
(),
'scale'
:
$
(
'#addmaid_input_ratio'
).
val
()
},
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
alert
(
'编辑成功!'
);
bargain
.
maidShow
();
}
else
{
layerTipsX
(
_data
[
'msg'
]);
}
}
if
(
temp
*
1
==
60
){
}
else
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
3
).
html
(
"其他"
)
layerTipsX
(
'数据错误'
);
};
},
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
{}
// 付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他
//计算分佣比例
if
(
temp_two
*
1
==
10
){
$
.
each
(
$
(
'.detail-modal-maid-span-scale'
),
function
(
i
,
v
)
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"意向金"
)
_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
){
var
_stopFlag
=
false
;
var
_data
=
[];
var
_parObj
=
$
(
'#maid_new_table_list>tr'
);
var
_errorTips
=
'请填写完整'
;
var
_scaleTotal
=
0
;
if
(
_parObj
.
length
>
0
){
$
.
each
(
_parObj
,
function
(
i
,
v
)
{
console
.
count
(
'$v'
);
var
_$v
=
$
(
v
);
var
_agentId
=
_$v
.
attr
(
'data-agentid'
);
//经纪人id
var
_role
=
_$v
.
attr
(
'data-role'
);
//盘方等类型
var
_scaleVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-span-scale'
).
html
());
//分佣比例
var
_shouldCommissionVal
=
$
.
trim
(
_$v
.
find
(
'.detail-modal-maid-td-should-commission'
).
html
());
//应分佣金
var
_dataTemp
=
{
'bargain_id'
:
_$v
.
attr
(
'data-id'
),
//成交报告id
'last_commission_id'
:
_$v
.
attr
(
'lastid'
)?
_$v
.
attr
(
'lastid'
):
0
,
//最后一个提交的记录id
'is_account_commission'
:
type
//0是保存,1是确认分佣
};
if
((
type
==
'1'
)
&&
(
_scaleVal
==
''
||
_shouldCommissionVal
==
''
)){
//如果是确认分佣,则每项必填。保存,则不加限制
_stopFlag
=
true
;
}
else
{
var
_parObj2
=
_$v
.
find
(
'.detail-modal-maid-mix-td>div'
);
if
(
_parObj2
.
length
>
0
){
$
.
each
(
_parObj2
,
function
(
i2
,
v2
)
{
console
.
count
(
'$v2'
);
var
_$v2
=
$
(
v2
);
var
_cid
=
_$v2
.
attr
(
'data-id'
);
_cid
=
_cid
?
_cid
:
0
;
//如果没有这个id,则为新增,传0
var
_sfyj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-real-fee'
).
html
());
var
_sxf
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-service-charge'
).
html
());
var
_csjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-charity-fund'
).
html
());
var
_xjj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-cash'
).
html
());
var
_ssyj
=
$
.
trim
(
_$v2
.
find
(
'.detail-modal-maid-span-practical-fee'
).
html
());
if
((
type
==
'1'
)
&&
(
_sfyj
==
''
||
_sxf
==
''
||
_csjj
==
''
||
_xjj
==
''
||
_ssyj
==
''
)){
//如果是确认分佣,则每项必填。保存,则不加限制
_stopFlag
=
true
;
}
else
{
_dataTemp
[
'commission_date['
+
i2
+
']'
]
=
{
'agent_id'
:
_agentId
,
//业务员id
'role'
:
_role
,
//盘方等角色类型
'scale'
:
Number
(
_scaleVal
),
//分佣比例
'should_commission'
:
_shouldCommissionVal
,
//应分佣金
'commission_id'
:
_cid
,
//子记录id
'real_fee'
:
_sfyj
,
//预分佣金
'service_charge'
:
_sxf
,
//手续费
'charity_fund'
:
_csjj
,
//慈善基金
'cash'
:
_xjj
,
//现金奖
'practical_fee'
:
_ssyj
,
//实收佣金,
'step'
:
bargain
.
mainTabIndex
+
1
};
}
}
if
(
temp_two
*
1
==
20
){
});
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"定金"
)
}
else
{
}
}
if
(
temp_two
*
1
==
30
){
};
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"保管金"
)
_data
.
push
(
_dataTemp
);
});
};
$
.
each
(
$
(
'.detail-modal-maid-span-scale'
),
function
(
i
,
v
)
{
_scaleTotal
+=
Number
(
$
.
trim
(
v
.
innerHTML
));
});
if
(
_scaleTotal
!=
100
){
//确认分佣和保存,都必须满足比例等于100%才能提交
_stopFlag
=
true
;
_errorTips
=
'分佣比例一定要是100%,否则无法提交'
;
};
return
{
'flag'
:
_stopFlag
,
'tips'
:
_errorTips
,
'list'
:
_data
}
}
if
(
temp_two
*
1
==
40
){
},
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"押金"
)
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'
]);
}
}
if
(
temp_two
*
1
==
50
){
}
else
{
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"租金"
)
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
if
(
temp_two
*
1
==
60
){
});
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"进场费"
)
}
}
if
(
temp_two
*
1
==
70
){
}(
0
);
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"转让费"
)
}
else
{
alert
(
_back
.
tips
);
}
}
if
(
temp_two
*
1
==
80
){
},
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
2
).
html
(
"其他"
)
newAddTax
:
function
(
obj
)
{
var
_tempTableObj
=
$
(
'.addtax-modal-tax-table'
);
_tempTableObj
.
attr
(
'data-type'
,
obj
[
'type'
]);
var
_url
=
''
;
var
_data
=
{};
$
(
'#addtax_commission_input'
).
val
(
''
);
//开票金额置空
$
(
'#addtax_date'
).
val
(
''
);
//开票日期置空
if
(
obj
[
'type'
]
===
'new'
){
$
(
'#modal_new_tax .modal-title'
).
html
(
'新增开票'
);
_url
=
'/index/searchBargainAgents'
;
_data
[
'bargain_id'
]
=
bargain
.
bargain_id
;
}
else
{
$
(
'#modal_new_tax .modal-title'
).
html
(
'编辑开票'
);
_tempTableObj
.
attr
(
'data-recordid'
,
obj
[
'id'
]);
_url
=
'/index/getTaxesById'
;
_data
[
'taxes_id'
]
=
obj
[
'id'
];
};
};
if
(
temp_one
==
'null'
){
$
.
ajax
({
$
(
"#tcaozuo_table"
).
find
(
"tr"
).
eq
(
e
).
find
(
"td"
).
eq
(
4
).
html
(
" "
)
type
:
'GET'
,
}
url
:
_url
,
data
:
_data
,
timeout
:
30000
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
if
(
_data
[
'data'
]
&&
_data
[
'data'
].
length
&&
_data
[
'data'
].
length
>
0
){
$
(
'#addtax_commission_input'
).
val
(
_data
[
'data'
][
0
][
'total_fee'
]);
$
(
'#addtax_date'
).
val
(
_data
[
'data'
][
0
][
'operation_date'
]);
var
_htmlTemp
=
'<tr><td>分佣方</td><td>业务员</td><td>分佣比例</td><td>税费</td></tr>'
;
$
.
each
(
_data
[
'data'
],
function
(
i
,
v
)
{
_htmlTemp
+=
'<tr class="addtax-modal-tax-table-datatr" data-feeid="{feeid}" data-agentid="{id}" data-role="{role}"><td>{0}</td><td>{1}</td><td>{2}%</td><td contenteditable>{3}</td></tr>'
.
stringFormatObj
({
'0'
:
v
.
role_name
,
'1'
:
v
.
name
+
'-'
+
v
.
phone
,
'2'
:
v
.
scale
,
'3'
:
(
obj
[
'type'
]
===
'new'
)?
''
:
v
.
fee
,
'role'
:
v
.
role
,
'id'
:
v
.
agent_id
,
'feeid'
:
v
.
id
});
});
}
});
$
(
'.addtax-modal-tax-table'
).
html
(
_htmlTemp
);
}
else
{
layerTipsX
(
_data
[
'msg'
]);
};
}
else
{
}
else
{
alert
(
'获取失败!'
);
layerTipsX
(
_data
[
'msg'
]
);
}
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
});
});
},
},
newCommission
:
function
(){
//新增分佣提成
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
({
$
.
ajax
({
'type'
:
'POST'
,
type
:
'POST'
,
'url'
:
'/index/addBargain'
,
url
:
'/index/addTallAge'
,
data
:
{
"id"
:
follow
.
house_id
,
data
:
_data
,
"role"
:
$
(
"#is_carefully_chosen"
).
val
(),
timeout
:
30000
,
"scale"
:
$
(
"#commission-rate"
).
val
(),
dataType
:
'json'
,
"scale_fee"
:
$
(
"#should-commission"
).
val
(),
beforeSend
:
function
()
{},
},
success
:
function
(
_data
)
{
dataType
:
"json"
,
if
(
typeof
_data
===
'object'
)
{
success
:
function
(
data
){
if
(
_data
[
'code'
]
==
'200'
)
{
if
(
data
.
code
==
200
){
if
(
_tempTableObj
.
attr
(
'data-type'
)
===
'edit'
){
if
(
data
.
data
)
{
alert
(
'编辑成功!'
);
console
.
log
(
666
);
}
else
{
}
alert
(
'新增成功!'
);
};
bargain
.
taxShow
();
}
else
{
}
else
{
alert
(
'获取失败!'
);
layerTipsX
(
_data
[
'msg'
]
);
}
}
}
else
{
layerTipsX
(
'数据错误'
);
};
},
error
:
function
()
{
layerTipsX
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
}
}
});
});
},
},
//删除开票税费调用接口
// table切换
delTaxOk
:
function
(
id
)
{
Information
:
function
(){
$
(
".Tswitch"
).
eq
(
0
).
show
();
$
(
".Tswitch"
).
eq
(
1
).
hide
();
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
"#information"
).
removeClass
(
"btn-default"
);
$
(
"#information"
).
addClass
(
"btn-info"
);
$
(
"#fees"
).
removeClass
(
"btn-info"
);
$
(
"#fees"
).
addClass
(
"btn-default"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
},
Fees
:
function
(){
$
(
".Tswitch"
).
eq
(
0
).
hide
();
$
(
".Tswitch"
).
eq
(
1
).
show
();
$
(
".Tswitch"
).
eq
(
2
).
hide
();
$
(
"#information"
).
removeClass
(
"btn-info"
);
$
(
"#information"
).
addClass
(
"btn-default"
);
$
(
"#fees"
).
removeClass
(
"btn-default"
);
$
(
"#fees"
).
addClass
(
"btn-info"
);
$
(
"#records"
).
removeClass
(
"btn-info"
);
$
(
"#records"
).
addClass
(
"btn-default"
);
},
//专员审核
Commissioner
:
function
(
pageNo
)
{
$
(
"#commissioner"
).
removeClass
(
"btn-default"
);
$
(
"#commissioner"
).
addClass
(
"btn-info"
);
$
(
"#manager"
).
removeClass
(
"btn-info"
);
$
(
"#manager"
).
addClass
(
"btn-default"
);
$
(
"#director"
).
removeClass
(
"btn-info"
);
$
(
"#director"
).
addClass
(
"btn-default"
);
$
(
"#cashier"
).
removeClass
(
"btn-info"
);
$
(
"#cashier"
).
addClass
(
"btn-default"
);
console
.
log
(
$
(
'.btn-info'
).
index
());
follow
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'POST'
,
url
:
'/index/refundListAttache/0'
,
url
:
'/index/delTaxes'
,
data
:
params
,
data
:
{
'taxes_id'
:
id
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
_data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'wait_backout_list_tpl'
).
innerHTML
);
alert
(
'删除成功!'
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
bargain
.
taxShow
();
/*分页代码*/
}
else
{
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
layerTipsX
(
'数据错误'
);
};
}
else
{
alert
(
'数据错误'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
alert
(
'
error'
);
layerTipsX
(
'enter
error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
};
}
}
});
});
},
},
//专员审核
//分佣提成,删除
deletMaid
:
function
(
id
){
//经理审核
Manager
:
function
(
pageNo
)
{
$
(
"#commissioner"
).
removeClass
(
"btn-info"
);
$
(
"#commissioner"
).
addClass
(
"btn-default"
);
$
(
"#manager"
).
removeClass
(
"btn-default"
);
$
(
"#manager"
).
addClass
(
"btn-info"
);
$
(
"#director"
).
removeClass
(
"btn-info"
);
$
(
"#director"
).
addClass
(
"btn-default"
);
$
(
"#cashier"
).
removeClass
(
"btn-info"
);
$
(
"#cashier"
).
addClass
(
"btn-default"
);
console
.
log
(
$
(
'.btn-info'
).
index
());
follow
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'POST'
,
url
:
'/index/refundListManager/1'
,
url
:
'/index/delPartialCommission'
,
data
:
params
,
data
:
{
'partial_id'
:
id
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
_data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'wait_backout_list_tpl'
).
innerHTML
);
alert
(
'删除成功'
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
bargain
.
maidShow
();
/*分页代码*/
}
else
{
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
layerTipsX
(
'数据错误'
);
};
}
else
{
alert
(
'数据错误'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
alert
(
'
error'
);
layerTipsX
(
'enter
error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
};
}
}
});
});
},
},
//经理审核
//转到一级审核
transFirstExamine
:
function
(){
//总监审核
Director
:
function
(
pageNo
)
{
$
(
"#commissioner"
).
removeClass
(
"btn-info"
);
$
(
"#commissioner"
).
addClass
(
"btn-default"
);
$
(
"#manager"
).
removeClass
(
"btn-info"
);
$
(
"#manager"
).
addClass
(
"btn-default"
);
$
(
"#director"
).
removeClass
(
"btn-default"
);
$
(
"#director"
).
addClass
(
"btn-info"
);
$
(
"#cashier"
).
removeClass
(
"btn-info"
);
$
(
"#cashier"
).
addClass
(
"btn-default"
);
console
.
log
(
$
(
'.btn-info'
).
index
());
follow
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'POST'
,
url
:
'/index/refundListMajordomo/2'
,
url
:
'/index/toReportListOne'
,
data
:
params
,
data
:
{
'bargain_id'
:
bargain
.
bargain_id
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
_data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'wait_backout_list_tpl'
).
innerHTML
);
alert
(
'修改成功'
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
//bargain.getList(1);
/*分页代码*/
}
else
{
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
layerTipsX
(
'数据错误'
);
};
}
else
{
alert
(
'数据错误'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
alert
(
'
error'
);
layerTipsX
(
'enter
error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
};
}
}
});
});
},
},
//总监审核
//结单
account
:
function
(){
//出纳审核
Cashier
:
function
(
pageNo
)
{
$
(
"#commissioner"
).
addClass
(
"btn-default"
);
$
(
"#manager"
).
removeClass
(
"btn-info"
);
$
(
"#manager"
).
addClass
(
"btn-default"
);
$
(
"#director"
).
removeClass
(
"btn-info"
);
$
(
"#director"
).
addClass
(
"btn-default"
);
$
(
"#cashier"
).
removeClass
(
"btn-default"
);
$
(
"#cashier"
).
addClass
(
"btn-info"
);
console
.
log
(
$
(
'.btn-info'
).
index
());
follow
.
pageNo
=
pageNo
;
var
params
=
{};
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'POST'
,
url
:
'/index/refundListCashier/3'
,
url
:
'/index/checkOver'
,
data
:
params
,
data
:
{
'bargain_id'
:
bargain
.
bargain_id
},
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
_data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
_data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
_data
[
'code'
]
==
'200'
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'wait_backout_list_tpl'
).
innerHTML
);
alert
(
'结单成功!'
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
//bargain.getList(1);
/*分页代码*/
}
else
{
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
layerTipsX
(
_data
[
'msg'
]);
}
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
layerTipsX
(
'数据错误'
);
};
}
else
{
alert
(
'数据错误'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
alert
(
'
error'
);
layerTipsX
(
'enter
error'
);
},
},
complete
:
function
(
xhr
,
textStatus
){
complete
:
function
(
xhr
,
textStatus
){
if
(
textStatus
===
'timeout'
){
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
//处理超时的逻辑
layerTipsX
(
'请求超时,请重试'
);
};
};
}
}
});
});
},
},
//出纳审核
//获取一级审核,二级审核,三级审核,结单不同的ajax请求url
switchUrl
:
function
(){
getList
:
function
(
pageNo
)
{
switch
(
Number
(
this
.
mainTabIndex
)){
follow
.
pageNo
=
pageNo
;
case
0
:
var
params
=
{};
return
'/index/reportListOne/1'
;
params
.
pageNo
=
follow
.
pageNo
;
case
1
:
params
.
pageSize
=
follow
.
pageSize
;
return
'/index/reportListTwo/2'
;
case
2
:
return
'/index/reportListThree/3'
;
case
3
:
return
'/index/reportListStatement/4'
;
default
:
return
''
;
}
},
//获取一级审核,二级审核,三级审核,结单数据列表共用的方法
getList
:
function
(
pageNo
){
console
.
count
(
'bar'
);
var
params
=
{
'pageNo'
:
pageNo
,
'pageSize'
:
bargain
.
pageSize
,
'shop_type'
:
$
(
'#maintable_shop_type'
).
val
(),
'create_time'
:
$
.
trim
(
$
(
'#maintable_create_time'
).
val
()),
'end_time'
:
$
.
trim
(
$
(
'#maintable_end_time'
).
val
()),
'internal_address'
:
$
.
trim
(
$
(
'#maintable_internal_address'
).
val
()),
'user_phone'
:
$
.
trim
(
$
(
'#maintable_user_phone'
).
val
()),
'house_number'
:
$
.
trim
(
$
(
'#maintable_shop_num'
).
val
()),
'district_id'
:
$
(
"select[name='district_id'] option:selected"
).
val
(),
'store_id'
:
$
(
"select[name='store_id'] option:selected"
).
val
(),
'agent_name'
:
$
.
trim
(
$
(
'#agent_name'
).
val
()),
'agent_phone'
:
$
.
trim
(
$
(
'#agent_phone'
).
val
()),
'partial_name'
:
$
.
trim
(
$
(
'#partical_name'
).
val
())
};
$
.
ajax
({
$
.
ajax
({
type
:
'GET'
,
type
:
'GET'
,
url
:
'/index/refundListAttache/0'
,
url
:
bargain
.
switchUrl
(),
data
:
params
,
data
:
params
,
timeout
:
30000
,
timeout
:
30000
,
dataType
:
'json'
,
dataType
:
'json'
,
beforeSend
:
function
()
{},
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'wait_backout_list_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'waitBackout_list_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#maintable_list"
).
html
(
doTtmpl
(
data
.
data
));
// var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
add_page
(
data
.
data
.
total
,
pageNo
,
bargain
.
pageSize
,
bargain
.
getList
);
}
else
{
}
else
{
alert
(
data
[
'msg'
]);
alert
(
data
[
'msg'
]);
};
};
}
else
{
}
else
{
alert
(
'数据错误'
);
alert
(
'数据错误'
);
};
};
},
},
error
:
function
()
{
error
:
function
()
{
alert
(
'error'
);
alert
(
'error'
);
},
},
complete
:
function
(
xhr
,
textStatus
)
{
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
if
(
textStatus
===
'timeout'
)
{
alert
(
'请求超时'
);
alert
(
'请求超时'
);
};
};
}
}
});
});
},
getDistrict
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
''
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
$
(
'[name=district_id]'
).
append
(
str
);
$
(
'#district_id2'
).
append
(
str
);
fn
&&
fn
();
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
type
:
'GET'
,
async
:
true
,
data
:
{
'id'
:
id
,
"pageSize"
:
1000
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
fn
&&
fn
(
data
.
data
);
}
}
}
});
},
};
};
return
follow
;
return
bargain
;
});
});
\ No newline at end of file
public/resource/template/wait_backout_template_tpl.html
View file @
60fb6402
<script
id=
"wait_backout_list_tpl"
type=
"text/template"
>
<script
id=
"waitBackout_list_tpl"
type=
"text/template"
>
[
%
if
(
it
)
{
%
]
[
%
if
(
it
[
"list"
]
&&
it
[
"list"
].
length
&&
it
[
"list"
].
length
>
0
)
{
%
]
[
%
var
sw
=
function
(
s
){
switch
(
Number
(
s
)){
case
10
:
return
"出租"
;
case
20
:
return
"增佣"
;
case
30
:
return
"代理"
;
case
40
:
return
"好处费"
;
default
:
return
s
}};
%
]
[
%
for
(
var
item
in
it
[
"list"
]){
%
]
<
tr
data
-
id
=
"[%= it['list'][item]['id'] %]"
data
-
orderid
=
"[%= it['list'][item]['order_id'] %]"
>
<
td
class
=
"text-center"
width
=
"10%"
>
[
%=
it
[
"list"
][
item
][
'create_time'
]
%
]
<
/td
>
<
td
class
=
"text-center"
width
=
"8%"
>
[
%=
it
[
"list"
][
item
][
'is_open'
]?
'是'
:
'否'
%
]
<
/td
>
<
td
class
=
"text-left"
>
[
%=
it
[
"list"
][
item
][
'internal_address'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
"list"
][
item
][
'house_number'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
it
[
"list"
][
item
][
'user_name'
]
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
hideTel
(
it
[
"list"
][
item
][
'user_phone'
])
%
]
<
/td
>
<
td
class
=
"text-center"
>
[
%=
sw
(
it
[
"list"
][
item
][
'trade_type'
])
%
]
<
/td
>
<
td
class
=
"text-center"
width
=
"15%"
>
[
%
if
(
check_auth
(
'index/bargainInfo'
))
{
%
]
<
a
class
=
"btn1 btn-success details-btn"
href
=
"#modal_detail"
data
-
toggle
=
"modal"
>
查看详情
<
/a
>
[
%
}
%
]
[
%
if
(
it
[
"step"
]
<
4
)
{
%
]
[
%
if
(
check_auth
(
'index/checkReportAttache/0'
)
||
check_auth
(
'index/checkReportManager/1'
)
||
check_auth
(
'index/checkReportMajordomo/2'
)
||
check_auth
(
'index/checkReportCashier/3'
))
{
%
]
<
a
class
=
"btn1 btn-success"
href
=
"#modal-pass"
data
-
toggle
=
"modal"
>
通过
<
/a
>
[
%
}
%
]
[
%
}
else
if
(
it
[
"step"
]
==
3
)
{
%
]
[
%
if
(
check_auth
(
'index/toReportListOne'
))
{
%
]
<!--<
a
class
=
"btn1 btn-success maintable-btn-trans-one"
>
转到一级审核
<
/a>--
>
[
%
}
%
]
[
%
if
(
check_auth
(
'index/checkOver'
))
{
%
]
<!--<
a
class
=
"btn1 btn-success maintable-btn-account"
>
结单
<
/a>--
>
[
%
}
%
]
[
%
}
%
]
<
a
class
=
"btn1 btn-success timeline"
href
=
"#modal-time"
data
-
toggle
=
"modal"
>
时间轴
<
/a
>
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
<
td
colspan
=
"8"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
[
%
}
%
]
</script>
<script
id=
"reportList_shuiFee_list_tpl"
type=
"text/template"
>
[
%
if
(
it
&&
it
.
length
&&
it
.
length
>
0
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
[
%
var
getInfoType
=
function
(
r
){
switch
(
Number
(
r
)){
case
1
:
return
"盘方"
;
case
2
:
return
"客方"
;
case
3
:
return
"反签"
;
case
4
:
return
"独家"
;
case
5
:
return
"合作方"
;
default
:
return
"未定义"
}};
%
]
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
<
section
>
<
td
>
[
%=
it
[
item
][
'internal_address'
]
%
]
<
/td
>
<
div
>
<
td
>
[
%=
it
[
item
][
'internal_title'
]
%
]
<
/td
>
<
table
class
=
"detail-modal-tax-table table-haveborder"
>
<
td
>
[
%=
it
[
item
][
'user_name'
]
%
]
<
/td
>
<
tr
>
<
td
>
[
%=
it
[
item
][
'user_phone'
]
%
]
<
/td
>
<
td
>
开票金额
<
/td
>
<
td
>
[
%=
it
[
item
][
'content'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'total_fee'
]
%
]
<
/td
>
<
td
>
开票日期
<
/td
>
<
td
>
[
%=
it
[
item
][
'operation_date'
]
%
]
<
/td
>
<
/tr
>
<
tr
>
<
td
>
分佣方
<
/td
>
<
td
>
业务员
<
/td
>
<
td
>
分佣比例
<
/td
>
<
td
>
税费
<
/td
>
<
/tr
>
[
%
if
(
it
[
item
][
'fee_list'
]
&&
it
[
item
][
'fee_list'
].
length
&&
it
[
item
][
'fee_list'
].
length
>
0
)
{
%
]
[
%
for
(
var
item2
in
it
[
item
][
'fee_list'
]){
%
]
<
tr
data
-
feeid
=
"[%= it[item]['fee_list'][item2]['fee_id'] %]"
>
<
td
>
[
%=
getInfoType
(
it
[
item
][
'fee_list'
][
item2
][
'role'
])
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'fee_list'
][
item2
][
'name'
]
+
'-'
+
it
[
item
][
'fee_list'
][
item2
][
'phone'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'fee_list'
][
item2
][
'scale'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'fee_list'
][
item2
][
'fee'
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
<
tr
>
暂无
<
/tr
>
[
%
}
%
]
<
/table
>
<
/div
>
<
div
>
<
a
class
=
"btn btn-default"
href
=
"#modal_new_tax"
data
-
recordid
=
"[%= it[item]['id'] %]"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<
br
/><
br
/>
<
a
class
=
"btn btn-danger detail-modal-shuiFee-del-btn"
href
=
"javascript:;"
data
-
recordid
=
"[%= it[item]['id'] %]"
>
删除
<
/a
>
<
/div
>
<
/section
>
[
%
}
%
]
[
%
}
else
{
%
]
<
section
>
暂无数据
<
/section
>
[
%
}
%
]
</script>
<script
id=
"reportList_maid_list_tpl"
type=
"text/template"
>
[
%
if
(
it
[
'data'
]
&&
it
[
'data'
].
length
&&
it
[
'data'
].
length
>
0
)
{
%
]
[
%
var
dealT
=
function
(
g
){
if
(
g
&&
(
g
!=
"null"
)){
return
g
}
else
{
return
""
}};
%
]
[
%
for
(
var
i
in
it
[
'data'
]){
%
]
<
tr
class
=
"text-center"
data
-
id
=
"[%= it['data'][i]['id'] %]"
data
-
agentid
=
"[%= it['data'][i]['agent_id'] %]"
data
-
role
=
"[%= it['data'][i]['role'] %]"
data
-
lastid
=
"[%= it['data'][i]['last_commission_id'] %]"
>
<
td
>
[
%=
it
[
'data'
][
i
][
'role_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'agent'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
'data'
][
i
][
'district_store'
]
%
]
<
/td
>
<
td
><
span
contenteditable
class
=
"detail-modal-maid-span-scale"
>
[
%=
it
[
'data'
][
i
][
'scale'
]
%
]
<
/span><span>%</
span
><
/td
>
<
td
contenteditable
class
=
"detail-modal-maid-td-should-commission"
>
[
%=
it
[
'data'
][
i
][
'scale_fee'
]
%
]
<
/td
>
<
td
colspan
=
"6"
class
=
"detail-modal-maid-mix-td oh"
>
[
%
if
(
it
[
'data'
][
i
][
'partial_commission'
]
&&
it
[
'data'
][
i
][
'partial_commission'
].
length
&&
it
[
'data'
][
i
][
'partial_commission'
].
length
>
0
)
{
%
]
[
%
for
(
var
j
in
it
[
'data'
][
i
][
'partial_commission'
]){
%
]
<
div
class
=
"oh"
data
-
id
=
"[%= it['data'][i]['partial_commission'][j]['id'] %]"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'real_fee'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-service-charge"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'service_charge'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-charity-fund"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'charity_fund'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-cash"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'cash'
]
%
]
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-practical-fee"
>
[
%=
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'practical_fee'
]
%
]
<
/span
>
<
span
class
=
"detail-modal-maid-span-time"
>
[
%=
dealT
(
it
[
'data'
][
i
][
'partial_commission'
][
j
][
'confirm_date'
])
%
]
<
/span
>
<
/div
>
[
%
}
%
]
[
%
}
else
{
%
]
<
div
class
=
"oh"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
><
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-service-charge"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-charity-fund"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-cash"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-practical-fee"
><
/span
>
<
span
class
=
"detail-modal-maid-span-time"
><
/span
>
<
/div>
[
%
}
%
]
<
/td
>
<
td
>
<
td
>
<
a
class
=
"btn1 btn-success edit"
href
=
"#modal-edit"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
编辑
<
/a
>
[
%
if
(
check_auth
(
'index/getBargainCommission'
))
{
%
]
<
a
class
=
"btn1 btn-success is_pass"
href
=
"#modal-pass"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
通过
<
/a
>
<
a
href
=
"#modal_new_maid"
class
=
"btn-success detail-modal-maid-a-edit"
data
-
toggle
=
"modal"
>
编辑
<
/a
>
<!--
<
a
class
=
"btn1 btn-success genjing"
href
=
"#modal-follow"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
跟进
<
/a> --
>
[
%
}
%
]
<
a
class
=
"btn1 btn-success timeline"
href
=
"#modal-time"
data
-
toggle
=
"modal"
data
-
id
=
'[%= it[item]["id"] %]'
>
时间轴
<
/a
>
[
%
if
(
check_auth
(
'index/delPartialCommission'
)
&&
(
it
[
'data'
][
i
][
'father_id'
]
!=
0
))
{
%
]
<
a
href
=
"javascript:;"
class
=
"btn-danger detail-modal-maid-a-del"
>
删除
<
/a
>
[
%
}
%
]
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
[
%
}
else
{
%
]
[
%
}
else
{
%
]
<
tr
>
<
tr
>
<
td
colspan
=
"
8
"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
td
colspan
=
"
11
"
style
=
"text-align:center;"
>
暂无数据
<
/td
>
<
/tr
>
<
/tr
>
[
%
}
%
]
[
%
}
%
]
</script>
</script>
<script
id=
"reportList_maid_sub1_list_tpl"
type=
"text/template"
>
<
div
class
=
"oh"
>
<
span
contenteditable
class
=
"detail-modal-maid-span-real-fee"
><
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-service-charge"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-charity-fund"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-cash"
>
0
<
/span
>
<
span
contenteditable
class
=
"detail-modal-maid-span-practical-fee"
><
/span
>
<
span
class
=
"detail-modal-maid-span-time"
><
/span
>
<
/div
>
</script>
\ 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