You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
3.6 KiB

<%--
Created by IntelliJ IDEA.
User: DELL
Date: 2026/4/27
Time: 14:58
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>添加商品</title>
<style>
.form-container {
width: 600px;
margin: 20px auto;
padding: 20px;
border: 1px solid #ddd;
border-radius: 5px;
}
.form-row {
margin: 15px 0;
display: flex;
align-items: center;
}
.form-row label {
width: 120px;
text-align: right;
margin-right: 15px;
font-size: 16px;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row select,
.form-row textarea {
flex: 1;
padding: 5px 10px;
border: 1px solid #ccc;
border-radius: 3px;
font-size: 14px;
}
.form-row textarea {
height: 80px;
resize: vertical;
}
.form-row input[type="file"] {
flex: 1;
}
.button-row {
margin: 20px 0 0 135px;
}
.button-row input[type="submit"],
.button-row input[type="reset"] {
padding: 8px 25px;
margin-right: 20px;
cursor: pointer;
font-size: 14px;
border: 1px solid #ccc;
border-radius: 3px;
background-color: #f5f5f5;
}
.button-row input[type="submit"]:hover,
.button-row input[type="reset"]:hover {
background-color: #e0e0e0;
}
</style>
</head>
<body>
<div class="form-container">
<form action="${pageContext.request.contextPath}/product/addProduct.action" method="post" enctype="multipart/form-data">
<div class="form-row">
<label>商品编号:</label>
<input type="text" name="productId" value="1" readonly style="background-color: #e8f0fe;">
</div>
<div class="form-row">
<label>商品名称:</label>
<input type="text" name="productName" value="菠萝">
</div>
<div class="form-row">
<label>是否热门:</label>
<select name="isPopular">
<option value="是" selected>是</option>
<option value="否">否</option>
</select>
</div>
<div class="form-row">
<label>市场价格:</label>
<input type="number" name="marketPrice" value="23" step="0.01" style="background-color: #e8f0fe;">
</div>
<div class="form-row">
<label>销售价格:</label>
<input type="number" name="salesPrice" value="23" step="0.01" style="background-color: #e8f0fe;">
</div>
<div class="form-row">
<label>商品图片:</label>
<input type="file" name="productImage">
</div>
<div class="form-row">
<label>分类名称:</label>
<input type="text" name="categoryName" value="水果">
</div>
<div class="form-row">
<label>商品描述:</label>
<textarea name="description">菠萝.....</textarea>
</div>
<div class="form-row">
<label>上架日期:</label>
<input type="text" name="listDate" value="2025-3-25">
</div>
<div class="button-row">
<input type="reset" value="重置">
<input type="submit" value="添加">
</div>
</form>
</div>
</body>
</html>