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
b86ac67e
Commit
b86ac67e
authored
Oct 09, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用报销审核
parent
d8a19696
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
195 additions
and
6 deletions
+195
-6
publicCostDetails.html
application/index/view/cost/publicCostDetails.html
+42
-1
publicCostDetails.js
public/resource/js/publicCostDetails.js
+153
-5
No files found.
application/index/view/cost/publicCostDetails.html
View file @
b86ac67e
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"publicCostDetails"
/>
<style>
.user-ul-office
,
.user-ul-store
{
float
:
right
;
text-align
:
center
;
position
:
relative
;
overflow-y
:
scroll
;
height
:
100px
;
left
:
0px
;
width
:
100%
;
line-height
:
30px
;
}
.user-ul-office
,
.user-ul-store
{
float
:
right
;
position
:
relative
;
overflow-y
:
scroll
;
height
:
100px
;
left
:
8px
;
width
:
100%
;
line-height
:
30px
;
}
.user-ul-office
li
,
.user-ul-store
li
{
list-style
:
none
;
line-height
:
20px
;
font-size
:
12px
;
}
.user-ul-store-pay
{
float
:
right
;
position
:
relative
;
...
...
@@ -194,7 +218,7 @@
<option
value=
"10004"
class=
"choose_siteID_add"
>
广州
</option>
<option
value=
"10005"
class=
"choose_siteID_add"
>
北京
</option>
<!--门店独有成本类型-->
<option
value=
"501"
class=
"choose_store"
>
家庭基金报销
</option>
<option
value=
"501"
class=
"choose_store
_add
"
>
家庭基金报销
</option>
<option
value=
"506"
class=
"choose_store_add"
>
区域经理基本工资
</option>
<option
value=
"504"
class=
"choose_store_add"
>
区域秘书基薪
</option>
<option
value=
"505"
class=
"choose_store_add"
>
招聘成本
</option>
...
...
@@ -301,6 +325,23 @@
</div>
</div>
<!--编辑为 办公室 门店时-->
<div
class=
"form-group form-group-bottom col-sm-6 addOffice"
style=
"display: none;"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
选择费用承担办公室:
</label>
<div
class=
"col-sm-8"
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_office"
placeholder=
"请输入办公室地址"
type=
"text"
value=
""
>
<ul
class=
"user-ul-office"
style=
"display:none"
></ul>
</div>
</div>
<div
class=
"form-group form-group-bottom col-sm-6 addStore"
style=
"display: none;"
>
<label
class=
"col-sm-4 control-label"
>
选择费用承担门店:
</label>
<div
class=
"col-sm-8"
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_store"
placeholder=
"请输入门店名称"
type=
"text"
value=
""
>
<ul
class=
"user-ul-store"
style=
"display:none"
></ul>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-12"
>
<div
class=
"form-group"
>
...
...
public/resource/js/publicCostDetails.js
View file @
b86ac67e
...
...
@@ -12,6 +12,11 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
main_index
:
''
,
agent_id
:
''
,
//编辑费用的经纪人id
agent_id_store_pay
:
''
,
//收款人
agent_id_office
:
''
,
agent_id_store
:
''
,
agent_site_office
:
''
,
addOffice
:
0
,
addStore
:
0
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
...
...
@@ -49,7 +54,34 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
that
.
search_store_pay
();
}
});
//办公室搜索
$
(
document
).
delegate
(
".addphoneOffice"
,
"click"
,
function
()
{
that
.
addphoneOffice
(
this
);
});
$
(
document
).
on
(
"input"
,
"#comit_office"
,
function
()
{
if
(
$
(
"#comit_office"
).
val
()
==
''
)
{
that
.
agent_id_office
=
''
;
that
.
agent_site_office
=
''
;
$
(
".user-ul-office"
).
html
(
''
);
}
else
{
that
.
search_office
();
}
});
//门店搜索
$
(
document
).
delegate
(
".addphoneStore"
,
"click"
,
function
()
{
that
.
addphoneStore
(
this
);
});
$
(
document
).
on
(
"input"
,
"#comit_store"
,
function
()
{
if
(
$
(
"#comit_name_store"
).
val
()
==
''
)
{
that
.
agent_id_store
=
''
;
that
.
agent_site_office
=
''
;
$
(
".user-ul-store"
).
html
(
''
);
}
else
{
that
.
search_store
();
}
});
//编辑 费用类型切换
$
(
"#payType"
).
change
(
function
()
{
$
(
"#payItem"
).
val
(
''
);
//置空费用项目
...
...
@@ -59,6 +91,11 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.no_cost_add'
).
hide
();
$
(
'.addOffice'
).
show
();
$
(
'.addStore'
).
hide
();
cost
.
addOffice
=
1
;
cost
.
addStore
=
0
;
}
else
if
(
$
(
'#payType'
).
val
()
==
2
){
//总部
...
...
@@ -67,7 +104,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.no_cost_add'
).
hide
();
$
(
'.addOffice'
).
hide
();
$
(
'.addStore'
).
hide
();
cost
.
addOffice
=
0
;
cost
.
addStore
=
0
;
}
else
if
(
$
(
'#payType'
).
val
()
==
3
){
//分部
$
(
'.choose_office_add'
).
hide
();
...
...
@@ -75,7 +115,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
'.choose_siteID_add'
).
show
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.no_cost_add'
).
hide
();
$
(
'.addOffice'
).
hide
();
$
(
'.addStore'
).
hide
();
cost
.
addOffice
=
0
;
cost
.
addStore
=
0
;
}
else
if
(
$
(
'#payType'
).
val
()
==
5
){
//门店
$
(
'.choose_office_add'
).
hide
();
...
...
@@ -83,6 +126,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
show
();
$
(
'.no_cost_add'
).
hide
();
$
(
'.addOffice'
).
hide
();
$
(
'.addStore'
).
show
();
cost
.
addOffice
=
0
;
cost
.
addStore
=
1
;
}
else
if
(
$
(
'#payType'
).
val
()
==
6
){
//不计入成本
$
(
'.choose_office_add'
).
hide
();
...
...
@@ -90,7 +137,10 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.no_cost_add'
).
show
();
$
(
'.addOffice'
).
hide
();
$
(
'.addStore'
).
hide
();
cost
.
addOffice
=
0
;
cost
.
addStore
=
0
;
};
});
//编辑报销 上传图片
...
...
@@ -465,6 +515,81 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}
});
},
search_office
:
function
()
{
//搜索办公室
$
.
ajax
({
url
:
'/index/getOfficeList'
,
type
:
'POST'
,
async
:
true
,
data
:
{
"pageNo"
:
1
,
"pageSize"
:
100
,
"office_address"
:
$
(
"#comit_office"
).
val
(),
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
if
(
data
.
data
.
list
){
$
.
each
(
data
.
data
.
list
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphoneOffice" data-site="'
+
item
.
site_id
+
'" data-id="'
+
item
.
id
+
'">'
+
item
.
office_address
+
';-ID:'
+
item
.
id
+
'</li>'
;
});
}
$
(
".user-ul-office"
).
html
(
user_ul
);
$
(
".user-ul-office"
).
show
();
}
else
{
// alert(data.msg);
}
}
});
},
search_store
:
function
()
{
//搜索门店
$
.
ajax
({
url
:
'/index/getStoreOffice'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"store_name"
:
$
(
"#comit_store"
).
val
(),
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
var
user_ul
=
""
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
user_ul
+=
'<li class="addphoneStore" data-site="'
+
item
.
site_id
+
'" data-id="'
+
item
.
id
+
'">'
+
item
.
store_name
+
';-ID:'
+
item
.
id
+
'</li>'
;
});
$
(
".user-ul-store"
).
html
(
user_ul
);
$
(
".user-ul-store"
).
show
();
}
else
{
// alert(data.msg);
}
}
});
},
//将li里的值 赋给input(办公室)
addphoneOffice
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
cost
;
var
user_ht
=
$
(
obj
).
html
();
$
(
"#comit_office"
).
val
(
user_ht
);
$
(
".user-ul-office"
).
html
(
''
);
$
(
".user-ul-office"
).
hide
();
that
.
agent_id_office
=
$
(
obj
).
attr
(
"data-id"
);
that
.
agent_site_office
=
$
(
obj
).
attr
(
"data-site"
);
},
//将li里的值 赋给input(门店)
addphoneStore
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
cost
;
var
user_ht
=
$
(
obj
).
html
();
$
(
"#comit_store"
).
val
(
user_ht
);
$
(
".user-ul-store"
).
html
(
''
);
$
(
".user-ul-store"
).
hide
();
that
.
agent_id_store
=
$
(
obj
).
attr
(
"data-id"
);
that
.
agent_site_office
=
$
(
obj
).
attr
(
"data-site"
);
},
//收款人 编辑报销
search_store_pay
:
function
()
{
//手机号新增客户
...
...
@@ -607,6 +732,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
alert
(
'请填写收款人'
);
return
;
}
params
.
card_name
=
$
(
'#card_name'
).
val
();
params
.
bank
=
$
(
'#bank'
).
val
();
params
.
card_no
=
$
(
'#card_no'
).
val
();
...
...
@@ -615,7 +741,29 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
params
.
agent_id
=
cost
.
agent_id
;
params
.
store_id
=
cost
.
store_id
;
params
.
payee_agent_id
=
cost
.
agent_id_store_pay
;
//收款人
//编辑为办公室 或者 门店成本
if
(
cost
.
addOffice
){
if
(
$
(
'#comit_office'
).
val
()){
params
.
office_id
=
cost
.
agent_id_office
;
params
.
site_id
=
cost
.
agent_site_office
;
//办公室所在城市
}
else
{
alert
(
"请选择办公室地址"
);
return
;
}
};
if
(
cost
.
addStore
){
if
(
$
(
'#comit_store'
).
val
()){
params
.
store_id
=
cost
.
agent_id_store
;
params
.
site_id
=
cost
.
agent_site_office
;
//办公室所在城市
}
else
{
alert
(
"请选择门店地址"
);
return
;
}
}
// params.office_id = cost.office_id;
$
.
ajax
({
...
...
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