Ver Fonte

4库红黄灯

JiangPengLi há 2 meses atrás
pai
commit
47b0ac399b
20 ficheiros alterados com 430 adições e 17 exclusões
  1. 42 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/enums/RedLightEnum.java
  2. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java
  3. 24 1
      projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml
  4. 10 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java
  5. 2 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java
  6. 7 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java
  7. 36 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/EditSubInfoVO.java
  8. 4 0
      projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java
  9. 2 0
      projects/src/main/java/com/rtrh/projects/web/controller/projects/ProjectsOverdueController.java
  10. 16 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java
  11. 19 10
      projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java
  12. 12 0
      projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java
  13. 5 1
      projects/src/main/webapp/asset/modules/common-utils.js
  14. 2 0
      projects/src/main/webapp/vmodules/project/projectInfo.jsp
  15. 34 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp
  16. 11 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp
  17. 169 0
      projects/src/main/webapp/vmodules/subject/subInfo/tz/light.jsp
  18. 11 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp
  19. 11 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp
  20. 11 1
      projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

+ 42 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/enums/RedLightEnum.java

@@ -0,0 +1,42 @@
+package com.rtrh.projects.modules.projects.enums;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * 红黄灯枚举
+ */
+@Getter
+@AllArgsConstructor
+@JsonFormat(shape = JsonFormat.Shape.OBJECT)
+public enum RedLightEnum {
+
+    RED("1", "红灯"),
+    YELLOW("2", "黄灯"),
+    WHITE("3", "白灯"),
+    GREEN("0", "绿灯")
+    ;
+
+    private final String code;
+    private final String name;
+
+    public static String getNameByCode(String code) {
+        return Arrays.stream(values()).filter(x -> x.code.equals(code)).findFirst().map(x -> x.name).orElse(null);
+    }
+
+    public static List<Map<String,String>> getAll(){
+        return Arrays.stream(values()).map(x -> {
+            Map<String,String> map = new HashMap<>();
+            map.put("code",x.code);
+            map.put("name",x.name);
+            return map;
+        }).collect(Collectors.toList());
+    }
+}

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.java

@@ -117,4 +117,6 @@ public interface SubInfoMapper {
     void removeFour(@Param("id") String id);
 
     void cancelRemove(@Param("id")String id);
+
+    void editStatusRedLight(@Param("vo") SubInfoGxj vo);
 }

+ 24 - 1
projects-service/src/main/java/com/rtrh/projects/modules/projects/mapper/SubInfoMapper.xml

@@ -32,6 +32,14 @@
     <update id="cancelRemove">
         update sub_info set status="1",last_update_time = now() where id=#{id}
     </update>
+    <update id="editStatusRedLight">
+        UPDATE sub_info
+        SET status_red = #{vo.statusRed},
+            red_name = #{vo.redName},
+            reason = #{vo.reason},
+            red_date = #{vo.redDate}
+        WHERE sub_id =#{vo.subId}
+    </update>
     <select id="exportSmzkDetailExcel" resultType="com.rtrh.projects.modules.projects.vo.export.SmzkDetailVo">
         SELECT sub_info.id as id,
         sub_info.sub_name as subName,
@@ -191,6 +199,11 @@
         s.kind_nature AS kindNature,
         s.addre AS addre,
         s.filing_date AS filingDate
+               ,
+        s.status_red AS statusRed,
+        s.reason,
+        s.red_name AS redName,
+        s.red_date AS redDate
         <if test="vo.status!=null and vo.status==3 and vo.month!=null and vo.month!=''">
             ,src.yearPlanAmt
         </if>
