浏览代码

电缆分段

[user3] 3 年之前
父节点
当前提交
e66ea275ff

+ 8 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/mapper/PickIngMapper.java

@@ -8,6 +8,8 @@ import com.jeeplus.core.persistence.annotation.MyBatisMapper;
 import com.jeeplus.modules.sg.audit.information.entity.Information;
 import com.jeeplus.modules.sg.managementcenter.activiti.entity.Construction;
 import com.jeeplus.modules.sg.picking.activiti.entity.*;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionData;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionInfo;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageInfo;
 import com.jeeplus.modules.sys.entity.User;
 import org.apache.ibatis.annotations.Param;
@@ -100,5 +102,11 @@ public interface PickIngMapper extends BaseMapper<PickIng> {
      * @return
      */
     List<VoltageInfo> getListByTheClassName(PickIng pickIng);
+    /**
+     * 根据类型名称查询数据
+     * @param pickIng
+     * @return
+     */
+    List<CableSectionData> getListCableByTheClassName(PickIng pickIng);
 
 }

+ 27 - 0
src/main/java/com/jeeplus/modules/sg/picking/activiti/mapper/xml/PickIngMapper.xml

@@ -459,4 +459,31 @@
         </where>
         order by md_big_sort,md_the_sort,md_small_sort
     </select>
+    <select id="getListCableByTheClassName" resultType="com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionData">
+        SELECT
+        a.id as "id",
+        (CASE a.md_small_class
+        WHEN '3×400电缆' THEN
+        'YJV22-3×400mm²'
+        WHEN '3×120电缆' THEN
+        'YJV22-3×120mm²'
+        WHEN '3×300电缆' THEN
+        'YJV22-3×300mm²'
+        WHEN '3×240电缆' THEN
+        'YJV22-3×240mm²'
+        WHEN '3×70电缆' THEN
+        'YJV22-3×70mm²'
+        ELSE a.md_small_class END) as "voltageName"
+        FROM md_module_block a
+        <where>
+            md_version = (select id from md_module_block_version where versionName = #{version})
+            <if test="mdSmallName != null and mdSmallName != ''">
+                AND a.md_small_class in
+                <foreach collection="mdSmallName" index="index" item="item" open="(" separator="," close=")">
+                    #{item}
+                </foreach>
+            </if>
+        </where>
+        order by md_big_sort,md_the_sort,md_small_sort
+    </select>
 </mapper>

+ 177 - 0
src/main/java/com/jeeplus/modules/sg/raiseCapitalDesign/entity/CableSectionData.java

@@ -0,0 +1,177 @@
+package com.jeeplus.modules.sg.raiseCapitalDesign.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+import java.util.List;
+
+/**
+ * @create: 2021-08-10 16:34
+ **/
+public class CableSectionData{
+    private String uuid;
+    private String id;  //sql查询id
+
+    private List<CableSectionInfo> cableFourHundredList;    //YJV22-3×400mm²
+    private List<CableSectionInfo> cableHundredAndTwentyList;   //YJV22-3×120mm²
+    private List<CableSectionInfo> cableThreeHundredList;   //YJV22-3×300mm²
+    private List<CableSectionInfo> cableTwoHundredFortyList;    //YJV22-3×240mm²
+    private List<CableSectionInfo> cableSeventyList;       //YJV22-3×70mm²
+    //总长
+    private String cableFourHundredListTotal;
+    private String cableHundredAndTwentyListTotal;
+    private String cableThreeHundredListTotal;
+    private String cableTwoHundredFortyListTotal;
+    private String cableSeventyListTotal;
+    private String voltageName;         //名称
+    // id
+    private String cableFourHundredId;
+    private String cableHundredAndTwentyId;
+    private String cableThreeHundredId;
+    private String cableTwoHundredFortyId;
+    private String cableSeventyId;
+
+
+    public String getUuid() {
+        return uuid;
+    }
+
+    public void setUuid(String uuid) {
+        this.uuid = uuid;
+    }
+
+    public String getId() {
+        return id;
+    }
+
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public List<CableSectionInfo> getCableFourHundredList() {
+        return cableFourHundredList;
+    }
+
+    public void setCableFourHundredList(List<CableSectionInfo> cableFourHundredList) {
+        this.cableFourHundredList = cableFourHundredList;
+    }
+
+    public List<CableSectionInfo> getCableHundredAndTwentyList() {
+        return cableHundredAndTwentyList;
+    }
+
+    public void setCableHundredAndTwentyList(List<CableSectionInfo> cableHundredAndTwentyList) {
+        this.cableHundredAndTwentyList = cableHundredAndTwentyList;
+    }
+
+    public List<CableSectionInfo> getCableThreeHundredList() {
+        return cableThreeHundredList;
+    }
+
+    public void setCableThreeHundredList(List<CableSectionInfo> cableThreeHundredList) {
+        this.cableThreeHundredList = cableThreeHundredList;
+    }
+
+    public List<CableSectionInfo> getCableTwoHundredFortyList() {
+        return cableTwoHundredFortyList;
+    }
+
+    public void setCableTwoHundredFortyList(List<CableSectionInfo> cableTwoHundredFortyList) {
+        this.cableTwoHundredFortyList = cableTwoHundredFortyList;
+    }
+
+    public List<CableSectionInfo> getCableSeventyList() {
+        return cableSeventyList;
+    }
+
+    public void setCableSeventyList(List<CableSectionInfo> cableSeventyList) {
+        this.cableSeventyList = cableSeventyList;
+    }
+
+    public String getCableHundredAndTwentyListTotal() {
+        return cableHundredAndTwentyListTotal;
+    }
+
+    public void setCableHundredAndTwentyListTotal(String cableHundredAndTwentyListTotal) {
+        this.cableHundredAndTwentyListTotal = cableHundredAndTwentyListTotal;
+    }
+
+    public String getCableThreeHundredListTotal() {
+        return cableThreeHundredListTotal;
+    }
+
+    public void setCableThreeHundredListTotal(String cableThreeHundredListTotal) {
+        this.cableThreeHundredListTotal = cableThreeHundredListTotal;
+    }
+
+    public String getCableTwoHundredFortyListTotal() {
+        return cableTwoHundredFortyListTotal;
+    }
+
+    public void setCableTwoHundredFortyListTotal(String cableTwoHundredFortyListTotal) {
+        this.cableTwoHundredFortyListTotal = cableTwoHundredFortyListTotal;
+    }
+
+    public String getCableSeventyListTotal() {
+        return cableSeventyListTotal;
+    }
+
+    public void setCableSeventyListTotal(String cableSeventyListTotal) {
+        this.cableSeventyListTotal = cableSeventyListTotal;
+    }
+
+    public String getVoltageName() {
+        return voltageName;
+    }
+
+    public void setVoltageName(String voltageName) {
+        this.voltageName = voltageName;
+    }
+
+    public String getCableFourHundredListTotal() {
+        return cableFourHundredListTotal;
+    }
+
+    public void setCableFourHundredListTotal(String cableFourHundredListTotal) {
+        this.cableFourHundredListTotal = cableFourHundredListTotal;
+    }
+
+    public String getCableFourHundredId() {
+        return cableFourHundredId;
+    }
+
+    public void setCableFourHundredId(String cableFourHundredId) {
+        this.cableFourHundredId = cableFourHundredId;
+    }
+
+    public String getCableHundredAndTwentyId() {
+        return cableHundredAndTwentyId;
+    }
+
+    public void setCableHundredAndTwentyId(String cableHundredAndTwentyId) {
+        this.cableHundredAndTwentyId = cableHundredAndTwentyId;
+    }
+
+    public String getCableThreeHundredId() {
+        return cableThreeHundredId;
+    }
+
+    public void setCableThreeHundredId(String cableThreeHundredId) {
+        this.cableThreeHundredId = cableThreeHundredId;
+    }
+
+    public String getCableTwoHundredFortyId() {
+        return cableTwoHundredFortyId;
+    }
+
+    public void setCableTwoHundredFortyId(String cableTwoHundredFortyId) {
+        this.cableTwoHundredFortyId = cableTwoHundredFortyId;
+    }
+
+    public String getCableSeventyId() {
+        return cableSeventyId;
+    }
+
+    public void setCableSeventyId(String cableSeventyId) {
+        this.cableSeventyId = cableSeventyId;
+    }
+}

+ 72 - 0
src/main/java/com/jeeplus/modules/sg/raiseCapitalDesign/entity/CableSectionInfo.java

@@ -0,0 +1,72 @@
+package com.jeeplus.modules.sg.raiseCapitalDesign.entity;
+
+import com.jeeplus.core.persistence.DataEntity;
+
+/**
+ * 电缆分段实体类
+ */
+public class CableSectionInfo{
+    private String destination; //起讫点
+    private String pathLength;  //路径长(m)
+    private String upperRod;    //上杆(m)
+    private String arrival;     //进站(m)
+    private String incomingEquipment;   //进设备(m)
+    private String coefficient;     //系数
+    private String electricalChief;     //电气长(m)
+
+    public String getDestination() {
+        return destination;
+    }
+
+    public void setDestination(String destination) {
+        this.destination = destination;
+    }
+
+    public String getPathLength() {
+        return pathLength;
+    }
+
+    public void setPathLength(String pathLength) {
+        this.pathLength = pathLength;
+    }
+
+    public String getUpperRod() {
+        return upperRod;
+    }
+
+    public void setUpperRod(String upperRod) {
+        this.upperRod = upperRod;
+    }
+
+    public String getArrival() {
+        return arrival;
+    }
+
+    public void setArrival(String arrival) {
+        this.arrival = arrival;
+    }
+
+    public String getIncomingEquipment() {
+        return incomingEquipment;
+    }
+
+    public void setIncomingEquipment(String incomingEquipment) {
+        this.incomingEquipment = incomingEquipment;
+    }
+
+    public String getCoefficient() {
+        return coefficient;
+    }
+
+    public void setCoefficient(String coefficient) {
+        this.coefficient = coefficient;
+    }
+
+    public String getElectricalChief() {
+        return electricalChief;
+    }
+
+    public void setElectricalChief(String electricalChief) {
+        this.electricalChief = electricalChief;
+    }
+}

+ 108 - 0
src/main/java/com/jeeplus/modules/sg/raiseCapitalDesign/service/RaiseCapitalDesignService.java

@@ -19,6 +19,8 @@ import com.jeeplus.modules.sg.raiseCapital.mapper.RaiseCapitalMapper;
 import com.jeeplus.modules.sg.raiseCapital.utils.RaiseExportUtil;
 import com.jeeplus.modules.sg.raiseCapital.utils.RaiseTemplate;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.DisposeData;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionData;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionInfo;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageData;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageInfo;
 import com.jeeplus.modules.sg.raiseCapitalDesign.mapper.RaiseCapitalDesignMapper;
@@ -329,6 +331,42 @@ public class RaiseCapitalDesignService extends CrudService<RaiseCapitalDesignMap
 
 		return list;
 	}
