From 5414f8f6e0034f5c897b18457b4ab47be302bea8 Mon Sep 17 00:00:00 2001
From: admin <1101184511@qq.com>
Date: 星期四, 31 七月 2025 00:13:11 +0800
Subject: [PATCH] 功能完善

---
 src/main/resources/static/admin/order-client-update.html |  228 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 114 insertions(+), 114 deletions(-)

diff --git a/src/main/resources/static/admin/order-client-update.html b/src/main/resources/static/admin/order-client-update.html
index 0ef6ac9..a663d74 100644
--- a/src/main/resources/static/admin/order-client-update.html
+++ b/src/main/resources/static/admin/order-client-update.html
@@ -3,127 +3,127 @@
 
 <head>
 	<meta charset="UTF-8">
-	<meta name="renderer" content="webkit">
-	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-	<meta name="viewport"
-		content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-	<title>淇敼涓嬪崟璁惧淇℃伅</title>
+	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
+	<title></title>
 	<link rel="stylesheet" type="text/css" href="layui/css/layui.css" />
-	<link rel="stylesheet" type="text/css" href="css/admin.css" />
+	<style>
+		body {
+			padding: 10px;
+		}
+
+		#sure {
+			visibility: hidden;
+		}
+
+		.layui-form-label {
+			width: 200px;
+		}
+
+		.layui-input-block {
+			margin-left: 240px;
+			max-width: 500px;
+		}
+
+		.layui-input-block input {
+			max-width: 150px;
+		}
+
+		.small {
+			max-width: 75px !important;
+		}
+
+		.share-ratio {
+			display: flex;
+			margin-bottom: 10px;
+		}
+
+		.share-ratio .layui-form-label {
+			width: 50px;
+			padding-left: 0;
+			font-size: 12px;
+			text-align: left;
+		}
+
+		.share-ratio input {
+			width: 60px;
+			margin-right: 10px;
+		}
+	</style>
 </head>
 
 <body>
-	<div class="page-content-wrap">
-		<form class="layui-form" action="" lay-filter='edit'>
-			<input type="hidden" name="id" id="clientId">
-			
-			<div class="layui-form-item">
-				<label class="layui-form-label">鎵嬫満鍙凤細</label>
-				<div class="layui-input-block">
-					<input type="text" name="mobile" id="mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿" autocomplete="off"
-						class="layui-input">
-				</div>
-			</div>
-			
-			<div class="layui-form-item">
-				<label class="layui-form-label">鏀粯瀹濊处鍙凤細</label>
-				<div class="layui-input-block">
-					<input type="text" name="alipayAccount" id="alipayAccount" placeholder="璇疯緭鍏ユ敮浠樺疂璐﹀彿" autocomplete="off"
-						class="layui-input">
-				</div>
-			</div>
-			
-			<div class="layui-form-item">
-				<label class="layui-form-label">鏀粯瀹濆瘑鐮侊細</label>
-				<div class="layui-input-block">
-					<input type="password" name="alipayPassword" id="alipayPassword" placeholder="璇疯緭鍏ユ敮浠樺疂瀵嗙爜" autocomplete="off"
-						class="layui-input">
-				</div>
-			</div>
-			
-			<div class="layui-form-item">
-				<div class="layui-input-block">
-					<button class="layui-btn layui-btn-normal" lay-submit lay-filter="update">淇濆瓨</button>
-					<button type="button" class="layui-btn layui-btn-primary" id="cancelBtn">鍙栨秷</button>
-				</div>
-			</div>
-		</form>
+
+<form class="layui-form" lay-filter="edit">
+	<input type="hidden" name="id" />
+	<div class="layui-form-item">
+		<label class="layui-form-label">鎵嬫満鍙凤細</label>
+		<div class="layui-input-inline">
+			<input type="text" name="mobile" required lay-verify="required|mobile" placeholder="鎵嬫満鍙�" autocomplete="off" class="layui-input">
+		</div>
 	</div>
 