@@ -205,6 +218,9 @@
             <if test="vo.subName!=null and vo.subName!=''">
                 and s.sub_name like CONCAT('%', #{vo.subName}, '%')
             </if>
+            <if test="vo.statusRed!=null and vo.statusRed!=''">
+                and s.status_red = #{vo.statusRed}
+            </if>
             <if test="vo.cbStatus!=null and vo.cbStatus!=''">
                 and s.cb_status = #{vo.cbStatus}
             </if>
@@ -301,6 +317,9 @@
             <if test="vo.subName!=null and vo.subName!=''">
                 and sub_name like CONCAT('%', #{vo.subName}, '%')
             </if>
+            <if test="vo.statusRed!=null and vo.statusRed!=''">
+                and s.status_red = #{vo.statusRed}
+            </if>
             <if test="vo.cbStatus!=null and vo.cbStatus!=''">
                 and cb_status = #{vo.cbStatus}
             </if>
@@ -388,7 +407,11 @@
             last_update_time AS lastUpdateTime,
             status_lamp AS statusLamp,
             kind_nature AS kindNature,
-            addre
+            addre,
+            status_red AS statusRed,
+            reason,
+            red_name AS redName,
+            red_date AS redDate
         from sub_info
         where id = #{id}
     </select>

+ 10 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/po/SubInfoGxj.java

@@ -157,6 +157,16 @@ public class SubInfoGxj extends TableBaseColomn implements Serializable {
     // 投资类型: 1政府类、2 投资类
     private String kindNature;
 
+    // 红黄灯 '1',红灯 '2',黄灯 '0',绿灯 '3',白灯
+    private String statusRed;
+    private String statusRedName;
+    // 红黄灯原因(红、黄、白)
+    private String reason;
+    // 红黄灯设置人员名
+    private String redName;
+    // 红黄灯时间
+    private Date redDate;
+
     // 前期手续数量
     private Long preProceNum;
     private Long preEndNum;

+ 2 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/SubInfoService.java

@@ -464,4 +464,6 @@ public interface SubInfoService {
 	void cancelRemove(MoveDbParamVo vo, LoginUserVO loginUser);
 
 	StaticsVO statics(QTDTO qtdto);
+
+	void editStatusRedLight(SubInfoGxj vo, LoginUserVO loginUser);
 }

+ 7 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/service/impl/SubInfoServiceImpl.java

@@ -6025,6 +6025,13 @@ public class SubInfoServiceImpl implements SubInfoService {
         return vo;
     }
 
+    @Override
+    public void editStatusRedLight(SubInfoGxj vo, LoginUserVO loginUser) {
+        vo.setRedName(loginUser.getLoginName());
+        vo.setRedDate(new Date());
+        subInfoMapper.editStatusRedLight(vo);
+    }
+
     /**
      * 计算比率并保留一位小数
      * @param numerator 分子

+ 36 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/EditSubInfoVO.java

@@ -0,0 +1,36 @@
+package com.rtrh.projects.modules.projects.vo;
+
+import com.rtrh.projects.modules.projects.po.SubInfoGxj;
+import lombok.Getter;
+import lombok.Setter;
+
+@Setter
+@Getter
+public class EditSubInfoVO {
+
+	/**
+	 * 项目基本信息
+	 */
+	private SubInfoGxj subInfo;
+
+	/**
+	 * 计划信息
+	 */
+	private SubListPlanVO planList;
+
+	/**
+	 * 监管单位
+	 */
+	private SubInfoJgDwVO manage;
+
+
+	/**
+	 * 资金来源Id
+	 */
+	private String zjlyId;
+
+	/**
+	 * 1 申报资金  2下达资金
+	 */
+	private String cat;
+}

+ 4 - 0
projects-service/src/main/java/com/rtrh/projects/modules/projects/vo/SubInfoQueryTzVO.java

@@ -1,6 +1,7 @@
 package com.rtrh.projects.modules.projects.vo;
 
 import java.math.BigDecimal;
+import java.util.Date;
 import java.util.List;
 
 import io.swagger.annotations.ApiModelProperty;
@@ -446,4 +447,7 @@ public class SubInfoQueryTzVO {
     @ApiModelProperty("数据权限")
     // 数据权限
     private List<String> subjectAuthIds;
+
+    // 红黄灯 '1',红灯 '2',黄灯 '0',绿灯 '3',白灯
+    private String statusRed;
 }

+ 2 - 0
projects/src/main/java/com/rtrh/projects/web/controller/projects/ProjectsOverdueController.java

@@ -4,6 +4,7 @@ import java.math.BigDecimal;
 import java.util.*;
 
 import com.rtrh.core.repository.Page;
+import com.rtrh.projects.modules.projects.enums.RedLightEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.SubInfoGxj;
 import com.rtrh.projects.modules.projects.service.*;
@@ -86,6 +87,7 @@ public class ProjectsOverdueController extends BaseController {
 	@RequestMapping(value="/overdue/projectInfo2",method=RequestMethod.GET)
 	public ModelAndView projectInfo2(Model model,String subId,String lastUrl, Boolean layer, String queryYear, Boolean isCt) {
 		SubInfoGxj vo = subInfoService.findById(subId);
+		vo.setStatusRedName(RedLightEnum.getNameByCode(vo.getStatusRed()));
 		model.addAttribute("sunInfo", vo);
 		model.addAttribute("layer", layer);
 		model.addAttribute("queryYear", queryYear);

+ 16 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoController.java

@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.rtrh.projects.modules.projects.dao.SubMajorMonthDao;
 import com.rtrh.projects.modules.projects.dao.SubSourceDao;
+import com.rtrh.projects.modules.projects.enums.RedLightEnum;
 import com.rtrh.projects.modules.projects.enums.SubInfoStatusEnum;
 import com.rtrh.projects.modules.projects.po.*;
 import com.rtrh.projects.modules.rolemeun.po.SecRole;
@@ -238,6 +239,7 @@ public class SubInfoController extends BaseController {
 
         model.put("TZXZ", tSysTableService.getByKind(SysTableKind.TZXZ));
         model.put("subInfoStatus", SubInfoStatusEnum.values());
+        model.put("statusRedList", RedLightEnum.getAll());
 
         model.put("HYDW", jUnitService.getUnitByKind(JUnitKind.ZFDW));
         model.put("BQ", tSysTableService.getByKind(SysTableKind.BQ));
@@ -1158,6 +1160,20 @@ public class SubInfoController extends BaseController {
         return begin + "~" + end;
     }
 
+
+    /**
+     * 红黄灯
+     */
+    @GetMapping("light")
+    public ModelAndView light(Model model, String subId) {
+        SubInfoGxj subInfoGxj = subInfoService.findById(subId);
+        model.addAttribute("subId", subInfoGxj.getSubId());
+        model.addAttribute("sourceStatusRed", subInfoGxj.getStatusRed());
+        model.addAttribute("statusRedList", RedLightEnum.getAll());
+        model.addAttribute("reason", subInfoGxj.getReason());
+        return new ModelAndView("/vmodules/subject/subInfo/tz/light.jsp");
+    }
+
     @Log("页面:【项目详情页】,执行操作:查询")
     @GetMapping("detailView2")
     public ModelAndView viewDetail(Model model, String subId, String lastUrl, Boolean layer, String queryYear, Boolean isCt) {

+ 19 - 10
projects/src/main/java/com/rtrh/projects/web/controller/subject/SubInfoExportController.java

@@ -1105,16 +1105,25 @@ public class SubInfoExportController extends BaseController {
     @PostMapping("/exportDetailExcel")
     public void exportDetailExcel(@RequestBody SubInfoQueryTzVO queryVO) {
         WebLogAspect.content.set(String.format("页面:【项目四库管理-%s库】,执行操作:导出明细", StringUtils.isBlank(queryVO.getStatus()) ? "项目总" : SubInfoStatusEnum.getDesc(queryVO.getStatus())));
-        if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
-            exportCbDetailExcel(queryVO);
-        }else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())){
-            exportNewDetailExcel(queryVO);
-        }else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())){
-            exportMainDetailExcel(queryVO);
-        } else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
-            exportTcDetailExcel(queryVO);
-        } else {
-            exportZkDetailExcel(queryVO);
+        try {
+            if (SubInfoStatusEnum.CB.getCode().equals(queryVO.getStatus())) {
+                exportCbDetailExcel(queryVO);
+            }else if (SubInfoStatusEnum.XJ.getCode().equals(queryVO.getStatus())){
+                exportNewDetailExcel(queryVO);
+            }else if (SubInfoStatusEnum.ZJ.getCode().equals(queryVO.getStatus())){
+                exportMainDetailExcel(queryVO);
+            } else if (SubInfoStatusEnum.TC.getCode().equals(queryVO.getStatus())) {
+                exportTcDetailExcel(queryVO);
+            } else {
+                exportZkDetailExcel(queryVO);
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            try {
+                response.getWriter().write(e.getMessage());
+            } catch (IOException ex) {
+                ex.printStackTrace();
+            }
         }
     }
 

+ 12 - 0
projects/src/main/java/com/rtrh/projects/web/controller/subject/api/SubInfoApiController.java

@@ -819,6 +819,18 @@ public class SubInfoApiController extends BaseController {
         return message;
     }
 
+    @PostMapping("/editStatusRedLight")
+    public Message editStatusRedLight(@RequestBody SubInfoGxj vo) {
+        Message message = new Message();
+        try {
+            subInfoService.editStatusRedLight(vo, getCurUser().getLoginUser());
+        } catch (Exception e) {
+            logger.error("", e);
+            message.addError(e.getMessage());
+        }
+        return message;
+    }
+
     /**
      * 保存编辑的项目信息
      *

+ 5 - 1
projects/src/main/webapp/asset/modules/common-utils.js

@@ -331,7 +331,11 @@ $(function($, mod){
 				            }
 			        	}else {
 			        		App.closeLoading();
-			        		App.msg.warn(errMsg||"下载失败");
+
+							req.responseType = "text";
+							errMsg = req.responseText || "下载失败";
+
+			        		App.msg.warn(errMsg);
 			        	}
 			        }
 			    };

+ 2 - 0
projects/src/main/webapp/vmodules/project/projectInfo.jsp

@@ -155,6 +155,8 @@
                 <tr>
                     <td class="label">项目单位</td>
                     <td>${sunInfo.unitDesc }</td>
+                    <td class="label">红黄灯</td>
+                    <td>${sunInfo.statusRedName }</td>
                 </tr>
                 <tr>
                     <td class="label">创建用户</td>

+ 34 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/cb.jsp

@@ -160,6 +160,28 @@
                                 </div>
                                 <div class="layui-col-xs6 layui-col-sm6 layui-col-md6 hiddenParam">
                                     <div class="layui-form-item">
+<%--                                        <label class="layui-form-label required label-longers">红黄灯</label>--%>
+<%--                                        <div class="layui-input-block">--%>
+<%--                                            <select name="statusRed">--%>
+<%--                                                <option value="">请选择</option>--%>
+<%--                                                <c:forEach items="${statusRedList }" var="l">--%>
+<%--                                                    <option value="${l.code }">${l.name }</option>--%>
+<%--                                                </c:forEach>--%>
+<%--                                            </select>--%>
+<%--                                        </div>--%>
+                                        <div class="layui-inline">
+                                            <label class="layui-form-label" style="width: 100px;">红黄灯:</label>
+                                            <div class="layui-input-block">
+                                                <input type="radio" name="statusRed" value="" title="所有" checked  />
+                                                <c:forEach var="item" items="${statusRedList}">
+                                                    <input type="radio" name="statusRed" value="${item.code}" title="${item.name}"/>
+                                                </c:forEach>
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                                <div class="layui-col-xs6 layui-col-sm6 layui-col-md6 hiddenParam">
+                                    <div class="layui-form-item">
                                         <label class="layui-form-label required label-longers" style="width: 100px;">项目总投资(亿元)</label>
                                         <div class="layui-input-block time_box">
                                             <input type="number" name="startAmt" placeholder="请输入最小金额"
@@ -334,6 +356,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditSubInfo" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
+        <span title="红黄灯" lay-event="toEditLight" class="no-wrap">红黄灯</span>
         <span title="转库" lay-event="move" class="no-wrap">转库</span>
         <span title="移出4库" lay-event="removeFour" class="no-wrap">移出4库</span>
     </div>
@@ -402,6 +425,16 @@
             this.init()
         },
         methods: {
+            // 红黄灯
+            toEditLight(obj){
+                App.openLayer({
+                    title: "红黄灯设置",
+                    content: App.getUrl("/subject/subInfo/light?subId=" + obj.data.id),
+                    width: 500,
+                    height: 400
+                })
+                layui.layer.full(index);
+            },
             closeAllLayers() {
                 layui.layer.closeAll(); // 关闭所有弹框
             },
@@ -603,7 +636,7 @@
                                 return row.progress ? '<span class="cut" title="' + row.progress + '">' + row.progress + '</span>' : '';
                             }},
                         {field: 'remark', title: '备注', minWidth: 200},
-                        {title: '操作', width: 200, toolbar: '#toolBar', fixed: 'right'},
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: $(window).height() - $('#table1').offset().top - 50,

+ 11 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/end.jsp

@@ -541,6 +541,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditSubInfo" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
+        <span title="红黄灯" lay-event="toEditLight" class="no-wrap">红黄灯</span>
         <span title="入规" lay-event="rg" class="no-wrap">入规</span>
         <span title="移出4库" lay-event="removeFour" class="no-wrap">移出4库</span>
     </div>
@@ -574,6 +575,15 @@
             this.init()
         },
         methods: {
+            // 红黄灯
+            toEditLight(obj){
+                App.openLayer({
+                    title: "红黄灯设置",
+                    content: App.getUrl("/subject/subInfo/light?subId=" + obj.data.id),
+                    width: 400,
+                    height: 400
+                })
+            },
             closeAllLayers() {
                 layui.layer.closeAll();
             },
@@ -897,7 +907,7 @@
                                 return row.progress ? '<span class="cut" title="' + row.progress + '">' + row.progress + '</span>' : '';
                             }},
                         {field: 'remark', title: '备注', minWidth: 150},
-                        {title: '操作', width: 200, toolbar: '#toolBar', fixed: 'right'},
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: window.screen.availHeight - 470,

+ 169 - 0
projects/src/main/webapp/vmodules/subject/subInfo/tz/light.jsp

@@ -0,0 +1,169 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+         pageEncoding="UTF-8"%>
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
+<!DOCTYPE html>
+<html>
+<head>
+    <jsp:include page="../../../common/common-meta-include.jsp"></jsp:include>
+    <jsp:include page="../../../common/common-js-include.jsp"></jsp:include>
+    <jsp:include page="../../../common/common-css-include.jsp"></jsp:include>
+    <!--[if lt IE 9]>
+    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
+    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
+    <![endif]-->
+
+    <style type="text/css">
+		.layui-form-radio {
+			margin:0 10px 0 0;
+		}
+
+        .layui-form-item{
+            display: flex;
+            justify-content: flex-start;
+            align-items: center;
+        }
+        .layui-form-label{
+            white-space: nowrap;
+        }
+        .btn_add {
+            padding: 3px 15px;
+            border-radius: 5px;
+            cursor: pointer;
+            background: #5fcc06;
+            color: #fff;
+            margin-bottom: 15px;
+        }
+        .layui-table-body::-webkit-scrollbar {
+            width: 0px;
+            /*height: 10px;*/
+        }
+        .layui-table-view .layui-table td > div>span {
+            /*min-height: 85px !important;*/
+            /*white-space: normal;*/
+            line-height: 22px !important;
+            display: -webkit-box; /* 使用旧版的弹性盒子布局 */
+            -webkit-box-orient: vertical; /* 设置为垂直方向排列 */
+            overflow: hidden; /* 隐藏溢出内容 */
+            text-overflow: ellipsis; /* 使用省略号表示溢出内容 */
+            -webkit-line-clamp: 2; /* 显示的行数 */
+        }
+        .layui-table-body .layui-table-cell{
+            padding: 5px !important;
+            height: 65px !important;
+        }
+        .layui-table-header .layui-table-cell{
+            height: 42px !important;
+        }
+        /*.btn_group{*/
+        /*    padding-left: 10px;*/
+        /*}*/
+	</style>
+</head>
+<body>
+<div class="layuimini-container">
+    <div class="layuimini-main">
+        <div class="layui-form" lay-filter="formData">
+<%--            <div class="layui-form-item">--%>
+<%--                <input type="hidden" id="id" name="id" value="${id}">--%>
+<%--            </div>--%>
+<%--            <div class="layui-form-item">--%>
+<%--                <div class="layui-inline">--%>
+<%--                    <label class="layui-form-label required">用户登录名</label>--%>
+<%--                    <div class="layui-input-block">--%>
+<%--                        <input type="text" name="login" lay-verify="required" lay-reqtext="请输入用户登录名"--%>
+<%--                               autocomplete="off" placeholder="请输入用户登录名" class="layui-input">--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--                <div class="layui-inline">--%>
+<%--                    <label class="layui-form-label required">真实姓名</label>--%>
+<%--                    <div class="layui-input-block">--%>
+<%--                        <input type="text" name="title" lay-verify="required" lay-reqtext="请输入真实姓名"--%>
+<%--                               autocomplete="off" placeholder="请输入真实姓名" class="layui-input">--%>
+<%--                    </div>--%>
+<%--                </div>--%>
+<%--            </div>--%>
+            <div class="layui-form-item">
+                <input type="hidden" id="subId" name="subId" value="${subId}">
+            </div>
+            <div class="layui-form-item">
+<%--                <div class="layui-inline">--%>
+                <div>
+                    <label class="layui-form-label" style="width: 100px">红黄灯:</label>
+                    <div class="layui-input-block">
+                        <c:forEach var="item" items="${statusRedList}">
+                            <input type="radio" name="statusRed" value="${item.code}" title="${item.name}"
+                                   <c:if test="${item.code == sourceStatusRed}">checked</c:if> />
+                        </c:forEach>
+                    </div>
+                </div>
+            </div>
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label" style="width: 100px">原因:</label>
+                    <div class="layui-input-block">
+                    <textarea placeholder="请输入原因" name="reason" maxlength="200" style="height: 150px;" id="compleDesc"
+                              autocomplete="off" class="layui-textarea">${reason}</textarea>
+                    </div>
+                </div>
+            </div>
+            <div class="layui-form-item" style="margin-top: 30px;">
+                <label class="layui-form-label "></label>
+                <div class="layui-input-block">
+                    <button type="button" class="layui-btn-submit" lay-submit lay-filter="submit">保存</button>
+                </div>
+            </div>
+        </div>
+    </div>
+
+</div>
+<%--<div id="app"></div>--%>
+
+<%--<template id="template" style="width: 300px;height: 400px">--%>
+<%--    <div class="layui-layout layui-layout-admin"  style="width: 300px;height: 400px">--%>
+<%--        <form class="layui-form" lay-filter="lightForm"  style="width: 300px;height: 400px" >--%>
+
+<%--        </form>--%>
+<%--    </div>--%>
+<%--</template>--%>
+
+<script>
+    new Vue({
+        el: "#app",
+        template: "#template",
+        data: {
+
+        },
+        mounted : function() {
+            this.init();
+        },
+        methods: {
+            init : function() {
+                let self = this;
+                let statusRedList = [];
+                <c:forEach items="${statusRedList}" var="xm">
+                    statusRedList.push({code: "${xm.code}", name: "${xm.name}"});
+                </c:forEach>
+                self.statusRedList = statusRedList;
+                layui.form.on("submit(submit)", function (obj) {
+                    self.submit(obj);
+                });
+            },
+            submit: function(obj){
+                let self = this;
+                let statusRedName = self.statusRedList.find(item => item.code === obj.field.statusRed).name;
+                layer.confirm("确认修改为【"+statusRedName+"】?", function(){
+                    App.postJson("/api/subject/subInfo/editStatusRedLight", obj.field, function(res) {
+                        if (res.success) {
+                            App.msg.success("提交成功");
+                            top.layer.closeAll();
+                        } else {
+                            App.msg.error(res.message || "请求失败,请重试");
+                        }
+                    });
+                })
+            },
+        }
+    });
+</script>
+</body>
+</html>

+ 11 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/main.jsp

@@ -695,6 +695,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditSubInfo" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
+        <span title="红黄灯" lay-event="toEditLight" class="no-wrap">红黄灯</span>
         <span title="转库" lay-event="move" class="no-wrap">转库</span>
         <span title="移出4库" lay-event="removeFour" class="no-wrap">移出4库</span>
     </div>
@@ -804,6 +805,15 @@
                     }
                 });
             },
