|
@@ -0,0 +1,81 @@
|
|
|
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
|
|
+<%@ include file="/webpage/include/taglib.jsp"%>
|
|
|
+<link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
|
|
|
+<link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
|
|
|
+<script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
|
|
|
+<script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
|
|
|
+<html>
|
|
|
+<head>
|
|
|
+ <title>添加结算书</title>
|
|
|
+ <link rel="stylesheet" href="${ctxp}/static/plugin/assets/layui/css/layui.css">
|
|
|
+ <link rel="stylesheet" href="${ctxp}/static/plugin/assets/common.css"/>
|
|
|
+ <script type="text/javascript" src="${ctxp}/static/plugin/assets/jquery-3.2.1.min.js"></script>
|
|
|
+ <style>
|
|
|
+ .mydiv{padding: 5px 7px;min-height: 17px;text-align: left}
|
|
|
+ .mydiv:empty:before{content: attr(placeholder);color:#999999;text-align: left}
|
|
|
+ .mydiv:focus:before{content:none;text-align: left}
|
|
|
+ .layui-input{ height: 28px;}
|
|
|
+ td{text-align: center;font-size: 14px;margin-top: 20px;color: #555}
|
|
|
+ .layui-form{padding: 4px}
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<button style="display: none" id="btnSub" onclick="addPro();"></button>
|
|
|
+<form id="inputForm"class="layui-form" action="#" method="post" enctype="multipart/form-data">
|
|
|
+ <div class="layui-form">
|
|
|
+ <table class="layui-table">
|
|
|
+ <tbody>
|
|
|
+ <tr>
|
|
|
+ <td width="35%">*工程名称</td>
|
|
|
+ <td>
|
|
|
+ <%--<input type="text" name="projectName" style="display: none" hidden="hidden" autocomplete="off" class="layui-input" id="inputwrite">--%>
|
|
|
+ <div contenteditable="true" id="mydiv1" class="mydiv" placeholder="请输入工程名称"></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td width="35%">*工程编号</td>
|
|
|
+ <td>
|
|
|
+ <div contenteditable="true" id="mydiv2" class="mydiv" placeholder="请输入工程编号"></div>
|
|
|
+ </td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
+ </div>
|
|
|
+</form>
|
|
|
+</body>
|
|
|
+<script src="${ctxp}/static/plugin/assets/layui/layui.js"></script>
|
|
|
+<script type="text/javascript">
|
|
|
+ layui.use(['form', 'layedit', 'laydate'], function(){
|
|
|
+ var form = layui.form;
|
|
|
+ form.render();
|
|
|
+ });
|
|
|
+ function addPro(){
|
|
|
+ var div1_value = $("#mydiv1").text();
|
|
|
+ var div2_value = $("#mydiv2").text();
|
|
|
+ if (div1_value==null||div1_value==""){
|
|
|
+ layer.msg("请输入工程名称",{icon:3});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+ if(div2_value==null||div2_value==""){
|
|
|
+ layer.msg("请输入工程编号",{icon:3});
|
|
|
+ throw SyntaxError;
|
|
|
+ }
|
|
|
+ $.ajax({
|
|
|
+ type: "post",
|
|
|
+ url: "${ctx}/project/save",
|
|
|
+ data:{projectName:div1_value},
|
|
|
+ dataType: "json",
|
|
|
+ success: function(data){
|
|
|
+ if(data.success){
|
|
|
+ layer.msg(data.msg, {icon: 1,offset:['38%','38%']},function () {
|
|
|
+ parent.location.reload();
|
|
|
+ });
|
|
|
+ }else{
|
|
|
+ layer.msg(data.msg, {icon: 5});
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+</html>
|