From 3282abd1d4dd2dd4a4167e027e609a52ceb8c728 Mon Sep 17 00:00:00 2001
From: suerwei <18810552194@163.com>
Date: 星期二, 21 五月 2024 10:26:29 +0800
Subject: [PATCH] 人员管理模块
---
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 109 insertions(+), 8 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html
index c6a0e41..97525c4 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/projectPerson/add.html
@@ -2,6 +2,7 @@
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
<th:block th:include="include :: header('鏂板椤圭洰浜哄憳')" />
+ <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
@@ -27,9 +28,15 @@
</div>
</div>
<div class="form-group">
- <label class="col-sm-3 control-label">鍦板潃锛�</label>
+ <label class="col-sm-3 control-label">韬唤璇佸彿锛�</label>
<div class="col-sm-8">
- <input name="address" class="form-control" type="text">
+ <input name="idCard" class="form-control" type="text">
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">浜哄憳鍒嗙粍锛�</label>
+ <div class="col-sm-8">
+ <input name="personGroup" class="form-control" type="text">
</div>
</div>
<div class="form-group">
@@ -38,13 +45,63 @@
<input name="responsibility" class="form-control" type="text">
</div>
</div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">杩涘満鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="inSiteTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">鍑哄満鏃堕棿锛�</label>
+ <div class="col-sm-8">
+ <div class="input-group date">
+ <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
+ <input name="outSiteTime" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ </div>
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">璇佷欢绫诲瀷锛�</label>
+ <div class="col-sm-8">
+ <input name="documentType" class="form-control" type="text">
+ </div>
+ </div>
+ <div class="form-group">
+ <label class="col-sm-3 control-label">璇佷欢缂栧彿锛�</label>
+ <div class="col-sm-8">
+ <input name="documentCode" class="form-control" type="text">
+ </div>
+ </div>
+
+ <div class="form-group">
+ <label class="col-sm-3 control-label">涓婁紶璇佷欢锛�</label>
+ <div class="col-sm-8">
+ <form id="formId" enctype="multipart/form-data">
+ <div class="select-list">
+ <ul>
+ <li>
+ <input type="file" id="file" name="file"/>
+ </li>
+ <li>
+ <a class="btn btn-primary btn-rounded btn-sm" onclick="upload()"><i class="fa fa-upload"></i> 涓婁紶</a>
+ </li>
+ </ul>
+ </div>
+ </form>
+ </div>
+ </div>
+
+
</form>
</div>
<th:block th:include="include :: footer" />
- <script type="text/javascript">
+ <th:block th:include="include :: datetimepicker-js" />
+ <script th:inline="javascript">
var prefix = ctx + "geo/projectPerson"
- var project_Id = [[${project_Id}]];
- console.log("projectId",project_Id);
+ var projectId = [[${projectId}]];
$("#form-projectPerson-add").validate({
focusCleanup: true
@@ -53,12 +110,56 @@
function submitHandler() {
if ($.validate.form()) {
let formData = $('#form-projectPerson-add').serialize();
- let data = formData + "&projectId=" + project_Id
- console.log("projectId",project_Id);
- console.log("data",data);
+ let data = formData + "&projectId=" + projectId;
$.operate.save(prefix + "/add", data);
}
}
+
+ $("input[name='inSiteTime']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ $("input[name='outSiteTime']").datetimepicker({
+ format: "yyyy-mm-dd",
+ minView: "month",
+ autoclose: true
+ });
+
+ function upload(){
+ var file = $('#file').val();
+ if (file == '' || (!$.common.endWith(file, '.png'))){
+ $.modal.msgWarning("璇烽�夋嫨寰呬笂浼犵殑鏂囦欢");
+ return false;
+ }
+
+ var formData = new FormData();
+ formData.append("file", $('#file')[0].files[0]);
+ formData.append("projectId", projectId);
+ $.modal.loading("鏁版嵁涓婁紶瑙f瀽涓�");
+
+ $.ajax({
+ url: ctx + "geo/projectPerson/uploadImg",
+ data: formData,
+ cache: false,
+ contentType: false,
+ processData: false,
+ type: 'POST',
+ success: function (result) {
+ if (result.code == web_status.SUCCESS) {
+ $.modal.closeLoading();
+ $.modal.alertSuccess(result.msg);
+ } else if (result.code == web_status.WARNING) {
+ $.modal.closeLoading();
+ $.modal.alertWarning(result.msg)
+ } else {
+ $.modal.closeLoading();
+ $.modal.alertError(result.msg);
+ }
+ }
+ });
+ }
</script>
</body>
</html>
\ No newline at end of file
--
Gitblit v1.9.1