首页 > 其他分享 >测试代码

测试代码

时间:2025-01-14 20:23:19浏览次数:1  
标签:color padding background 测试代码 20px font margin

以下为测试的部分代码:

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>物料管理系统</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/layui/css/layui.css">
  <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap" rel="stylesheet">
  <style>
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      font-family: 'Poppins', sans-serif;
      background-color: #f0f4f8; /* 更柔和的背景色 */
      color: #333;
    }

    /* 左侧导航样式 */
    #leftNav {
      position: fixed;
      top: 0;
      left: 0;
      width: 250px;
      height: 100%;
      background-color: #2C3E50; /* 深蓝色 */
      color: #fff;
      padding-top: 20px;
      box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    }

    /* 左侧导航栏标题 */
    #leftNav .title {
      color: #fff;
      font-size: 24px;
      font-weight: bold;
      text-align: center;
      margin-bottom: 20px;
      padding: 10px 0;
      background-color: #1A242F; /* 深蓝色背景 */
    }

    #leftNav .layui-nav {
      margin-top: 20px;
    }

    #leftNav .layui-nav-item {
      background-color: #2C3E50;
      border-bottom: 1px solid #34495E;
    }

    #leftNav .layui-nav-item a {
      color: #fff;
      font-size: 18px;
      padding: 12px 20px;
      text-decoration: none;
      display: block;
    }

    #leftNav .layui-nav-item a:hover {
      background-color: #34495E;
    }

    #leftNav .layui-nav-child dd a {
      padding-left: 40px;
      background-color: #34495E;
    }

    #leftNav .layui-nav-child dd a:hover {
      background-color: #5D6D7E;
    }

    /* 主内容区域 */
    .main-content {
      margin-left: 250px;
      padding: 30px;
      transition: margin-left 0.3s ease;
      background-color: #fff; /* 白色背景 */
      min-height: 100vh;
      box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1); /* 给主区域加个阴影,提升视觉效果 */
    }

    .main-content header {
      background-color: #3498DB;  /* 蓝色 */
      color: white;
      padding: 20px;
      font-size: 30px;
      text-align: center;
      border-radius: 8px;
      margin-bottom: 20px;
      box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    }

    .main-content h2 {
      color: #2C3E50;
      font-size: 24px;
      margin-bottom: 20px;
      font-weight: 500;
    }

    .main-content p {
      color: #7F8C8D;
      font-size: 18px;
    }

    .layui-row {
      display: flex;
      justify-content: center;
      gap: 20px;
      flex-wrap: wrap;
    }

    .layui-col-xs6 {
      flex: 1 1 calc(33% - 20px);
      min-width: 300px;
      max-width: 350px;
    }

    .layui-card {
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
      background-color: #ecf0f1;  /* 柔和的背景色 */
    }

    .layui-card-header {
      background-color: #2980B9; /* 深蓝色 */
      color: white;
      font-size: 20px;
      font-weight: 600;
      padding: 15px;
    }

    .layui-card-body {
      padding: 20px;
      color: #34495E;
    }

    footer {
      background-color: #34495E; /* 深灰蓝色 */
      color: white;
      text-align: center;
      padding: 20px;
      margin-top: 50px;
      font-size: 14px;
    }

    footer a {
      color: #ecf0f1;
      text-decoration: none;
      font-weight: 500;
    }

    footer a:hover {
      color: #fff;
    }

    @media (max-width: 768px) {
      .main-content {
        margin-left: 0;
        padding: 20px;
      }

      #leftNav {
        width: 100%;
        position: relative;
      }

      #leftNav .layui-nav-item a {
        padding-left: 20px;
      }
    }
  </style>
</head>
<body>

<!-- 左侧导航栏 -->
<div id="leftNav">
  <div class="title">
    物料管理系统
  </div>

  <div class="layui-nav layui-nav-tree">
    <div class="layui-nav-item">
      <a href="javascript:;">物料管理</a>
      <dl class="layui-nav-child">
        <dd><a href="javascript:void(0);" onclick="loadPage('issue_material.html')">发料申请</a></dd>
        <dd><a href="javascript:void(0);" onclick="loadPage('return_material.html')">退料申请</a></dd>
        <dd><a href="javascript:void(0);" onclick="loadPage('supply_material.html')">补料申请</a></dd>
        <dd><a href="javascript:void(0);" onclick="loadPage('product_inbound.html')">产品入库</a></dd>
        <dd><a href="javascript:void(0);" onclick="loadPage('stock_management.html')">库存管理</a></dd>
      </dl>
    </div>
  </div>
