Commit 2dcd286e authored by duxinyuan's avatar duxinyuan

123

parent 944c03a8
...@@ -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 {
......
...@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment