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
7873e6de
Commit
7873e6de
authored
Dec 18, 2018
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
bcfb1703
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1105 additions
and
412 deletions
+1105
-412
getCollection.html
application/index/view/finance/getCollection.html
+445
-81
getCollection.js
public/resource/js/getCollection.js
+660
-331
No files found.
application/index/view/finance/getCollection.html
View file @
7873e6de
{layout name="global/frame_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"
getCollection
"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"
receivables
"
/>
<style>
.reportArea
{
float
:
left
;
position
:
relative
;
overflow-y
:
scroll
;
height
:
100px
;
left
:
0px
;
width
:
100%
;
line-height
:
30px
;
}
.reportArea
li
{
list-style
:
none
;
line-height
:
20px
;
}
ul
{
-webkit-padding-start
:
0px
!important
;
}
.modal-body-height
{
overflow-y
:
auto
;
height
:
432px
;
...
...
@@ -208,9 +224,52 @@
margin-top
:
20px
;
}
.modal-body-width
{
width
:
800px
;
width
:
1200px
;
}
input
{
width
:
50%
;
}
.col-xs-12
{
overflow
:
hidden
;
}
.p-a-0
{
padding
:
0px
;
}
.p-l-15
{
padding-left
:
15px
!important
;
}
.p-t-10
{
padding-top
:
10px
!important
;
}
.no-border
{
border
:
none
;
}
#preview
img
{
height
:
300px
!important
;
width
:
500px
!important
;
}
#preview
{
height
:
300px
!important
;
width
:
500px
!important
;
}
#file_input
{
top
:
0
!important
;
height
:
41px
!important
;
width
:
102px
!important
;
}
.active
{
color
:
dodgerblue
;
}
#file_input_pic
{
opacity
:
0
;
position
:
absolute
;
top
:
0
;
left
:
145px
;
height
:
35px
;
width
:
80px
;
}
</style>
<div
id=
"page-content-wrapper"
>
<div
class=
"container"
>
...
...
@@ -222,27 +281,26 @@
<a
href=
"javascript:;"
>
收款记录
</a>
</li>
</div>
<div
class=
"panel-body"
>
<div
class=
"panel-body"
style=
"overflow:hidden;"
>
<div
class=
"table-responsive"
>
<table
class=
"table table-striped table-bordered table-hover table-condensed"
>
<thead>
<tr>
<td
colspan=
"1
3
"
>
<td
colspan=
"1
5
"
>
<form
id=
"form_search"
>
<span
class=
"fore-span ld-Marheight"
>
收款提交时间:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date"
name=
"start_date1"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
提交时间:
</span>
<input
id=
"comit_time_start"
class=
"form-control btn4 ld-Marheight"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'comit_time_end\')||\'%y-%M-%d\'}',readOnly:'readonly'})"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date"
name=
"end_date1"
type=
"date"
>
<span
class=
"fore-span ld-Marheight"
>
入账日期:
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"start_date_booked"
name=
""
type=
"date"
>
<input
id=
"comit_time_end"
class=
"form-control btn4 ld-Marheight"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'comit_time_start\' )}',maxDate:'%y-%M-%d',readOnly:'readonly'})"
>
<span
class=
"fore-span ld-Marheight"
>
入账日期:
</span>
<input
id=
"into_time_start"
class=
"form-control btn4 ld-Marheight"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'#F{ $dp.$D(\'into_time_end\')||\'%y-%M-%d\'}',readOnly:'readonly'})"
>
<span
class=
"fore-span ld-Marheight"
>
-
</span>
<input
class=
"form-control btn4 ld-Marheight"
value=
""
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"end_date_booked"
name=
""
type=
"date"
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_name"
placeholder=
"商铺地址"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_num"
placeholder=
"商铺号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"customer_phone"
placeholder=
"客户手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"customer_name"
placeholder=
"客户姓名"
type=
"text"
value=
""
>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="store_name" placeholder="门店" type="text" value="">-->
<select
class=
"form-control btn2 ld-Marheight"
name=
"maintable_shop_type_1"
id=
"maintable_deal_type"
>
<input
id=
"into_time_end"
class=
"form-control btn4 ld-Marheight"
type=
"text"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'into_time_start\')}',maxDate:'%y-%M-%d',readOnly:'readonly'})"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"maintable_deal_type"
>
<option
value=
""
>
入账类型
</option>
<option
value=
"10"
>
意向金
</option>
<option
value=
"20"
>
定金
</option>
...
...
@@ -254,7 +312,7 @@
<option
value=
"80"
>
其他
</option>
<option
value=
"90"
>
佣金
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
name=
"maintable_shop_type_2"
id=
"maintable_mone
y_type"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"maintable_pa
y_type"
>
<option
value=
""
>
入账方式
</option>
<option
value=
"10"
>
支付宝
</option>
<option
value=
"20"
>
微信
</option>
...
...
@@ -262,49 +320,53 @@
<option
value=
"40"
>
转账
</option>
<option
value=
"50"
>
现金
</option>
<option
value=
"60"
>
其他
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"come_from"
>
<option
value=
""
>
来源
</option>
<option
value=
"0"
>
app
</option>
<option
value=
"1"
>
智能pos机
</option>
<option
value=
"1"
>
调整
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"order_id"
placeholder=
"订单ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"get_id"
placeholder=
"收款ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"report_id"
placeholder=
"成交报告ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_id"
placeholder=
"商铺ID"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"shop_addr"
placeholder=
"商铺地址"
type=
"text"
value=
""
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_home"
>
<option
value=
""
>
提交人所在部门
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_shop"
>
<option
value=
""
>
提交人所在门店
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"提交人姓名"
type=
"text"
value=
""
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
style=
"float:left"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
style=
"float:left"
>
重置
</span>
<select
name=
"district_id"
class=
"form-control btn4 ld-Marheight"
>
<option
value=
""
>
约带看人所在部门
</option>
</select>
<select
name=
"store_id"
class=
"form-control btn4 ld-Marheight"
>
<option
value=
""
>
约带看人所在门店
</option>
</select>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"applicant_phone"
placeholder=
"约带看人手机号"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"applicant_name"
placeholder=
"约带看人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"submit_name"
placeholder=
"提交人姓名"
type=
"text"
value=
""
>
<div
class=
"clear"
>
</div>
<!--<span class=" btn btn-info btn3 ld-Marheight" style="visibility: hidden;">搜索</span>-->
<div
class=
"text-right"
>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
>
重置
</span>
<span
class=
"money_total_two ld-Marheight "
>
收款总额:
</span><span
id=
"money_total"
class=
"money_total_two"
></span>
<!--<span class="money_total_two fore-span ld-Marheight ">实付总额:</span><span id="money_total" class="money_total_two_shifu fore-span ld-Marheight">1268</span>元-->
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"export"
>
导出报表
</span>
</div>
</form>
<!--<span class="money_total_two fore-span ld-Marheight ">实付总额:</span><span id="money_total" class="money_total_two_shifu fore-span ld-Marheight">1268</span>元-->
<!--<span class="btn btn-info btn3 ld-Marheight" id="export" style="float:left">导出报表</span>-->
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"count"
style=
"float:left"
>
统计
</span>
<span
class=
"money_total_two ld-Marheight "
style=
"float:left"
>
实付总额:
</span><span
style=
"float:left"
id=
"money_total"
class=
"money_total_two_shifu fore-span ld-Marheight"
>
0元
</span>
</form>
</td>
</tr>
<tr>
<th
class=
"text-center"
>
收款提交时间
</th>
<th
class=
"text-center"
>
提交时间
</th>
<th
class=
"text-center"
>
收款ID
</th>
<th
class=
"text-center"
>
订单ID
</th>
<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>
<th
class=
"text-center"
>
来源
</th>
<th
class=
"text-center"
>
状态
</th>
<th
class=
"text-center"
>
操作
</th>
</tr>
</thead>
<tbody
class=
"text-center"
id=
"
follow
_list"
>
<tbody
class=
"text-center"
id=
"
order
_list"
>
</table>
</div>
<!-- /#page-content-wrapper -->
...
...
@@ -338,59 +400,140 @@
</div>
<!-- /.modal -->
</div>
<!--调整-->
<div
class=
"modal fade"
id=
"modal-linetime"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-dialog
modal-body-width
"
>
<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>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
调整
</h4>
</div>
<div
class=
"modal-body modal-body-height"
>
实付金额:
<input
type=
"number"
id=
'real_money'
/>
元
<div
class=
"clear"
></div>
手续费:
<input
type=
"number"
id=
'real_money2'
/>
元
<div
class=
"clear"
></div><br
/>
<span
style=
"float: left;margin-top: 10px;"
>
入账日期:
</span><input
value=
""
class=
"form_datetime form-control btn5"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"date_booked"
name=
""
type=
"text"
readonly=
"readonly"
>
<form
class=
""
>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-12"
>
<span>
该笔收款可调整/退款金额:
<strong><span
id=
"could_price"
>
1000
</span></strong>
元
</span>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
调整后商铺ID:
</span></strong>
<span
id=
"shop_id_change"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
调整后商铺地址:
</span></strong>
<span
id=
"shop_addr_change"
class=
"col-xs-6 ld-Marheight"
>
123456
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
调整为:
</span></strong>
<div
class=
"col-xs-6"
>
<select
class=
"form-control"
id=
"change_type"
>
<option
class=
"yixiangjin"
value=
"91"
>
中介费
</option>
<option
class=
"yixiangjin"
value=
"92"
>
案场费
</option>
<option
class=
"yixiangjin"
value=
"10"
>
意向金
</option>
<option
class=
"baoguanjin"
value=
"91"
>
中介费
</option>
<option
class=
"baoguanjin"
value=
"92"
>
案场费
</option>
<option
class=
"baoguanjin"
value=
"30"
>
保管金
</option>
</select>
</div>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
调整金额(元):
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
"0"
id=
"change_price"
/></div>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-2 ld-Marheight"
>
成交报告ID:
</span></strong>
<div
class=
"col-xs-9"
style=
"padding:0px 10px 0px 5px;"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"report_id_change"
/>
<ul
class=
"reportArea"
style=
"display:none"
></ul></div>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
调整后带看ID:
</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="into_id_change" readonly="true"/></div>-->
<span
id=
"into_id_change"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
<div
class=
"col-xs-6 choose_topic_1"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
是否分红:
</span></strong>
<div
class=
"col-xs-6"
>
<select
class=
"form-control "
id=
"change_fenhong"
>
<option
value=
"0"
>
否
</option>
<option
value=
"1"
>
是
</option>
</select>
</div>
</div>
</div>
<div
class=
"col-xs-6 choose_topic_2"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
商铺号:
</span></strong>
<span
id=
"shop_id_change_shop"
class=
"col-xs-6 ld-Marheight"
></span>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="" /></div>-->
</div>
</div>
<div
class=
"col-xs-6 choose_topic_2"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
最后转定时间:
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"change_time"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'comit_time_start\' )}',maxDate:'%y-%M-%d',readOnly:'readonly'})"
/></div>
</div>
</div>
<!--上传图片-->
<div
class=
"col-xs-12"
style=
"margin-top:20px;"
>
<div
class=
"col-xs-12"
style=
"padding-left:30px;"
>
<label>
上传资料图片:
</label>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"file-upload-area p-a-0 "
>
<ul
class=
"img-pre-ul"
id=
"fujian_ul"
></ul>
<div
class=
"btn-area"
>
<input
class=
"btn btn-default"
type=
"file"
id=
"file_input"
data-limittop=
"10"
/>
<!--修改上传文件的最大数字-->
<button
class=
"btn btn-default"
style=
"margin-left : 144px;"
>
选择图片
</button>
</div>
<div
class=
"col-xs-12 img_area p-t-10"
>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer"
>
<!--<button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button>-->
<button
type=
"button"
class=
"btn btn-primary submit_edit"
id=
" "
data-dismiss=
"modal"
>
保存
</button>
<button
type=
"button"
class=
"btn btn-primary submit_edit"
id=
"saveChangeBtn"
>
提交
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--
收款图片 2.2版本
-->
<!--
收款详情
-->
<div
class=
"modal fade"
id=
"modal-addPic"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog modal-body-width"
>
<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>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title tit_con active shoukuanxiangqing"
style=
"width:auto!important;float:left"
>
收款详情
</h4>
<h4
class=
"modal-title tit_con"
style=
"width:auto!important;float:left;margin-left:20px;"
>
收款图片
</h4>
</div>
<div
class=
"modal-body modal-body-height"
>
<ul
class=
"list-group"
>
<div
class=
"modal-body modal-body-height pic-con1"
>
<ul
class=
"list-group "
>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<!--input上传图片-->
<div
id=
"container_body"
>
<label>
请选择一个图像文件:
</label>
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input"
/>
<input
type=
"file"
id=
"file_input
_pic
"
/>
<div
id=
"container_body_img_area"
></div>
</div>
</div>
...
...
@@ -400,9 +543,230 @@
</ul>
</div>
<div
class=
"modal-footer"
>
<div
class=
"modal-footer
pic-con1
"
>
<button
type=
"button btn2"
class=
"btn btn-primary"
id=
"saveBtn"
data-dismiss=
"modal"
>
保存
</button>
</div>
<div
class=
"modal-body modal-body-height pic-con2"
>
<form
class=
""
>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-3"
>
<div
class=
"form-group"
>
<strong><span>
入账ID:
</span></strong>
<span
id=
"ruzhangId"
>
45122
</span>
</div>
</div>
<div
class=
"col-xs-3"
>
<div
class=
"form-group"
>
<strong><span>
订单ID:
</span></strong>
<span
id=
"dingdanId"
>
45122
</span>
</div>
</div>
<div
class=
"col-xs-3"
>
<div
class=
"form-group"
>
<strong><span>
成交报告ID:
</span></strong>
<span
id=
"chengjiaobaogaoId"
>
45122
</span>
</div>
</div>
<div
class=
"col-xs-3"
>
<div
class=
"form-group"
>
<strong><span>
房源ID:
</span></strong>
<span
id=
"fangyuanId"
>
45122
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
提交人:
</span></strong>
<span
id=
"tijiaoren"
class=
"col-xs-6 ld-Marheight"
>
forgina
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
房源地址:
</span></strong>
<span
id=
"address"
class=
"col-xs-6 ld-Marheight"
>
上海市南京东路123号
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
提交时间:
</span></strong>
<span
id=
"comit_time"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
入账类型:
</span></strong>
<span
id=
"intoType"
class=
"col-xs-6 ld-Marheight"
>
中介费
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
商铺号:
</span></strong>
<!--<input class="form-control" type="text" value="2018" id="shopNo" />-->
<span
id=
"shopNo"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
成交价:
</span></strong>
<!--<input class="form-control" type="text" value="2018" id="salePrice" />-->
<span
id=
"salePrice"
class=
"col-xs-6 ld-Marheight"
></span>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
入账日期:
</span></strong>
<div
class=
"col-xs-6"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"intoDate"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"
/>
</div>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
入账金额:
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"intoPrice"
/></div>
<strong><span
class=
"col-xs-2 ld-Marheight"
>
元
</span></strong>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
手续费:
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"shouxu"
/></div>
<strong><span
class=
"col-xs-2 ld-Marheight"
>
元
</span></strong>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
实付金额:
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"realPrice"
/></div>
<strong><span
class=
"col-xs-2 ld-Marheight"
>
元
</span></strong>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
应收金额:
</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="getPrice" /></div>-->
<span
id=
"getPrice"
class=
" col-xs-6 ld-Marheight"
></span>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
多收金额:
</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="morePrice" /></div>-->
<span
id=
"morePrice"
class=
" col-xs-6 ld-Marheight"
></span>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
业务员:
</span></strong>
<span
id=
"person"
class=
"col-xs-6 ld-Marheight"
>
周小雨
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
所属门店:
</span></strong>
<span
id=
"belongT"
class=
" col-xs-6 ld-Marheight"
>
南京东路店
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
最后转定时间:
</span></strong>
<div
class=
"col-xs-6"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"lastTime"
onClick=
"WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"
/>
</div>
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
支付方式:
</span></strong>
<div
class=
"col-xs-6"
>
<select
class=
"form-control"
id=
"payType"
>
<option
value=
"10"
>
施总支付宝
</option>
<option
value=
"11"
>
林老师支付宝
</option>
<option
value=
"20"
>
施总微信
</option>
<option
value=
"21"
>
林老师微信
</option>
<option
value=
"30"
>
pos机器
</option>
<option
value=
"40"
>
地产转账
</option>
<option
value=
"41"
>
世家公账
</option>
<option
value=
"42"
>
3000账号
</option>
<option
value=
"50"
>
50现金
</option>
<option
value=
"60"
>
其他
</option>
</select>
</div>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
转账户名:
</span></strong>
<div
class=
"col-xs-6"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"payNo"
/></div>
</div>
</div>
</div>
<div
class=
"col-xs-12"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
是否开业:
</span></strong>
<!--<div class="col-xs-6">-->
<span
id=
"running"
class=
"col-xs-6 ld-Marheight"
></span>
<!--<select class="form-control" id="running">
<option value="0">是</option>
<option value="1">否</option>
</select>-->
<!--</div>-->
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
是否分红:
</span></strong>
<div
class=
"col-xs-6"
>
<select
class=
"form-control"
id=
"fenhong"
>
<option
value=
"1"
>
是
</option>
<option
value=
"0"
>
否
</option>
</select>
</div>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
来源:
</span></strong>
<span
id=
"comes"
class=
"col-xs-6 ld-Marheight"
>
调整
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-3 ld-Marheight"
>
状态:
</span></strong>
<span
id=
"status"
class=
" col-xs-6 ld-Marheight"
>
正常
</span>
</div>
</div>
</div>
</form>
</div>
<div
class=
"modal-footer pic-con2"
>
<button
type=
"button btn2"
class=
"btn btn-primary"
id=
"savePayBtn"
data-dismiss=
"modal"
>
保存
</button>
</div>
</div>
...
...
@@ -414,7 +778,7 @@
<img
/>
</div>
<!-- /#删除模态框 -->
<div
class=
"modal fade"
id=
"modal-delete"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal fade"
id=
"modal-delete
1
"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
...
...
public/resource/js/getCollection.js
View file @
7873e6de
define
([
'doT'
,
'text!temp/
get_collection
_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
,
'blow-up'
],
function
(
doT
,
template
)
{
follow
=
{
define
([
'doT'
,
'text!temp/
receivables
_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
,
'blow-up'
],
function
(
doT
,
template
)
{
receiv
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
id
:
''
,
house_fatherid
:
''
,
house_id
:
''
,
house_fatherid
:
''
,
collection_del_id
:
''
,
change_max
:
''
,
listData
:
''
,
agent_id
:
""
,
order_id
:
''
,
order_no
:
''
,
report_id
:
''
,
pay_type
:
''
,
type_num
:
''
,
houseNmuber
:
''
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
follow
.
getList
(
1
);
follow
.
event
();
//汉化实现
;(
function
(
$
){
$
.
fn
.
datetimepicker
.
dates
[
'zh-CN'
]
=
{
days
:
[
"星期日"
,
"星期一"
,
"星期二"
,
"星期三"
,
"星期四"
,
"星期五"
,
"星期六"
,
"星期日"
],
daysShort
:
[
"周日"
,
"周一"
,
"周二"
,
"周三"
,
"周四"
,
"周五"
,
"周六"
,
"周日"
],
daysMin
:
[
"日"
,
"一"
,
"二"
,
"三"
,
"四"
,
"五"
,
"六"
,
"日"
],
months
:
[
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"10"
,
"11"
,
"12"
],
monthsShort
:
[
"01"
,
"02"
,
"03"
,
"04"
,
"05"
,
"06"
,
"07"
,
"08"
,
"09"
,
"10"
,
"11"
,
"12"
],
today
:
"今日"
,
suffix
:
[],
meridiem
:
[
"am"
,
"pm"
],
weekStart
:
1
,
};
}(
jQuery
));
//入账日期修改为 只提交 年月日
$
(
".form_datetime"
).
datetimepicker
({
// format: 'yyyy-mm-dd hh:ii:ss',
// format: 'yyyy-mm-dd hh:ii:00',
format
:
'yyyy-mm-dd'
,
autoclose
:
true
,
language
:
'zh-CN'
,
minView
:
'month'
,
// minuteStep: 30
// hourStep: 1
});
$
(
'.datetimepicker'
).
hide
();
//初始化隐藏时间控件
receiv
.
getList
(
1
);
receiv
.
event
();
},
event
:
function
()
{
var
that
=
receiv
;
var
_doc
=
$
(
document
);
var
_imgUploadLunbo
=
$
(
'#xiangqing_pic_ul'
);
//详情页轮播图ul
//时间轴点击出现
_doc
.
on
(
'click'
,
'a[href="#modal-time"]'
,
function
(
e
)
{
follow
.
house_id
=
$
(
this
).
attr
(
"data-id"
);
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'.iframe-time-line'
).
attr
(
'src'
,
'/app_broker/timeline_pc?order_id='
+
follow
.
house_id
);
});
//搜索按钮点击事件
$
(
"#search"
).
click
(
function
()
{
follow
.
getList
(
1
);
});
//二级联动
follow
.
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'
)
{
follow
.
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>'
;
});
_objTemp
.
html
(
_str
);
_this
.
next
().
html
(
_str
);
});
}
else
{};
});
});
//收款图片按钮点击的事件
_doc
.
on
(
'click'
,
'.add-pic'
,
function
()
{
//区分收款记录的id 和 father-id 获取图片 和保存图片 都区分
var
_this
=
$
(
this
);
follow
.
house_id
=
_this
.
attr
(
"data-id"
);
follow
.
house_fatherid
=
_this
.
attr
(
"father-id"
);
follow
.
getaddPicList
();
//获取已经上传的图片信息
});
//确认 删除 弹出框
$
(
"#confirm_delete"
).
click
(
function
(){
var
params
=
{};
params
.
id
=
follow
.
collection_del_id
;
if
(
!
params
.
id
||
params
.
id
==
null
){
alert
(
"要删除的id不能为空"
);
return
false
;
}
follow
.
delete_collection
(
params
);
});
//删除 收款记录
$
(
document
).
delegate
(
".collection-del"
,
"click"
,
function
()
{
follow
.
collection_del_id
=
$
(
this
).
attr
(
"data-id"
);
});
//重置按钮的事件
$
(
"#reset"
).
click
(
function
()
{
//重置
document
.
getElementById
(
"form_search"
).
reset
();
});
//导出列表事件
$
(
"#export"
).
click
(
function
()
{
//导出列表
follow
.
exportList
();
});
//编辑按钮点击事件
$
(
document
).
delegate
(
".submit_edit2"
,
"click"
,
function
()
{
//提交
var
_this
=
$
(
this
);
follow
.
house_id2
=
_this
.
attr
(
"data-id"
);
console
.
log
(
follow
.
house_id2
);
$
(
"#real_money"
).
val
(
_this
.
attr
(
"data-money"
));
$
(
"#real_money2"
).
val
(
_this
.
attr
(
"data-fee"
));
if
(
_this
.
attr
(
"data-time"
).
indexOf
(
"0000"
)
!=
-
1
){
$
(
"#date_booked"
).
val
(
'2016-08-02 00:00:00'
);
}
else
{
$
(
"#date_booked"
).
val
(
_this
.
attr
(
"data-time"
));
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
$
(
'.tit_con'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(
e
){
$
(
this
).
parent
(
'div'
).
find
(
'h4.active'
).
removeClass
(
"active"
);
$
(
this
).
addClass
(
"active"
);
if
(
e
.
currentTarget
.
innerHTML
==
"收款图片"
){
$
(
'.pic-con1'
).
show
();
$
(
'.pic-con2'
).
hide
();
}
else
{
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
}
});
//编辑-收付金额-保存
$
(
document
).
delegate
(
".submit_edit"
,
"click"
,
function
()
{
follow
.
Submit_follow
();
});
//收款图片-点击添加图片事件
$
(
'#file_input'
).
on
(
'change'
,
function
(){
$
(
'#file_input_pic'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'chat'
);
...
...
@@ -181,7 +90,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
e
.
stopPropagation
();
if
(
confirm
(
'确认删除吗?'
)){
_this
.
parent
().
remove
();
follow
.
spandelList
(
_this
.
prev
().
attr
(
'data-imgid'
));
that
.
spandelList
(
_this
.
prev
().
attr
(
'data-imgid'
));
};
});
...
...
@@ -195,7 +104,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
console
.
log
(
imgname
.
join
(
','
));
var
id_pic
=
follow
.
house_fatherid
>
0
?
follow
.
house_fatherid
:
follow
.
house_id
;
var
id_pic
=
that
.
house_fatherid
>
0
?
that
.
house_fatherid
:
that
.
house_id
;
var
_data
=
{
img_id
:
id_pic
};
...
...
@@ -214,7 +123,12 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
success
:
function
(
_data
)
{
if
(
typeof
_data
===
'object'
)
{
alert
(
'保存成功'
);
follow
.
getList
(
0
);
$
(
'#container_body_img_area'
).
html
(
""
);
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
$
(
'.active'
).
removeClass
(
"active"
);
$
(
'.shoukuanxiangqing'
).
addClass
(
"active"
);
that
.
getList
(
0
);
}
else
{
alert
(
'数据错误'
);
};
...
...
@@ -230,34 +144,155 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
});
},
//编辑-收付金额-保存
Submit_follow
:
function
()
{
//提交
// if(!($("#real_money").val()>0&&$("#real_money2").val()>0)){
// alert('实付金额及手续费需大于0')
// return false;
//
// }
$
.
ajax
({
'type'
:
'POST'
,
'url'
:
'/index/addRealMoney'
,
data
:
{
"collection_id"
:
follow
.
house_id2
,
"real_money"
:
$
(
"#real_money"
).
val
(),
"transaction_fee"
:
$
(
"#real_money2"
).
val
(),
"income_time"
:
$
(
"#date_booked"
).
val
()
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
follow
.
getList
(
0
);
//操作----时间轴
$
(
document
).
on
(
'click'
,
'.timeline'
,
function
(
e
){
var
house_id
=
e
.
target
.
dataset
.
id
;;
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
'.iframe-time-line'
).
attr
(
'src'
,
'/app_broker/timeline_pc?order_id='
+
house_id
);
});
//操作----收款详情
$
(
document
).
on
(
'click'
,
'.add-pic'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
that
.
getMoneyDetail
(
id
);
that
.
house_fatherid
=
id
;
console
.
log
(
id
)
});
//操作---调整
$
(
document
).
on
(
'click'
,
'.money_change'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
var
type
=
e
.
target
.
dataset
.
type
;
var
order_id
=
e
.
target
.
dataset
.
order_id
;
that
.
type_num
=
e
.
target
.
dataset
.
type_num
that
.
order_id
=
order_id
;
that
.
order_no
=
e
.
target
.
dataset
.
order_no
;
that
.
report_id
=
e
.
target
.
dataset
.
report_id
;
that
.
agent_id
=
e
.
target
.
dataset
.
agent_id
;
that
.
pay_type
=
e
.
target
.
dataset
.
pay_type
;
that
.
getAllPrice
(
id
);
if
(
type
==
"意向金"
){
$
(
'#change_type'
).
val
(
91
);
$
(
'.baoguanjin'
).
hide
();
$
(
'.yixiangjin'
).
show
();
}
else
{
$
(
'#change_type'
).
val
(
91
);
$
(
'.yixiangjin'
).
hide
();
$
(
'.baoguanjin'
).
show
();
}
that
.
yetai
=
""
;
that
.
changeType
(
order_id
);
});
//操作----删除
$
(
document
).
on
(
'click'
,
'.list_delete'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
that
.
deleteTableRow
(
id
);
console
.
log
(
id
)
});
//搜索
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
that
.
getList
(
that
.
pageNo
);
});
//重置搜索条件
$
(
document
).
on
(
'click'
,
'#reset'
,
function
(
e
){
that
.
resetAll
();
});
//导出报表
$
(
document
).
on
(
'click'
,
'#export'
,
function
(
e
){
that
.
exportExcel
();
});
//统计
$
(
document
).
on
(
'click'
,
'#count'
,
function
(
e
){
that
.
countValue
();
});
//收款详情
$
(
"#modal-addPic"
).
on
(
"shown.bs.modal"
,
function
(
event
){
$
(
'#savePayBtn'
).
click
(
function
(){
that
.
saveRecervables
();
})
});
//调整
$
(
"#modal-linetime"
).
on
(
"shown.bs.modal"
,
function
(
event
){
//初始化...
//initMoadalData
that
.
change_show_hide
(
$
(
'#change_type option:selected'
).
text
());
$
(
'#saveChangeBtn'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(
e
){
that
.
saveChange
();
});
//附件上传处理事件
$
(
"#file_input"
).
change
(
function
()
{
var
_this
=
$
(
this
);
var
_spFile
=
_this
.
data
(
'spfile'
);
var
_limitTop
=
_this
.
data
(
'limittop'
);
var
_fileNum
=
_this
.
parent
().
next
().
find
(
'.delet-pic-btn'
).
length
;
//根据删除按钮的个数,确定文件的个数
if
(
_limitTop
&&
(
_fileNum
<
_limitTop
))
{
that
.
uploadImg
(
_this
);
}
else
{
alert
(
'上传上限为 '
+
_limitTop
);
return
false
;
};
});
$
(
'#change_type'
).
change
(
function
(
e
){
console
.
log
(
$
(
'#change_type option:selected'
).
text
());
var
val
=
$
(
'#change_type option:selected'
).
text
();
that
.
change_show_hide
(
val
);
});
$
(
document
).
delegate
(
".hideLI"
,
"click"
,
function
(
e
)
{
//list消失新增客户 点击li事件 获取id ul消失
//that.addphone(this);
//todo list detail
});
$
(
document
).
on
(
"input"
,
"#report_id_change"
,
function
()
{
//手机号新增搜索客方
var
val
=
$
(
'#report_id_change'
).
val
()
var
data
=
that
.
getReportDataByDetail
(
val
);
if
(
$
(
"#report_id_change"
).
val
()
==
''
)
{
$
(
".user-ul"
).
html
(
''
);
var
tag
=
""
;
// tag += '<li class="hideLI" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
$
(
'#reportArea'
).
append
(
tag
);
}
else
{
alert
(
data
.
msg
)
that
.
search_phone
();
}
}
});
//点击li 列表消失
$
(
document
).
delegate
(
".reportIdBuild"
,
"click"
,
function
()
{
//list消失新增客户 点击li事件 获取id ul消失
that
.
reportIdBuild
(
this
);
});
});
//图片,附件上传删除键事件
$
(
document
).
on
(
'click'
,
'.delet-pic-btn'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
$
(
this
).
parent
().
parent
().
remove
();
});
//二级联动
that
.
getDistrict
(
function
()
{
_doc
.
on
(
'input'
,
'#commit_home'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
$
(
'#commit_home'
).
val
();
$
(
'#commit_shop'
).
html
(
''
);
//先清空
if
(
_id
&&
_id
!=
'0'
)
{
that
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
var
_str
=
'<option value="0">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
$
(
'#commit_shop'
).
append
(
_str
)
});
}
else
{};
});
});
},
spandelList
:
function
(
n
)
{
//删除已经保存的图片都调用
$
.
ajax
({
'type'
:
'POST'
,
...
...
@@ -274,147 +309,420 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
});
},
getaddPicList
:
function
()
{
//获取收款图片
$
(
'#container_body_img_area'
).
html
(
''
);
//每回先清空所有图片
var
id_pic
=
follow
.
house_fatherid
>
0
?
follow
.
house_fatherid
:
follow
.
house_id
;
$
(
'.result2,.result'
).
remove
();
//删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
//将li里的值 赋给input(分佣方姓名)
reportIdBuild
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
receiv
;
that
.
report_id_a
=
$
(
obj
).
attr
(
"data-id"
);
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#report_id_change"
).
val
(
user_ht_str
);
$
(
".reportArea"
).
html
(
''
);
$
(
'.reportArea'
).
hide
();
$
(
'#shop_addr_change'
).
text
(
$
(
obj
).
attr
(
"data-addr"
));
$
(
'#into_id_change'
).
text
(
$
(
obj
).
attr
(
"data-order_id"
));
$
(
'#shop_id_change_shop'
).
text
(
$
(
obj
).
attr
(
"data-house_number"
));
that
.
houseNmuber
=
$
(
obj
).
attr
(
"data-house_number"
);
},
search_phone
:
function
(){
var
that
=
receiv
;
$
.
ajax
({
'type'
:
'GET'
,
'url'
:
'/index/receiptImgList'
,
url
:
'/broker/bargainMain'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"id"
:
id_pic
,
"keyword"
:
$
(
"#report_id_change"
).
val
(),
'status'
:
0
,
'is_my_correlation'
:
0
,
'page_no'
:
1
,
'page_size'
:
20
,
'AuthToken'
:
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
))).
AuthToken
,
'submit_agent_id'
:
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
))).
id
},
dataType
:
"json"
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
//渲染已经有的列表
// <img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview"
// data-bimg='[%= it[item]["agent_img"] %]'>
for
(
i
=
0
;
i
<
data
.
data
.
length
;
i
++
)
{
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
'0'
:
data
.
data
[
i
].
id
,
'1'
:
data
.
data
[
i
].
img_name
?
urlDeal
(
data
.
data
[
i
].
img_name
):
data
.
data
[
i
].
img_name
})
);
};
var
user_ul
=
""
;
$
.
each
(
data
.
data
.
result
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="reportIdBuild" data-house_number="'
+
item
.
house_number
+
'"data-order_id="'
+
item
.
order_id
+
'" data-addr="'
+
item
.
internal_address
+
'" data-id="'
+
item
.
id
+
'">'
+
item
.
internal_address
+
',商铺ID:'
+
item
.
house_id
+
',成交报告ID'
+
item
.
id
+
',成交价:'
+
item
.
price
+
',佣金'
+
item
.
commission
+
'</li>'
;
});
$
(
'.reportArea'
).
show
();
$
(
".reportArea"
).
html
(
user_ul
);
}
else
{
alert
(
data
.
msg
);
}
}
else
{}
}
});
},
//点击收款图片 上传新的图片 掉用全局上传图片
//点击input的时候 调用全局上传图片 然后渲染到页面
getaddPicList2
:
function
()
{
var
input
=
document
.
getElementById
(
"file_input"
);
var
result
,
div
;
if
(
typeof
FileReader
===
'undefined'
)
{
result
.
innerHTML
=
"抱歉,你的浏览器不支持 FileReader"
;
input
.
setAttribute
(
'disabled'
,
'disabled'
);
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>'
;
});
$
(
'#commit_home'
).
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
);
}
}
});
},
countValue
:
function
(){
var
that
=
receiv
;
var
data
=
that
.
listData
;
console
.
log
(
data
);
var
value
=
0
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
value
=
value
+
(
data
[
i
].
money
-
0
);
}
console
.
log
(
value
);
$
(
'#money_total'
).
text
(
value
+
"元"
);
},
getReportDataByDetail
:
function
(
val
){
$
.
post
(
''
,{
'val'
:
val
},
function
(
data
){
return
data
;
})
},
change_show_hide
:
function
(
val
){
if
(
val
==
"意向金"
)
{
$
(
'.choose_topic_1'
).
hide
();
$
(
'.choose_topic_2'
).
show
();
}
else
if
(
val
==
'保管金'
)
{
$
(
'.choose_topic_1'
).
hide
();
$
(
'.choose_topic_2'
).
show
();
}
else
{
input
.
addEventListener
(
'change'
,
readFile
,
false
);
$
(
'.choose_topic_2'
).
hide
();
$
(
'.choose_topic_1'
).
show
();
}
},
//上传图片
uploadImg
:
function
(
_this
){
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'shop_image_depot'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
var
_url
=
_data
.
data
.
internet_img_name
;
var
tag
=
''
;
tag
+=
'<div class="col-xs-3 pictures" id='
+
_data
.
data
.
img_path
+
'>'
;
tag
+=
' <img src="/'
+
_url
+
'" class="" id="" width="90%">'
;
tag
+=
' <div style="text-align:center" id="'
+
_data
.
data
.
img_path
+
'"><a href="javascript:;" class="delet-pic-btn">删除</a></div>'
;
tag
+=
'</div>'
;
$
(
'.img_area'
).
append
(
tag
)
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
},
saveChange
:
function
(
no
){
var
that
=
receiv
;
console
.
log
(
that
);
var
params
=
{
'order_id'
:
that
.
order_id
,
'order_no'
:
that
.
order_no
,
'agent_id'
:
that
.
agent_id
,
'report_id'
:
that
.
report_id_a
?
that
.
report_id_a
:
that
.
report_id
,
'industry_type'
:
that
.
yetai
};
function
readFile
()
{
console
.
log
(
this
.
files
);
for
(
var
i
=
0
;
i
<
this
.
files
.
length
;
i
++
)
{
if
(
!
input
[
'value'
].
match
(
/.jpg|.gif|.png|.bmp/i
))
{
//判断上传文件格式
return
alert
(
"上传的图片格式不正确,请重新选择"
)
}
var
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
this
.
files
[
i
]);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'chat'
);
formData
.
append
(
'image'
,
this
.
files
[
0
]);
console
.
log
(
this
.
files
[
0
]);
console
.
log
(
formData
);
reader
.
onload
=
function
(
e
)
{
var
result2
=
this
.
result
;
$
.
ajax
({
type
:
'post'
,
url
:
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
result
=
'<div class="result"><img class="'
+
_data
.
data
.
img_path
+
'" src="'
+
result2
+
'" alt=""/> <span class="span-del">删除</span></div>'
;
div
=
document
.
createElement
(
'div'
);
div
.
innerHTML
=
result
;
document
.
getElementById
(
'container_body'
).
appendChild
(
div
);
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
}
};
var
obj
=
{
'pay_type'
:
that
.
pay_type
};
},
// 导出列表
exportList
:
function
(
pageNo
)
{
console
.
log
(
2
);
follow
.
pageNo
=
pageNo
;
var
params
=
{};
var
excel_two
=
1
;
var
user_name
=
$
.
trim
(
$
(
'#customer_name'
).
val
());
var
start_time
=
$
(
'#start_date'
).
val
();
var
end_time
=
$
(
'#end_date'
).
val
();
var
income_start_time
=
$
(
'#start_date_booked'
).
val
();
var
income_end_time
=
$
(
'#end_date_booked'
).
val
();
var
internal_address
=
$
(
'#shop_name'
).
val
();
var
user_phone
=
$
(
'#customer_phone'
).
val
();
var
id
=
$
(
'#shop_num'
).
val
();
var
store_name
=
$
(
'#store_name'
).
val
();
var
report_phone
=
$
(
'#applicant_phone'
).
val
();
var
report_name
=
$
(
'#applicant_name'
).
val
();
var
store_id
=
$
(
"select[name='store_id'] option:selected"
).
val
();
var
district_id
=
$
(
"select[name='district_id'] option:selected"
).
val
();
var
pay_type
=
$
(
"select[name='maintable_shop_type_2'] option:selected"
).
val
();
var
type
=
$
(
"select[name='maintable_shop_type_1'] option:selected"
).
val
();
var
agent_name
=
$
(
"#submit_name"
).
val
();
if
(
$
(
'#change_type'
).
val
()){
//调整类型
obj
.
type
=
that
.
type_num
;
//$('#change_type').val()
};
//拼接jsonArray to jsonObject
if
(
$
(
'#change_price'
).
val
()){
//调整金额
if
(
$
(
'#change_price'
).
val
()
>
0
){
if
(
$
(
'#change_price'
).
val
()
-
$
(
'#could_price'
).
text
()
>
0
){
alert
(
"超出最大限额"
);
return
false
;
}
else
{
obj
.
money
=
$
(
'#change_price'
).
val
();}
}
else
{
alert
(
'请选择调整金额'
);
return
false
;
}
};
var
jsonArray
=
[]
;
jsonArray
.
push
(
obj
);
params
.
collecting_bill
=
JSON
.
stringify
(
jsonArray
)
;
//条件验证
params
.
house_number
=
that
.
houseNmuber
;
if
(
$
(
'#change_type'
).
val
()
==
10
||
$
(
'#change_type'
).
val
()
==
30
){
if
(
$
(
'#change_time'
).
val
()){
//最后转定时间
params
.
last_transfer_time
=
$
(
'#change_time'
).
val
()
};
// if ($('#shop_id_change_shop').text()){//商铺号
//
// };
}
else
{
if
(
$
(
'#change_fenhong'
).
text
()){
//分红
params
.
is_dividend
=
$
(
'#change_fenhong'
).
val
()
};
}
if
(
$
(
'#into_id_change'
).
val
()){
//带看id
params
.
into_id_change
=
$
(
'#into_id_change'
).
val
()
};
window
.
open
(
'/index/getCollection?'
+
'excel='
+
excel_two
+
'&user_name='
+
user_name
+
'&start_time='
+
start_time
+
'&end_time='
+
end_time
+
'&internal_address='
+
internal_address
+
'&user_phone='
+
user_phone
+
'&id='
+
id
+
'&store_name='
+
store_name
+
'&report_phone='
+
report_phone
+
'&report_name='
+
report_name
+
'&store_id='
+
store_id
+
'&district_id='
+
district_id
+
'&pay_type='
+
pay_type
+
'&type='
+
type
+
'&income_start_time='
+
income_start_time
+
'&income_end_time='
+
income_end_time
+
'&agent_name='
+
agent_name
);
//图片数据处理
var
pictures
=
$
(
'.img_area'
).
find
(
'.pictures'
);
var
picName
=
""
;
pictures
.
each
(
function
(
i
,
event
){
picName
+=
$
(
this
).
attr
(
"id"
)
+
","
})
if
(
!
(
pictures
.
length
-
0
>
0
)
){
alert
(
"请选择图片"
);
return
false
;
}
else
{
params
.
picName
=
JSON
.
stringify
(
picName
.
substr
(
0
,
picName
.
length
-
1
).
split
(
","
));
}
//上传数据
$
.
post
(
'/index/collectingBill'
,
params
,
function
(
data
){
console
.
log
(
data
);
$
(
'#modal-linetime'
).
modal
(
'hide'
);
},
'json'
);
},
getAllPrice
:
function
(
id
){
$
.
get
(
'/index/getAdjustment'
,{
'pay_id'
:
id
},
function
(
data
){
$
(
'#could_price'
).
text
(
data
.
data
.
residue_money
);
})
},
getList
:
function
(
pageNo
)
{
follow
.
pageNo
=
pageNo
;
saveRecervables
:
function
(){
var
that
=
receiv
;
var
params
=
that
.
recervablesParams
();
console
.
log
(
params
);
$
.
post
(
'/index/getCollectionEdit'
,
params
,
function
(
data
){
that
.
getList
(
that
.
pageNo
);
},
'json'
)
},
recervablesParams
:
function
(){
var
params
=
{}
;
if
(
$
(
'#ruzhangId'
).
text
()){
//入账ID
params
.
pay_id
=
$
(
'#ruzhangId'
).
text
()
};
if
(
$
(
'#intoDate'
).
val
()){
//入账日期
params
.
income_time
=
$
(
'#intoDate'
).
val
()
};
if
(
$
(
'#intoPrice'
).
val
()){
//入账金额
params
.
money
=
$
(
'#intoPrice'
).
val
()
};
if
(
$
(
'#shouxu'
).
val
()){
//手续费
params
.
transaction_fee
=
$
(
'#shouxu'
).
val
()
};
if
(
$
(
'#realPrice'
).
val
()){
//实付金额
params
.
real_money
=
$
(
'#realPrice'
).
val
()
};
if
(
$
(
'#payType'
).
val
()){
//支付方式
params
.
pay_type
=
$
(
'#payType'
).
val
()
};
if
(
$
(
'#payNo'
).
val
()){
//支付户名
params
.
transfer_name
=
$
(
'#payNo'
).
val
()
};
if
(
$
(
'#running'
).
val
()){
//是否开业 1是 0否
params
.
is_open
=
$
(
'#running'
).
val
()
};
if
(
$
(
'#fenhong'
).
val
()){
//分红
params
.
is_dividend
=
$
(
'#fenhong'
).
val
()
};
if
(
$
(
'#lastTime'
).
val
()){
//最后转定时间
params
.
last_transfer_time
=
$
(
'#lastTime'
).
val
()
};
return
params
;
},
/**
* 重置查询条件
*/
resetAll
:
function
(){
var
commite_time_start
=
$
(
'#comit_time_start'
).
val
(
""
);
var
commite_time_end
=
$
(
'#comit_time_end'
).
val
(
""
);
var
into_time_start
=
$
(
'#into_time_start'
).
val
(
""
);
var
into_time_end
=
$
(
'#into_time_end'
).
val
(
""
);
var
maintable_deal_type
=
$
(
'#maintable_deal_type'
).
val
(
""
);
var
maintable_pay_type
=
$
(
'#maintable_pay_type'
).
val
(
""
);
var
come_from
=
$
(
'#come_from'
).
val
(
""
);
var
order_id
=
$
(
'#order_id'
).
val
(
""
);
var
get_id
=
$
(
'#get_id'
).
val
(
""
);
var
report_id
=
$
(
'#report_id'
).
val
(
""
);
var
shop_id
=
$
(
'#shop_id'
).
val
(
""
);
var
shop_addr
=
$
(
'#shop_addr'
).
val
(
""
);
var
commit_home
=
$
(
'#commit_home'
).
html
(
'<option value="">提交人所在部门</option>'
);
var
commit_shop
=
$
(
'#commit_shop'
).
html
(
'<option value="">提交人所在门店</option>'
);
var
comit_name
=
$
(
'#comit_name'
).
val
(
""
);
},
/**
* 导出报表
*/
exportExcel
:
function
(){
var
that
=
receiv
;
var
params
=
that
.
buildSearchParams
(
true
);
$
.
post
(
''
,
params
,
function
(
data
){
console
.
log
(
data
);
})
window
.
open
(
'/index/getCollection'
+
params
);
},
/**
* 获取查询参数
*/
buildSearchParams
:
function
(
excel
){
var
commite_time_start
=
$
(
'#comit_time_start'
).
val
();
var
commite_time_end
=
$
(
'#comit_time_end'
).
val
();
var
into_time_start
=
$
(
'#into_time_start'
).
val
();
var
into_time_end
=
$
(
'#into_time_end'
).
val
();
var
maintable_deal_type
=
$
(
'#maintable_deal_type'
).
val
();
var
maintable_pay_type
=
$
(
'#maintable_pay_type'
).
val
();
var
come_from
=
$
(
'#come_from'
).
val
();
var
order_id
=
$
(
'#order_id'
).
val
();
var
get_id
=
$
(
'#get_id'
).
val
();
var
report_id
=
$
(
'#report_id'
).
val
();
var
shop_id
=
$
(
'#shop_id'
).
val
();
var
shop_addr
=
$
(
'#shop_addr'
).
val
();
var
commit_home
=
$
(
'#commit_home'
).
val
();
var
commit_shop
=
$
(
'#commit_shop'
).
val
();
var
comit_name
=
$
(
'#comit_name'
).
val
();
var
params
=
{};
params
.
user_name
=
$
.
trim
(
$
(
'#customer_name'
).
val
());
params
.
start_time
=
$
(
'#start_date'
).
val
();
params
.
end_time
=
$
(
'#end_date'
).
val
();
params
.
income_start_time
=
$
(
'#start_date_booked'
).
val
();
params
.
income_end_time
=
$
(
'#end_date_booked'
).
val
();
params
.
internal_address
=
$
(
'#shop_name'
).
val
();
params
.
user_phone
=
$
(
'#customer_phone'
).
val
();
params
.
id
=
$
(
'#shop_num'
).
val
();
params
.
report_phone
=
$
(
'#applicant_phone'
).
val
();
params
.
report_name
=
$
(
'#applicant_name'
).
val
();
params
.
store_id
=
$
(
"select[name='store_id'] option:selected"
).
val
();
params
.
district_id
=
$
(
"select[name='district_id'] option:selected"
).
val
();
params
.
pay_type
=
$
(
"select[name='maintable_shop_type_2'] option:selected"
).
val
();
params
.
type
=
$
(
"select[name='maintable_shop_type_1'] option:selected"
).
val
();
params
.
agent_name
=
$
(
"#submit_name"
).
val
();
params
.
pageNo
=
follow
.
pageNo
;
params
.
pageSize
=
follow
.
pageSize
;
var
paramsStr
=
"?"
;
if
(
commite_time_start
)
{
params
.
income_start_time
=
commite_time_start
;
paramsStr
+=
"income_start_time="
+
commite_time_start
+
"&"
}
if
(
commite_time_end
)
{
params
.
income_end_time
=
commite_time_end
;
paramsStr
+=
"income_end_time="
+
commite_time_end
+
"&"
}
if
(
into_time_start
)
{
params
.
start_time
=
into_time_start
;
paramsStr
+=
"start_time="
+
into_time_start
+
"&"
}
if
(
into_time_end
)
{
params
.
end_time
=
into_time_end
;
paramsStr
+=
"end_time="
+
into_time_end
+
"&"
}
if
(
maintable_deal_type
)
{
params
.
type
=
maintable_deal_type
;
paramsStr
+=
"type="
+
maintable_deal_type
+
"&"
}
if
(
maintable_pay_type
)
{
params
.
pay_type
=
maintable_pay_type
;
paramsStr
+=
"pay_type="
+
maintable_pay_type
+
"&"
}
if
(
come_from
)
{
params
.
soucre
=
come_from
;
paramsStr
+=
"soucre="
+
come_from
+
"&"
}
if
(
order_id
)
{
params
.
order_id
=
order_id
;
paramsStr
+=
"order_id="
+
order_id
+
"&"
}
if
(
get_id
)
{
params
.
pay_id
=
get_id
;
paramsStr
+=
"pay_id="
+
get_id
+
"&"
}
if
(
report_id
)
{
params
.
bargain_id
=
report_id
;
paramsStr
+=
"bargain_id="
+
report_id
+
"&"
}
if
(
shop_addr
)
{
params
.
internal_address
=
shop_addr
;
paramsStr
+=
"internal_address="
+
shop_addr
+
"&"
}
if
(
shop_id
)
{
params
.
id
=
shop_id
;
paramsStr
+=
"id="
+
shop_id
+
"&"
}
if
(
commit_home
)
{
params
.
district_id
=
commit_home
;
paramsStr
+=
"district_id="
+
commit_home
+
"&"
}
if
(
commit_shop
)
{
params
.
store_id
=
commit_shop
;
paramsStr
+=
"store_id="
+
commit_shop
+
"&"
}
if
(
comit_name
)
{
params
.
agent_name
=
comit_name
;
paramsStr
+=
"agent_name="
+
comit_name
+
"&"
}
if
(
excel
)
{
return
paramsStr
.
substr
(
0
,
paramsStr
.
length
-
1
)
}
else
{
return
params
;
}
},
/**
* 获取表格数据
* @param {Object} no
*/
getList
:
function
(
no
){
var
that
=
receiv
;
that
.
pageNo
=
no
;
var
params
=
that
.
buildSearchParams
(
false
);
params
.
pageNo
=
that
.
pageNo
;
params
.
pageSize
=
that
.
pageSize
;
$
.
ajax
({
type
:
'GET'
,
url
:
'/index/getCollection'
,
...
...
@@ -423,15 +731,15 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
dataType
:
'json'
,
beforeSend
:
function
()
{},
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'get_collection_tpl'
).
innerHTML
);
$
(
"#follow_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
that
.
listData
=
data
.
data
.
list
;
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'receivables_template_tpl'
).
innerHTML
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#money_total"
).
html
(
data
.
data
.
money_total
)
/*分页代码*/
add_page
(
data
.
data
.
total
,
pageNo
,
follow
.
pageSize
,
follow
.
getList
);
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
}
else
{
alert
(
data
[
'msg'
]);
};
...
...
@@ -449,63 +757,83 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
},
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
();
}
}
});
},
// 删除收款记录
delete_collection
:
function
(
params
)
{
$
.
ajax
({
url
:
'/index/updatePayLog'
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'删除成功'
)
}
else
{
alert
(
data
[
'msg'
]);
};
}
});
},
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
);
}
}
});
},
/**
* 收款详情
* @param {Object} id
*/
getMoneyDetail
:
function
(
id
){
var
that
=
receiv
;
console
.
log
(
"get the timmerLine with id = "
+
id
);
var
params
=
{
'pay_id'
:
id
};
$
.
post
(
'/index/getCollectionDetail'
,
params
,
function
(
data
){
console
.
log
(
"12321321321321313213213"
)
console
.
log
(
data
);
that
.
getValueFunction
(
data
.
data
);
},
'json'
)
},
getValueFunction
:
function
(
data
){
var
doc
=
$
(
'#modal-addPic'
);
doc
.
find
(
"#ruzhangId"
).
text
(
data
.
id
);
doc
.
find
(
"#dingdanId"
).
text
(
data
.
order_id
);
doc
.
find
(
"#chengjiaobaogaoId"
).
text
(
data
.
bargain_id
);
doc
.
find
(
"#fangyuanId"
).
text
(
data
.
house_id
);
doc
.
find
(
"#tijiaoren"
).
text
(
data
.
agent_name
);
doc
.
find
(
"#address"
).
text
(
data
.
address
);
doc
.
find
(
"#comit_time"
).
text
(
data
.
create_time
);
doc
.
find
(
"#intoType"
).
text
(
data
.
type
);
doc
.
find
(
"#shopNo"
).
text
(
data
.
house_number
);
doc
.
find
(
"#intoDate"
).
val
(
data
.
income_time
);
doc
.
find
(
"#salePrice"
).
text
(
data
.
price
+
"元"
);
doc
.
find
(
"#intoPrice"
).
val
(
data
.
money
);
doc
.
find
(
"#shouxu"
).
val
(
data
.
transaction_fee
);
doc
.
find
(
"#realPrice"
).
val
(
data
.
real_money
);
doc
.
find
(
"#getPrice"
).
text
(((
data
.
price
-
0
)
*
0.7
)
+
"元"
);
doc
.
find
(
"#morePrice"
).
text
(
data
.
money
-
((
data
.
price
-
0
)
*
0.7
)
+
"元"
);
doc
.
find
(
"#person"
).
val
(
data
.
current_agent_name
);
doc
.
find
(
"#belongT"
).
val
(
data
.
store_name
);
doc
.
find
(
"#payType"
).
val
(
data
.
pay_type
);
doc
.
find
(
"#payNo"
).
val
(
data
.
transfer_name
);
doc
.
find
(
"#running"
).
text
(
data
.
is_open
==
0
?
"是"
:
"否"
);
doc
.
find
(
"#fenhong"
).
val
(
data
.
is_dividend
);
doc
.
find
(
"#comes"
).
text
(
data
.
soucre
);
doc
.
find
(
"#status"
).
text
(
data
.
soucre_id
);
doc
.
find
(
"#lastTime"
).
val
(
data
.
last_transfer_time
);
},
/**
* 调整
* @param {Object} id
*/
changeType
:
function
(
order_id
){
var
that
=
receiv
;
that
.
getShopId
(
order_id
);
},
getShopId
:
function
(
id
){
var
that
=
receiv
;
$
.
get
(
'/index/getBeForNum'
,{
'order_id'
:
id
},
function
(
data
){
$
(
'#shop_id_change'
).
text
(
data
.
data
.
house_number
);
that
.
yetai
=
data
.
data
.
industry_type
;
},
'json'
)
},
/**
* 删除收款记录
* @param {Object} id
*/
deleteTableRow
:
function
(
id
){
var
that
=
receiv
;
console
.
log
(
"delete the row from the table while id = "
+
id
);
var
params
=
{
'pay_id'
:
id
};
$
.
post
(
'/index/delPayLog'
,
params
,
function
(
data
){
console
.
log
(
data
);
that
.
getList
(
1
);
},
'json'
)
}
};
return
follow
;
return
receiv
;
});
\ 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