| | |
| | | var str = this.mol+'/'+this.den;
|
| | | this.ele.text(str)
|
| | | }
|
| | | }; |
| | | };
|
| | |
|
| | |
|
| | | //获取电池品牌列表
|
| | | function getBattProducers() {
|
| | | let producers = [];
|
| | | // 请求后台查询电池品牌
|
| | | $.ajax({
|
| | | type: 'post'
|
| | | ,async: false
|
| | | ,url: 'BattInfAction!serchByBattProducer'
|
| | | ,data: null
|
| | | ,dataType: 'json'
|
| | | ,success: function(res) {
|
| | | let rs = JSON.parse(res.result);
|
| | | // 判断查询结果
|
| | | if(rs.code == 1) {
|
| | | let data = rs.data;
|
| | | // 遍历查询结果
|
| | | for(let i=0; i<data.length; i++) {
|
| | | let _data = data[i];
|
| | | if(_data.BattProducer) { // 处理为空的品牌
|
| | | producers.push(_data.BattProducer);
|
| | | }
|
| | | }
|
| | | producers.push('其他');
|
| | | }
|
| | | }
|
| | | ,complete: function() {
|
| | | |
| | | }
|
| | | });
|
| | | |
| | | return producers;
|
| | | } |