+	/**
+	 * 根据UUID查询电缆分段再redis中的数据
+	 * @return
+	 */
+	public List<CableSectionInfo> getCableSection(String uuidKey, String type) {
+		List<CableSectionInfo> list = Lists.newArrayList();
+		//创建通道,查询redis中数据
+		CacheChannel channel = J2Cache.getChannel();
+		RedisClient client = ((RedisCacheProvider)channel.getL2Provider()).getRedisClient();
+		BinaryJedisCommands binaryJedisCommands = client.get();
+		byte[] bytes = binaryJedisCommands.get(uuidKey.getBytes());
+		//判定是否存在这些数据的备份,有则进行处理并返回
+		if(null != bytes){
+			list = JSON.parseArray(new String(bytes),CableSectionInfo.class);
+		}
+		return list;
+	}
+	/**
+	 * 根据UUID查询电缆分段再redis中的数据
+	 * @return
+	 */
+	public List<CableSectionData> getCableSectionData() {
+		List<CableSectionData> list = Lists.newArrayList();
+		PickIng entity = new PickIng();
+		entity.setVersion(MyActiviUtils.findDic().getValue());
+		//查询4.2高压电缆线路数据
+		List<String> mdSmallNameList = Lists.newArrayList();
+		mdSmallNameList.add("3×400电缆");
+		mdSmallNameList.add("3×120电缆");
+		mdSmallNameList.add("3×300电缆");
+		mdSmallNameList.add("3×240电缆");
+		mdSmallNameList.add("3×70电缆");
+		entity.setMdSmallName(mdSmallNameList);
+		list = pickIngMapper.getListCableByTheClassName(entity);
+		return list;
+	}
 
 	/**
 	 * 架空导线计算处理
@@ -367,4 +405,74 @@ public class RaiseCapitalDesignService extends CrudService<RaiseCapitalDesignMap
 		binaryJedisCommands.expire((voltageData.getUuid()+"lowVoltage").getBytes(),86400);
 
 	}
+	/**
+	 * 电缆分段计算处理
+	 * @param cableSectionData
+	 */
+	@Transactional(readOnly = false)
+	public void saveCable(CableSectionData cableSectionData) {
+		List<DisposeData> dataList = this.CableDataList(cableSectionData);
+		List<CableSectionInfo> cableFourHundredList=cableSectionData.getCableFourHundredList();
+		List<CableSectionInfo> cableHundredAndTwentyList=cableSectionData.getCableHundredAndTwentyList();
+		List<CableSectionInfo> cableThreeHundredList=cableSectionData.getCableThreeHundredList();
+		List<CableSectionInfo> cableTwoHundredFortyList=cableSectionData.getCableTwoHundredFortyList();
+		List<CableSectionInfo> cableSeventyList=cableSectionData.getCableSeventyList();
+		String voltageDisposeDataJson = JSON.toJSONString(dataList);
+		String cableFourHundredListJson = JSON.toJSONString(cableFourHundredList);
+		String cableHundredAndTwentyListJson = JSON.toJSONString(cableHundredAndTwentyList);
+		String cableThreeHundredListJson = JSON.toJSONString(cableThreeHundredList);
+		String cableTwoHundredFortyListJson = JSON.toJSONString(cableTwoHundredFortyList);
+		String cableSeventyListJson = JSON.toJSONString(cableSeventyList);
+		CacheChannel channel = J2Cache.getChannel();
+		RedisClient client = ((RedisCacheProvider)channel.getL2Provider()).getRedisClient();
+		BinaryJedisCommands binaryJedisCommands = client.get();
+		binaryJedisCommands.set((cableSectionData.getUuid()+"voltageDisposeData").getBytes(),voltageDisposeDataJson.getBytes());
+		binaryJedisCommands.set((cableSectionData.getUuid()+"cableFourHundred").getBytes(),cableFourHundredListJson.getBytes());
+		binaryJedisCommands.set((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),cableHundredAndTwentyListJson.getBytes());
+		binaryJedisCommands.set((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),cableThreeHundredListJson.getBytes());
+		binaryJedisCommands.set((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),cableTwoHundredFortyListJson.getBytes());
+		binaryJedisCommands.set((cableSectionData.getUuid()+"cableSeventy").getBytes(),cableSeventyListJson.getBytes());
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"voltageDisposeData").getBytes(),86400);
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"cableFourHundred").getBytes(),86400);
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"cableHundredAndTwenty").getBytes(),86400);
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"cableThreeHundred").getBytes(),86400);
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"cableTwoHundredForty").getBytes(),86400);
+		binaryJedisCommands.expire((cableSectionData.getUuid()+"cableSeventy").getBytes(),86400);
+
+	}
+
+	/**
+	 * 页面需要的数据
+	 * @param cableSectionData
+	 * @return
+	 */
+	public List<DisposeData> CableDataList(CableSectionData cableSectionData){
+		List<DisposeData> dataList = Lists.newArrayList();
+
+		DisposeData data = new DisposeData();
+		data.setId(cableSectionData.getCableFourHundredId());
+		data.setNumber(cableSectionData.getCableFourHundredListTotal());
+		dataList.add(data);
+
+		DisposeData dataCableHundredAndTwenty = new DisposeData();
+		dataCableHundredAndTwenty.setId(cableSectionData.getCableHundredAndTwentyId());
+		dataCableHundredAndTwenty.setNumber(cableSectionData.getCableHundredAndTwentyListTotal());
+		dataList.add(dataCableHundredAndTwenty);
+
+		DisposeData dataCableThreeHundred = new DisposeData();
+		dataCableThreeHundred.setId(cableSectionData.getCableThreeHundredId());
+		dataCableThreeHundred.setNumber(cableSectionData.getCableThreeHundredListTotal());
+		dataList.add(dataCableThreeHundred);
+
+		DisposeData dataCableTwoHundredForty = new DisposeData();
+		dataCableTwoHundredForty.setId(cableSectionData.getCableTwoHundredFortyId());
+		dataCableTwoHundredForty.setNumber(cableSectionData.getCableTwoHundredFortyListTotal());
+		dataList.add(dataCableTwoHundredForty);
+
+		DisposeData dataCableSeventy = new DisposeData();
+		dataCableSeventy.setId(cableSectionData.getCableSeventyId());
+		dataCableSeventy.setNumber(cableSectionData.getCableSeventyListTotal());
+		dataList.add(dataCableSeventy);
+		return dataList;
+	}
 }