</div>

<!-- 主内容区域 -->
<div class="main-content">
  <div id="contentArea">
    <h2>欢迎来到物料管理系统</h2>
    <p>请选择左侧菜单中的操作来管理物料。</p>
  </div>

  <footer>
    <p>© 2024 物料管理系统. <a href="#">隐私政策</a> | <a href="#">联系我们</a></p>
  </footer>
</div>

<script src="https://cdn.jsdelivr.net/npm/layui/layui.js"></script>
<script>
  layui.use(['element'], function () {
    var element = layui.element;
  });

  // 动态加载页面内容
  function loadPage(url) {
    var contentArea = document.getElementById('contentArea');
    contentArea.innerHTML = "<h2>加载中...</h2>";

    var xhr = new XMLHttpRequest();
    xhr.open('GET', url, true);
    xhr.onload = function() {
      if (xhr.status === 200) {
        contentArea.innerHTML = xhr.responseText;
      } else {
        contentArea.innerHTML = "<h2>无法加载页面</h2>";
      }
    };
    xhr.onerror = function() {
      contentArea.innerHTML = "<h2>加载错误</h2>";
    };
    xhr.send();
  }
</script>

</body>
</html>

 

 

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>发料申请</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: 'Roboto', sans-serif;
      background-color: #f7f7f7;
      margin: 0;
      padding: 0;
    }
    header {
      background-color: #2a87f0;
      color: white;
      padding: 20px;
      text-align: center;
      font-size: 30px;
    }
    nav {
      background-color: #333;
      padding: 12px 0;
      text-align: center;
    }
    nav a {
      color: white;
      margin: 0 20px;
      text-decoration: none;
      font-size: 16px;
    }
    nav a:hover {
      background-color: #575757;
      padding: 10px 20px;
      border-radius: 5px;
    }
    .container {
      width: 60%;
      max-width: 800px;
      margin: 40px auto;
      padding: 20px;
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    h2 {
      text-align: center;
      font-size: 28px;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      font-size: 16px;
      display: block;
      margin-bottom: 5px;
    }
    input[type="text"],
    input[type="number"],
    textarea {
      width: 100%;
      padding: 12px;
      border-radius: 5px;
      border: 1px solid #ddd;
      font-size: 16px;
    }
    button {
      width: 100%;
      padding: 14px;
      background-color: #2a87f0;
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 18px;
      cursor: pointer;
      margin-top: 20px;
    }
    button:hover {
      background-color: #1a6fc5;
    }
  </style>
</head>
<body>
<header>
  发料申请
</header>
<nav>
  <a href="index.html">首页</a>
  <a href="issue_material.html">发料</a>
  <a href="return_material.html">退料</a>
  <a href="stock_management.html">库存管理</a>
  <a href="supply_material.html">补料申请</a>
</nav>
<div class="container">
  <h2>请输入发放的物料信息</h2>
  <form action="submit_issue_request.html" method="POST">
    <div class="form-group">
      <label for="materialId">物料ID:</label>
      <input type="text" id="materialId" name="materialId" required>
    </div>
    <div class="form-group">
      <label for="quantity">发放数量:</label>
      <input type="number" id="quantity" name="quantity" required>
    </div>
    <div class="form-group">
      <label for="reason">发放原因:</label>
      <textarea id="reason" name="reason" required></textarea>
    </div>
    <button type="submit">提交发料申请</button>
  </form>
</div>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>产品入库</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Roboto', sans-serif;
            background-color: #f7f7f7;
            margin: 0;
            padding: 0;
        }
        header {
            background-color: #2a87f0;
            color: white;
            padding: 20px;
            text-align: center;
            font-size: 30px;
        }
        nav {
            background-color: #333;
            padding: 12px 0;
            text-align: center;
        }
        nav a {
            color: white;
            margin: 0 20px;
            text-decoration: none;
            font-size: 16px;
        }
        nav a:hover {
            background-color: #575757;
            padding: 10px 20px;
            border-radius: 5px;
        }
        .container {
            width: 60%;
            max-width: 800px;
            margin: 40px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
            font-size: 28px;
            margin-bottom: 20px;
        }
        .form-group {
            margin-bottom: 20px;
        }
        label {
            font-size: 16px;
            display: block;
            margin-bottom: 5px;
        }
        input[type="text"],
        input[type="number"],
        input[type="date"],
        textarea {
            width: 100%;
            padding: 12px;
            border-radius: 5px;
            border: 1px solid #ddd;
            font-size: 16px;
        }
        button {
            width: 100%;
            padding: 14px;
            background-color: #2a87f0;
            border: none;
            border-radius: 5px;
            color: white;
            font-size: 18px;
            cursor: pointer;
            margin-top: 20px;
        }
        button:hover {
            background-color: #1a6fc5;
        }
    </style>
