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.

108 lines
3.3 KiB

<%--
Created by IntelliJ IDEA.
User: DELL
Date: 2026/5/11
Time: 14:00
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;
}
.form-row {
margin: 15px 0;
}
.form-row label {
display: inline-block;
width: 100px;
text-align: right;
margin-right: 15px;
font-size: 16px;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row select {
width: 250px;
padding: 5px;
border: 1px solid #ccc;
font-size: 14px;
}
.form-row textarea {
width: 400px;
height: 80px;
padding: 5px;
border: 1px solid #ccc;
font-size: 14px;
vertical-align: top;
}
.form-row input[type="file"] {
padding: 5px;
}
.button-row {
margin-left: 115px;
margin-top: 20px;
}
.button-row input {
padding: 5px 20px;
margin-right: 100px;
font-size: 14px;
}
</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>