|
@@ -52,28 +52,28 @@
|
|
<div class="layui-card">
|
|
<div class="layui-card">
|
|
<div class="layui-card-header">工程管理</div>
|
|
<div class="layui-card-header">工程管理</div>
|
|
<div class="layui-card-body">
|
|
<div class="layui-card-body">
|
|
- <form class="layui-form" action="" style="margin-top: 10px;">
|
|
|
|
|
|
+ <form class="layui-form" action="${ctx}/project/list" style="margin-top: 10px;" method="post">
|
|
<div class="layui-form-item">
|
|
<div class="layui-form-item">
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">工程名称</label>
|
|
<label class="layui-form-label">工程名称</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="hcmc" lay-verify="" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="projectName" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">登记人</label>
|
|
<label class="layui-form-label">登记人</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="person" lay-verify="" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="createBy" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">工程登记时间</label>
|
|
<label class="layui-form-label">工程登记时间</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="beginName1" id="beginDate1" lay-verify="" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="projectStartDate" id="beginDate1" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-mid">-</div>
|
|
<div class="layui-form-mid">-</div>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="endName1" id="endDate1" lay-verify="" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="projectEndDate" id="endDate1" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -81,19 +81,19 @@
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">项目名称</label>
|
|
<label class="layui-form-label">项目名称</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="xmmc" lay-verify="" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="itemName" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">项目划分</label>
|
|
<label class="layui-form-label">项目划分</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="xmhf" lay-verify="" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="type" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">施工单位</label>
|
|
<label class="layui-form-label">施工单位</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="sgdw" lay-verify="" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="unit" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -101,11 +101,11 @@
|
|
<div class="layui-inline">
|
|
<div class="layui-inline">
|
|
<label class="layui-form-label">项目登记时间</label>
|
|
<label class="layui-form-label">项目登记时间</label>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="beginDate2" id="beginDate2" lay-verify="" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="itemStartDate" id="beginDate2" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
<div class="layui-form-mid">-</div>
|
|
<div class="layui-form-mid">-</div>
|
|
<div class="layui-input-inline">
|
|
<div class="layui-input-inline">
|
|
- <input type="text" name="endDate2" id="endDate2" lay-verify="" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
|
|
|
|
+ <input type="text" name="itemEndDate" id="endDate2" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="layui-inline" style="margin-left: 300px;">
|
|
<div class="layui-inline" style="margin-left: 300px;">
|
|
@@ -154,17 +154,17 @@
|
|
});
|
|
});
|
|
|
|
|
|
//监听提交
|
|
//监听提交
|
|
- form.on('submit(mybtnsubmit)', function(data){
|
|
|
|
- layer.alert(JSON.stringify(data.field), {
|
|
|
|
- title: '最终的提交信息'
|
|
|
|
- })
|
|
|
|
- return false;
|
|
|
|
- });
|
|
|
|
|
|
+ // form.on('submit(mybtnsubmit)', function(data){
|
|
|
|
+ // layer.alert(JSON.stringify(data.field), {
|
|
|
|
+ // title: '最终的提交信息'
|
|
|
|
+ // })
|
|
|
|
+ // return false;
|
|
|
|
+ // });
|
|
});
|
|
});
|
|
</script>
|
|
</script>
|
|
<script>
|
|
<script>
|
|
layui.config({
|
|
layui.config({
|
|
- base: 'module/'
|
|
|
|
|
|
+ base: '${ctxp}/static/plugin/assets/'
|
|
}).extend({
|
|
}).extend({
|
|
treetable: 'treetable-lay/treetable'
|
|
treetable: 'treetable-lay/treetable'
|
|
}).use(['layer', 'table', 'treetable'], function () {
|
|
}).use(['layer', 'table', 'treetable'], function () {
|
|
@@ -208,12 +208,14 @@
|
|
}}
|
|
}}
|
|
]],
|
|
]],
|
|
"data": [
|
|
"data": [
|
|
|
|
+ <c:if test="${ not empty list}">
|
|
|
|
+ <c:forEach items="${list}" var="data" varStatus="index">
|
|
{
|
|
{
|
|
- "id": "1",
|
|
|
|
- "gcmc":"某线路工程",
|
|
|
|
- "xmsl": "3",
|
|
|
|
- "cjsq": "2018/8/14",
|
|
|
|
- "djr":"home",
|
|
|
|
|
|
+ "id": "${data.id}",
|
|
|
|
+ "gcmc":"${data.projectName}",
|
|
|
|
+ "xmsl": "${data.number}",
|
|
|
|
+ "cjsq": "<fmt:formatDate value="${data.createDate}" pattern="yyyy-MM-dd hh:mm:ss"/>",
|
|
|
|
+ "djr":"${data.userName}",
|
|
"status":"1",
|
|
"status":"1",
|
|
"pid": -1
|
|
"pid": -1
|
|
},
|
|
},
|
|
@@ -224,71 +226,92 @@
|
|
"cjsq": "项目划分",
|
|
"cjsq": "项目划分",
|
|
"djr":"创建时间",
|
|
"djr":"创建时间",
|
|
"status":"2",
|
|
"status":"2",
|
|
- "pid": 1
|
|
|
|
|
|
+ "pid": "${data.id}"
|
|
},
|
|
},
|
|
|
|
+ <%--<c:if test="${ not empty data.wbsItems}">--%>
|
|
|
|
+ <%--<c:forEach items="${data.wbsItems}" var="items" varStatus="index">--%>
|
|
|
|
+ <%--{--%>
|
|
|
|
+ <%--"id": "${items.id}",--%>
|
|
|
|
+ <%--"gcmc":"${items.itemName}",--%>
|
|
|
|
+ <%--"xmsl": "某施工单位一",--%>
|
|
|
|
+ <%--"cjsq": "架空线路",--%>
|
|
|
|
+ <%--"djr":"<fmt:formatDate value="${items.updateDate}" pattern="yyyy-MM-dd hh:mm:ss"/>",--%>
|
|
|
|
+ <%--"status":"3",--%>
|
|
|
|
+ <%--"pid": "${items.projectId}"--%>
|
|
|
|
+ <%--},--%>
|
|
|
|
+ <%--</c:forEach>--%>
|
|
|
|
+ <%--</c:if>--%>
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </c:if>
|
|
|
|
+ <c:forEach items="${list}" var="item" varStatus="index">
|
|
|
|
+ <c:forEach items="${item.wbsItems}" var="items" varStatus="index">
|
|
{
|
|
{
|
|
- "id": "3",
|
|
|
|
- "gcmc":"某项目",
|
|
|
|
|
|
+ "id": "${items.id}",
|
|
|
|
+ "gcmc":"${items.itemName}",
|
|
"xmsl": "某施工单位一",
|
|
"xmsl": "某施工单位一",
|
|
"cjsq": "架空线路",
|
|
"cjsq": "架空线路",
|
|
- "djr":"2018/8/14",
|
|
|
|
|
|
+ "djr":"<fmt:formatDate value="${items.updateDate}" pattern="yyyy-MM-dd hh:mm:ss"/>",
|
|
"status":"3",
|
|
"status":"3",
|
|
- "pid": 2
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "4",
|
|
|
|
- "gcmc":"某项目",
|
|
|
|
- "xmsl": "某施工单位一",
|
|
|
|
- "cjsq": "架空线路",
|
|
|
|
- "djr":"2018/8/14",
|
|
|
|
- "status":"3",
|
|
|
|
- "pid": 2
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "5",
|
|
|
|
- "gcmc":"某项目",
|
|
|
|
- "xmsl": "某施工单位一",
|
|
|
|
- "cjsq": "架空线路",
|
|
|
|
- "djr":"2018/8/14",
|
|
|
|
- "status":"3",
|
|
|
|
- "pid": 2
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "6",
|
|
|
|
- "gcmc":"某线路工程二",
|
|
|
|
- "xmsl": "1",
|
|
|
|
- "cjsq": "2018/8/15",
|
|
|
|
- "djr":"home1",
|
|
|
|
- "status":"1",
|
|
|
|
- "pid": -1
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "7",
|
|
|
|
- "gcmc":"项目名称",
|
|
|
|
- "xmsl": "施工单位",
|
|
|
|
- "cjsq": "项目类型",
|
|
|
|
- "djr":"创建时间",
|
|
|
|
- "status":"2",
|
|
|
|
- "pid": 6
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "8",
|
|
|
|
- "gcmc":"某项目",
|
|
|
|
- "xmsl": "某施工单位一",
|
|
|
|
- "cjsq": "架空线路",
|
|
|
|
- "djr":"2018/8/14",
|
|
|
|
- "status":"3",
|
|
|
|
- "pid": 7
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- "id": "9",
|
|
|
|
- "gcmc":"某项目",
|
|
|
|
- "xmsl": "某施工单位一",
|
|
|
|
- "cjsq": "架空线路",
|
|
|
|
- "djr":"2018/8/14",
|
|
|
|
- "status":"3",
|
|
|
|
- "pid": 7
|
|
|
|
|
|
+ "pid": "${items.projectId}"
|
|
},
|
|
},
|
|
|
|
+ </c:forEach>
|
|
|
|
+ </c:forEach>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // {
|
|
|
|
+ // "id": "4",
|
|
|
|
+ // "gcmc":"某项目",
|
|
|
|
+ // "xmsl": "某施工单位一",
|
|
|
|
+ // "cjsq": "架空线路",
|
|
|
|
+ // "djr":"2018/8/14",
|
|
|
|
+ // "status":"3",
|
|
|
|
+ // "pid": 2
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // "id": "5",
|
|
|
|
+ // "gcmc":"某项目",
|
|
|
|
+ // "xmsl": "某施工单位一",
|
|
|
|
+ // "cjsq": "架空线路",
|
|
|
|
+ // "djr":"2018/8/14",
|
|
|
|
+ // "status":"3",
|
|
|
|
+ // "pid": 2
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // "id": "6",
|
|
|
|
+ // "gcmc":"某线路工程二",
|
|
|
|
+ // "xmsl": "1",
|
|
|
|
+ // "cjsq": "2018/8/15",
|
|
|
|
+ // "djr":"home1",
|
|
|
|
+ // "status":"1",
|
|
|
|
+ // "pid": -1
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // "id": "7",
|
|
|
|
+ // "gcmc":"项目名称",
|
|
|
|
+ // "xmsl": "施工单位",
|
|
|
|
+ // "cjsq": "项目类型",
|
|
|
|
+ // "djr":"创建时间",
|
|
|
|
+ // "status":"2",
|
|
|
|
+ // "pid": 6
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // "id": "8",
|
|
|
|
+ // "gcmc":"某项目",
|
|
|
|
+ // "xmsl": "某施工单位一",
|
|
|
|
+ // "cjsq": "架空线路",
|
|
|
|
+ // "djr":"2018/8/14",
|
|
|
|
+ // "status":"3",
|
|
|
|
+ // "pid": 7
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
|
|
+ // "id": "9",
|
|
|
|
+ // "gcmc":"某项目",
|
|
|
|
+ // "xmsl": "某施工单位一",
|
|
|
|
+ // "cjsq": "架空线路",
|
|
|
|
+ // "djr":"2018/8/14",
|
|
|
|
+ // "status":"3",
|
|
|
|
+ // "pid": 7
|
|
|
|
+ // },
|
|
],
|
|
],
|
|
|
|
|
|
done: function () {
|
|
done: function () {
|
|
@@ -321,16 +344,16 @@
|
|
layer.close(index);
|
|
layer.close(index);
|
|
$.ajax({
|
|
$.ajax({
|
|
type: "post",
|
|
type: "post",
|
|
- url: "#",
|
|
|
|
- data:{name:text},
|
|
|
|
|
|
+ url: "${ctx}/project/save",
|
|
|
|
+ data:{projectName:text},
|
|
dataType: "json",
|
|
dataType: "json",
|
|
success: function(data){
|
|
success: function(data){
|
|
- if(data.result!=null){
|
|
|
|
- layer.msg(data.result, {icon: 1});
|
|
|
|
|
|
+ if(data.success){
|
|
|
|
+ layer.msg(data.msg, {icon: 1});
|
|
window.location.reload();
|
|
window.location.reload();
|
|
}else{
|
|
}else{
|
|
layer.msg('添加失败', {icon: 1});
|
|
layer.msg('添加失败', {icon: 1});
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|