-	<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
-	<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
-	<script>
-		layui.use(['form', 'jquery', 'layer'], function() {
-			var form = layui.form;
-			var $ = layui.jquery;
-			var layer = layui.layer;
-			
-			// 鑾峰彇URL鍙傛暟
-			function getQueryString(name) {
-				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
-				var r = window.location.search.substr(1).match(reg);
-				if (r != null) return unescape(r[2]); return null;
-			}
-			
-			// 椤甸潰鍔犺浇鏃惰幏鍙栬澶囦俊鎭�
-			$(document).ready(function() {
-				var clientId = getQueryString("id");
-				if (clientId != null) {
-					$.get("/admin/api/clientinfo/js2/getAdditionalInfo", {id: clientId}, function(res) {
-						if (res.code == 0) {
-							var data = res.data;
-							form.val("edit", data);
-						} else {
-							layer.msg("鑾峰彇璁惧淇℃伅澶辫触");
-						}
-					}, 'json').fail(function() {
-						layer.msg("缃戠粶璇锋眰澶辫触");
-					});
-				}
-			});
-			
-			// 鐩戝惉鎻愪氦
-			form.on('submit(update)', function(data) {
-				$.post("/admin/api/clientinfo/js2/update", data.field, function(response) {
-					if (response.code == 0) {
-						layer.msg("淇濆瓨鎴愬姛", {time: 1000}, function() {
-							// 鐖堕〉闈細澶勭悊鍏抽棴鍜屽埛鏂�
-						});
-					} else {
-						layer.msg(response.msg);
-					}
-				}, 'json').fail(function(jqXHR, textStatus, errorThrown) {
-					layer.msg("缃戠粶璇锋眰澶辫触");
-				});
-				return false;
-			});
-			
-			// 鍙栨秷鎸夐挳浜嬩欢
-			$("#cancelBtn").click(function() {
-				var index = parent.layer.getFrameIndex(window.name);
-				parent.layer.close(index);
-			});
+	<div class="layui-form-item">
+		<label class="layui-form-label">鏀粯瀹濊处鍙凤細</label>
+		<div class="layui-input-inline">
+			<input type="text" name="alipayAccount" required lay-verify="required" placeholder="鏀粯瀹濊处鍙�" autocomplete="off" class="layui-input">
+		</div>
+	</div>
+
+	<div class="layui-form-item">
+		<label class="layui-form-label">鏀粯瀹濆瘑鐮侊細</label>
+		<div class="layui-input-inline">
+			<input type="text" name="alipayPassword" required lay-verify="" placeholder="鏃犳洿鏀规棤闇�濉啓" autocomplete="off" class="layui-input">
+		</div>
+	</div>
+
+	<div class="layui-input-block">
+		<button class="layui-btn layui-btn-normal" lay-submit lay-filter="sure" id="sure">纭畾</button>
+	</div>
+</form>
+<script src="layui/layui.js" type="text/javascript" charset="utf-8"></script>
+<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
+<script src="js/http_api.js"></script>
+<script>
+	var listener;
+
+	function submit(callback) {
+
+		//鏆傚瓨鍥炶皟鏂规硶
+		listener = callback;
+		//琛ㄥ崟鎻愪氦鎸夐挳
+		$("#sure").click();
+	}
+
+	layui.use(['form', 'layedit', 'laydate', 'laytpl'], function() {
+		var form = layui.form,
+				layer = layui.layer,
+				laydate = layui.laydate,
+				laytpl = layui.laytpl;
+		//鑷畾涔夐獙璇佽鍒�
+		form.verify({
+			num: [/^\d+$/, "蹇呴』涓烘鏁存暟"],
+			money: [/^\d+(\.\d{1,2})?$/, "閲戦鏈�澶氫繚鐣�2浣嶅皬鏁�"]
 		});
-		
-		// 鎻愪緵缁欑埗椤甸潰璋冪敤鐨勬彁浜ゅ嚱鏁�
-		function submit(callback) {
-			layui.use(['form', 'jquery'], function() {
-				var form = layui.form;
-				var $ = layui.jquery;
-				
-				// 鑾峰彇琛ㄥ崟鏁版嵁
-				var field = {};
-				$(".layui-form input").each(function() {
-					if ($(this).attr("name")) {
-						field[$(this).attr("name")] = $(this).val();
-					}
-				});
-				
-				// 璋冪敤鍥炶皟鍑芥暟
-				callback(field);
-			});
-		}
-	</script>
+		var id = http_util.getQueryString("id");
+		// 鑾峰彇鍊�
+		$.post("/admin/api/clientinfo/js2/getAdditionalInfo", {
+			"id":id
+		}, function(response) {
+			if (response.code == 0) {
+				form.val("edit", response.data);
+			} else {
+				layer.msg(response.msg);
+			}
+		}, 'json').fail(function(jqXHR, textStatus, errorThrown) {
+			layer.msg("缃戠粶璇锋眰澶辫触");
+		});
+		//鐩戝惉鎻愪氦
+		form.on('submit(sure)', function(data) {
+			listener(data.field);
+			return false;
+		});
+	});
+</script>
 </body>
 
 </html>
\ No newline at end of file

--
Gitblit v1.8.0