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
75200f79
Commit
75200f79
authored
Dec 20, 2018
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码整理,修改统计功能
parent
00a58a73
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
84 deletions
+16
-84
adjustment.html
application/index/view/finance/adjustment.html
+1
-22
getCollection.html
application/index/view/finance/getCollection.html
+1
-1
adjustment.js
public/resource/js/adjustment.js
+6
-42
getCollection.js
public/resource/js/getCollection.js
+8
-19
No files found.
application/index/view/finance/adjustment.html
View file @
75200f79
...
@@ -319,16 +319,6 @@
...
@@ -319,16 +319,6 @@
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_shop"
>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_shop"
>
<option
value=
""
>
提交人所在门店
</option>
<option
value=
""
>
提交人所在门店
</option>
</select>
</select>
<!--<select class="form-control btn2 ld-Marheight" id="commit_home">
<option value="">提交人所在部门</option>
<option value="0">一部</option>
<option value="1">二部</option>
</select>
<select class="form-control btn2 ld-Marheight" id="commit_shop">
<option value="">提交人所在门店</option>
<option value="0">一店</option>
<option value="1">二店</option>
</select>-->
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"提交人姓名"
type=
"text"
value=
""
>
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_name"
placeholder=
"提交人姓名"
type=
"text"
value=
""
>
<ul
class=
"user-ul"
style=
"display:none"
></ul>
<ul
class=
"user-ul"
style=
"display:none"
></ul>
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_name" placeholder="提交人姓名" type="text" value="">-->
<!--<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_name" placeholder="提交人姓名" type="text" value="">-->
...
@@ -336,7 +326,7 @@
...
@@ -336,7 +326,7 @@
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
style=
"float:left"
>
搜索
</span>
<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>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
style=
"float:left"
>
重置
</span>
<!--<span class="btn btn-info btn3 ld-Marheight" id="export" style="float:left">导出excel</span>-->
<!--<span class="btn btn-info btn3 ld-Marheight" id="export" style="float:left">导出excel</span>-->
<
span
class=
"btn btn-info btn3 ld-Marheight"
id=
"count"
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>
<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>
</form>
</td>
</td>
...
@@ -510,21 +500,10 @@
...
@@ -510,21 +500,10 @@
<span
id=
"after_into_type"
class=
"col-xs-6 ld-Marheight"
></span>
<span
id=
"after_into_type"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
</div>
</div>
<!--<div class="col-xs-12">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">入账金额:</span></strong>
<span id="after_into_price" class="col-xs-6 ld-Marheight"></span>
</div>
</div>-->
</div>
</div>
</div>
</div>
</form>
</form>
</div>
</div>
<!--<div class="modal-footer">
<button type="button btn2" class="btn btn-primary" id="savePayBtn" data-dismiss="modal">
保存
</button>
</div>-->
</div>
</div>
<!-- /.modal-content -->
<!-- /.modal-content -->
</div>
</div>
...
...
application/index/view/finance/getCollection.html
View file @
75200f79
...
@@ -382,7 +382,7 @@
...
@@ -382,7 +382,7 @@
<!--<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="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="export" style="float:left">导出报表</span>-->
<
span
class=
"btn btn-info btn3 ld-Marheight"
id=
"count"
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>
<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>
</form>
</td>
</td>
...
...
public/resource/js/adjustment.js
View file @
75200f79
...
@@ -21,27 +21,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -21,27 +21,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var
that
=
adjustment
;
var
that
=
adjustment
;
var
_doc
=
$
(
document
);
var
_doc
=
$
(
document
);
// $(document).on('click','.btn_choose',function(e){
// console.log(e);
// console.log(e.target.innerHTML);
// var value = e.target.innerHTML ;
// $('.btn-group').find('button.btn-info').addClass("btn-default");
// $('.btn-group').find('button.btn-info').removeClass("btn-info");
// $('.btn-group').find('button').each(function(){
// console.log($(this).context.innerHTML)
// if ($(this).context.innerHTML == value){
// $(this).addClass("btn-info");
// $(this).removeClass("btn-default");
// }
// })
// adjustment.getList(1);
// });
//操作----删除
//操作----删除
$
(
document
).
on
(
'click'
,
'.list_delete'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.list_delete'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
var
id
=
e
.
target
.
dataset
.
id
;
that
.
deleteId
=
id
;
that
.
deleteId
=
id
;
// that.deleteTableRow(id);
// console.log(id);
});
});
$
(
document
).
on
(
'click'
,
'#confirm_delete'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'#confirm_delete'
,
function
(
e
){
var
id
=
that
.
deleteId
;
var
id
=
that
.
deleteId
;
...
@@ -71,13 +54,12 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -71,13 +54,12 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
$
(
document
).
on
(
'click'
,
'.add-pic'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.add-pic'
,
function
(
e
){
var
id
=
e
.
target
.
dataset
.
id
;
var
id
=
e
.
target
.
dataset
.
id
;
that
.
getAdjustmentDetail
(
id
);
that
.
getAdjustmentDetail
(
id
);
console
.
log
(
id
)
});
});
//统计
//统计
$
(
document
).
on
(
'click'
,
'#count'
,
function
(
e
){
//
$(document).on('click','#count',function(e){
// that.countValue();
// that.countValue();
$
(
'#money_total'
).
text
((
that
.
moneyTotal
-
0
>
0
)
?
(
that
.
moneyTotal
+
"元"
):
"0元"
)
//
$('#money_total').text((that.moneyTotal-0 > 0) ? (that.moneyTotal+"元"): "0元" )
});
//
});
//二级联动
//二级联动
that
.
getDistrict
(
function
()
{
that
.
getDistrict
(
function
()
{
...
@@ -155,7 +137,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -155,7 +137,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
addphone
:
function
(
obj
)
{
//新增客户 input赋值
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
adjustment
;
var
that
=
adjustment
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
console
.
log
(
user_ht
.
length
);
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
html
(
''
);
...
@@ -210,12 +191,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -210,12 +191,10 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
countValue
:
function
(){
countValue
:
function
(){
var
that
=
adjustment
;
var
that
=
adjustment
;
var
data
=
that
.
listData
;
var
data
=
that
.
listData
;
console
.
log
(
data
);
var
value
=
0
;
var
value
=
0
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
value
=
value
+
(
data
[
i
].
money
-
0
);
value
=
value
+
(
data
[
i
].
money
-
0
);
}
}
console
.
log
(
value
);
$
(
'#money_total'
).
text
(
value
+
"元"
);
$
(
'#money_total'
).
text
(
value
+
"元"
);
},
},
...
@@ -223,7 +202,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -223,7 +202,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var
that
=
adjustment
;
var
that
=
adjustment
;
$
.
get
(
'/index/getAdjustmentDetail'
,{
'id'
:
id
},
function
(
data
){
$
.
get
(
'/index/getAdjustmentDetail'
,{
'id'
:
id
},
function
(
data
){
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
console
.
log
(
data
.
data
);
that
.
setValue
(
data
.
data
);
that
.
setValue
(
data
.
data
);
}
else
{
}
else
{
alert
(
data
.
msg
);
alert
(
data
.
msg
);
...
@@ -235,7 +213,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -235,7 +213,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var
that
=
adjustment
;
var
that
=
adjustment
;
$
(
'#change_id'
).
text
(
data
.
id
);
$
(
'#change_id'
).
text
(
data
.
id
);
// $('#change_price').text("");
// $('#change_price').text("");
console
.
log
(
data
.
adjustment_old
)
$
(
'#befor_into_id'
).
text
(
data
.
adjustment_old
[
0
].
id
);
$
(
'#befor_into_id'
).
text
(
data
.
adjustment_old
[
0
].
id
);
$
(
'#befor_order_id'
).
text
(
data
.
adjustment_old
[
0
].
order_id
);
$
(
'#befor_order_id'
).
text
(
data
.
adjustment_old
[
0
].
order_id
);
$
(
'#befor_house_id'
).
text
(
data
.
adjustment_old
[
0
].
house_id
);
$
(
'#befor_house_id'
).
text
(
data
.
adjustment_old
[
0
].
house_id
);
...
@@ -260,7 +237,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -260,7 +237,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var
that
=
adjustment
;
var
that
=
adjustment
;
that
.
pageNo
=
no
;
that
.
pageNo
=
no
;
var
params
=
that
.
buildSearchParams
();
var
params
=
that
.
buildSearchParams
();
console
.
log
(
params
)
;
params
.
pageNo
=
that
.
pageNo
;
params
.
pageNo
=
that
.
pageNo
;
params
.
pageSize
=
that
.
pageSize
;
params
.
pageSize
=
that
.
pageSize
;
$
.
get
(
'/index/adjustment'
,
params
,
function
(
data
){
$
.
get
(
'/index/adjustment'
,
params
,
function
(
data
){
...
@@ -270,7 +246,9 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -270,7 +246,9 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
var
temp
=
document
.
getElementById
(
'adjustment_template_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'adjustment_template_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
that
.
moneyTotal
=
data
.
data
.
money_total
;
// that.moneyTotal = data.data.money_total;
$
(
'#money_total'
).
text
((
data
.
data
.
money_total
-
0
>
0
)
?
(
data
.
data
.
money_total
+
"元"
):
"0元"
)
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
}
else
{
}
else
{
...
@@ -280,19 +258,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -280,19 +258,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
alert
(
'数据错误'
);
alert
(
'数据错误'
);
};
};
},
'json'
);
},
'json'
);
//功能模拟
// var aaa = [{'create_time' : '12','income_time' : '13','report_agent_name' : '14','report_agent_phone' : '15','store_name' : '16','money' : '17',
// 'real_money' : '18','type' : '19','pay_type' : '10','internal_address' : '21','house_number' : '31','aaa' : '41','bbb' : '51','id' : '61'},{
// 'create_time' : '12','income_time' : '13','report_agent_name' : '14','report_agent_phone' : '15','store_name' : '16','money' : '17',
// 'real_money' : '18','type' : '19','pay_type' : '10','internal_address' : '21','house_number' : '31','aaa' : '41','bbb' : '51','id' : '80'}]
// var temp = document.getElementById('adjustment_template_tpl').innerHTML;
// var doTtmpl = doT.template(temp);
// $("#order_list").html(doTtmpl(aaa));
// that.setValue();
//******************************************************************************
},
},
/**
/**
...
@@ -401,7 +366,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
...
@@ -401,7 +366,6 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
*/
*/
deleteTableRow
:
function
(
id
){
deleteTableRow
:
function
(
id
){
var
that
=
adjustment
;
var
that
=
adjustment
;
console
.
log
(
"delete the row from the table while id = "
+
id
);
var
params
=
{
var
params
=
{
'id'
:
id
'id'
:
id
};
};
...
...
public/resource/js/getCollection.js
View file @
75200f79
...
@@ -33,11 +33,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -33,11 +33,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var
that
=
receiv
;
var
that
=
receiv
;
var
_doc
=
$
(
document
);
var
_doc
=
$
(
document
);
//绑定全部点击事件,判断当前点击的位置是否为制定模块 ,作用为调整功能
$
(
document
).
bind
(
"click"
,
function
(
e
){
$
(
document
).
bind
(
"click"
,
function
(
e
){
//id为menu的是菜单,id为open的是打开菜单的按钮
//id为menu的是菜单,id为open的是打开菜单的按钮
console
.
log
(
"12312321321"
);
console
.
log
(
e
);
if
(
e
.
target
.
dataset
.
status
==
100
){
if
(
e
.
target
.
dataset
.
status
==
100
){
$
(
'.reportArea'
).
hide
();
$
(
'.reportArea'
).
hide
();
$
(
'#report_id_change'
).
val
(
""
);
$
(
'#report_id_change'
).
val
(
""
);
...
@@ -49,9 +47,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -49,9 +47,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$
(
'.reportArea'
).
hide
();
$
(
'.reportArea'
).
hide
();
}
}
})
})
// 初始化界面
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
$
(
'.pic-con1'
).
hide
();
$
(
'.tit_con'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(
e
){
$
(
'.tit_con'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(
e
){
$
(
this
).
parent
(
'div'
).
find
(
'h4.active'
).
removeClass
(
"active"
);
$
(
this
).
parent
(
'div'
).
find
(
'h4.active'
).
removeClass
(
"active"
);
$
(
this
).
addClass
(
"active"
);
$
(
this
).
addClass
(
"active"
);
...
@@ -126,7 +126,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -126,7 +126,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
};
console
.
log
(
imgname
.
join
(
','
));
var
id_pic
=
that
.
house_fatherid
>
0
?
that
.
house_fatherid
:
that
.
house_id
;
var
id_pic
=
that
.
house_fatherid
>
0
?
that
.
house_fatherid
:
that
.
house_id
;
var
_data
=
{
var
_data
=
{
img_id
:
id_pic
img_id
:
id_pic
...
@@ -181,7 +180,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -181,7 +180,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
that
.
getMoneyDetail
(
id
);
that
.
getMoneyDetail
(
id
);
that
.
house_fatherid
=
id
;
that
.
house_fatherid
=
id
;
that
.
getaddPicList
(
id
);
that
.
getaddPicList
(
id
);
console
.
log
(
id
)
});
});
//操作---调整
//操作---调整
$
(
document
).
on
(
'click'
,
'.money_change'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.money_change'
,
function
(
e
){
...
@@ -220,7 +218,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -220,7 +218,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$
(
document
).
on
(
'click'
,
'#confirm_delete'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'#confirm_delete'
,
function
(
e
){
var
id
=
that
.
deleteId
;
var
id
=
that
.
deleteId
;
that
.
deleteTableRow
(
id
);
that
.
deleteTableRow
(
id
);
console
.
log
(
id
)
});
});
//搜索
//搜索
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
...
@@ -237,7 +234,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -237,7 +234,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
//统计
//统计
$
(
document
).
on
(
'click'
,
'#count'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'#count'
,
function
(
e
){
//that.countValue();
//that.countValue();
$
(
'#money_total'
).
text
((
that
.
totalCount
-
0
>
0
)
?
(
that
.
totalCount
+
"元"
):
"0元"
)
});
});
//收款详情
//收款详情
$
(
"#modal-addPic"
).
on
(
"shown.bs.modal"
,
function
(
event
){
$
(
"#modal-addPic"
).
on
(
"shown.bs.modal"
,
function
(
event
){
...
@@ -285,7 +282,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -285,7 +282,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
});
});
$
(
'#change_type'
).
change
(
function
(
e
){
$
(
'#change_type'
).
change
(
function
(
e
){
console
.
log
(
$
(
'#change_type option:selected'
).
text
());
var
val
=
$
(
'#change_type option:selected'
).
text
();
var
val
=
$
(
'#change_type option:selected'
).
text
();
that
.
change_show_hide
(
val
);
that
.
change_show_hide
(
val
);
});
});
...
@@ -409,7 +405,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -409,7 +405,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
addphone
:
function
(
obj
)
{
//新增客户 input赋值
addphone
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
receiv
;
var
that
=
receiv
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
var
user_ht
=
$
(
obj
).
html
()
+
''
;
console
.
log
(
user_ht
.
length
);
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
var
user_ht_str
=
user_ht
.
substring
(
0
,
user_ht
.
length
-
3
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
"#comit_name"
).
val
(
user_ht_str
);
$
(
".user-ul"
).
html
(
''
);
$
(
".user-ul"
).
html
(
''
);
...
@@ -563,7 +558,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -563,7 +558,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="intoIdBuild" data-house_number="'
+
item
.
house_number
+
'"data-order_id="'
+
item
.
order_id
+
'" data-addr="'
+
item
.
house_address
+
'" data-id="'
+
item
.
report_id
user_ul
+=
'<li class="intoIdBuild" data-house_number="'
+
item
.
house_number
+
'"data-order_id="'
+
item
.
order_id
+
'" data-addr="'
+
item
.
house_address
+
'" data-id="'
+
item
.
report_id
+
'" data-house_id="'
+
item
.
house_id
+
'" data-agent_id="'
+
item
.
report_agent_id
+
'" data-agent_name="'
+
item
.
report_agent_name
+
'" data-order_no="'
+
item
.
order_no
+
'" data-house_id="'
+
item
.
house_id
+
'" data-agent_id="'
+
item
.
report_agent_id
+
'" data-agent_name="'
+
item
.
report_agent_name
+
'" data-order_no="'
+
item
.
order_no
+
'">'
+
item
.
house_address
+
',商铺ID
:+'
+
item
.
house_id
+
',带看ID'
+
item
.
report_id
+
',客户编号
'
+
item
.
user_id
+
'</li>'
;
+
'">'
+
item
.
house_address
+
',商铺ID
:'
+
item
.
house_id
+
',带看ID:'
+
item
.
report_id
+
',客户编号:
'
+
item
.
user_id
+
'</li>'
;
});
});
$
(
'.intoIdArea'
).
show
();
$
(
'.intoIdArea'
).
show
();
$
(
".intoIdArea"
).
html
(
user_ul
);
$
(
".intoIdArea"
).
html
(
user_ul
);
...
@@ -622,12 +617,10 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -622,12 +617,10 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
countValue
:
function
(){
countValue
:
function
(){
var
that
=
receiv
;
var
that
=
receiv
;
var
data
=
that
.
listData
;
var
data
=
that
.
listData
;
console
.
log
(
data
);
var
value
=
0
;
var
value
=
0
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
){
value
=
value
+
(
data
[
i
].
money
-
0
);
value
=
value
+
(
data
[
i
].
money
-
0
);
}
}
console
.
log
(
value
);
$
(
'#money_total'
).
text
(
value
+
"元"
);
$
(
'#money_total'
).
text
(
value
+
"元"
);
},
},
...
@@ -701,7 +694,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -701,7 +694,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
saveChange
:
function
(
no
){
saveChange
:
function
(
no
){
var
that
=
receiv
;
var
that
=
receiv
;
console
.
log
(
that
);
if
(
that
.
pay_id
-
0
<
1
){
if
(
that
.
pay_id
-
0
<
1
){
alert
(
"参数错误!"
);
alert
(
"参数错误!"
);
}
}
...
@@ -797,7 +789,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -797,7 +789,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
saveRecervables
:
function
(){
saveRecervables
:
function
(){
var
that
=
receiv
;
var
that
=
receiv
;
var
params
=
that
.
recervablesParams
();
var
params
=
that
.
recervablesParams
();
console
.
log
(
params
);
$
.
post
(
'/index/getCollectionEdit'
,
params
,
function
(
data
){
$
.
post
(
'/index/getCollectionEdit'
,
params
,
function
(
data
){
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
that
.
getList
(
that
.
pageNo
);
that
.
getList
(
that
.
pageNo
);
...
@@ -996,12 +987,12 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -996,12 +987,12 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
that
.
totalCount
=
data
.
data
.
money_total
;
//
that.totalCount = data.data.money_total;
that
.
listData
=
data
.
data
.
list
;
that
.
listData
=
data
.
data
.
list
;
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'receivables_template_tpl'
).
innerHTML
);
var
doTtmpl
=
doT
.
template
(
document
.
getElementById
(
'receivables_template_tpl'
).
innerHTML
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
// $("#money_total").html(data.data.money_total)
// $("#money_total").html(data.data.money_total)
$
(
'#money_total'
).
text
((
data
.
data
.
money_total
-
0
>
0
)
?
(
data
.
data
.
money_total
+
"元"
):
"0元"
)
/*分页代码*/
/*分页代码*/
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
add_page
(
data
.
data
.
total
,
no
,
that
.
pageSize
,
that
.
getList
);
}
else
{
}
else
{
...
@@ -1028,7 +1019,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -1028,7 +1019,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
*/
*/
getMoneyDetail
:
function
(
id
){
getMoneyDetail
:
function
(
id
){
var
that
=
receiv
;
var
that
=
receiv
;
console
.
log
(
"get the timmerLine with id = "
+
id
);
var
params
=
{
var
params
=
{
'pay_id'
:
id
'pay_id'
:
id
};
};
...
@@ -1144,7 +1134,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
...
@@ -1144,7 +1134,6 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
*/
*/
deleteTableRow
:
function
(
id
){
deleteTableRow
:
function
(
id
){
var
that
=
receiv
;
var
that
=
receiv
;
console
.
log
(
"delete the row from the table while id = "
+
id
);
var
params
=
{
var
params
=
{
'pay_id'
:
id
'pay_id'
:
id
};
};
...
...
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