</head>
<body>
<header>
    产品入库
</header>
<nav>
    <a href="index.html">首页</a>
    <a href="issue_material.html">发料</a>
    <a href="return_material.html">退料</a>
    <a href="stock_management.html">库存管理</a>
    <a href="supply_material.html">补料申请</a>
    <a href="product_inbound.html">产品入库</a>
</nav>
<div class="container">
    <h2>请输入入库产品信息</h2>
    <form action="submit_product_inbound.html" method="POST">
        <div class="form-group">
            <label for="productId">产品ID:</label>
            <input type="text" id="productId" name="productId" required>
        </div>
        <div class="form-group">
            <label for="productName">产品名称:</label>
            <input type="text" id="productName" name="productName" required>
        </div>
        <div class="form-group">
            <label for="quantity">入库数量:</label>
            <input type="number" id="quantity" name="quantity" required>
        </div>
        <div class="form-group">
            <label for="supplier">供应商:</label>
            <input type="text" id="supplier" name="supplier" required>
        </div>
        <div class="form-group">
            <label for="inboundDate">入库日期:</label>
            <input type="date" id="inboundDate" name="inboundDate" required>
        </div>
        <div class="form-group">
            <label for="comments">备注:</label>
            <textarea id="comments" name="comments"></textarea>
        </div>
        <button type="submit">提交入库申请</button>
    </form>
