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
a9170351
Commit
a9170351
authored
Oct 11, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
城市筛选
parent
8747ee8b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
14 deletions
+51
-14
costCheck.html
application/index/view/cost/costCheck.html
+9
-0
costCheck.js
public/resource/js/costCheck.js
+42
-14
No files found.
application/index/view/cost/costCheck.html
View file @
a9170351
...
...
@@ -206,6 +206,15 @@
<input
class=
"form-control btn2 ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"cost_id"
placeholder=
"费用报销ID"
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>
<!--城市-->
<select
class=
"form-control btn4 ld-Marheight"
name=
""
id=
"district_id2_city"
>
<option
value=
""
>
提交人所在城市
</option>
<option
value=
"10001"
>
上海市
</option>
<option
value=
"10002"
>
杭州市
</option>
<option
value=
"10003"
>
深圳市
</option>
<option
value=
"10004"
>
广州市
</option>
<option
value=
"10005"
>
北京市
</option>
</select>
<select
class=
"form-control btn2 ld-Marheight"
id=
"commit_home"
>
<option
value=
""
>
提交人所在部门
</option>
</select>
...
...
public/resource/js/costCheck.js
View file @
a9170351
...
...
@@ -311,22 +311,23 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
document
).
on
(
'click'
,
'#export'
,
function
(
e
){
that
.
exportExcel
();
});
$
(
document
).
on
(
"input"
,
"#district_id2_city"
,
function
()
{
//点击城市
//列表选择城市
that
.
getDistrictList
();
});
//二级联动
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="">全部</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
$
(
'#commit_shop'
).
append
(
_str
)
_doc
.
on
(
'input'
,
'#commit_home'
,
function
()
{
var
_this
=
$
(
this
);
var
_id
=
$
(
'#commit_home'
).
val
();
if
(
_id
&&
_id
!=
'0'
)
{
that
.
getDistrictStoreList
(
_id
,
function
(
_data
)
{
var
_str
=
'<option value="">提交人所在门店</option>'
;
$
.
each
(
_data
,
function
(
i
,
item
)
{
_str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
store_name
+
'</option>'
;
});
}
else
{};
});
$
(
'#commit_shop'
).
html
(
_str
)
});
}
else
{};
});
//点击li 列表消失
...
...
@@ -723,6 +724,32 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}
});
},
//获取城市所在部门
getDistrictList
:
function
(
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrict'
,
type
:
'GET'
,
async
:
true
,
data
:
{
"pageSize"
:
1000
,
"site_id"
:
$
(
'#district_id2_city'
).
val
()
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
var
str
=
'<option value="">提交人所在部门</option>'
;
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
str
+=
'<option value="'
+
item
.
id
+
'">'
+
item
.
district_name
+
'</option>'
;
});
// $('[name=district_id]').html(str);
$
(
'#commit_home'
).
html
(
str
);
$
(
'#commit_shop'
).
html
(
'<option value="">提交人所在门店</option>'
);
}
}
});
},
getDistrictStoreList
:
function
(
id
,
fn
)
{
$
.
ajax
({
url
:
'/index/getDistrictStoreList'
,
...
...
@@ -956,6 +983,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
//收款人 置空
$
(
'#comit_store_pay'
).
val
(
''
);
cost
.
agent_id_store_pay
=
''
;
$
(
'#district_id2_city'
).
val
(
""
);
},
//重置搜索条件
...
...
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