+ 48 - 0
src/main/java/com/jeeplus/modules/sg/raiseCapitalDesign/web/RaiseCapitalDesignController.java

@@ -23,6 +23,8 @@ import com.jeeplus.modules.sg.raiseCapital.entity.RaiseCapital;
 import com.jeeplus.modules.sg.raiseCapital.service.RaiseCapitalService;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.DisposeData;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageData;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionData;
+import com.jeeplus.modules.sg.raiseCapitalDesign.entity.CableSectionInfo;
 import com.jeeplus.modules.sg.raiseCapitalDesign.entity.VoltageInfo;
 import com.jeeplus.modules.sg.raiseCapitalDesign.service.RaiseCapitalDesignService;
 import com.jeeplus.modules.sys.utils.DictUtils;
@@ -152,6 +154,30 @@ public class RaiseCapitalDesignController extends BaseController {
 		model.addAttribute("uuid", uuid);
 		return "modules/sg/raiseCapitalDesign/aerialConductorForm";
 	}
+	/**
+	 * 电缆分段
+	 * 查看,增加,编辑提资表单表单页面
+	 */
+	@RequestMapping(value = "cableSectionForm")
+	public String cableSectionForm(String uuid, Model model) {
+		List<CableSectionData> cableSectionData = raiseCapitalDesignService.getCableSectionData();
+		List<CableSectionInfo> cableFourHundredList = raiseCapitalDesignService.getCableSection(uuid + "cableFourHundred","cableFourHundred");
+		List<CableSectionInfo> cableHundredAndTwentyList = raiseCapitalDesignService.getCableSection(uuid + "cableHundredAndTwenty","cableHundredAndTwenty");
+		List<CableSectionInfo> cableThreeHundredList = raiseCapitalDesignService.getCableSection(uuid + "cableThreeHundred","cableThreeHundred");
+		List<CableSectionInfo> cableTwoHundredFortyList = raiseCapitalDesignService.getCableSection(uuid + "cableTwoHundredForty","cableTwoHundredForty");
+		List<CableSectionInfo> cableSeventyList = raiseCapitalDesignService.getCableSection(uuid + "cableSeventy","cableSeventy");
+		//获取电缆分段的系数
+		String cableFactor = DictUtils.getDictLabel("cableFactor", "designCalculateCoefficient", "");
+		model.addAttribute("cableFactor", cableFactor);
+		model.addAttribute("cableSectionData", cableSectionData);
+		model.addAttribute("cableFourHundredList", cableFourHundredList);
+		model.addAttribute("cableHundredAndTwentyList", cableHundredAndTwentyList);
+		model.addAttribute("cableThreeHundredList", cableThreeHundredList);
+		model.addAttribute("cableTwoHundredFortyList", cableTwoHundredFortyList);
+		model.addAttribute("cableSeventyList", cableSeventyList);
+		model.addAttribute("uuid", uuid);
+		return "modules/sg/raiseCapitalDesign/cableSectionForm";
+	}
 
 	/**
 	 * 架空导线计算处理
@@ -176,6 +202,28 @@ public class RaiseCapitalDesignController extends BaseController {
 		j.setMsg("处理完成");
 		return j;
 	}
+	/**
+	 * 电缆分段计算处理
+	 */
+	@ResponseBody
+	@RequestMapping(value = "saveCable")
+	public AjaxJson saveCable(CableSectionData cableSectionData, Model model) throws Exception{
+		AjaxJson j = new AjaxJson();
+		/**
+		 * 后台hibernate-validation插件校验
+		 */
+		String errMsg = beanValidator(cableSectionData);
+		if (StringUtils.isNotBlank(errMsg)){
+			j.setSuccess(false);
+			j.setMsg(errMsg);
+			return j;
+		}
+		//新增或编辑表单保存
+		raiseCapitalDesignService.saveCable(cableSectionData);//处理
+		j.setSuccess(true);
+		j.setMsg("处理完成");
+		return j;
+	}
 
 	/**
 	 * 保存提资表单

+ 589 - 0
src/main/webapp/webpage/modules/sg/raiseCapitalDesign/cableSectionForm.jsp

@@ -0,0 +1,589 @@
+<%@ page contentType="text/html;charset=UTF-8" %>
+<%@ include file="/webpage/include/taglib.jsp"%>
+<html>
+<head>
+	<title>核准阶段管理</title>
+	<meta name="decorator" content="ani"/>
+	<script type="text/javascript">
+
+		$(document).ready(function() {
+	        $('#inDate').datetimepicker({
+				 format: "YYYY-MM-DD HH:mm:ss"
+		    });
+
+			$(".list-tabs li").click(function(){
+				$(".list-tabs li").each(function(){
+					$(this).removeAttr("class","active");
+					var id='#'+$(this).find("span").html();
+					$(id).attr("class","hide");
+				})
+				$(this).attr("class","active");
+				var id='#'+$(this).find("span").html();
+				$(id).removeAttr("class","hide");
+			})
+
+			$(".list-tabs li").each(function(){
+				var data = ${fns:toJson(cableSectionData)};
+				var name=$(this).find("span").eq(1).html();
+				for (var i=0;i<data.length;i++){
+					if (name==data[i].voltageName){
+						$(this).find("input").val(data[i].id);
+					}
+				}
+			})
+			//400mm
+			var cableFourHundredList = ${fns:toJson(cableFourHundredList)};
+			if (null != cableFourHundredList){
+				var cableFourHundredListTotal=0;
+				for (var i=0;i<cableFourHundredList.length;i++){
+					var electricalChief=cableFourHundredList[i].electricalChief;
+					cableFourHundredListTotal=cableFourHundredListTotal+parseFloat(electricalChief);
+				}
+				document.getElementById("cableFourHundredListTotal").value=(cableFourHundredListTotal/1000).toFixed(4);
+			}
+			//300mm
+			var cableThreeHundredList = ${fns:toJson(cableThreeHundredList)};
+			if (null != cableThreeHundredList){
+				var cableThreeHundredListTotal=0;
+				for (var i=0;i<cableThreeHundredList.length;i++){
+					var electricalChief=cableThreeHundredList[i].electricalChief;
+					cableThreeHundredListTotal=cableThreeHundredListTotal+parseFloat(electricalChief);
+				}
+				document.getElementById("cableThreeHundredListTotal").value=(cableThreeHundredListTotal/1000).toFixed(4);
+			}
+			//240mm
+			var cableTwoHundredFortyList = ${fns:toJson(cableTwoHundredFortyList)};
+			if (null != cableTwoHundredFortyList){
+				var cableTwoHundredFortyListTotal=0;
+				for (var i=0;i<cableTwoHundredFortyList.length;i++){
+					var electricalChief=cableTwoHundredFortyList[i].electricalChief;
+					cableTwoHundredFortyListTotal=cableTwoHundredFortyListTotal+parseFloat(electricalChief);
+				}
+				document.getElementById("cableTwoHundredFortyListTotal").value=(cableTwoHundredFortyListTotal/1000).toFixed(4);
+			}
+			//120mm
+			var cableHundredAndTwentyList = ${fns:toJson(cableHundredAndTwentyList)};
+			if (null != cableHundredAndTwentyList){
+				var cableHundredAndTwentyListTotal=0;
+				for (var i=0;i<cableHundredAndTwentyList.length;i++){
+					var electricalChief=cableHundredAndTwentyList[i].electricalChief;
+					cableHundredAndTwentyListTotal=cableHundredAndTwentyListTotal+parseFloat(electricalChief);
+				}
+				document.getElementById("cableHundredAndTwentyListTotal").value=(cableHundredAndTwentyListTotal/1000).toFixed(4);
+			}
+			//70mm
+			var cableSeventyList = ${fns:toJson(cableSeventyList)};
+			if (null != cableSeventyList){
+				var cableSeventyListTotal=0;
+				for (var i=0;i<cableSeventyList.length;i++){
+					var electricalChief=cableSeventyList[i].electricalChief;
+					cableSeventyListTotal=cableSeventyListTotal+parseFloat(electricalChief);
+				}
+				document.getElementById("cableSeventyListTotal").value=(cableSeventyListTotal/1000).toFixed(4);
+			}
+
+		});
+
+		function save() {
+			var isValidate = jp.validateForm('#inputForm');//校验表单
+			if(!isValidate){
+				return false;
+			}else{
+				var uuid = $("#uuid").val();
+				jp.loading();
+				jp.post("${ctx}/raiseCapitalDesign/saveCable",$('#inputForm').serialize(),function(data){
+					if(data.success){
+						jp.getParent().refresh();
+						var dialogIndex = parent.layer.getFrameIndex(window.name); // 获取窗口索引
+						parent.layer.close(dialogIndex);
+						jp.success(data.msg)
+						jp.getParent().refreshCharts(uuid);
+					}else{
+						jp.error(data.msg);
+					}
+				})
+			}
+
+		}
+		function addRow(list, idx, tpl, row){
+			$(list).prepend(Mustache.render(tpl, {
+				idx: idx, delBtn: true, row: row
+			}));
+			$(list+idx).find("select").each(function(){
+				$(this).val($(this).attr("data-value"));
+			});
+			$(list+idx).find("input[type='checkbox'], input[type='radio']").each(function(){
+				var ss = $(this).attr("data-value").split(',');
+				for (var i=0; i<ss.length; i++){
+					if($(this).val() == ss[i]){
+						$(this).attr("checked","checked");
+					}
+				}
+			});
+			$(list+idx).find(".form_datetime").each(function(){
+				 $(this).datetimepicker({
+					 format: "YYYY-MM-DD HH:mm:ss"
+			    });
+			});
+		}
+		function delRow(obj, prefix,tbody,idx){
+			var id = $(prefix+"_id");
+			var delFlag = $(prefix+"_delFlag");
+			if (id.val() == ""){
+				$(obj).parent().parent().remove();
+				if (idx=='cableFourHundredRowIdx'){
+					cableFourHundredRowIdx=cableFourHundredRowIdx-1;
+					cableFourHundredTotal(tbody,cableFourHundredRowIdx);
+				}else if (idx=='cableThreeHundredRowIdx'){
+					cableThreeHundredRowIdx=cableThreeHundredRowIdx-1;
+					cableFourHundredTotal(tbody,cableThreeHundredRowIdx);
+				}else if (idx=='cableTwoHundredFortyRowIdx'){
+					cableTwoHundredFortyRowIdx=cableTwoHundredFortyRowIdx-1;
+					cableFourHundredTotal(tbody,cableTwoHundredFortyRowIdx);
+				}else if (idx=='cableHundredAndTwentyRowIdx'){
+					cableHundredAndTwentyRowIdx=cableHundredAndTwentyRowIdx-1;
+					cableFourHundredTotal(tbody,cableHundredAndTwentyRowIdx);
+				}else if (idx=='cableSeventyRowIdx'){
+					cableSeventyRowIdx=cableSeventyRowIdx-1;
+					cableFourHundredTotal(tbody,cableSeventyRowIdx);
+				}
+			}else if(delFlag.val() == "0"){
+				delFlag.val("1");
+				$(obj).html("&divide;").attr("title", "撤销删除");
+				$(obj).parent().parent().addClass("error");
+			}else if(delFlag.val() == "1"){
+				delFlag.val("0");
+				$(obj).html("&times;").attr("title", "删除");
+				$(obj).parent().parent().removeClass("error");
+			}
+		}
+		function cableJiSuan(obj,prefix,tbody,idx) {
+			var tr=$(obj).parent().parent();
+			// var pathLength =$(tr).find("td").eq(2).val();//路径长(m)
+			var pathLength =document.getElementById(prefix+"_pathLength").value;//路径长(m)
+			var upperRod =document.getElementById(prefix+"_upperRod").value;//上杆(m)
+			var arrival =document.getElementById(prefix+"_arrival").value;//进站(m)
+			var incomingEquipment =document.getElementById(prefix+"_incomingEquipment").value;//进设备(m)
+			var coefficient =document.getElementById(prefix+"_coefficient").value;//系数
+			if (pathLength==undefined || pathLength=='' ){
+				pathLength=0;
+			}if (upperRod==undefined || upperRod==''){
+				upperRod=0;
+			}if ( arrival==undefined || arrival==''){
+				arrival=0;
+			}if (incomingEquipment==undefined || incomingEquipment==''){
+				incomingEquipment=0;
+			}
+			var total=(parseFloat(pathLength)+parseFloat(upperRod)+parseFloat(arrival)+parseFloat(incomingEquipment))*parseFloat(coefficient);
+			document.getElementById(prefix+"_electricalChief").value=total.toFixed(2);
+			cableFourHundredTotal(tbody,idx);
+		}
+		function cableFourHundredTotal(tbody,idx) {
+			var length=idx;
+			var totalLength=0
+			for (var i=0;i<length;i++){
+				var ss=$("#"+tbody).find('tr').eq(i).attr("id");
+				var id=ss+"_electricalChief";
+				var electricalChief =document.getElementById(id).value;//电气长(m)
+				if (electricalChief==''){
+					electricalChief=0;
+				}
+				totalLength+=parseFloat(electricalChief)
+			}
+			var totalName=tbody+"Total"
+			document.getElementById(totalName).value=(totalLength/1000).toFixed(4);
+		}
+	</script>
+</head>
+<body class="bg-white">
+
+		<form:form id="inputForm" modelAttribute="cableSectionData" action="${ctx}/filing/basicInformation/save" method="post" class="form-horizontal">
+			<input type="hidden" id="uuid" name="uuid" value="${uuid}">
+			<div>
+				<ul class="nav nav-tabs list-tabs">
+					<li class="active" role="presentation" id="click1"><a id="dq" href="javascript:void(0)"><span class="hide">cableFourHundred</span><span>YJV22-3×400mm²</span></a><input type="hidden" name="cableFourHundredId"/></li>
+					<li role="presentation"><a href="javascript:void(0)"><span class="hide">cableThreeHundred</span><span>YJV22-3×300mm²</span></a><input type="hidden" name="cableThreeHundredId"/></li>
+					<li role="presentation"><a href="javascript:void(0)"><span class="hide">cableTwoHundredForty</span><span>YJV22-3×240mm²</span></a><input type="hidden" name="cableTwoHundredFortyId"/></li>
+					<li role="presentation"><a href="javascript:void(0)"><span class="hide">cableHundredAndTwenty</span><span>YJV22-3×120mm²</span></a><input type="hidden" name="cableHundredAndTwentyId"/></li>
+					<li role="presentation"><a href="javascript:void(0)"><span class="hide">cableSeventy</span><span>YJV22-3×70mm²</span></a><input type="hidden" name="cableSeventyId"/></li>
+				</ul>
+			</div>
+			<div class="tabs-container" id="cableFourHundred">
+				<div class="tab-content">
+					<div id="tab-1" class="tab-pane fade in  active">
+					<a class="btn btn-white btn-sm" onclick="addRow('#cableFourHundredList', cableFourHundredRowIdx, cableFourHundredTpl);cableFourHundredRowIdx = cableFourHundredRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+					<table class="table table-striped table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th class="hide"></th>
+							<th>起讫点</th>
+							<th>路径长(m)</th>
+							<th>上杆(m)</th>
+							<th>进站(m)</th>
+							<th>进设备(m)</th>
+							<th>系数</th>
+							<th>电气长(m)</th>
+							<th width="10">&nbsp;</th>
+						</tr>
+					</thead>
+					<tbody id="cableFourHundredList">
+						<tr>
+							<td colspan="6">总长(km):</td>
+							<td width="200px">
+								<input type='text' id="cableFourHundredListTotal"  name="cableFourHundredListTotal" readonly= "true" class="form-control"  value=""/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<script type="text/template" id="cableFourHundredTpl">//<!--
+					<tr id="cableFourHundredList[{{idx}}]">
+						<td class="hide">
+							<input id="cableFourHundredList{{idx}}_id" name="cableFourHundredList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+							<input id="cableFourHundredList{{idx}}_delFlag" name="cableFourHundredList[{{idx}}].delFlag" type="hidden" value="0"/>
+						</td>
+
+						<td  class="max-width-250">
+						<input type='text' id="cableFourHundredList[{{idx}}]_destination" name="cableFourHundredList[{{idx}}].destination" class="form-control"  value="{{row.destination}}" />
+						</td>
+
+						<td  class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_pathLength" name="cableFourHundredList[{{idx}}].pathLength" class="form-control" onchange="cableJiSuan(this,'cableFourHundredList[{{idx}}]','cableFourHundredList',cableFourHundredRowIdx)"  value="{{row.pathLength}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_upperRod" name="cableFourHundredList[{{idx}}].upperRod" class="form-control" onchange="cableJiSuan(this,'cableFourHundredList[{{idx}}]','cableFourHundredList',cableFourHundredRowIdx)"  value="{{row.upperRod}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_arrival" name="cableFourHundredList[{{idx}}].arrival" class="form-control" onchange="cableJiSuan(this,'cableFourHundredList[{{idx}}]','cableFourHundredList',cableFourHundredRowIdx)"  value="{{row.arrival}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_incomingEquipment" name="cableFourHundredList[{{idx}}].incomingEquipment" onchange="cableJiSuan(this,'cableFourHundredList[{{idx}}]','cableFourHundredList',cableFourHundredRowIdx)" class="form-control"  value="{{row.incomingEquipment}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_coefficient"  name="cableFourHundredList[{{idx}}].coefficient" readonly= "true" class="form-control"  value="${cableFactor}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableFourHundredList[{{idx}}]_electricalChief"  name="cableFourHundredList[{{idx}}].electricalChief" readonly= "true" class="form-control"  value="{{row.electricalChief}}"/>
+						</td>
+						<td class="text-center" width="10">
+							{{#delBtn}}<span class="close" onclick="delRow(this, '#cableFourHundredList{{idx}}','cableFourHundredList','cableFourHundredRowIdx')" title="删除">&times;</span>{{/delBtn}}
+						</td>
+					</tr>//-->
+				</script>
+				<script type="text/javascript">
+					var cableFourHundredRowIdx = 0, cableFourHundredTpl = $("#cableFourHundredTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					$(document).ready(function() {
+						var data = ${fns:toJson(cableFourHundredList)};
+						for (var i=0; i<data.length; i++){
+							console.log(data[i])
+							addRow('#cableFourHundredList', cableFourHundredRowIdx, cableFourHundredTpl, data[i]);
+							cableFourHundredRowIdx = cableFourHundredRowIdx + 1;
+						}
+					});
+				</script>
+				</div>
+			</div>
+		</div>
+			<div class="tabs-container hide" id="cableThreeHundred">
+				<div class="tab-content">
+					<div id="tab-2" class="tab-pane fade in  active">
+					<a class="btn btn-white btn-sm" onclick="addRow('#cableThreeHundredList', cableThreeHundredRowIdx, cableThreeHundredTpl);cableThreeHundredRowIdx = cableThreeHundredRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+					<table class="table table-striped table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th class="hide"></th>
+							<th>起讫点</th>
+							<th>路径长(m)</th>
+							<th>上杆(m)</th>
+							<th>进站(m)</th>
+							<th>进设备(m)</th>
+							<th>系数</th>
+							<th>电气长(m)</th>
+							<th width="10">&nbsp;</th>
+						</tr>
+					</thead>
+					<tbody id="cableThreeHundredList">
+						<tr>
+							<td colspan="6">总长(km):</td>
+							<td width="200px">
+								<input type='text' id="cableThreeHundredListTotal"  name="cableThreeHundredListTotal" readonly= "true" class="form-control"  value=""/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<script type="text/template" id="cableThreeHundredTpl">//<!--
+				<tr id="cableThreeHundredList[{{idx}}]">
+						<td class="hide">
+							<input id="cableThreeHundredList{{idx}}_id" name="cableThreeHundredList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+							<input id="cableThreeHundredList{{idx}}_delFlag" name="cableThreeHundredList[{{idx}}].delFlag" type="hidden" value="0"/>
+						</td>
+
+						<td  class="max-width-250">
+						<input type='text' id="cableThreeHundredList[{{idx}}]_destination" name="cableThreeHundredList[{{idx}}].destination" class="form-control"  value="{{row.destination}}"/>
+						</td>
+
+						<td  class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_pathLength" name="cableThreeHundredList[{{idx}}].pathLength" class="form-control" onchange="cableJiSuan(this,'cableThreeHundredList[{{idx}}]','cableThreeHundredList',cableThreeHundredRowIdx)"  value="{{row.pathLength}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_upperRod" name="cableThreeHundredList[{{idx}}].upperRod" class="form-control" onchange="cableJiSuan(this,'cableThreeHundredList[{{idx}}]','cableThreeHundredList',cableThreeHundredRowIdx)"  value="{{row.upperRod}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_arrival" name="cableThreeHundredList[{{idx}}].arrival" class="form-control" onchange="cableJiSuan(this,'cableThreeHundredList[{{idx}}]','cableThreeHundredList',cableThreeHundredRowIdx)"  value="{{row.arrival}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_incomingEquipment" name="cableThreeHundredList[{{idx}}].incomingEquipment" onchange="cableJiSuan(this,'cableThreeHundredList[{{idx}}]','cableThreeHundredList',cableThreeHundredRowIdx)" class="form-control"  value="{{row.incomingEquipment}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_coefficient"  name="cableThreeHundredList[{{idx}}].coefficient" readonly= "true" class="form-control"  value="${cableFactor}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableThreeHundredList[{{idx}}]_electricalChief"  name="cableThreeHundredList[{{idx}}].electricalChief" readonly= "true" class="form-control"  value="{{row.electricalChief}}"/>
+						</td>
+						<td class="text-center" width="10">
+							{{#delBtn}}<span class="close" onclick="delRow(this, '#cableThreeHundredList{{idx}}','cableThreeHundredList','cableThreeHundredRowIdx')" title="删除">&times;</span>{{/delBtn}}
+						</td>
+					</tr>//-->
+				</script>
+				<script type="text/javascript">
+					var cableThreeHundredRowIdx = 0, cableThreeHundredTpl = $("#cableThreeHundredTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					$(document).ready(function() {
+						var data = ${fns:toJson(cableThreeHundredList)};
+						for (var i=0; i<data.length; i++){
+							console.log(data[i])
+							addRow('#cableThreeHundredList', cableThreeHundredRowIdx, cableThreeHundredTpl, data[i]);
+							cableThreeHundredRowIdx = cableThreeHundredRowIdx + 1;
+						}
+					});
+				</script>
+				</div>
+			</div>
+		</div>
+			<div class="tabs-container hide" id="cableTwoHundredForty">
+				<div class="tab-content">
+					<div id="tab-3" class="tab-pane fade in  active">
+					<a class="btn btn-white btn-sm" onclick="addRow('#cableTwoHundredFortyList', cableTwoHundredFortyRowIdx, cableTwoHundredFortyTpl);cableTwoHundredFortyRowIdx = cableTwoHundredFortyRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+					<table class="table table-striped table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th class="hide"></th>
+							<th>起讫点</th>
+							<th>路径长(m)</th>
+							<th>上杆(m)</th>
+							<th>进站(m)</th>
+							<th>进设备(m)</th>
+							<th>系数</th>
+							<th>电气长(m)</th>
+							<th width="10">&nbsp;</th>
+
+						</tr>
+					</thead>
+					<tbody id="cableTwoHundredFortyList">
+						<tr>
+							<td colspan="6">总长(km):</td>
+							<td width="200px">
+								<input type='text' id="cableTwoHundredFortyListTotal"  name="cableTwoHundredFortyListTotal" readonly= "true" class="form-control"  value=""/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<script type="text/template" id="cableTwoHundredFortyTpl">//<!--
+				<tr id="cableTwoHundredFortyList[{{idx}}]">
+						<td class="hide">
+							<input id="cableTwoHundredFortyList{{idx}}_id" name="cableTwoHundredFortyList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+							<input id="cableTwoHundredFortyList{{idx}}_delFlag" name="cableTwoHundredFortyList[{{idx}}].delFlag" type="hidden" value="0"/>
+						</td>
+
+						<td  class="max-width-250">
+						<input type='text' id="cableTwoHundredFortyList[{{idx}}]_destination" name="cableTwoHundredFortyList[{{idx}}].destination" class="form-control"  value="{{row.destination}}"/>
+						</td>
+
+						<td  class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_pathLength" name="cableTwoHundredFortyList[{{idx}}].pathLength" class="form-control" onchange="cableJiSuan(this,'cableTwoHundredFortyList[{{idx}}]','cableTwoHundredFortyList',cableTwoHundredFortyRowIdx)"  value="{{row.pathLength}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_upperRod" name="cableTwoHundredFortyList[{{idx}}].upperRod" class="form-control" onchange="cableJiSuan(this,'cableTwoHundredFortyList[{{idx}}]','cableTwoHundredFortyList',cableTwoHundredFortyRowIdx)"  value="{{row.upperRod}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_arrival" name="cableTwoHundredFortyList[{{idx}}].arrival" class="form-control" onchange="cableJiSuan(this,'cableTwoHundredFortyList[{{idx}}]','cableTwoHundredFortyList',cableTwoHundredFortyRowIdx)"  value="{{row.arrival}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_incomingEquipment" name="cableTwoHundredFortyList[{{idx}}].incomingEquipment" onchange="cableJiSuan(this,'cableTwoHundredFortyList[{{idx}}]','cableTwoHundredFortyList',cableTwoHundredFortyRowIdx)" class="form-control"  value="{{row.incomingEquipment}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_coefficient"  name="cableTwoHundredFortyList[{{idx}}].coefficient" readonly= "true" class="form-control"  value="${cableFactor}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableTwoHundredFortyList[{{idx}}]_electricalChief"  name="cableTwoHundredFortyList[{{idx}}].electricalChief" readonly= "true" class="form-control"  value="{{row.electricalChief}}"/>
+						</td>
+						<td class="text-center" width="10">
+							{{#delBtn}}<span class="close" onclick="delRow(this, '#cableTwoHundredFortyList{{idx}}','cableTwoHundredFortyList','cableTwoHundredFortyRowIdx')" title="删除">&times;</span>{{/delBtn}}
+						</td>
+					</tr>//-->
+				</script>
+				<script type="text/javascript">
+					var cableTwoHundredFortyRowIdx = 0, cableTwoHundredFortyTpl = $("#cableTwoHundredFortyTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					$(document).ready(function() {
+						var data = ${fns:toJson(cableTwoHundredFortyList)};
+						for (var i=0; i<data.length; i++){
+							console.log(data[i])
+							addRow('#cableTwoHundredFortyList', cableTwoHundredFortyRowIdx, cableTwoHundredFortyTpl, data[i]);
+							cableTwoHundredFortyRowIdx = cableTwoHundredFortyRowIdx + 1;
+						}
+					});
+				</script>
+				</div>
+			</div>
+		</div>
+			<div class="tabs-container hide" id="cableHundredAndTwenty">
+				<div class="tab-content">
+					<div id="tab-4" class="tab-pane fade in  active">
+					<a class="btn btn-white btn-sm" onclick="addRow('#cableHundredAndTwentyList', cableHundredAndTwentyRowIdx, cableHundredAndTwentyTpl);cableHundredAndTwentyRowIdx = cableHundredAndTwentyRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+					<table class="table table-striped table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th class="hide"></th>
+							<th>起讫点</th>
+							<th>路径长(m)</th>
+							<th>上杆(m)</th>
+							<th>进站(m)</th>
+							<th>进设备(m)</th>
+							<th>系数</th>
+							<th>电气长(m)</th>
+							<th width="10">&nbsp;</th>
+						</tr>
+					</thead>
+					<tbody id="cableHundredAndTwentyList">
+						<tr>
+							<td colspan="6">总长(km):</td>
+							<td width="200px">
+								<input type='text' id="cableHundredAndTwentyListTotal"  name="cableHundredAndTwentyListTotal" readonly= "true" class="form-control"  value=""/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<script type="text/template" id="cableHundredAndTwentyTpl">//<!--
+				<tr id="cableHundredAndTwentyList[{{idx}}]">
+						<td class="hide">
+							<input id="cableHundredAndTwentyList{{idx}}_id" name="cableHundredAndTwentyList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+							<input id="cableHundredAndTwentyList{{idx}}_delFlag" name="cableHundredAndTwentyList[{{idx}}].delFlag" type="hidden" value="0"/>
+						</td>
+
+						<td  class="max-width-250">
+						<input type='text' id="cableHundredAndTwentyList[{{idx}}]_destination" name="cableHundredAndTwentyList[{{idx}}].destination" class="form-control"  value="{{row.destination}}"/>
+						</td>
+
+						<td  class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_pathLength" name="cableHundredAndTwentyList[{{idx}}].pathLength" class="form-control" onchange="cableJiSuan(this,'cableHundredAndTwentyList[{{idx}}]','cableHundredAndTwentyList',cableHundredAndTwentyRowIdx)"  value="{{row.pathLength}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_upperRod" name="cableHundredAndTwentyList[{{idx}}].upperRod" class="form-control" onchange="cableJiSuan(this,'cableHundredAndTwentyList[{{idx}}]','cableHundredAndTwentyList',cableHundredAndTwentyRowIdx)"  value="{{row.upperRod}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_arrival" name="cableHundredAndTwentyList[{{idx}}].arrival" class="form-control" onchange="cableJiSuan(this,'cableHundredAndTwentyList[{{idx}}]','cableHundredAndTwentyList',cableHundredAndTwentyRowIdx)"  value="{{row.arrival}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_incomingEquipment" name="cableHundredAndTwentyList[{{idx}}].incomingEquipment" onchange="cableJiSuan(this,'cableHundredAndTwentyList[{{idx}}]','cableHundredAndTwentyList',cableHundredAndTwentyRowIdx)" class="form-control"  value="{{row.incomingEquipment}}" onkeyup="this.value=this.value.replace(/^(\d*\.?\d{0,2}).*/,'$1')" maxlength="10"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_coefficient"  name="cableHundredAndTwentyList[{{idx}}].coefficient" readonly= "true" class="form-control"  value="${cableFactor}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableHundredAndTwentyList[{{idx}}]_electricalChief"  name="cableHundredAndTwentyList[{{idx}}].electricalChief" readonly= "true" class="form-control"  value="{{row.electricalChief}}"/>
+						</td>
+						<td class="text-center" width="10">
+							{{#delBtn}}<span class="close" onclick="delRow(this, '#cableHundredAndTwentyList{{idx}}','cableHundredAndTwentyList','cableHundredAndTwentyRowIdx')" title="删除">&times;</span>{{/delBtn}}
+						</td>
+					</tr>//-->
+				</script>
+				<script type="text/javascript">
+					var cableHundredAndTwentyRowIdx = 0, cableHundredAndTwentyTpl = $("#cableHundredAndTwentyTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					$(document).ready(function() {
+						var data = ${fns:toJson(cableHundredAndTwentyList)};
+						for (var i=0; i<data.length; i++){
+							console.log(data[i])
+							addRow('#cableHundredAndTwentyList', cableHundredAndTwentyRowIdx, cableHundredAndTwentyTpl, data[i]);
+							cableHundredAndTwentyRowIdx = cableHundredAndTwentyRowIdx + 1;
+						}
+					});
+				</script>
+				</div>
+			</div>
+		</div>
+			<div class="tabs-container hide" id="cableSeventy">
+				<div class="tab-content">
+					<div id="tab-5" class="tab-pane fade in  active">
+					<a class="btn btn-white btn-sm" onclick="addRow('#cableSeventyList', cableSeventyRowIdx, cableSeventyTpl);cableSeventyRowIdx = cableSeventyRowIdx + 1;" title="新增">	<i class="glyphicon glyphicon-plus"></i> 新建</a>
+					<table class="table table-striped table-bordered table-condensed">
+					<thead>
+						<tr>
+							<th class="hide"></th>
+							<th>起讫点</th>
+							<th>路径长(m)</th>
+							<th>上杆(m)</th>
+							<th>进站(m)</th>
+							<th>进设备(m)</th>
+							<th>系数</th>
+							<th>电气长(m)</th>
+							<th width="10">&nbsp;</th>
+						</tr>
+					</thead>
+					<tbody id="cableSeventyList">
+						<tr>
+							<td colspan="6">总长(km):</td>
+							<td width="200px">
+								<input type='text' id="cableSeventyListTotal"  name="cableSeventyListTotal" readonly= "true" class="form-control"  value=""/>
+							</td>
+						</tr>
+					</tbody>
+				</table>
+				<script type="text/template" id="cableSeventyTpl">//<!--
+				<tr id="cableSeventyList[{{idx}}]">
+						<td class="hide">
+							<input id="cableSeventyList{{idx}}_id" name="cableSeventyList[{{idx}}].id" type="hidden" value="{{row.id}}"/>
+							<input id="cableSeventyList{{idx}}_delFlag" name="cableSeventyList[{{idx}}].delFlag" type="hidden" value="0"/>
+						</td>
+
+						<td  class="max-width-250">
+						<input type='text' id="cableSeventyList[{{idx}}]_destination" name="cableSeventyList[{{idx}}].destination" class="form-control"  value="{{row.destination}}"/>
+						</td>
+
+						<td  class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_pathLength" name="cableSeventyList[{{idx}}].pathLength" class="form-control" onchange="cableJiSuan(this,'cableSeventyList[{{idx}}]','cableSeventyList',cableSeventyRowIdx)"  value="{{row.pathLength}}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_upperRod" name="cableSeventyList[{{idx}}].upperRod" class="form-control" onchange="cableJiSuan(this,'cableSeventyList[{{idx}}]','cableSeventyList',cableSeventyRowIdx)"  value="{{row.upperRod}}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_arrival" name="cableSeventyList[{{idx}}].arrival" class="form-control" onchange="cableJiSuan(this,'cableSeventyList[{{idx}}]','cableSeventyList',cableSeventyRowIdx)"  value="{{row.arrival}}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_incomingEquipment" name="cableSeventyList[{{idx}}].incomingEquipment" onchange="cableJiSuan(this,'cableSeventyList[{{idx}}]','cableSeventyList',cableSeventyRowIdx)" class="form-control"  value="{{row.incomingEquipment}}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_coefficient"  name="cableSeventyList[{{idx}}].coefficient" readonly= "true" class="form-control"  value="${cableFactor}"/>
+						</td>
+						<td class="max-width-250">
+							<input type='text' id="cableSeventyList[{{idx}}]_electricalChief"  name="cableSeventyList[{{idx}}].electricalChief" readonly= "true" class="form-control"  value="{{row.electricalChief}}"/>
+						</td>
+						<td class="text-center" width="10">
+							{{#delBtn}}<span class="close" onclick="delRow(this, '#cableSeventyList{{idx}}','cableSeventyList','cableSeventyRowIdx')" title="删除">&times;</span>{{/delBtn}}
+						</td>
+					</tr>//-->
+				</script>
+				<script type="text/javascript">
+					var cableSeventyRowIdx = 0, cableSeventyTpl = $("#cableSeventyTpl").html().replace(/(\/\/\<!\-\-)|(\/\/\-\->)/g,"");
+					$(document).ready(function() {
+						var data = ${fns:toJson(cableSeventyList)};
+						for (var i=0; i<data.length; i++){
+							console.log(data[i])
+							addRow('#cableSeventyList', cableSeventyRowIdx, cableSeventyTpl, data[i]);
+							cableSeventyRowIdx = cableSeventyRowIdx + 1;
+						}
+					});
+				</script>
+				</div>
+			</div>
+		</div>
+		</form:form>
+</body>
+</html>

+ 5 - 0
src/main/webapp/webpage/modules/sg/raiseCapitalDesign/raiseCapitalDesign.js

@@ -456,6 +456,11 @@ function aerialConductor(){
 	jp.openSaveDialog('架空导线计算表', "${ctx}/raiseCapitalDesign/aerialConductorForm?uuid="+pickUuid+"&item="+item, '800px', '500px');
 
 }
+function cableSection(){
+	var pickUuid = $("#pickUuid").val();
+	console.log(pickUuid);
+	jp.openSaveDialog('新增领料信息', "${ctx}/raiseCapitalDesign/cableSectionForm?uuid="+pickUuid, '80%', '80%');
+}
 
 function add(){
 	var projectName = $("#projectName").val();

+ 3 - 0
src/main/webapp/webpage/modules/sg/raiseCapitalDesign/raiseCapitalDesign.jsp

@@ -103,6 +103,9 @@
 						<button id="aerialConductor" class="btn btn-primary" onclick="aerialConductor()">
 							架空导线
 						</button>
+						<button id="cableSection" class="btn btn-primary" onclick="cableSection()">
+							电缆分段
+						</button>
 					<%--</shiro:hasPermission>--%>
 				</div>
 				<table class="table table-view">