From 5606efe6f2778ad09d8b35280d6360cfe8f34d91 Mon Sep 17 00:00:00 2001
From: zmk <496160012@qq.com>
Date: 星期三, 03 七月 2024 16:19:28 +0800
Subject: [PATCH] Merge branch 'master' of ssh://117.78.1.188:29418/dkyChenJiang
---
javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html | 102 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 71 insertions(+), 31 deletions(-)
diff --git a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html
index 837a610..f1e4b52 100644
--- a/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html
+++ b/javaweb-plus/javaweb-cms/src/main/resources/templates/geo/TubLog/edit.html
@@ -11,30 +11,30 @@
<div class="form-group">
<label class="col-sm-3 control-label">鍑哄叆搴撳崟瀛愬彿锛�</label>
<div class="col-sm-8">
- <input name="code" th:field="*{code}" class="form-control" type="text">
+ <input name="code" th:field="*{code}" class="form-control" type="text" disabled="disabled">
</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="tubName" th:field="*{tubName}" class="form-control" type="text">
+ <input name="tubName" th:field="*{tubName}" class="form-control" type="text" placeholder="璇峰~鍐欐潗鏂欏悕绉�" required>
</div>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label">绫诲瀷锛�</label>
- <div class="col-sm-8">
- <select name="type" class="form-control m-b">
- <option value="">鎵�鏈�</option>
- </select>
- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 浠g爜鐢熸垚璇烽�夋嫨瀛楀吀灞炴��</span>
- </div>
- </div>
+<!-- <div class="form-group"> -->
+<!-- <label class="col-sm-3 control-label">绫诲瀷锛�</label>-->
+<!-- <div class="col-sm-8">-->
+<!-- <select name="type" class="form-control m-b">-->
+<!-- <option value="">鎵�鏈�</option>-->
+<!-- </select>-->
+<!-- <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 浠g爜鐢熸垚璇烽�夋嫨瀛楀吀灞炴��</span>-->
+<!-- </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="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ <input id="outboundDateId" name="outboundDate" th:value="${#dates.format(tubLog.outboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
</div>
</div>
</div>
@@ -43,14 +43,14 @@
<div class="col-sm-8">
<div class="input-group date">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
- <input name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
+ <input id="inboundDateId" name="inboundDate" th:value="${#dates.format(tubLog.inboundDate, 'yyyy-MM-dd')}" 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="optUser" th:field="*{optUser}" class="form-control" type="text">
+ <input name="optUser" th:field="*{optUser}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
@@ -62,38 +62,84 @@
<div class="form-group">
<label class="col-sm-3 control-label">鍑哄叆搴撴暟閲忥細</label>
<div class="col-sm-8">
- <input name="number" th:field="*{number}" class="form-control" type="text">
+ <input name="number" th:field="*{number}" class="form-control" type="text" placeholder="璇疯緭鍏ュ嚭鍏ュ簱鏁伴噺锛屾暟瀛楃被鍨�">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">鏁版嵁鍗曚綅锛�</label>
<div class="col-sm-8">
- <input name="unit" th:field="*{unit}" class="form-control" type="text">
+ <input name="unit" th:field="*{unit}" class="form-control" type="text" placeholder="渚嬪锛氬惃銆佷欢銆佷釜绛�">
</div>
</div>
- <div class="form-group">
- <label class="col-sm-3 control-label">鏃堕棿锛�</label>
+ <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="createDate" th:value="${#dates.format(tubLog.createDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
- </div>
+ <textarea id="remark" th:field="*{remark}" name="remark" class="form-control"></textarea>
</div>
</div>
+
+ <div class="form-group">
+ <label class="col-sm-3 control-label">涓婁紶鍥剧墖/鎵弿浠讹細</label>
+ <div class="col-sm-8">
+ <input type="file" name= "file" id="file"/>
+ </div>
+ </div>
+
</form>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: datetimepicker-js" />
<script type="text/javascript">
var prefix = ctx + "geo/TubLog";
+
$("#form-TubLog-edit").validate({
focusCleanup: true
});
function submitHandler() {
- if ($.validate.form()) {
- $.operate.save(prefix + "/edit", $('#form-TubLog-edit').serialize());
+ var result = doSubmitFile();
+ var documentFile =null;
+ if(result !=null){
+ if(result.code == web_status.SUCCESS){
+ documentFile= result.fileName;
+ }
}
+
+ let inboundDateValue = $("#inboundDateId").val();
+ let outboundDateValue = $("#outboundDateId").val();
+ if ($.common.isEmpty(inboundDateValue) && $.common.isEmpty(outboundDateValue)) {
+ $.modal.alertWarning("鍑哄叆搴撴椂闂达紝璇烽�夋嫨涓�鏉¤褰�");
+ return;
+ }
+ if ($.validate.form()) {
+ let formData = $('#form-TubLog-edit').serialize();
+ let data = formData +"&fileUrl="+documentFile;
+ $.operate.save(prefix + "/edit", data);
+ }
+ }
+
+ //涓婁紶鏂囦欢
+ function doSubmitFile(){
+ var file = $('#file').val();
+ if (file == '' || file ==null){
+ return null;
+ }
+ var formData = new FormData();
+ formData.append("file", $('#file')[0].files[0]);
+ var data = null;
+ $.ajax({
+ url: ctx + "geo/TubLog/uploadTubLogFile",
+ data: formData,
+ cache: false,
+ contentType: false,
+ processData: false,
+ type: 'POST',
+ async:false,
+ success: function (result) {
+ data= result;
+ }
+ });
+ return data;
}
$("input[name='outboundDate']").datetimepicker({
@@ -103,12 +149,6 @@
});
$("input[name='inboundDate']").datetimepicker({
- format: "yyyy-mm-dd",
- minView: "month",
- autoclose: true
- });
-
- $("input[name='createDate']").datetimepicker({
format: "yyyy-mm-dd",
minView: "month",
autoclose: true
--
Gitblit v1.9.1