소스 검색

bug修复

wangxiaoming 7 년 전
부모
커밋
592a6b5331
20개의 변경된 파일226개의 추가작업 그리고 59개의 파일을 삭제
  1. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsBom.java
  2. 6 6
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsMachine.java
  3. 10 0
      watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsSupplier.java
  4. 3 0
      watero-rst-interface/src/main/java/com/iamberry/rst/faces/pts/PtsBomService.java
  5. 22 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/PtsBomServiceImpl.java
  6. 1 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/PtsBomMapper.java
  7. 5 1
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml
  8. 23 21
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machinePartsMapper.xml
  9. 16 11
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineSupplierMapper.xml
  10. 5 5
      watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/ptsBomMapper.xml
  11. 31 4
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachineController.java
  12. 2 2
      watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/MachineController.java
  13. 1 1
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/add_bom.ftl
  14. 5 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/bom_details.ftl
  15. 4 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/bom_list.ftl
  16. 3 2
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/update_bom.ftl
  17. 64 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_particulars.ftl
  18. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/add_supplier.ftl
  19. 11 0
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/supplier_list.ftl
  20. 2 2
      watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/update_supplier.ftl

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsBom.java

@@ -31,6 +31,8 @@ public class PtsBom implements Serializable{
 
     private String produceName; //产品名称
 
+    private String componentsQuantity; //零件数量
+
     private List<PtsBomComponents> ptsBomComponentsList;//bom单的关联表
 
     public Integer getBomId() {
@@ -119,4 +121,12 @@ public class PtsBom implements Serializable{
     public void setBomVersion(String bomVersion) {
         this.bomVersion = bomVersion;
     }
+
+    public String getComponentsQuantity() {
+        return componentsQuantity;
+    }
+
+    public void setComponentsQuantity(String componentsQuantity) {
+        this.componentsQuantity = componentsQuantity;
+    }
 }

+ 6 - 6
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsMachine.java

@@ -20,8 +20,8 @@ public class PtsMachine implements Serializable{
     private Integer machineIsPrint;//是否打印
     private String machineCompoundImg;//合成图片
     private Integer machineProcessState;//生成流程状态
-    private String machineSoftwareVersion;//软件版本
-    private String machineHardwareVersion;//硬件版本
+    private Integer machineSoftwareVersion;//软件版本
+    private Integer machineHardwareVersion;//硬件版本
     private String machineNfcId;//nfcId(卡片ID)
     private Date machineCreateTime;//创建时间
     private Date machineUpdateTime;//修改时间
@@ -137,19 +137,19 @@ public class PtsMachine implements Serializable{
         this.machineUpdateTime = machineUpdateTime;
     }
 
-    public String getMachineSoftwareVersion() {
+    public Integer getMachineSoftwareVersion() {
         return machineSoftwareVersion;
     }
 
-    public void setMachineSoftwareVersion(String machineSoftwareVersion) {
+    public void setMachineSoftwareVersion(Integer machineSoftwareVersion) {
         this.machineSoftwareVersion = machineSoftwareVersion;
     }
 
-    public String getMachineHardwareVersion() {
+    public Integer getMachineHardwareVersion() {
         return machineHardwareVersion;
     }
 
-    public void setMachineHardwareVersion(String machineHardwareVersion) {
+    public void setMachineHardwareVersion(Integer machineHardwareVersion) {
         this.machineHardwareVersion = machineHardwareVersion;
     }
 

+ 10 - 0
watero-rst-core/src/main/java/com.iamberry.rst.core/pts/PtsSupplier.java

@@ -29,6 +29,8 @@ public class PtsSupplier implements Serializable {
 
     private Date supplierUpdateTime;//修改时间
 
+    private Integer componentsNumber; //零件数量
+
     public Integer getSupplierId() {
         return supplierId;
     }
@@ -108,4 +110,12 @@ public class PtsSupplier implements Serializable {
     public void setSupplierUpdateTime(Date supplierUpdateTime) {
         this.supplierUpdateTime = supplierUpdateTime;
     }
+
+    public Integer getComponentsNumber() {
+        return componentsNumber;
+    }
+
+    public void setComponentsNumber(Integer componentsNumber) {
+        this.componentsNumber = componentsNumber;
+    }
 }

+ 3 - 0
watero-rst-interface/src/main/java/com/iamberry/rst/faces/pts/PtsBomService.java

@@ -23,6 +23,9 @@ public interface PtsBomService {
     //查询单个bom单
     PtsBom getPtsBom(PtsBom ptsBom);
 
+    //查询单个bom单详情
+    PtsBom getPtsBomDetails(PtsBom ptsBom);
+
     //修改bom
     Integer updatePtsBom(PtsBom ptsBom);
 

+ 22 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/PtsBomServiceImpl.java

@@ -4,7 +4,9 @@ import com.github.pagehelper.PageHelper;
 import com.iamberry.rst.core.page.PagedResult;
 import com.iamberry.rst.core.pts.PtsBom;
 import com.iamberry.rst.core.pts.PtsBomComponents;
+import com.iamberry.rst.core.pts.PtsComponents;
 import com.iamberry.rst.faces.pts.PtsBomService;
+import com.iamberry.rst.service.pts.mapper.MachinePartsMapper;
 import com.iamberry.rst.service.pts.mapper.PtsBomMapper;
 import com.iamberry.rst.util.PageUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -19,6 +21,8 @@ public class PtsBomServiceImpl implements PtsBomService {
     @Autowired
     private PtsBomMapper ptsBomMapper;
 
+    @Autowired
+    private MachinePartsMapper machinePartsMapper;
 
     //查询bom单列表
     @Override
@@ -63,9 +67,26 @@ public class PtsBomServiceImpl implements PtsBomService {
         return bom;
     }
 
+    //查询单个bom详情
+    @Override
+    public PtsBom getPtsBomDetails(PtsBom ptsBom) {
+        PtsBom bom = ptsBomMapper.getPtsBom(ptsBom);
+        List<PtsBomComponents> ptsBomComponentsList = ptsBomMapper.listPtsComponents(ptsBom.getBomId());
+        if (ptsBomComponentsList != null && ptsBomComponentsList.size()>0) {
+            for (PtsBomComponents ptsBomComponents : ptsBomComponentsList) {
+                PtsComponents ptsComponents = new PtsComponents();
+                ptsComponents.setComponentsId(ptsBomComponents.getComponentsId());
+                ptsComponents = machinePartsMapper.getmachineParts(ptsComponents);
+                ptsBomComponents.setPtsComponents(ptsComponents);
+            }
+            bom.setPtsBomComponentsList(ptsBomComponentsList);
+        }
+        return bom;
+    }
+
     //修改bom
     @Override
-    public Integer updatePtsBom(PtsBom ptsBom){
+    public Integer updatePtsBom(PtsBom ptsBom) {
         Integer flag;
         flag = ptsBomMapper.updatePtsBom(ptsBom);
         if (flag < 0) {

+ 1 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/PtsBomMapper.java

@@ -22,7 +22,7 @@ public interface PtsBomMapper {
     //查询单个bom单
     PtsBom getPtsBom(PtsBom ptsBom);
 
-    //查询单个bom单
+    //查询bom单的零件
     List<PtsBomComponents> listPtsComponents(Integer bomId);
 
     //修改bom

+ 5 - 1
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineMapper.xml

@@ -153,7 +153,11 @@
          machine_create_time machineCreateTime,
          machine_update_time machineUpdateTime,
          machine_produce_type machineProduceType,
-         machine_produce_id machineProduceId
+         machine_produce_id machineProduceId,
+         machine_batch_id machineBatchId,
+         machine_bom_id  machineBomId,
+         machine_is_retreading  machineIsRetreading,
+         machine_line  machineLine
         from tb_rst_pts_machine WHERE  machine_id = #{machineId}
         order by machine_create_time desc
     </select>

+ 23 - 21
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machinePartsMapper.xml

@@ -16,36 +16,38 @@
 
     <select id="getmachineParts" parameterType="PtsComponents" resultType="PtsComponents">
         SELECT
-        components_id AS componentsId,
-        supplier_id AS supplierId,
-        produce_id AS produceId,
-        components_no AS  componentsNo,
-        components_name AS componentsName,
-        components_type AS  componentsType,
-        components_cost AS componentsCost,
-        components_weight AS componentsWeight,
-        components_material AS componentsMaterial,
-        components_mbsc AS componentsMbsc,
-        components_specification AS componentsSpecification,
-        components_img AS componentsImg,
-        components_status AS componentsStatus,
-        components_desc AS componentsDesc,
-        components_create_time AS componentsCreateTime,
-        components_update_time AS componentsUpdateTime
+        t.components_id AS componentsId,
+        t.supplier_id AS supplierId,
+        t.produce_id AS produceId,
+        t.components_no AS  componentsNo,
+        t.components_name AS componentsName,
+        t.components_type AS  componentsType,
+        t.components_cost AS componentsCost,
+        t.components_weight AS componentsWeight,
+        t.components_material AS componentsMaterial,
+        t.components_mbsc AS componentsMbsc,
+        t.components_specification AS componentsSpecification,
+        t.components_img AS componentsImg,
+        t.components_status AS componentsStatus,
+        t.components_desc AS componentsDesc,
+        t.components_create_time AS componentsCreateTime,
+        t.components_update_time AS componentsUpdateTime,
+        s.supplier_name AS supplierName
         FROM
-        tb_rst_pts_components
+        tb_rst_pts_components t
+        LEFT JOIN tb_rst_pts_supplier s on t.supplier_id = s.supplier_id
         <where>
             <if test="produceId != null and produceId != ''">
-                produce_id = #{produceId}
+                t.produce_id = #{produceId}
             </if>
             <if test="componentsStatus != null and componentsStatus != ''">
-                AND components_status = #{componentsStatus}
+                AND t.components_status = #{componentsStatus}
             </if>
             <if test="componentsNo != null and componentsNo != ''">
-                AND components_no = #{componentsNo}
+                AND t.components_no = #{componentsNo}
             </if>
             <if test="componentsId != null and componentsId != ''">
-                AND components_id = #{componentsId}
+                AND t.components_id = #{componentsId}
             </if>
         </where>
     </select>

+ 16 - 11
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/machineSupplierMapper.xml

@@ -5,18 +5,21 @@
 
     <select id="listMachineSupplier"  resultType="PtsSupplier" parameterType="PtsSupplier">
         SELECT
-            supplier_id AS supplierId,
-            supplier_name AS supplierName,
-            supplier_abbreviation AS supplierAbbreviation,
-            supplier_address AS  supplierAddress,
-            supplier_contact_person AS supplierContactPerson,
-            supplier_tel AS  supplierTel,
-            supplier_phone AS supplierPhone,
-            supplier_email AS supplierEmail,
-            supplier_create_time AS supplierCreateTime,
-            supplier_update_time AS supplierUpdateTime
+            trps.supplier_id AS supplierId,
+            trps.supplier_name AS supplierName,
+            trps.supplier_abbreviation AS supplierAbbreviation,
+            trps.supplier_address AS  supplierAddress,
+            trps.supplier_contact_person AS supplierContactPerson,
+            trps.supplier_tel AS  supplierTel,
+            trps.supplier_phone AS supplierPhone,
+            trps.supplier_email AS supplierEmail,
+            trps.supplier_create_time AS supplierCreateTime,
+            trps.supplier_update_time AS supplierUpdateTime,
+            IFNULL(COUNT(trpc.components_id),0) AS componentsNumber
         FROM
-            tb_rst_pts_supplier
+            tb_rst_pts_supplier trps
+        LEFT JOIN
+            tb_rst_pts_components trpc ON trps.supplier_id = trpc.supplier_id
         <where>
             <if test="supplierName !=null and supplierName !=''">
                 supplier_name like CONCAT('%',#{supplierName},'%')
@@ -28,6 +31,8 @@
                 supplier_tel like CONCAT('%',#{supplierTel},'%')
             </if>
         </where>
+        GROUP BY trps.supplier_id
+        ORDER BY trps.supplier_id DESC
     </select>
 
     <insert id="savePtsSupplier" parameterType="PtsSupplier" useGeneratedKeys="true" >

+ 5 - 5
watero-rst-service/src/main/java/com/iamberry/rst/service/pts/mapper/ptsBomMapper.xml

@@ -11,6 +11,7 @@
         trpb.bom_remarks AS bomRemarks,
         trpb.bom_create_time AS bomCreateTime,
         trpb.bom_update_time AS bomUpdateTime,
+        IFNULL(SUM(trpbc.bom_components_quantity),0) AS componentsQuantity,
         ifnull(SUM(trpc.components_cost * trpbc.bom_components_quantity),0)  AS allComponentsCost,
         ifnull(SUM(trpc.components_weight * trpbc.bom_components_quantity),0)  AS allComponentsWeight,
         trpp.produce_name AS produceName
@@ -49,6 +50,7 @@
         trpb.bom_remarks AS bomRemarks,
         trpb.bom_create_time AS bomCreateTime,
         trpb.bom_update_time AS bomUpdateTime,
+        IFNULL(SUM(trpbc.bom_components_quantity),0) AS componentsQuantity,
         ifnull(SUM(trpc.components_cost * trpbc.bom_components_quantity),0)  AS allComponentsCost,
         ifnull(SUM(trpc.components_weight * trpbc.bom_components_quantity),0)  AS allComponentsWeight,
         trpp.produce_name AS produceName
@@ -57,11 +59,9 @@
         LEFT JOIN tb_rst_pts_bom_components trpbc ON trpb.bom_id = trpbc.bom_id
         LEFT JOIN tb_rst_pts_components trpc ON trpbc.components_id = trpc.components_id
         LEFT JOIN tb_rst_pts_produce trpp ON trpb.produce_id = trpp.produce_id
-        <where>
-            <if test="bomId !=null">
-                AND trpb.bom_id = #{bomId}
-            </if>
-        </where>
+        WHERE
+              trpb.bom_id = #{bomId}
+
         GROUP BY trpb.bom_id
     </select>
 

+ 31 - 4
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/AdminMachineController.java

@@ -54,6 +54,10 @@ public class AdminMachineController {
 
     @Autowired
     private PtsBomService ptsBomService;
+
+    @Autowired
+    private MachinePartsService machinePartsService;
+
     /**
      * 查询机器列表
      *
@@ -231,6 +235,29 @@ public class AdminMachineController {
         PtsMachine ptsMachine = machineService.getMachine(machineId);
         ModelAndView mv = new ModelAndView("pts/machine/machine_particulars");
         List<PtsMachineLogs> machineLogsList = machineService.listMachineLogs(machineId);
+
+        PtsBom ptsBom = new PtsBom();
+        if(ptsMachine.getMachineBomId() != null && ptsMachine.getMachineBomId() != 0){
+            //获取bom单
+            ptsBom.setBomId(ptsMachine.getMachineBomId());
+            ptsBom = ptsBomService.getPtsBomDetails(ptsBom);
+        }
+
+        PtsBatch ptsBatch = new PtsBatch();
+        if(ptsMachine.getMachineBatchId() != null && ptsMachine.getMachineBatchId() != 0){
+            ptsBatch.setBatchId(ptsMachine.getMachineBatchId());
+            ptsBatch = ptsBatchService.getPtsBatch(ptsBatch);
+        }
+
+        PtsMachineVersion ptsMachineVersion = new PtsMachineVersion();
+        if(ptsMachine.getMachineSoftwareVersion() != null && ptsMachine.getMachineSoftwareVersion() != 0){
+            ptsMachineVersion.setMachineVersionId(ptsMachine.getMachineSoftwareVersion());
+            ptsMachineVersion = machineVersionService.getMachineVersion(ptsMachineVersion);
+        }
+
+        mv.addObject("ptsMachineVersion", ptsMachineVersion);
+        mv.addObject("ptsBatch", ptsBatch);
+        mv.addObject("ptsBom", ptsBom);
         mv.addObject("machineLogsList", machineLogsList);
         mv.addObject("ptsMachine", ptsMachine);
         return mv;
@@ -467,8 +494,8 @@ public class AdminMachineController {
             ptsMachine.setMachineCreateTime(new Date());//创建时间
             ptsMachine.setMachineProduceType(produce.getProduceType());//产品类型
             ptsMachine.setMachineNfcId(productNfcId);
-            ptsMachine.setMachineHardwareVersion(machineSoftwareVersion);
-            ptsMachine.setMachineSoftwareVersion(machineSoftwareVersion);
+            ptsMachine.setMachineHardwareVersion(Integer.valueOf(machineSoftwareVersion));
+            ptsMachine.setMachineSoftwareVersion(Integer.valueOf(machineSoftwareVersion));
             ptsMachine.setMachineProduceId(Integer.valueOf(produceId));
             ptsMachine.setMachineIsRetreading(2);
             ptsList.add(ptsMachine);
@@ -618,8 +645,8 @@ public class AdminMachineController {
             ptsMachine.setMachineCreateTime(new Date());//创建时间
             ptsMachine.setMachineProduceType(produce.getProduceType());//产品类型
             ptsMachine.setMachineNfcId(productNfcId);
-            ptsMachine.setMachineHardwareVersion(ptsBom.getBomVersion());
-            ptsMachine.setMachineSoftwareVersion(ptsBatch.getSoftwareVersionNo());
+            //ptsMachine.setMachineHardwareVersion(ptsBom.getBomId());
+            ptsMachine.setMachineSoftwareVersion(ptsBatch.getBatchSoftwareVersionId());
             ptsMachine.setMachineProduceId(produce.getProduceId());
             ptsMachine.setMachineIsRetreading(1);
             ptsMachine.setMachineBatchId(batchId);

+ 2 - 2
watero-rst-web/src/main/java/com/iamberry/rst/controllers/pts/MachineController.java

@@ -110,8 +110,8 @@ public class MachineController {
             ptsMachine.setMachineCreateTime(new Date());//创建时间
             ptsMachine.setMachineProduceType(produce.getProduceType());//产品类型
             ptsMachine.setMachineNfcId(nfcId);
-            ptsMachine.setMachineHardwareVersion("30");
-            ptsMachine.setMachineSoftwareVersion("30");
+            //ptsMachine.setMachineHardwareVersion(30);
+            ptsMachine.setMachineSoftwareVersion(ptsBatch.getBatchSoftwareVersionId());
             ptsMachine.setMachineProduceId(produce.getProduceId());
             ptsMachine.setMachineBomId(0);//默认为0
             ptsMachine.setMachineBatchId(0);//默认为0

+ 1 - 1
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/add_bom.ftl

@@ -60,7 +60,7 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>版本:</label>
+            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>硬件版本:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <input type="text" class="input-text" value="" id="bomVersion" name="bomVersion" placeholder="请输入1-10位的版本号" datatype="*1-10" errormsg="请输入1-10位的版本号!">
             </div>

+ 5 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/bom_details.ftl

@@ -61,6 +61,11 @@
             </div>
 
             <div class="input-box">
+                <span class="my-con-right content">硬件版本:</span>&nbsp;&nbsp;
+                <span class="my-con-left content">${ptsBom.bomVersion}</span>
+            </div>
+
+            <div class="input-box">
                 <span class="my-con-right content">Bom备注:</span>&nbsp;&nbsp;
                 <span class="my-con-text content">${ptsBom.bomRemarks ! ''}</span>
             </div>

+ 4 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/bom_list.ftl

@@ -54,6 +54,8 @@
             <th width="50">Bom编号</th>
             <th width="60">所属产品</th>
             <th width="100">bom名称</th>
+            <th width="80">硬件版本</th>
+            <th width="80">零件总数量</th>
             <th width="80">零件总成本(元)</th>
             <th width="80">零件总重(g)</th>
             <th width="100">备注</th>
@@ -69,6 +71,8 @@
                             <td>${bom.bomId!''}</td>
                             <td>${bom.produceName!''}</td>
                             <td>${bom.bomName!''}</td>
+                            <td>${bom.bomVersion!''}</td>
+                            <td>${bom.componentsQuantity!'0'}</td>
                             <td><#if bom.allComponentsCost?? >${bom.allComponentsCost/100}</#if></td>
                             <td><#if bom.allComponentsWeight?? >${bom.allComponentsWeight}</#if></td>
                             <td>${bom.bomRemarks!''}</td>

+ 3 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/bom/update_bom.ftl

@@ -49,7 +49,7 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>版本:</label>
+            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>硬件版本:</label>
             <div class="formControls col-xs-8 col-sm-9">
                 <input type="text" class="input-text" value="${ptsBom.bomVersion}" id="bomVersion" name="bomVersion" placeholder="请输入1-10位的版本号" datatype="*1-10" errormsg="请输入1-10位的版本号!">
             </div>
@@ -109,7 +109,8 @@
 
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-3"></label>
-            <span class="c-red">*提示</span><span>:新增的Bom,需要批次选中该Bom单,才会生效!</span>
+            <span class="c-red" style="display: block;float: left;">*提示</span>
+            <span style="display: block;float: left; width: 420px;">:修改的Bom,会影响已经生成的机器。 如果不是因为录入错误而修改了某个清单的零件、零件数量,建议做增加Bom处理,并做对应软硬件版本升级。</span>
         </div>
         <div class="row cl">
             <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">

+ 64 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/machine/machine_particulars.ftl

@@ -127,6 +127,8 @@
         p{margin: 0;}
         input[type=radio]{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-1.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
         input[type=radio]:checked{-webkit-appearance:none;appearance:none;background: url(/rst/common/images/pts/radio-2.png) center center no-repeat;background-size:auto 100%;width: 20px;height: 20px;margin-right: 10px;}
+        .rj-a{text-decoration:none; color: #f6393f;}
+        .rj-a:hover{text-decoration:underline;color: #f6393f;}
     </style>
 <#include "/base/list_base.ftl">
 </head>
@@ -142,6 +144,68 @@
         <li>机器条码:${ptsMachine.machineBarcode!''}</li>
         <li>生产状态:<#if ptsMachine.machineProcessState == 1><span class="text-blue">正常</#if>
 		<#if ptsMachine.machineProcessState == 2><span class="text-red">异常</#if></span></li>
+
+        <li style="width: 100%;height: 25px;">
+            <div style="float: left;width: 200px;">软件版本:
+                <span class="text-red">
+                    <a class="rj-a" style="" href="javascript:void(0);" title="点击查看软件版本" onclick="admin_to_version(${ptsMachine.machineSoftwareVersion ! ''})">${ptsMachineVersion.machineVersionNo ! ''}</a>
+                </span>
+            </div>
+            <div style="float: left;width: 200px;">硬件版本:<span class="text-red">${ptsBom.bomVersion ! ''}</span></div>
+        </li>
+
+        <li style="width: 100%;height: 25px;">
+            <div style="float: left;width: 200px;">所属批次:${ptsBatch.batchNo ! ''}</div>
+            <div style="float: left;width: 200px;">所属Bom:${ptsBom.bomName ! ''}</div>
+        </li>
+
+        <li  style="width: 100%;height: 25px;">Bom零件清单</li>
+        <table class="table table-border table-bordered table-bg table-hover table-sort">
+            <thead>
+            <tr class="text-c">
+                <th width="80">零件编号</th>
+                <th width="">零件名称</th>
+                <th width="">零件数量</th>
+                <th width="">零件成本(元)</th>
+                <th width="">零件净重(g)</th>
+                <th width="">零件规格</th>
+                <th width="">零件供应商</th>
+            </tr>
+            </thead>
+            <tbody id="componentaAll">
+            <#if ptsBom.ptsBomComponentsList?? &&  (ptsBom.ptsBomComponentsList?size > 0) >
+                <#list ptsBom.ptsBomComponentsList  as bomComponents>
+                    <#assign compont = bomComponents.ptsComponents/>
+                    <tr class="text-c">
+                        <td>
+                        ${compont.componentsNo}
+                        </td>
+                        <td>
+                        ${compont.componentsName}
+                        </td>
+                        <td>
+                        ${bomComponents.bomComponentsQuantity}
+                        </td>
+                        <td>
+                            <#if compont.componentsCost?? >${compont.componentsCost/100}</#if>
+                        </td>
+                        <td>
+                        ${compont.componentsWeight}
+                        </td>
+                        <td>
+                        ${compont.componentsSpecification}
+                        </td>
+                        <td>
+                        ${compont.supplierName! ''}
+                        </td>
+                    </tr>
+                </#list>
+            <#else>
+                    <tr><td colspan="7" class="td-manage text-c" >该Bom单没有零件!</td></tr>
+            </#if>
+            </tbody>
+        </table>
+
         <li>
             <div class="content">
                 <article>

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/add_supplier.ftl

@@ -56,9 +56,9 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人座机:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人座机:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
+                <input type="text" class="input-text" value="" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^\s*$/|/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
             </div>
         </div>
 

+ 11 - 0
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/supplier_list.ftl

@@ -51,6 +51,7 @@
             <th width="100">邮箱</th>
             <th width="80">地址</th>
             <th width="80">最近修改时间</th>
+            <th width="80">零件数量</th>
             <th width="80">操作</th>
         </tr>
         </thead>
@@ -67,6 +68,11 @@
                             <td>${supplier.supplierAddress!''}</td>
                             <td>${(supplier.supplierUpdateTime?string("yyyy-MM-dd HH:mm:ss"))!''}</td>
                             <td>
+                                <a style="text-decoration:none" href="javascript:void(0);" title="编辑" onclick="admin_to_components(${supplier.supplierId!''})">
+                                    ${supplier.componentsNumber!'0'}
+                                </a>
+                            </td>
+                            <td>
                                 <a style="text-decoration:none" href="javascript:void(0);" title="编辑" onclick="admin_update_supplier(${supplier.supplierId!''})">
                                     <i class="Hui-iconfont">&#xe6df;</i>
                                 </a>&nbsp;
@@ -98,6 +104,11 @@
     function admin_update_supplier(supplierId) {
         window.location.href= "${path}/admin/supplier/to_update_supplier?supplierId="+supplierId;
     }
+
+    /*跳转到零件页面*/
+    function admin_to_components(supplierId){
+        window.location.href= "${path}/admin/machineParts/_parts_list?supplierId="+supplierId;
+    }
 </script>
 </body>
 </html>

+ 2 - 2
watero-rst-web/src/main/webapp/WEB-INF/views/pts/supplier/update_supplier.ftl

@@ -57,9 +57,9 @@
         </div>
 
         <div class="row cl">
-            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>联系人座机:</label>
+            <label class="form-label col-xs-4 col-sm-3">联系人座机:</label>
             <div class="formControls col-xs-8 col-sm-9">
-                <input type="text" class="input-text" value="${ptsSupplier.supplierPhone!''}" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
+                <input type="text" class="input-text" value="${ptsSupplier.supplierPhone!''}" id="supplierPhone" name="supplierPhone" placeholder="请输入联系人座机" datatype="/^\s*$/|/^0\d{2,3}-?\d{7,8}$/" errormsg="联系人座机格式不正确!">
             </div>
         </div>