首页 > 其他分享 >明石印染厂(开学测试)

明石印染厂(开学测试)

时间:2022-11-03 20:58:06浏览次数:59  
标签:开学 String rs 印染厂 resp req public 明石 id

 

 

 

 

 

 

 

 

hetong.java

 

package bean;

public class hetong {
private String id;
private String name;
private String goodname;
private String goodcolor;
private String goodnum;
private String date;
private String date2;
private String operator;
private String leixing;
private String zhuangtai;
public String getId() {
    return id;
}
public void setId(String id) {
    this.id = id;
}
public String getName() {
    return name;
}
public void setName(String name) {
    this.name = name;
}
public String getGoodname() {
    return goodname;
}
public void setGoodname(String goodname) {
    this.goodname = goodname;
}
public String getGoodcolor() {
    return goodcolor;
}
public void setGoodcolor(String goodcolor) {
    this.goodcolor = goodcolor;
}
public String getGoodnum() {
    return goodnum;
}
public void setGoodnum(String goodnum) {
    this.goodnum = goodnum;
}
public String getDate() {
    return date;
}
public void setDate(String date) {
    this.date = date;
}
public String getDate2() {
    return date2;
}
public void setDate2(String date2) {
    this.date2 = date2;
}
public String getOperator() {
    return operator;
}
public void setOperator(String operator) {
    this.operator = operator;
}
public String getLeixing() {
    return leixing;
}
public void setLeixing(String leixing) {
    this.leixing = leixing;
}
public String getZhuangtai() {
    return zhuangtai;
}
public void setZhuangtai(String zhuangtai) {
    this.zhuangtai = zhuangtai;
}
public hetong(String id,String name,String goodname,String goodcolor,String goodnum,String date,String date2,String operator,String leixing,String zhuangtai) {
    this.id = id;
    this.name = name;
    this.goodname = goodname;
    this.goodcolor = goodcolor;
    this.goodnum = goodnum;
    this.date = date;
    this.date2 = date2;
    this.operator = operator;
    this.leixing = leixing;
    this.zhuangtai = zhuangtai;
}
}

 

jihua.java

 

package bean;

public class jihua {
    private String id;
    private String hetongid;
    private String gongrenid;
    private String gongrenzuid;
    private String dailyplan;
    private String startime;
    private String endtime;
    private String operator;
    private String zhuangtai;
    public String getId() {
        return id;
    }
    public void setId(String id) {
        this.id = id;
    }
    public String getHetongid() {
        return hetongid;
    }
    public void setHetongid(String hetongid) {
        this.hetongid = hetongid;
    }
    public String getGongrenid() {
        return gongrenid;
    }
    public void setGongrenid(String gongrenid) {
        this.gongrenid = gongrenid;
    }
    public String getGongrenzuid() {
        return gongrenzuid;
    }
    public void setGongrenzuid(String gongrenzuid) {
        this.gongrenzuid = gongrenzuid;
    }
    public String getDailyplan() {
        return dailyplan;
    }
    public void setDailyplan(String dailyplan) {
        this.dailyplan = dailyplan;
    }
    public String getStartime() {
        return startime;
    }
    public void setStartime(String startime) {
        this.startime = startime;
    }
    public String getEndtime() {
        return endtime;
    }
    public void setEndtime(String endtime) {
        this.endtime = endtime;
    }
    public String getOperator() {
        return operator;
    }
    public void setOperator(String operator) {
        this.operator = operator;
    }
    public String getZhuangtai() {
        return zhuangtai;
    }
    public void setZhuangtai(String zhuangtai) {
        this.zhuangtai = zhuangtai;
    }
    public jihua(String id,String hetongid,String gongrenid,String gongrenzuid,String dailyplan,String startime,String endtime,String operator,String zhuangtai) {
        this.id = id;
        this.hetongid = hetongid;
        this.gongrenid = gongrenid;
        this.gongrenzuid = gongrenzuid;
        this.dailyplan = dailyplan;
        this.startime = startime;
        this.endtime = endtime;
        this.operator = operator;
        this.zhuangtai = zhuangtai;
    }
}

 

dao.java

 

package dao;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.sql.ResultSet;
import java.sql.Statement;
import dbutil.DBUtil;
import bean.*;
import java.util.Collections;
public class dao {
    public String login(String name,String paw)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        try
        {
            String sql = "select * from login";
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            while(rs.next())
            {
                String number=rs.getString("id");
                String password=rs.getString("password");
                if(number.equals(name)&&password.equals(paw))
                {
                    return "正确";
                }
            }
            
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return "错误";
    }
    