+            // 红黄灯
+            toEditLight(obj){
+                App.openLayer({
+                    title: "红黄灯设置",
+                    content: App.getUrl("/subject/subInfo/light?subId=" + obj.data.id),
+                    width: 400,
+                    height: 400
+                })
+            },
             init: function () {
                 let self = this;
                 layui.form.on("select(moveStatus)", function (data) {
@@ -1168,7 +1178,7 @@
                                 return row.progress ? '<span class="cut" title="' + row.progress + '">' + row.progress + '</span>' : '';
                             }},
                         {field: 'remark', title: '备注', width: 200},
-                        {title: '操作', width: 200, toolbar: '#toolBar', fixed: 'right'},
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: window.screen.availHeight - 470,

+ 11 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/new.jsp

@@ -473,6 +473,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditSubInfo" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
+        <span title="红黄灯" lay-event="toEditLight" class="no-wrap">红黄灯</span>
         <span title="转库" lay-event="move" class="no-wrap">转库</span>
         <span title="移出4库" lay-event="removeFour" class="no-wrap">移出4库</span>
     </div>
@@ -617,6 +618,15 @@
             this.init()
         },
         methods: {
+            // 红黄灯
+            toEditLight(obj){
+                App.openLayer({
+                    title: "红黄灯设置",
+                    content: App.getUrl("/subject/subInfo/light?subId=" + obj.data.id),
+                    width: 400,
+                    height: 400
+                })
+            },
             closeAllLayers() {
                 layui.layer.closeAll();
             },
@@ -1002,7 +1012,7 @@
                         {field: 'preProceNum', title: '预计开工时间', width: 100, templet: '#date'},
                           {field: 'xmbaStatus', title: '前期手续办理情况', width: 160, templet: '#preInfo'},
                         {field: 'remark', title: '备注', width: 245, templet: '#remark'},
-                        {title: '操作', width: 200, toolbar: '#toolBar', fixed: 'right'},
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: window.screen.availHeight - 450,

+ 11 - 1
projects/src/main/webapp/vmodules/subject/subInfo/tz/xmzk.jsp

@@ -420,6 +420,7 @@
         {{# if("${currUser.edit}" == 'true'||( d.propKind == '3' && "${currUser.id}" == d.create_user_id )) { }}
         <span title="编辑" lay-event="toEditSubInfo" class="no-wrap">&nbsp;编辑</span>
         {{#} }}
+        <span title="红黄灯" lay-event="toEditLight" class="no-wrap">红黄灯</span>
         <span title="转库" lay-event="move" class="no-wrap">转库</span>
         {{# if(d.status != '5') { }}
         <span title="移出4库" lay-event="removeFour" class="no-wrap">移出4库</span>
@@ -552,6 +553,15 @@
             this.init()
         },
         methods: {
+            // 红黄灯
+            toEditLight(obj){
+                App.openLayer({
+                    title: "红黄灯设置",
+                    content: App.getUrl("/subject/subInfo/light?subId=" + obj.data.id),
+                    width: 400,
+                    height: 400
+                })
+            },
             closeAllLayers() {
                 layui.layer.closeAll(); // 关闭所有弹框
             },
@@ -993,7 +1003,7 @@
                         {field: 'endDate', title: '计划完工日期', minWidth: 100,
                             templet: (d)=> `<span class="new-roman">` +  d.endDate + `</span>`
                         },
-                        {title: '操作', width: 200, toolbar: '#toolBar', fixed: 'right'},
+                        {title: '操作', width: 160, toolbar: '#toolBar', fixed: 'right'},
                     ]],
                     fixed: true,
                     height: $(window).height() - $('#table1').offset().top - 50,