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
2dcd286e
Commit
2dcd286e
authored
Jul 25, 2019
by
duxinyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
944c03a8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
3 deletions
+32
-3
costParamsmeters.js
public/resource/js/costParamsmeters.js
+31
-2
costParamsmeters_template_tpl.html
public/resource/template/costParamsmeters_template_tpl.html
+1
-1
No files found.
public/resource/js/costParamsmeters.js
View file @
2dcd286e
...
@@ -117,14 +117,43 @@ define(['doT', 'text!temp/costParamsmeters_template_tpl.html', 'css!style/home.c
...
@@ -117,14 +117,43 @@ define(['doT', 'text!temp/costParamsmeters_template_tpl.html', 'css!style/home.c
var
params
=
{}
var
params
=
{}
params
.
setting_date
=
that
.
getDate
();
params
.
setting_date
=
that
.
getDate
();
$
.
get
(
'/index/getCompanyCostParameterList'
,
params
,
function
(
data
){
$
.
get
(
'/index/getCompanyCostParameterList'
,
params
,
function
(
data
){
console
.
log
(
data
);
//
console.log(data);
if
(
typeof
data
===
'object'
)
{
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
$
(
'.chooseAll'
).
prop
(
"checked"
,
""
);
$
(
'.chooseAll'
).
prop
(
"checked"
,
""
);
that
.
listData
=
data
.
data
.
list
;
that
.
listData
=
data
.
data
.
list
;
var
temp
=
document
.
getElementById
(
'costParamsmeters_template_tpl'
).
innerHTML
;
var
temp
=
document
.
getElementById
(
'costParamsmeters_template_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
let
datas
=
data
.
data
.
list
;
//前端修改获取的json数组,内部添加描述,模板设置了readOnly,如果后期需要修改去掉readObly
datas
.
map
((
obj
)
=>
{
console
.
log
(
obj
.
type
)
switch
(
obj
.
type
-
0
){
case
0
:
//上海总部
obj
.
desc
=
'test1'
;
break
;
case
1
:
//杭州总部
obj
.
desc
=
'test12'
;
break
;
case
2
:
//深圳总部
obj
.
desc
=
'test123'
;
break
;
case
3
:
//广州总部
obj
.
desc
=
'test1234'
;
break
;
case
4
:
//北京总部
obj
.
desc
=
'test12345'
;
break
;
case
5
:
//同联发展基金
obj
.
desc
=
'test123456'
;
break
;
case
6
:
//总经理基薪
obj
.
desc
=
'test1234567'
;
break
;
}
});
console
.
log
(
datas
)
$
(
"#order_list"
).
html
(
doTtmpl
(
datas
));
/*分页代码*/
/*分页代码*/
// add_page(data.data.total, no, that.pageSize,that.getList);
// add_page(data.data.total, no, that.pageSize,that.getList);
}
else
{
}
else
{
...
...
public/resource/template/costParamsmeters_template_tpl.html
View file @
2dcd286e
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
<
td
>--<
/td
>
<
td
>--<
/td
>
[
%
}
%
]
[
%
}
%
]
<
td
>
<
td
>
<
textarea
placeholder
=
"点击输入"
style
=
"width:100%;height:auto;border:none;background-color:rgba(0,0,0,0);overflow-x:hidden;resize:none;"
type
=
"num"
value
=
"[%= it[item]['id'] %]"
style
=
""
>
<
/textarea
>
<
textarea
readonly
=
"readonly"
placeholder
=
"点击输入"
style
=
"outline:none;width:100%;height:auto;border:none;background-color:rgba(0,0,0,0);overflow-x:hidden;resize:none;"
>
[
%=
it
[
item
][
'desc'
]
%
]
<
/textarea
>
<
/div>
<
/div>
<
/td
>
<
/td
>
<
/tr
>
<
/tr
>
...
...
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