    public void addhetong(String id,String name,String goodname,String goodcolor,String goodnum,String operator,String leixing)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        try
        {
            String date="20220906001";
            String date2="20221006001";
            String zhuangtai="已提交";
            String sql = "insert into hetong(id,name,goodname,goodcolor,goodnum,date,date2,operator,leixing,zhuangtai)values('"+id+"','"+name+"','"+goodname+"','"+goodcolor+"','"+goodnum+"','"+date+"','"+date2+"','"+operator+"','"+leixing+"','"+zhuangtai+"')";
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public void updatehetong(String id,String name,String goodname,String goodcolor,String goodnum,String operator,String leixing)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        try
        {
            String date="20220906001";
            String date2="20221006001";
            
            String sql = "update hetong set name='"+name+"',goodname='"+goodname+"',goodcolor='"+goodcolor+"',goodnum='"+goodnum+"',date='"+date+"',date2='"+date2+"',operator='"+operator+"',leixing='"+leixing+"' where id='"+id+"'";
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public static List<hetong> selecthetong()
    { 
        
        String sql = "select * from hetong";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<hetong> list = new ArrayList<>();
        ResultSet rs = null;
        int flag=0;
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            hetong kc=null;
            while(rs.next())
            {
                String id=rs.getString("id");
                String name=rs.getString("name");
                String goodname=rs.getString("goodname");
                String goodcolor=rs.getString("goodcolor");
                String goodnum=rs.getString("goodnum");
                String date=rs.getString("date");
                String date2=rs.getString("date2");
                String operator=rs.getString("operator");
                String leixing=rs.getString("leixing");
                String zhuangtai=rs.getString("zhuangtai");
                kc =new hetong(id,name,goodname,goodcolor,goodnum,date,date2,operator,leixing,zhuangtai);
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public void shenhe(String id,String q)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        String sql="";
        try
        {
            if(q.equals("1")) {
                String w="通过";
             sql = "update hetong set zhuangtai='"+w+"' where id='"+id+"'";
            }
            else {
                String w="退回";
                sql = "update hetong set zhuangtai='"+w+"' where id='"+id+"'";
            }
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public void addjihua(String id,String hetongid,String gongrenid,String dailyplan,String opeartor,String gongrenzuid)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        try
        {
            String date="20220906001";
            String date2="20221006001";
            String zhuangtai="已提交";
            String sql = "insert into plan(id,hetongid,gongrenid,gongrenzuid,dailyplan,startime,endtime,operator,zhuangtai)values('"+id+"','"+hetongid+"','"+gongrenid+"','"+gongrenzuid+"','"+dailyplan+"','"+date+"','"+date2+"','"+opeartor+"','"+zhuangtai+"')";
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public void updatejihua(String id,String hetongid,String gongrenid,String dailyplan,String opeartor,String gongrenzuid)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        try
        {
            String date="20220906001";
            String date2="20221006001";
            String zhuangtai="已提交";
            String sql = " update plan set   hetongid= '"+hetongid+"',gongrenid ='"+gongrenid+"',gongrenzuid='"+gongrenzuid+"',dailyplan='"+dailyplan+"',startime='"+date+"',endtime='"+date2+"',operator='"+opeartor+"',zhuangtai='"+zhuangtai+"' where id='"+id+"'";
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public static List<jihua> selectplan()
    { 
        
        String sql = "select * from plan";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<jihua> list = new ArrayList<>();
        ResultSet rs = null;
        int flag=0;
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            jihua kc=null;
            while(rs.next())
            {
                String id=rs.getString("id");
                String hetongid=rs.getString("hetongid");
                String gongrenid=rs.getString("gongrenid");
                String gongrenzuid=rs.getString("gongrenzuid");
                String dailyplan=rs.getString("dailyplan");
                String startime=rs.getString("startime");
                String endtime=rs.getString("endtime");
                String operator=rs.getString("operator");
                String zhuangtai=rs.getString("zhuangtai");
                kc =new jihua(id,hetongid,gongrenid,gongrenzuid,dailyplan,startime,endtime,operator,zhuangtai);
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    public void shenhe1(String id,String q)
    {
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        ResultSet rs = null;
        int flag=0;
        String sql="";
        try
        {
            if(q.equals("1")) {
                String w="通过";
                sql = "update plan set zhuangtai='"+w+"' where id='"+id+"'";
            }
            else {
                String w="退回";
                sql = "update plan set zhuangtai='"+w+"' where id='"+id+"'";
            }
            state = conn.createStatement();
            int count = state.executeUpdate(sql);
            if(count>0) {
                System.out.println("数据插入成功");
            }else {
                System.out.println("数据插入失败了QAQ");
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
    }
    public static List<jihua> selectgongren(String ID)
    { 
        
        String sql = "select * from plan where operator='"+ID+"'";
        Connection conn = DBUtil.getConn();//这里就是从DBUtil类里面得到连接
        Statement state =null;
        List<jihua> list = new ArrayList<>();
        ResultSet rs = null;
        int flag=0;
        try
        {
            state = conn.createStatement();
            rs=state.executeQuery(sql);
            jihua kc=null;
            while(rs.next())
            {
                String id=rs.getString("id");
                String hetongid=rs.getString("hetongid");
                String gongrenid=rs.getString("gongrenid");
                String gongrenzuid=rs.getString("gongrenzuid");
                String dailyplan=rs.getString("dailyplan");
                String startime=rs.getString("startime");
                String endtime=rs.getString("endtime");
                String operator=rs.getString("operator");
                String zhuangtai=rs.getString("zhuangtai");
                kc =new jihua(id,hetongid,gongrenid,gongrenzuid,dailyplan,startime,endtime,operator,zhuangtai);
                list.add(kc);
            }
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }

        finally
        {
            DBUtil.close(rs, state, conn);
        }
        return list;
    }
    
    
    
}

 

 

DBUtil.java

package dbutil;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DBUtil {//这个类就是套模板如果需要用的时候只需要改数据库(db)的名字即可*******
    //public static String db_url="jdbc:mysql://localhost:3306/database?uerUnicode=true&characterEncoding=UTF-8";
    public static String db_url="jdbc:mysql://localhost:3306/python?serverTimezone=GMT%2B8&serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=UTF-8";//db是数据库的名字
    //这是连接数据库,servlet是数据库的名称,uerUnicode=true&characterEncoding=UTF-8是将字符集设置为utf-8,避免乱码。
    public static String db_user="root";//数据的用户名
    public static String db_password="123456";//数据库的密码
    public static Connection getConn()//获取连接,返回Connection类型,必须设置为static这样才能在其他类中使用
    {
        Connection conn=null;
        try
        {
            Class.forName("com.mysql.cj.jdbc.Driver");//加载驱动
            conn=DriverManager.getConnection(db_url,db_user,db_password);//连接数据库
        }
        catch(Exception e)
        {
            e.printStackTrace();
        }
        return conn;
    }
    public static void close(Statement state,Connection conn)//关闭函数
    {
        if(state!=null)//只有状态和连接时,先关闭状态
        {
            try
            {
                state.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(conn!=null)
        {
            try
            {
                conn.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
    public static void close(ResultSet rs,Statement state,Connection conn)
    {
        if(rs!=null)//有结果集,状态和连接时,先关闭结果集,在关闭状态,在关闭连接
        {
            try
            {
                rs.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(state!=null)

        {
            try
            {
                state.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
        if(conn!=null)
        {
            try
            {
                conn.close();
            }
            catch(SQLException e)
            {
                e.printStackTrace();
            }
        }
    }
}

 

Servlet.java

 

package servlet;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.List;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bean.hetong;
import bean.jihua;
import dao.*;

@WebServlet("/r2")//r3是资源路径
public class Servlet extends HttpServlet{
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, java.io.IOException {
    /*    
     * 利用post获取体数据进行使用
        //获取请求消息体--请求参数
        //1 获取字符流
        BufferedReader br=request.getReader();
        //2 读取数据
        String line=null;
        while((line==br.readLine())    ) {
            System.out.println("line");
        }
        
        */
        return;
    }
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");// 设置字符集,避免乱码
        // 获取jsp界面需要进行的操作,
        String method = req.getParameter("method");//1 req.getParameter("参数名")根据参数名获取参数值
        //2 String[] getParametervalue("参数名"):根据参数名称获取参数值的数组
        //3 Enumeration<String>  getParameterNames():获取所有请求参数名称 如果是数组的话只能获取到第一个
        //4 Map<String,String[]> getParameterMap():获取所有参数map集合  就是字符或者字符串都能存储
        
        
        //System.out.println("============");
        if (method.equals("login"))
        {
            login(req,resp);
        }
        if (method.equals("addhetong"))
        {
            addhetong(req,resp);
        }
        if (method.equals("updatehetong"))
        {
            updatehetong(req,resp);
        }
        if (method.equals("selecthetong"))
        {
            selecthetong(req,resp);
        }
        if (method.equals("selecthetong1"))
        {
            selecthetong1(req,resp);
        }
        if (method.equals("shenhe"))
        {
            shenhe(req,resp);
        }
        if (method.equals("shenhe1"))
        {
            shenhe1(req,resp);
        }
        if (method.equals("addjihua"))
        {
            addjihua(req,resp);
        }
        if (method.equals("updatejihua"))
        {
            updatejihua(req,resp);
        }
        if (method.equals("selectplan"))
        {
            selectplan(req,resp);
        }
        if (method.equals("selectplan1"))
        {
            selectplan1(req,resp);
        }
        
    }
    private void login(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");
        String id=req.getParameter("id");
        String password=req.getParameter("password");
        dao userdao = new dao();
        String w= userdao.login(id, password);
        if(w.equals("正确"))
        {
            String a=id.substring(0,2);
            String b=id.substring(2,4);
            if(a.equals("01")) {
                //String a1=id.substring(0, 0)
                req.getRequestDispatcher("zongjingli.jsp").forward(req,resp);
            }
            if(a.equals("02")) {
                if(b.equals("01")) {
                    List<hetong> kc=dao.selecthetong();
                    req.setAttribute("kc", kc);
                    //req.setAttribute("inf1", inf1);
                    req.getRequestDispatcher("xiaoshoujingli.jsp").forward(req, resp);
                    
                }
                req.getRequestDispatcher("xiaoshougongneng.jsp").forward(req,resp);
            }
            if(a.equals("03")) {
                if(b.equals("02")) {
                    req.getRequestDispatcher("shengchanjishu.jsp").forward(req,resp);
                }
                if(b.equals("01")) {
                    //req.getRequestDispatcher("shengchanjingli.jsp").forward(req,resp);
                    selectplan1(req, resp);
                }
                if(b.equals("03")) {
                    //req.getRequestDispatcher("shengchanjingli.jsp").forward(req,resp);
                    selectgongren(req, resp,id);
                }
            }
            
        }
        else {
            req.setAttribute("message", "账号或密码错误,请重新输入。");
            req.getRequestDispatcher("login.jsp").forward(req,resp);
        }
    }
    private void addhetong(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
           req.setCharacterEncoding("utf-8");//职员填写合同
           resp.setContentType("text/html;charset=utf-8");
           String id=req.getParameter("id");
           String name = req.getParameter("name");
           String goodname=req.getParameter("goodname");
           String goodcolor=req.getParameter("goodcolor");
           String goodnum=req.getParameter("goodnum");
           String operator=req.getParameter("operator");
           String leixing=req.getParameter("leixing");
           

           dao  userdao = new dao();
          // System.out.println("============");
           userdao.addhetong(id,name,goodname,goodcolor,goodnum,operator,leixing);
          // System.out.println("============");
           req.getRequestDispatcher("/xiaoshougongneng.jsp").forward(req,resp);
      }
    private void updatehetong(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          req.setCharacterEncoding("utf-8");//职员修改合同
          resp.setContentType("text/html;charset=utf-8");
          String id=req.getParameter("id");
          String name = req.getParameter("name");
          String goodname=req.getParameter("goodname");
          String goodcolor=req.getParameter("goodcolor");
          String goodnum=req.getParameter("goodnum");
          String operator=req.getParameter("operator");
          String leixing=req.getParameter("leixing");
          

          dao  userdao = new dao();
         // System.out.println("============");
          userdao.updatehetong(id,name,goodname,goodcolor,goodnum,operator,leixing);
         // System.out.println("============");
          req.getRequestDispatcher("/xiaoshougongneng.jsp").forward(req,resp);
     }
    private void selecthetong(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//职员查看合同
//        System.out.println(req.getParameter("luxian")+"=========");
        List<hetong> kc=dao.selecthetong();
        req.setAttribute("kc", kc);
        //req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("selecthetong.jsp").forward(req, resp);
    }
    private void selecthetong1(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//销售经理查看合同
//        System.out.println(req.getParameter("luxian")+"=========");
        List<hetong> kc=dao.selecthetong();
        req.setAttribute("kc", kc);
        //req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("xiaoshoujingli.jsp").forward(req, resp);
    }
    private void shenhe(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
         req.setCharacterEncoding("utf-8");//销售经理修改合同
         resp.setContentType("text/html;charset=utf-8");
         String id=req.getParameter("id");
         String w=req.getParameter("w");
         dao  userdao = new dao();
        // System.out.println("============");
             userdao.shenhe(id,w);
        // System.out.println("============");
         //req.getRequestDispatcher("/xiaoshoujingli.jsp").forward(req,resp);
             selecthetong1(req, resp);
    }
    private void shenhe1(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//销售经理修改合同
        resp.setContentType("text/html;charset=utf-8");
        String id=req.getParameter("id");
        String w=req.getParameter("w");
        dao  userdao = new dao();
       System.out.println(id);
       System.out.println(w);
            userdao.shenhe1(id,w);
       
       //req.getRequestDispatcher("/xiaoshoujingli.jsp").forward(req,resp);
            selectplan1(req, resp);
   }
    private void addjihua(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          req.setCharacterEncoding("utf-8");//生产计划员拟定合同
          resp.setContentType("text/html;charset=utf-8");
          String id=req.getParameter("id");
          String hetongid = req.getParameter("hetongid");
          String gongrenid=req.getParameter("gongrenid");
          String dailyplan=req.getParameter("dailyplan");
          String opeartor=req.getParameter("operator");
          String gongrenzuid=req.getParameter("gongrenzuid");

          dao  userdao = new dao();
         // System.out.println("============");
          userdao.addjihua(id,hetongid,gongrenid,dailyplan,opeartor,gongrenzuid);
         // System.out.println("============");
          req.getRequestDispatcher("/shengchangongneng.jsp").forward(req,resp);
     }
    private void updatejihua(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
         req.setCharacterEncoding("utf-8");//生产技术员修改合同
         resp.setContentType("text/html;charset=utf-8");
         String id=req.getParameter("id");
         String hetongid = req.getParameter("hetongid");
         String gongrenid=req.getParameter("gongrenid");
         String dailyplan=req.getParameter("dailyplan");
         String opeartor=req.getParameter("operator");
         String gongrenzuid=req.getParameter("gongrenzuid");

         dao  userdao = new dao();
         //System.out.println("============");
         userdao.updatejihua(id,hetongid,gongrenid,dailyplan,opeartor,gongrenzuid);
         //System.out.println("============");
         req.getRequestDispatcher("/shengchangongneng.jsp").forward(req,resp);
    }
    private void selectplan(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//生产技术员查看合同
//        System.out.println(req.getParameter("luxian")+"=========");
        List<jihua> kc=dao.selectplan();
        req.setAttribute("kc", kc);
        //req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("selectplan.jsp").forward(req, resp);
    }
    private void selectplan1(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//生产技术员查看合同
//      System.out.println(req.getParameter("luxian")+"=========");
        List<jihua> kc=dao.selectplan();
        req.setAttribute("kc", kc);
        //req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("shengchanjingli.jsp").forward(req, resp);
    }
    private void selectgongren(HttpServletRequest req, HttpServletResponse resp,String id) throws ServletException, IOException {
        req.setCharacterEncoding("utf-8");//生产技术员查看合同
//      System.out.println(req.getParameter("luxian")+"=========");
        List<jihua> kc=dao.selectgongren(id);
        req.setAttribute("kc", kc);
        //req.setAttribute("inf1", inf1);
        req.getRequestDispatcher("selectgongren.jsp").forward(req, resp);
    }
 }

 

需要导入hupls(BootStrap的)还有layui

login.jsp

<%@page import="java.util.*"%>
<%@page import="bean.*"%>
<%@page import="dao.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from www.zi-han.net/theme/hplus/login_v2.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:49 GMT -->

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title>H+ 后台主题UI框架 - 登录</title>
    <meta name="keywords" content="H+后台主题,后台bootstrap框架,会员中心主题,后台HTML,响应式后台">
    <meta name="description" content="H+是一个完全响应式,基于Bootstrap3最新版本开发的扁平化主题,她采用了主流的左右两栏式布局,使用了Html5+CSS3等现代技术">
    <link href="hplus/css/bootstrap.min.css" rel="stylesheet">
    <link href="hplus/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="hplus/css/animate.min.css" rel="stylesheet">
    <link href="hplus/css/style.min.css" rel="stylesheet">
    <link href="hplus/css/login.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>
        if(window.top!==window.self){window.top.location=window.location};
    </script>

</head>

<body class="signin">
    <div class="signinpanel">
        <div class="row">
            <div class="col-sm-7">
                <div class="signin-info">
                    <div class="logopanel m-b">
                        <h1>[ 明石印染厂 ]</h1>
                    </div>
                    <div class="m-b"></div>
                    <h4>欢迎使用 <strong>石家庄明石印染厂销售系统</strong></h4>
                </div>
            </div>
            <div class="col-sm-5">
                <form action="/test/r2?method=login" method="post">
                    <h4 class="no-margins">登录:</h4>
                    <p class="m-t-md">登录到石家庄明石印染厂销售系统</p>
                    <input type="text" class="form-control uname" placeholder="工号" name="id" required="required"   />
                    <input type="password" class="form-control pword m-b" placeholder="密码" name="password" required="required" />
                    <button class="btn btn-success btn-block">登录</button>
                </form>
            </div>
        </div>
        <div class="signup-footer">
            <div class="pull-left">
            <%        
            SimpleDateFormat sim=new SimpleDateFormat("yyyy年MM月dd日 a hh点mm分ss秒");
            String newTime = sim.format(new Date());
        %>
                &copy; 当前时间:<%=newTime %>
            </div>
        </div>
    </div>
    <script>
      var w=<%= (String)request.getAttribute("message") %>
      if(w!=null)
          {
              alert(q);
              location.reload();
          }
    </script>
</body>
</html>

 

selectgongren.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@page import="bean.*"%>
<%@page import="dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
   <li class="layui-nav-item layui-this"><a href="login.jsp">查询生产计划(需要进行身份验证)</a></li>
   <li class="layui-nav-item"><a href="updateplan.jsp">拟制生产计划</a></li>
</ul>
<table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>计划编号</th>
                    <th>合同编号</th>
                    <th>工人编号</th>
                    <th>工人组编号</th>
                    <th>每日完成计划量</th>
                    <th>计划开始时间</th>
                    <th>计划结束时间</th>
                    <th>操作人</th>
                    <th>计划状态</th>
            </tr>
             <c:forEach items="${kc}" var="jihua">
            <tr>
                <td><c:out value="${jihua.id}"></c:out></td>
                <td><c:out value="${jihua.hetongid}"></c:out></td>
                <td><c:out value="${jihua.gongrenid}"></c:out></td>
                <td><c:out value="${jihua.gongrenzuid}"></c:out></td>
                <td><c:out value="${jihua.daiilplan}"></c:out></td>
                <td><c:out value="${jihua.startime}"></c:out></td>
                <td><c:out value="${jihua.endtime}"></c:out></td>
                <td><c:out value="${jihua.operator}"></c:out></td>
                <td>
                <c:out value="${jihua.zhuangtai}"></c:out>
                </td>
            </tr>
        </c:forEach>
        </table>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

selecthetong.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@page import="bean.*"%>
<%@page import="dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item "><a href="xiaoshougongneng.jsp">合同拟制</a></li>
  <li class="layui-nav-item layui-this"><a href="xiugaihetong.jsp">修改合同</a></li>
  <li class="layui-nav-item"><a href="/test/r2?method=selecthetong">浏览合同</a></li>
</ul>

<table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>合同编号</th>
                    <th>合同名称</th>
                    <th>货物名称</th>
                    <th>活文物颜色</th>
                    <th>货物数量</th>
                    <th>签订日期</th>
                    <th>交货日期 </th>
                    <th>操作人</th>
                    <th>货物类型</th>
                    <th>合同状态</th>
            </tr>
             <c:forEach items="${kc}" var="hetong">
            <tr>
                <td><c:out value="${hetong.id}"></c:out></td>
                <td><c:out value="${hetong.name}"></c:out></td>
                <td><c:out value="${hetong.goodname}"></c:out></td>
                <td><c:out value="${hetong.goodcolor}"></c:out></td>
                <td><c:out value="${hetong.goodnum}"></c:out></td>
                <td><c:out value="${hetong.date}"></c:out></td>
                <td><c:out value="${hetong.date2}"></c:out></td>
                <td><c:out value="${hetong.operator}"></c:out></td>
                <td><c:out value="${hetong.leixing}"></c:out></td>
                <td><c:out value="${hetong.zhuangtai}"></c:out></td>
            </tr>
        </c:forEach>
        </table>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

selectplan.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@page import="bean.*"%>
<%@page import="dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item layui-this"><a href="xiaoshougongneng.jsp">拟制生产计划</a></li>
  <li class="layui-nav-item "><a href="xiugaihetong.jsp"></a>修改生产计划</li>
  <li class="layui-nav-item"><a href="/test/r2?method=selectplan">查询生产计划</a></li>
</ul>
<table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>计划编号</th>
                    <th>合同编号</th>
                    <th>工人编号</th>
                    <th>工人组编号</th>
                    <th>每日完成计划量</th>
                    <th>计划开始时间</th>
                    <th>计划结束时间</th>
                    <th>操作人</th>
                    <th>计划状态</th>
            </tr>
             <c:forEach items="${kc}" var="jihua">
            <tr>
                <td><c:out value="${jihua.id}"></c:out></td>
                <td><c:out value="${jihua.hetongid}"></c:out></td>
                <td><c:out value="${jihua.gongrenid}"></c:out></td>
                <td><c:out value="${jihua.gongrenzuid}"></c:out></td>
                <td><c:out value="${jihua.daiilplan}"></c:out></td>
                <td><c:out value="${jihua.startime}"></c:out></td>
                <td><c:out value="${jihua.endtime}"></c:out></td>
                <td><c:out value="${jihua.operator}"></c:out></td>
                <td>
                <c:out value="${jihua.zhuangtai}"></c:out>
                </td>
            </tr>
        </c:forEach>
        </table>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>

</body>
</html>

 

 

shengchangongneng.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item layui-this"><a href="xiaoshougongneng.jsp">拟制生产计划</a></li>
  <li class="layui-nav-item "><a href="xiugaihetong.jsp"></a>修改生产计划</li>
  <li class="layui-nav-item"><a href="/test/r2?method=selectplan">查询生产计划</a></li>
</ul>
<div class="center">
 <form action="/test/r2?method=addjihua" method="post"> 
         <div class="layui-container">  
<br>
<br>
<br>
  <div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
        <label class="layui-form-label">计划编号</label>
        <div class="layui-input-block">
          <input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入编号" class="layui-input">
        </div>
      </div>
    </div>
  </div>
<div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
            <label class="layui-form-label">合同编号</label>
            <div class="layui-input-block">
              <input type="password" name="hetongid" placeholder="请输入编号" autocomplete="off" class="layui-input">
    </div>
  </div>
    </div>
  </div>
      <div class="layui-inline">
      <label class="layui-form-label">工人工号</label>
      <div class="layui-input-inline">
        <input type="text" name="gongrenid" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
    
    <div class="layui-inline">
      <label class="layui-form-label">工人组号</label>
      <div class="layui-input-inline">
        <input type="text" name="gongrenzuid" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">每日完成计划量</label>
      <div class="layui-input-inline">
        <input type="text" name="dailyplan" lay-verify="required|phone" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">操作人</label>
      <div class="layui-input-inline">
        <input type="text" name="operator" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-container">  
  <div class="layui-row">
  <div class="layui-col-md2">
                   &nbsp;
    </div>
    <div class="layui-col-md2">
       <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">提交</button>
    </div>
    <div class="layui-col-md3">
      <button type="reset" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">刷新</button>
    </div>
  </div>
  </div>
  </div>
         
 </form>
 </div>

<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

 

shengchanjingli.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@page import="bean.*"%>
<%@page import="dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item layui-this"><a href="xiaoshougongneng.jsp">拟制生产计划</a></li>
  <li class="layui-nav-item "><a href="xiugaihetong.jsp"></a>修改生产计划</li>
  <li class="layui-nav-item"><a href="/test/r2?method=selectplan1">操作生产计划</a></li>
</ul>
<table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>计划编号</th>
                    <th>合同编号</th>
                    <th>工人编号</th>
                    <th>工人组编号</th>
                    <th>每日完成计划量</th>
                    <th>计划开始时间</th>
                    <th>计划结束时间</th>
                    <th>操作人</th>
                    <th>计划状态</th>
                    <th>操作</th>
            </tr>
             <c:forEach items="${kc}" var="jihua">
            <tr>
                <td><c:out value="${jihua.id}"></c:out></td>
                <td><c:out value="${jihua.hetongid}"></c:out></td>
                <td><c:out value="${jihua.gongrenid}"></c:out></td>
                <td><c:out value="${jihua.gongrenzuid}"></c:out></td>
                <td><c:out value="${jihua.dailyplan}"></c:out></td>
                <td><c:out value="${jihua.startime}"></c:out></td>
                <td><c:out value="${jihua.endtime}"></c:out></td>
                <td><c:out value="${jihua.operator}"></c:out></td>
                <td>
                <c:out value="${jihua.zhuangtai}"></c:out>
                </td>
                <td>
                <form action="/test/r2?method=shenhe1" method="post">
                <input type="hidden" placeholder="${jihua.id}" value="${jihua.id}" name="id">
                <input type="hidden" placeholder="1" value="1" name="w">
                    <button type="submit">通过</button>
                </form>
                    <form action="/test/r2?method=shenhe1" method="post">
                <input type="hidden" placeholder="${jihua.id}" value="${jihua.id}" name="id">
                <input type="hidden" placeholder="2" value="2" name="w">
                    <button type="submit">退回</button>
                </form>
                </td>
            </tr>
        </c:forEach>
        </table>
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

 

updateplan.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item "><a href="shengchangongneng.jsp">拟制生产计划</a></li>
  <li class="layui-nav-item layui-this"><a href="updateplan.jsp"></a>修改生产计划</li>
  <li class="layui-nav-item"><a href="/test/r2?method=selectplan">查询生产计划</a></li>
</ul>
<div class="center">
 <form action="/test/r2?method=updatejihua" method="post"> 
         <div class="layui-container">  
<br>
<br>
<br>
  <div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
        <label class="layui-form-label">计划编号</label>
        <div class="layui-input-block">
          <input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入编号" class="layui-input">
        </div>
      </div>
    </div>
  </div>
<div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
            <label class="layui-form-label">合同编号</label>
            <div class="layui-input-block">
              <input type="password" name="hetongid" placeholder="请输入编号" autocomplete="off" class="layui-input">
    </div>
  </div>
    </div>
  </div>
      <div class="layui-inline">
      <label class="layui-form-label">工人工号</label>
      <div class="layui-input-inline">
        <input type="text" name="gongrenid" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
    
    <div class="layui-inline">
      <label class="layui-form-label">工人组号</label>
      <div class="layui-input-inline">
        <input type="text" name="gongrenzuid" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">每日完成计划量</label>
      <div class="layui-input-inline">
        <input type="text" name="dailyplan" lay-verify="required|phone" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">操作人</label>
      <div class="layui-input-inline">
        <input type="text" name="operator" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-container">  
  <div class="layui-row">
  <div class="layui-col-md2">
                   &nbsp;
    </div>
    <div class="layui-col-md2">
       <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">提交</button>
    </div>
    <div class="layui-col-md3">
      <button type="reset" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">刷新</button>
    </div>
  </div>
  </div>
  </div>
         
 </form>
 </div>

<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>`
</body>
</html>

 

 

siaoshougongneng.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
<style type="text/css">
</style>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item layui-this"><a href="xiaoshougongneng.jsp">合同拟制</a></li>
  <li class="layui-nav-item "><a href="xiugaihetong.jsp">修改合同</a></li>
  <li class="layui-nav-item"><a href="/test/r2?method=selecthetong">浏览合同</a></li>
</ul>
 <div class="center">
 <form action="/test/r2?method=addhetong" method="post">
         <div class="layui-container">  
<br>
<br>
<br>
  <div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
        <label class="layui-form-label">合同编号</label>
        <div class="layui-input-block">
          <input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入编号" class="layui-input">
        </div>
      </div>
    </div>
  </div>
<div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
            <label class="layui-form-label">合同名称</label>
            <div class="layui-input-block">
              <input type="password" name="name" placeholder="请输入名称" autocomplete="off" class="layui-input">
    </div>
  </div>
    </div>
  </div>
      <div class="layui-inline">
      <label class="layui-form-label">货物名称</label>
      <div class="layui-input-inline">
        <input type="text" name="goodname" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  <div class="layui-form-item">
    <div class="layui-form-item">
    <label class="layui-form-label"> 货物类型</label>
    <div class="layui-input-block">
      <input type="radio" name="leixing" value="全色染布" title="全色染布" checked>全色染布
      <input type="radio" name="leixing" value="印花染布" title="印花染布">印花染布
    </div>
  </div>
    
    <div class="layui-inline">
      <label class="layui-form-label">货物颜色</label>
      <div class="layui-input-inline">
        <input type="text" name="goodcolor" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">货物数量</label>
      <div class="layui-input-inline">
        <input type="text" name="goodnum" lay-verify="required|phone" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">操作人</label>
      <div class="layui-input-inline">
        <input type="text" name="operator" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-container">  
  <div class="layui-row">
  <div class="layui-col-md2">
                   &nbsp;
    </div>
    <div class="layui-col-md2">
       <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">提交</button>
    </div>
    <div class="layui-col-md3">
      <button type="reset" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">刷新</button>
    </div>
  </div>
  </div>
  </div>
         
 </form>
 </div>
 
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

 

xiaoshoujingli.jsp

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%@page import="bean.*"%>
<%@page import="dao.*"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>

</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item "><a href="xiaoshougongneng.jsp">审核合同</a></li>
  <li class="layui-nav-item layui-this"><a href="/test/r2?method=selecthetong1">浏览合同</a></li>
</ul>
<table class="layui-table" layui-data= "{skin: even:true, } ">
            <tr>
                    <th>合同编号</th>
                    <th>合同名称</th>
                    <th>货物名称</th>
                    <th>活文物颜色</th>
                    <th>货物数量</th>
                    <th>签订日期</th>
                    <th>交货日期 </th>
                    <th>操作人</th>
                    <th>货物类型</th>
                    <th>合同状态</th>
                    <th colspan="2"> 操作</th>
            </tr>
             <c:forEach items="${kc}" var="hetong">
            <tr>
                <td><c:out value="${hetong.id}"></c:out></td>
                <td><c:out value="${hetong.name}"></c:out></td>
                <td><c:out value="${hetong.goodname}"></c:out></td>
                <td><c:out value="${hetong.goodcolor}"></c:out></td>
                <td><c:out value="${hetong.goodnum}"></c:out></td>
                <td><c:out value="${hetong.date}"></c:out></td>
                <td><c:out value="${hetong.date2}"></c:out></td>
                <td><c:out value="${hetong.operator}"></c:out></td>
                <td><c:out value="${hetong.leixing}"></c:out></td>
                <td><a href="/test/r2?method=shenghe&id=${hetong.id}">
                <c:out value="${hetong.zhuangtai}"></c:out>
                </a></td>
                <td>
                <form action="/test/r2?method=shenhe" method="post">
                <input type="hidden" placeholder="${hetong.id}" value="${hetong.id}" name="id">
                <input type="hidden" placeholder="1" value="1" name="w">
                    <button type="submit">通过</button>
                </form>
                    <form action="/test/r2?method=shenhe" method="post">
                <input type="hidden" placeholder="${hetong.id}" value="${hetong.id}" name="id">
                <input type="hidden" placeholder="2" value="2" name="w">
                    <button type="submit">退回</button>
                </form>
                </td>
            </tr>
        </c:forEach>
        </table>


<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

 

 

xiugaihetong.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css" media="all">
<script src="layui/layui.js" charset="utf-8"></script>
</head>
<body>
<ul class="layui-nav layui-nav-child-c" lay-filter="">
  <li class="layui-nav-item "><a href="xiaoshougongneng.jsp">合同拟制</a></li>
  <li class="layui-nav-item layui-this"><a href="xiugaihetong.jsp">修改合同</a></li>
  <li class="layui-nav-item"><a href="/test/r2?method=selecthetong">浏览合同</a></li>
</ul>
<form action="/test/r2?method=updatehetong" method="post">
         <div class="layui-container">  
<br>
<br>
<br>
  <div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
        <label class="layui-form-label">合同编号</label>
        <div class="layui-input-block">
          <input type="text" name="id" lay-verify="title" autocomplete="off" placeholder="请输入编号" class="layui-input">
        </div>
      </div>
    </div>
  </div>
<div class="layui-row">
    <div class="layui-col-md6">
      <div class="layui-form-item">
            <label class="layui-form-label">合同名称</label>
            <div class="layui-input-block">
              <input type="password" name="name" placeholder="请输入名称" autocomplete="off" class="layui-input">
    </div>
  </div>
    </div>
  </div>
      <div class="layui-inline">
      <label class="layui-form-label">货物名称</label>
      <div class="layui-input-inline">
        <input type="text" name="goodname" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  <div class="layui-form-item">
    <div class="layui-form-item">
    <label class="layui-form-label"> 货物类型</label>
    <div class="layui-input-block">
      <input type="radio" name="leixing" value="全色染布" title="全色染布" checked>全色染布
      <input type="radio" name="leixing" value="印花染布" title="印花染布">印花染布
    </div>
  </div>
    
    <div class="layui-inline">
      <label class="layui-form-label">货物颜色</label>
      <div class="layui-input-inline">
        <input type="text" name="goodcolor" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">货物数量</label>
      <div class="layui-input-inline">
        <input type="text" name="goodnum" lay-verify="required|phone" autocomplete="off" class="layui-input">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">操作人</label>
      <div class="layui-input-inline">
        <input type="text" name="operator" lay-verify="required/email" autocomplete="off" class="layui-input">
      </div>
    </div>
  </div>
  <div class="layui-container">  
  <div class="layui-row">
  <div class="layui-col-md2">
                   &nbsp;
    </div>
    <div class="layui-col-md2">
       <button type="submit" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">提交</button>
    </div>
    <div class="layui-col-md3">
      <button type="reset" class="layui-btn layui-btn-radius layui-btn-normal" style="text-align:center;">刷新</button>
    </div>
  </div>
  </div>
  </div>
         
 </form>
 </div>
 
<script>
//注意:导航 依赖 element 模块,否则无法进行功能性操作
layui.use('element', function(){
  var element = layui.element;
  //…
});
</script>
</body>
</html>

 

标签:开学,String,rs,印染厂,resp,req,public,明石,id
From: https://www.cnblogs.com/1774323810com/p/16855791.html

相关文章

  • 开学第九周总结
    这周进行了极限测试,测试内容是基于树形结构的分类查询,数据的增删改查,完成了验收视频,下面是运行截图         ......
  • Lee的老家今年7、8月对该区进行拉闸限电,政府决定从7月1日起停电,然后隔一天到7月3日再
    publicclassoneday{publicstaticvoidmain(String[]args){ Scannerinput=newScanner(System.in); System.out.println("请输入放假月份"); intmonth1=input.......
  • 开学第七周总结
    开学已经第七周了,这周我对我的航空公司案例分析又进行了完善,在之前制作好数据库,表等后,又进行了创建可视化操作,这里我用的是FineBI包括代理商活跃度,代理商利润汇总,飞机场日......
  • 2022年第 2 期《Python 测试平台开发》进阶课程(10月30号开学)
    2022年第2期《Python测试平台开发》进阶课程主讲老师:上海-悠悠上课方式:微信群视频在线教学,方便交流本期上课时间:10月30报名费:报名费3800一人(周期3个月,之前学过《pyt......
  • 开学第五周总结
    开学第五周了,这一周进行了课堂测试画了三个图,分别是业务流程图,过冬天,协作图,复习了UML建模    ......
  • 开学第六周总结
    这一周进行了hive大数据测试,由于在课堂上加晚上只搞出来了数据导入和数据清洗,我又开始重新学习了一边hive大数据,我学习的黑马教程,按照教程加上自我学习敲代码,清理了covid19......
  • 开学季书单|这个九月,这几本书值得一读
    "IT有得聊”是机械工业出版社旗下IT专业资讯和服务平台,致力于帮助读者在广义的IT领域里,掌握更专业、实用的知识与技能,快速提升职场竞争力。导语:告别了七八月份的骄阳,我们迎......
  • 开学总动员!2022华为开发者大赛等你来挑战!
    摘要:9月23日开启2022华为开发者大赛“开学季总动员”主题直播活动。金秋开学季,为了吸引更多高校开发者关注与参与华为开发者大赛,华为于9月23日开启2022华为开发者大赛“开......
  • 开学第四周总结
    这一周建民哥带我们进行了hbase的极限测试经过一下午的练习和学习,加上周末的学习,我完成了测试并且上传,截图如下 ......
  • 第一周开学测试
    //学生类packageTest;publicclassStudent{privateStringname;privateintage;privateStringid;privateStringare;publicStringgetName......