</div>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>退料申请</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: 'Roboto', sans-serif;
      background-color: #f7f7f7;
      margin: 0;
      padding: 0;
    }
    header {
      background-color: #2a87f0;
      color: white;
      padding: 20px;
      text-align: center;
      font-size: 30px;
    }
    nav {
      background-color: #333;
      padding: 12px 0;
      text-align: center;
    }
    nav a {
      color: white;
      margin: 0 20px;
      text-decoration: none;
      font-size: 16px;
    }
    nav a:hover {
      background-color: #575757;
      padding: 10px 20px;
      border-radius: 5px;
    }
    .container {
      width: 60%;
      max-width: 800px;
      margin: 40px auto;
      padding: 20px;
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    h2 {
      text-align: center;
      font-size: 28px;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      font-size: 16px;
      display: block;
      margin-bottom: 5px;
    }
    input[type="text"],
    input[type="number"],
    textarea {
      width: 100%;
      padding: 12px;
      border-radius: 5px;
      border: 1px solid #ddd;
      font-size: 16px;
    }
    button {
      width: 100%;
      padding: 14px;
      background-color: #2a87f0;
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 18px;
      cursor: pointer;
      margin-top: 20px;
    }
    button:hover {
      background-color: #1a6fc5;
    }
  </style>
</head>
<body>
<header>
  退料申请
</header>
<nav>
  <a href="index.html">首页</a>
  <a href="issue_material.html">发料</a>
  <a href="return_material.html">退料</a>
  <a href="stock_management.html">库存管理</a>
</nav>
<div class="container">
  <h2>请选择需要退回的物料</h2>
  <form action="submit_return_request.html" method="POST">
    <div class="form-group">
      <label for="materialId">物料ID:</label>
      <input type="text" id="materialId" name="materialId" required>
    </div>
    <div class="form-group">
      <label for="quantity">退料数量:</label>
      <input type="number" id="quantity" name="quantity" required>
    </div>
    <div class="form-group">
      <label for="reason">退料原因:</label>
      <textarea id="reason" name="reason" required></textarea>
    </div>
    <button type="submit">提交退料申请</button>
  </form>
</div>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>库存管理</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Roboto', sans-serif;
            background-color: #f7f7f7;
            margin: 0;
            padding: 0;
        }
        header {
            background-color: #2a87f0;
            color: white;
            padding: 20px;
            text-align: center;
            font-size: 30px;
        }
        nav {
            background-color: #333;
            padding: 12px 0;
            text-align: center;
        }
        nav a {
            color: white;
            margin: 0 20px;
            text-decoration: none;
            font-size: 16px;
        }
        nav a:hover {
            background-color: #575757;
            padding: 10px 20px;
            border-radius: 5px;
        }
        .container {
            width: 60%;
            max-width: 800px;
            margin: 40px auto;
            padding: 20px;
            background-color: #fff;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        }
        h2 {
            text-align: center;
            font-size: 28px;
            margin-bottom: 20px;
        }
    </style>
</head>
<body>
<header>
    库存管理
</header>
<nav>
    <a href="index.html">首页</a>
    <a href="issue_material.html">发料</a>
    <a href="return_material.html">退料</a>
    <a href="stock_management.html">库存管理</a>
    <a href="supply_material.html">补料申请</a>
</nav>
<div class="container">
    <h2>当前库存情况</h2>
    <table border="1" cellpadding="10" style="width: 100%; border-collapse: collapse;">
        <thead>
        <tr>
            <th>物料ID</th>
            <th>物料名称</th>
            <th>库存数量</th>
        </tr>
        </thead>
        <tbody>
        <tr>
            <td>001</td>
            <td>螺丝</td>
            <td>500</td>
        </tr>
        <tr>
            <td>002</td>
            <td>电池</td>
            <td>300</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>

 

 

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>补料申请</title>
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
  <style>
    body {
      font-family: 'Roboto', sans-serif;
      background-color: #f7f7f7;
      margin: 0;
      padding: 0;
    }
    header {
      background-color: #2a87f0;
      color: white;
      padding: 20px;
      text-align: center;
      font-size: 30px;
    }
    nav {
      background-color: #333;
      padding: 12px 0;
      text-align: center;
    }
    nav a {
      color: white;
      margin: 0 20px;
      text-decoration: none;
      font-size: 16px;
    }
    nav a:hover {
      background-color: #575757;
      padding: 10px 20px;
      border-radius: 5px;
    }
    .container {
      width: 60%;
      max-width: 800px;
      margin: 40px auto;
      padding: 20px;
      background-color: #fff;
      border-radius: 8px;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
    h2 {
      text-align: center;
      font-size: 28px;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 20px;
    }
    label {
      font-size: 16px;
      display: block;
      margin-bottom: 5px;
    }
    input[type="text"],
    input[type="number"],
    textarea {
      width: 100%;
      padding: 12px;
      border-radius: 5px;
      border: 1px solid #ddd;
      font-size: 16px;
    }
    button {
      width: 100%;
      padding: 14px;
      background-color: #2a87f0;
      border: none;
      border-radius: 5px;
      color: white;
      font-size: 18px;
      cursor: pointer;
      margin-top: 20px;
    }
    button:hover {
      background-color: #1a6fc5;
    }
  </style>
</head>
<body>
<header>
  补料申请
</header>
<nav>
  <a href="index.html">首页</a>
  <a href="issue_material.html">发料</a>
  <a href="return_material.html">退料</a>
  <a href="stock_management.html">库存管理</a>
  <a href="supply_material.html">补料申请</a>
</nav>
<div class="container">
  <h2>请输入需要补充的物料信息</h2>
  <form action="submit_supply_request.html" method="POST">
    <div class="form-group">
      <label for="materialId">物料ID:</label>
      <input type="text" id="materialId" name="materialId" required>
    </div>
    <div class="form-group">
      <label for="quantity">补料数量:</label>
      <input type="number" id="quantity" name="quantity" required>
    </div>
    <div class="form-group">
      <label for="reason">补料原因:</label>
      <textarea id="reason" name="reason" required></textarea>
    </div>
    <button type="submit">提交补料申请</button>
  </form>
</div>
</body>
</html>

 

标签:color,padding,background,测试代码,20px,font,margin
From: https://www.cnblogs.com/lijianlongCode13/p/18671504

相关文章

  • Consul测试代码
    importtimefromconsulimportConsul,CheckclassConsulServiceManager:def__init__(self,host,port=8500,schema="http"):self._host=hostself._port=portself._schema=schemaself._local_ip="1......
  • 使用 Selenium IDE 生成 Java 自动化测试代码
    首先使用SeleniumIDE录制操作。导出为JavaJUnit测试文件。创建Maven项目,并编辑pom.xml添加依赖:我使用的SeleniumIDE版本为3.17.2,其对应的JUnit版本为4.x.x。<projectxmlns="http://maven.apache.org/POM/4.0.0"xmlns:xsi="http://www.w3.org/200......
  • FluentAssertions:C#单元测试断言库,让测试代码更加直观、易读!
    推荐一个C#开源库,用于单元测试中的断言,它提供了一系列的扩展方法,使得单元测试的断言看起来更加自然流畅。01项目简介FluentAssertions是一个基于.NET的断言库,它提供了一种链式调用的方式来编写断言语句。支持框架.NETFramework4.7、.NETCore2.1、.NETCore3.0、.NET6......
  • 神经网络入门实战:(十九)完整训练及测试代码,以数据集CIFAR10为例
    完整实操之:CIFAR10数据集的训练与测试CIFAR10数据集,有50000张训练图片,有10000张测试图片下方代码中:训练轮次为10轮;batch_size=64,50000/64=782(向上取整),所以训练一轮就等于训练了782个batch_size的图片,10轮就是7820;最终运行结果展示两个部分:画出78......
  • C#实现一个HttpClient集成通义千问-测试代码入手学习参数配置
    测试代码入手学习参数配置准备测试代码修改配置效果:修改消息内容测试流式输出设置流式输出的参数视频教程准备测试代码我们学习从测试代码开始,选择一个模型选择的大模型:通义千问2-VL-开源版-7B然后再API示例中,找到C#的示例代码测试代码:usingSystem.Net.Http.H......
  • 鼠标键盘游戏手柄的测试代码
    #include"QtWidgetsApplication2.h"#include<windows.h>#include<QDebug>#include<QVBoxLayout>QtWidgetsApplication2::QtWidgetsApplication2(QWidget*parent):QFrame(parent){ui.setupUi(this); //init();}QtWidget......
  • 你是如何测试代码的性能的?都有用到哪些工具?
    作为大型语言模型,我不会直接“运行”或“测试”代码,但我可以提供关于前端代码性能测试方法和工具的信息,并帮助你理解如何使用它们。前端性能测试主要关注以下几个方面:加载性能:页面加载速度有多快?运行时性能:页面交互有多流畅?动画是否卡顿?内存使用:页面消耗多少内存?是......
  • 通义灵码用户说:“人工编写测试用例需要数十分钟,通义灵码以毫秒级的速度生成测试代码,且
    通过一篇文章,详细跟大家分享一下我在使用通义灵码过程中的感受。一、定义通义灵码,是一个智能编码助手,它基于通义大模型,提供代码智能生成、研发智能问答能力。在体验过程中有任何问题均可点击下面的连接前往了解和学习。通义灵码官网通义灵码安装教程通义灵码产品手册......
  • 排序算法 排序性能测试代码(随机数调整,高精度时间) - C++
    目录测试工具源码testsort测试工具C++11标准库<chrono>中高精度计时器,时间精度可以达到1纳秒.C++11标准库<random>中随机数生成器,可以实现各类随机数,本测试主要用于实现9成随机数下排序性能源码源码我拆分成两部分,一部分为测试,一部分为sort源码.合并一起使用test......
  • poi实现多个word文档的合并测试代码样例
    提供一个代码样例实现使用poi工具包合并多个word文档:工具类MergeDocUtilspackagecom.yootii.bdy.util.test;importorg.apache.commons.collections.CollectionUtils;importorg.apache.poi.openxml4j.opc.OPCPackage;importorg.apache.poi.xwpf.usermodel.BreakType;im......