diff --git a/pom.xml b/pom.xml
index 6da773646..ad0084a75 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <modelVersion>4.0.0</modelVersion>
 
     <groupId>com.ruoyi</groupId>
diff --git a/doc/contract.pdf b/running/pdf/contract.pdf
similarity index 93%
rename from doc/contract.pdf
rename to running/pdf/contract.pdf
index be360b133..24a059aff 100644
Binary files a/doc/contract.pdf and b/running/pdf/contract.pdf differ
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index e7882dcf1..5d215da05 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -119,18 +119,6 @@
             <scope>provided</scope>
         </dependency>
 
-        <!-- itextpdf-->
-        <dependency>
-            <groupId>com.itextpdf</groupId>
-            <artifactId>kernel</artifactId>
-            <version>7.1.12</version>
-        </dependency>
-        <dependency>
-            <groupId>com.itextpdf</groupId>
-            <artifactId>layout</artifactId>
-            <version>7.1.12</version>
-        </dependency>
-
     </dependencies>
 
     <build>
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
index 0295cba77..ebb1a692f 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/common/CommonController.java
@@ -3,7 +3,6 @@ package com.ruoyi.web.controller.common;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.model.Contract;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
@@ -13,7 +12,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom/SysContractController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom/SysContractController.java
index f0eebdb6c..2389f4010 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom/SysContractController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom/SysContractController.java
@@ -3,7 +3,6 @@ package com.ruoyi.web.controller.custom;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.domain.model.Contract;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
@@ -13,7 +12,9 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 合同Controller
@@ -92,27 +93,35 @@ public class SysContractController extends BaseController {
 
     @GetMapping("/file/{id}")
     public AjaxResult getfile(@PathVariable long id) {
-        try {
-            AjaxResult ajax = AjaxResult.success();
-//            ajax.put("url", "/login");
-            ajax.put("data", id);
-            return ajax;
-        } catch (Exception e) {
-            return AjaxResult.error(e.getMessage());
+        AjaxResult ajax = AjaxResult.success();
+        SysContract contract = sysContractService.selectSysContractById(id);
+        if (contract.getPath() != null) {
+            ajax.put("url", contract.getPath());
+        } else {
+            Map<String, String> data = new HashMap<>();
+            data.put("name", contract.getName());
+            data.put("amount", contract.getAmount().toString());
+            data.put("serveTime", contract.getServeTime().toString());
+            ajax.put("data", data);
         }
+        return ajax;
     }
 
     /**
      * 合同签单
      */
     @PostMapping("/sign")
-    public AjaxResult signContract(@RequestBody Contract contract) throws Exception {
-        try {
+    public AjaxResult signContract(@RequestBody SysContract sysContract) {
+        sysContract.setStatus(1);
+        String path = "/file/" + sysContract.getId() + ".pdf";
+        sysContract.setPath(path);
+        int count = sysContractService.updateSysContract(sysContract);
+        if (count > 0) {
             AjaxResult ajax = AjaxResult.success();
-            ajax.put("result", "hi");
+            ajax.put("url", path);
             return ajax;
-        } catch (Exception e) {
-            return AjaxResult.error(e.getMessage());
+        } else {
+            return AjaxResult.error("操作失败");
         }
     }
 }
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/Contract.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/Contract.java
deleted file mode 100644
index 739cd443f..000000000
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/Contract.java
+++ /dev/null
@@ -1,25 +0,0 @@
-package com.ruoyi.common.core.domain.model;
-
-public class Contract  {
-
-    private String name;
-
-    private String phone;
-
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-
-    public String getPhone() {
-        return phone;
-    }
-
-    public void setPhone(String phone) {
-        this.phone = phone;
-    }
-}
-
diff --git a/ruoyi-custom/pom.xml b/ruoyi-custom/pom.xml
index a7ed1b730..a696a53de 100644
--- a/ruoyi-custom/pom.xml
+++ b/ruoyi-custom/pom.xml
@@ -23,5 +23,23 @@
             <artifactId>ruoyi-common</artifactId>
         </dependency>
 
+        <!--        itextpdf-->
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>io</artifactId>
+            <version>7.1.12</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>kernel</artifactId>
+            <version>7.1.12</version>
+        </dependency>
+        <dependency>
+            <groupId>com.itextpdf</groupId>
+            <artifactId>itextpdf</artifactId>
+            <version>5.5.13.2</version>
+        </dependency>
+
     </dependencies>
 </project>
\ No newline at end of file
diff --git a/ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysContract.java b/ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysContract.java
index feffe6f99..2a403816f 100644
--- a/ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysContract.java
+++ b/ruoyi-custom/src/main/java/com/ruoyi/custom/domain/SysContract.java
@@ -1,114 +1,158 @@
 package com.ruoyi.custom.domain;
 
-import java.math.BigDecimal;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+import java.math.BigDecimal;
 
 /**
  * 合同对象 sys_contract
- * 
+ *
  * @author wonder
  * @date 2020-10-23
  */
-public class SysContract extends BaseEntity
-{
+public class SysContract extends BaseEntity {
     private static final long serialVersionUID = 1L;
 
-    /** 合同编号 */
+    /**
+     * 合同编号
+     */
     @Excel(name = "合同编号")
     private Long id;
 
-    /** 客户姓名 */
+    /**
+     * 客户姓名
+     */
     @Excel(name = "客户姓名")
     private String name;
 
-    /** 电话 */
+    /**
+     * 客户身份证
+     */
+    private String cusId;
+
+    /**
+     * 电话
+     */
     @Excel(name = "电话")
     private String phone;
 
-    /** 服务时间 */
+    /**
+     * 服务时间
+     */
     @Excel(name = "服务时间")
     private Integer serveTime;
 
-    /** 金额 */
+    /**
+     * 金额
+     */
     @Excel(name = "金额")
     private BigDecimal amount;
 
-    /** 文件路径 */
+    private String amountUpper;
+
+    /**
+     * 文件路径
+     */
     @Excel(name = "文件路径")
     private String path;
 
-    public void setId(Long id) 
-    {
+    /**
+     * 合同状态
+     * 0-未签订;1-已签订
+     */
+    private int Status;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
         this.id = id;
     }
 
-    public Long getId() 
-    {
-        return id;
+    public String getName() {
+        return name;
     }
-    public void setName(String name) 
-    {
+
+    public void setName(String name) {
         this.name = name;
     }
 
-    public String getName() 
-    {
-        return name;
+    public String getPhone() {
+        return phone;
     }
-    public void setPhone(String phone) 
-    {
+
+    public void setPhone(String phone) {
         this.phone = phone;
     }
 
-    public String getPhone() 
-    {
-        return phone;
+    public Integer getServeTime() {
+        return serveTime;
     }
-    public void setServeTime(Integer serveTime) 
-    {
+
+    public void setServeTime(Integer serveTime) {
         this.serveTime = serveTime;
     }
 
-    public Integer getServeTime() 
-    {
-        return serveTime;
+    public BigDecimal getAmount() {
+        return amount;
     }
-    public void setAmount(BigDecimal amount) 
-    {
+
+    public String getAmountUpper() {
+        return amountUpper;
+    }
+
+    public void setAmountUpper(String amountUpper) {
+        this.amountUpper = amountUpper;
+    }
+
+    public void setAmount(BigDecimal amount) {
         this.amount = amount;
     }
 
-    public BigDecimal getAmount() 
-    {
-        return amount;
+    public String getPath() {
+        return path;
     }
-    public void setPath(String path) 
-    {
+
+    public void setPath(String path) {
         this.path = path;
     }
 
-    public String getPath() 
-    {
-        return path;
+    public int getStatus() {
+        return Status;
+    }
+
+    public void setStatus(int status) {
+        Status = status;
+    }
+
+    public String getCusId() {
+        return cusId;
+    }
+
+    public void setCusId(String cusId) {
+        this.cusId = cusId;
     }
 
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("name", getName())
-            .append("phone", getPhone())
-            .append("serveTime", getServeTime())
-            .append("amount", getAmount())
-            .append("path", getPath())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("id", getId())
+                .append("name", getName())
+                .append("cusId", getCusId())
+                .append("status", getStatus())
+                .append("phone", getPhone())
+                .append("serveTime", getServeTime())
+                .append("amount", getAmount())
+                .append("path", getPath())
+                .append("createBy", getCreateBy())
+                .append("createTime", getCreateTime())
+                .append("updateBy", getUpdateBy())
+                .append("updateTime", getUpdateTime())
+                .append("remark", getRemark())
+                .toString();
     }
 }
diff --git a/ruoyi-custom/src/main/java/com/ruoyi/custom/service/ISysContractService.java b/ruoyi-custom/src/main/java/com/ruoyi/custom/service/ISysContractService.java
index 40bf5d920..8df35a504 100644
--- a/ruoyi-custom/src/main/java/com/ruoyi/custom/service/ISysContractService.java
+++ b/ruoyi-custom/src/main/java/com/ruoyi/custom/service/ISysContractService.java
@@ -58,4 +58,6 @@ public interface ISysContractService
      * @return 结果
      */
     public int deleteSysContractById(Long id);
+
+    public int signContract(SysContract sysContract);
 }
diff --git a/ruoyi-custom/src/main/java/com/ruoyi/custom/service/impl/SysContractServiceImpl.java b/ruoyi-custom/src/main/java/com/ruoyi/custom/service/impl/SysContractServiceImpl.java
index 9fbbea799..3f7e49184 100644
--- a/ruoyi-custom/src/main/java/com/ruoyi/custom/service/impl/SysContractServiceImpl.java
+++ b/ruoyi-custom/src/main/java/com/ruoyi/custom/service/impl/SysContractServiceImpl.java
@@ -1,96 +1,147 @@
 package com.ruoyi.custom.service.impl;
 
-import java.util.List;
+import com.itextpdf.text.Document;
+import com.itextpdf.text.DocumentException;
+import com.itextpdf.text.pdf.*;
 import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.custom.domain.SysContract;
+import com.ruoyi.custom.mapper.SysContractMapper;
+import com.ruoyi.custom.service.ISysContractService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.ruoyi.custom.mapper.SysContractMapper;
-import com.ruoyi.custom.domain.SysContract;
-import com.ruoyi.custom.service.ISysContractService;
+
+import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.List;
+
 
 /**
  * 合同Service业务层处理
- * 
+ *
  * @author wonder
  * @date 2020-10-23
  */
 @Service
-public class SysContractServiceImpl implements ISysContractService 
-{
+public class SysContractServiceImpl implements ISysContractService {
     @Autowired
     private SysContractMapper sysContractMapper;
 
     /**
      * 查询合同
-     * 
+     *
      * @param id 合同ID
      * @return 合同
      */
     @Override
-    public SysContract selectSysContractById(Long id)
-    {
+    public SysContract selectSysContractById(Long id) {
         return sysContractMapper.selectSysContractById(id);
     }
 
     /**
      * 查询合同列表
-     * 
+     *
      * @param sysContract 合同
      * @return 合同
      */
     @Override
-    public List<SysContract> selectSysContractList(SysContract sysContract)
-    {
+    public List<SysContract> selectSysContractList(SysContract sysContract) {
         return sysContractMapper.selectSysContractList(sysContract);
     }
 
     /**
      * 新增合同
-     * 
+     *
      * @param sysContract 合同
      * @return 结果
      */
     @Override
-    public int insertSysContract(SysContract sysContract)
-    {
+    public int insertSysContract(SysContract sysContract) {
+        sysContract.setId(DateUtils.getNowDate().getTime());
         sysContract.setCreateTime(DateUtils.getNowDate());
         return sysContractMapper.insertSysContract(sysContract);
     }
 
     /**
      * 修改合同
-     * 
+     *
      * @param sysContract 合同
      * @return 结果
      */
     @Override
-    public int updateSysContract(SysContract sysContract)
-    {
+    public int updateSysContract(SysContract sysContract) {
         sysContract.setUpdateTime(DateUtils.getNowDate());
         return sysContractMapper.updateSysContract(sysContract);
     }
 
     /**
      * 批量删除合同
-     * 
+     *
      * @param ids 需要删除的合同ID
      * @return 结果
      */
     @Override
-    public int deleteSysContractByIds(Long[] ids)
-    {
+    public int deleteSysContractByIds(Long[] ids) {
         return sysContractMapper.deleteSysContractByIds(ids);
     }
 
     /**
      * 删除合同信息
-     * 
+     *
      * @param id 合同ID
      * @return 结果
      */
     @Override
-    public int deleteSysContractById(Long id)
-    {
+    public int deleteSysContractById(Long id) {
         return sysContractMapper.deleteSysContractById(id);
     }
+
+    @Override
+    public int signContract(SysContract sysContract) {
+        String templatePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running/pdf/contract.pdf";
+        String filePath = "/Users/wonder/Documents/Workspaces/java/RuoYi-Vue/running" + sysContract.getPath();
+        PdfReader reader;
+        FileOutputStream out;
+        ByteArrayOutputStream bos;
+        PdfStamper stamper;
+
+        try {
+            out = new FileOutputStream(filePath);// 输出流到新的pdf,没有b2.pdf时会创建
+            reader = new PdfReader(templatePath);// 读取pdf模板
+            bos = new ByteArrayOutputStream();
+            stamper = new PdfStamper(reader, bos);
+            AcroFields form = stamper.getAcroFields();
+
+            form.setField("name", sysContract.getName());
+            form.setField("phone", sysContract.getName());
+            form.setField("money", sysContract.getAmount().toString());
+            form.setField("moneyUpper", sysContract.getAmountUpper());
+            form.setField("date", sysContract.getName());
+            form.setField("cusId", sysContract.getCusId());
+
+
+            stamper.setFormFlattening(true);// 如果为false那么生成的PDF文件还能编辑,一定要设为true
+            stamper.close();
+
+            Document doc = new Document();
+
+            PdfCopy copy = new PdfCopy(doc, out);
+            doc.open();
+            PdfImportedPage importPage = null;
+            for (int i = 1; i <= reader.getNumberOfPages(); i++) {
+                importPage = copy
+                        .getImportedPage(new PdfReader(bos.toByteArray()), i);
+                copy.addPage(importPage);
+            }
+            doc.close();
+        } catch (FileNotFoundException e) {
+            e.printStackTrace();
+        } catch (IOException e) {
+            e.printStackTrace();
+        } catch (DocumentException e) {
+            e.printStackTrace();
+        }
+        return 0;
+    }
 }
diff --git a/ruoyi-custom/src/main/resources/mapper/custom/SysContractMapper.xml b/ruoyi-custom/src/main/resources/mapper/custom/SysContractMapper.xml
index c4912fee3..25a001722 100644
--- a/ruoyi-custom/src/main/resources/mapper/custom/SysContractMapper.xml
+++ b/ruoyi-custom/src/main/resources/mapper/custom/SysContractMapper.xml
@@ -6,7 +6,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="SysContract" id="SysContractResult">
         <result property="id"    column="id"    />
+        <result property="status"    column="status"    />
         <result property="name"    column="name"    />
+        <result property="cusId"    column="cus_id"    />
         <result property="phone"    column="phone"    />
         <result property="serveTime"    column="serve_time"    />
         <result property="amount"    column="amount"    />
@@ -19,13 +21,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectSysContractVo">
-        select id, name, phone, serve_time, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
+        select id, status, name, phone, cus_id, serve_time, amount, path, create_by, create_time, update_by, update_time, remark from sys_contract
     </sql>
 
     <select id="selectSysContractList" parameterType="SysContract" resultMap="SysContractResult">
         <include refid="selectSysContractVo"/>
         <where>  
             <if test="id != null "> and id = #{id}</if>
+            <if test="status != null "> and status = #{status}</if>
             <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
             <if test="phone != null  and phone != ''"> and phone = #{phone}</if>
         </where>
@@ -39,7 +42,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertSysContract" parameterType="SysContract" useGeneratedKeys="true" keyProperty="id">
         insert into sys_contract
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="status != null">status,</if>
             <if test="name != null and name != ''">name,</if>
+            <if test="cusId != null and cusId != ''">cus_id,</if>
             <if test="phone != null">phone,</if>
             <if test="serveTime != null">serve_time,</if>
             <if test="amount != null">amount,</if>
@@ -51,7 +57,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="status != null">#{status},</if>
             <if test="name != null and name != ''">#{name},</if>
+            <if test="cusId != null and cusId != ''">#{cus_id},</if>
             <if test="phone != null">#{phone},</if>
             <if test="serveTime != null">#{serveTime},</if>
             <if test="amount != null">#{amount},</if>
@@ -67,7 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateSysContract" parameterType="SysContract">
         update sys_contract
         <trim prefix="SET" suffixOverrides=",">
+            <if test="status != null">name = #{status},</if>
             <if test="name != null and name != ''">name = #{name},</if>
+            <if test="cusId != null and cusId != ''">name = #{cus_id},</if>
             <if test="phone != null">phone = #{phone},</if>
             <if test="serveTime != null">serve_time = #{serveTime},</if>
             <if test="amount != null">amount = #{amount},</if>
diff --git a/ruoyi-ui/src/api/custom/contract.js b/ruoyi-ui/src/api/custom/contract.js
index 8cfc776ae..a5833256e 100644
--- a/ruoyi-ui/src/api/custom/contract.js
+++ b/ruoyi-ui/src/api/custom/contract.js
@@ -58,3 +58,11 @@ export function getFile(id) {
     method: 'get',
   })
 }
+
+export function signContract(data) {
+  return request({
+    url: '/custom/contract/',
+    method: 'put',
+    data: data
+  })
+}
diff --git a/ruoyi-ui/src/main.js b/ruoyi-ui/src/main.js
index d270fb743..a2be0932a 100644
--- a/ruoyi-ui/src/main.js
+++ b/ruoyi-ui/src/main.js
@@ -23,7 +23,7 @@ import {
   handleTree,
   parseTime,
   resetForm,
-  searchToParams,
+  digitUppercase,
   selectDictLabel,
   selectDictLabels,
   toThousands
@@ -43,7 +43,7 @@ Vue.prototype.selectDictLabels = selectDictLabels
 Vue.prototype.download = download
 Vue.prototype.handleTree = handleTree
 Vue.prototype.toThousands = toThousands
-Vue.prototype.searchToParams = searchToParams
+Vue.prototype.digitUppercase = digitUppercase
 
 Vue.prototype.msgSuccess = function (msg) {
   this.$message({showClose: true, message: msg, type: "success"});
diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js
index 14fb79fef..a4c3637a7 100644
--- a/ruoyi-ui/src/permission.js
+++ b/ruoyi-ui/src/permission.js
@@ -49,7 +49,7 @@ router.beforeEach((to, from, next) => {
     }
   } else {
     // 没有token
-    if (whiteList.indexOf(to.path) !== -1 || to.path.startsWith('/contract')) {
+    if (whiteList.indexOf(to.path) !== -1 || to.path.startsWith('/file')) {
       // 在免登录白名单,直接进入
       next()
     } else {
diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js
index e231d899b..77c91210e 100644
--- a/ruoyi-ui/src/router/index.js
+++ b/ruoyi-ui/src/router/index.js
@@ -125,7 +125,7 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/contract/:id(\\d+)',
+    path: '/file/contract/:id(\\d+)',
     hidden: true,
     component: (resolve) => require(['@/views/custom/signContract'], resolve),
     meta: { title: '合同' }
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index 08f27a579..58f7e4bc4 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -167,13 +167,33 @@ export function toThousands(num) {
   return result;
 }
 
-export function searchToParams(paramStr) {
-  if (!paramStr) {
-    return {}
+export function digitUppercase(n) {
+  const fraction = ['角', '分'];
+  const digit = [
+    '零', '壹', '贰', '叁', '肆',
+    '伍', '陆', '柒', '捌', '玖'
+  ];
+  const unit = [
+    ['元', '万', '亿'],
+    ['', '拾', '佰', '仟']
+  ];
+  const head = n < 0 ? '欠' : '';
+  n = Math.abs(n);
+  let s = '';
+  for (let i = 0; i < fraction.length; i++) {
+    s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
   }
-  return paramStr.split('&').reduce((obj, cur) => {
-    const tarObj = cur.split('=');
-    obj[tarObj[0]] = tarObj[1];
-    return obj;
-  }, {})
-}
+  s = s || '整';
+  n = Math.floor(n);
+  for (let i = 0; i < unit[0].length && n > 0; i++) {
+    const p = '';
+    for (let j = 0; j < unit[1].length && n > 0; j++) {
+      p = digit[n % 10] + unit[1][j] + p;
+      n = Math.floor(n / 10);
+    }
+    s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
+  }
+  return head + s.replace(/(零.)*零元/, '元')
+    .replace(/(零.)+/g, '零')
+    .replace(/^整$/, '零元整');
+};
diff --git a/ruoyi-ui/src/views/custom/contract/index.vue b/ruoyi-ui/src/views/custom/contract/index.vue
index 2964dbcd1..f4cab396a 100644
--- a/ruoyi-ui/src/views/custom/contract/index.vue
+++ b/ruoyi-ui/src/views/custom/contract/index.vue
@@ -42,65 +42,77 @@
           size="mini"
           @click="handleAdd"
           v-hasPermi="['custom:contract:add']"
-        >新增</el-button>
+        >新增
+        </el-button>
       </el-col>
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="success"-->
-<!--          icon="el-icon-edit"-->
-<!--          size="mini"-->
-<!--          :disabled="single"-->
-<!--          @click="handleUpdate"-->
-<!--          v-hasPermi="['custom:contract:edit']"-->
-<!--        >修改</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="danger"-->
-<!--          icon="el-icon-delete"-->
-<!--          size="mini"-->
-<!--          :disabled="multiple"-->
-<!--          @click="handleDelete"-->
-<!--          v-hasPermi="['custom:contract:remove']"-->
-<!--        >删除</el-button>-->
-<!--      </el-col>-->
-<!--      <el-col :span="1.5">-->
-<!--        <el-button-->
-<!--          type="warning"-->
-<!--          icon="el-icon-download"-->
-<!--          size="mini"-->
-<!--          @click="handleExport"-->
-<!--          v-hasPermi="['custom:contract:export']"-->
-<!--        >导出</el-button>-->
-<!--      </el-col>-->
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="success"-->
+      <!--          icon="el-icon-edit"-->
+      <!--          size="mini"-->
+      <!--          :disabled="single"-->
+      <!--          @click="handleUpdate"-->
+      <!--          v-hasPermi="['custom:contract:edit']"-->
+      <!--        >修改</el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="danger"-->
+      <!--          icon="el-icon-delete"-->
+      <!--          size="mini"-->
+      <!--          :disabled="multiple"-->
+      <!--          @click="handleDelete"-->
+      <!--          v-hasPermi="['custom:contract:remove']"-->
+      <!--        >删除</el-button>-->
+      <!--      </el-col>-->
+      <!--      <el-col :span="1.5">-->
+      <!--        <el-button-->
+      <!--          type="warning"-->
+      <!--          icon="el-icon-download"-->
+      <!--          size="mini"-->
+      <!--          @click="handleExport"-->
+      <!--          v-hasPermi="['custom:contract:export']"-->
+      <!--        >导出</el-button>-->
+      <!--      </el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
-<!--      <el-table-column type="selection" width="55" align="center" />-->
-      <el-table-column label="合同编号" align="center" prop="id" />
-      <el-table-column label="客户姓名" align="center" prop="name" />
-      <el-table-column label="电话" align="center" prop="phone" />
-      <el-table-column label="服务时间" align="center" prop="serveTime" :formatter="serveTimeFormat" />
-      <el-table-column label="金额" align="center" prop="amount" />
-      <el-table-column label="合同地址" align="center" prop="path" />
-      <el-table-column label="备注" align="center" prop="remark" />
+      <!--      <el-table-column type="selection" width="55" align="center" />-->
+      <el-table-column label="合同编号" align="center" prop="id"/>
+      <el-table-column label="合同状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <el-tag
+            :type="scope.row.status ? 'success' : 'danger'"
+            disable-transitions>
+            {{scope.row.status ? '已签订':'未签订'}}
+          </el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="客户姓名" align="center" prop="name"/>
+      <el-table-column label="证件号" align="center" prop="cusId"/>
+      <el-table-column label="电话" align="center" prop="phone"/>
+      <el-table-column label="服务时间" align="center" prop="serveTime" :formatter="serveTimeFormat"/>
+      <el-table-column label="金额" align="center" prop="amount"/>
+      <el-table-column label="合同地址" align="center" prop="path"/>
+      <el-table-column label="备注" align="center" prop="remark"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-<!--          <el-button-->
-<!--            size="mini"-->
-<!--            type="text"-->
-<!--            icon="el-icon-edit"-->
-<!--            @click="handleUpdate(scope.row)"-->
-<!--            v-hasPermi="['custom:contract:edit']"-->
-<!--          >修改</el-button>-->
+          <!--          <el-button-->
+          <!--            size="mini"-->
+          <!--            type="text"-->
+          <!--            icon="el-icon-edit"-->
+          <!--            @click="handleUpdate(scope.row)"-->
+          <!--            v-hasPermi="['custom:contract:edit']"-->
+          <!--          >修改</el-button>-->
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['custom:contract:remove']"
-          >删除</el-button>
+          >删除
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -117,10 +129,10 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="客户姓名" prop="name">
-          <el-input v-model="form.name" placeholder="请输入客户姓名" />
+          <el-input v-model="form.name" placeholder="请输入客户姓名"/>
         </el-form-item>
         <el-form-item label="电话" prop="phone">
-          <el-input v-model="form.phone" placeholder="请输入电话" />
+          <el-input v-model="form.phone" placeholder="请输入电话"/>
         </el-form-item>
         <el-form-item label="服务时间" prop="serveTime">
           <el-select v-model="form.serveTime" placeholder="请选择服务时间">
@@ -133,13 +145,13 @@
           </el-select>
         </el-form-item>
         <el-form-item label="金额" prop="amount">
-          <el-input v-model="form.amount" placeholder="请输入金额" />
+          <el-input v-model="form.amount" placeholder="请输入金额"/>
         </el-form-item>
-<!--        <el-form-item label="文件路径" prop="path">-->
-<!--          <el-input v-model="form.path" placeholder="请输入文件路径" />-->
-<!--        </el-form-item>-->
+        <!--        <el-form-item label="文件路径" prop="path">-->
+        <!--          <el-input v-model="form.path" placeholder="请输入文件路径" />-->
+        <!--        </el-form-item>-->
         <el-form-item label="备注" prop="remark">
-          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
@@ -151,175 +163,184 @@
 </template>
 
 <script>
-import { listContract, getContract, delContract, addContract, updateContract, exportContract } from "@/api/custom/contract";
+  import {
+    addContract,
+    delContract,
+    exportContract,
+    getContract,
+    listContract,
+    updateContract
+  } from "@/api/custom/contract";
 
-export default {
-  name: "Contract",
-  data() {
-    return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: false,
-      // 总条数
-      total: 0,
-      // 合同表格数据
-      contractList: [],
-      // 弹出层标题
-      title: "",
-      // 是否显示弹出层
-      open: false,
-      // 服务时间字典
-      serveTimeOptions: [],
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        id: null,
-        name: null,
-        phone: null,
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-        name: [
-          { required: true, message: "客户姓名不能为空", trigger: "blur" }
-        ],
-      }
-    };
-  },
-  created() {
-    this.getList();
-    this.getDicts("cus_serve_time").then(response => {
-      this.serveTimeOptions = response.data;
-    });
-  },
-  methods: {
-    /** 查询合同列表 */
-    getList() {
-      this.loading = true;
-      listContract(this.queryParams).then(response => {
-        this.contractList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    // 服务时间字典翻译
-    serveTimeFormat(row, column) {
-      return this.selectDictLabel(this.serveTimeOptions, row.serveTime);
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        name: null,
-        phone: null,
-        serveTime: null,
-        amount: null,
-        path: null,
-        createBy: null,
-        createTime: null,
-        updateBy: null,
-        updateTime: null,
-        remark: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加合同";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const id = row.id || this.ids
-      getContract(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改合同";
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.id != null) {
-            updateContract(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              }
-            });
-          } else {
-            addContract(this.form).then(response => {
-              if (response.code === 200) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
-              }
-            });
-          }
+  export default {
+    name: "Contract",
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        // 合同表格数据
+        contractList: [],
+        // 弹出层标题
+        title: "",
+        // 是否显示弹出层
+        open: false,
+        // 服务时间字典
+        serveTimeOptions: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          id: null,
+          name: null,
+          phone: null,
+        },
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          name: [
+            {required: true, message: "客户姓名不能为空", trigger: "blur"}
+          ],
         }
+      };
+    },
+    created() {
+      this.getList();
+      this.getDicts("cus_serve_time").then(response => {
+        this.serveTimeOptions = response.data;
       });
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm('是否确认删除合同编号为"' + ids + '"的数据项?', "警告", {
+    methods: {
+      /** 查询合同列表 */
+      getList() {
+        this.loading = true;
+        listContract(this.queryParams).then(response => {
+          this.contractList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      // 服务时间字典翻译
+      serveTimeFormat(row, column) {
+        return this.selectDictLabel(this.serveTimeOptions, row.serveTime);
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: null,
+          name: null,
+          phone: null,
+          serveTime: null,
+          amount: null,
+          path: null,
+          createBy: null,
+          createTime: null,
+          updateBy: null,
+          updateTime: null,
+          remark: null
+        };
+        this.resetForm("form");
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id)
+        this.single = selection.length !== 1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = "添加合同";
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        const id = row.id || this.ids
+        getContract(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改合同";
+        });
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.id != null) {
+              updateContract(this.form).then(response => {
+                if (response.code === 200) {
+                  this.msgSuccess("修改成功");
+                  this.open = false;
+                  this.getList();
+                }
+              });
+            } else {
+              addContract(this.form).then(response => {
+                if (response.code === 200) {
+                  this.msgSuccess("新增成功");
+                  this.open = false;
+                  this.getList();
+                }
+              });
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        this.$confirm('是否确认删除合同编号为"' + ids + '"的数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
-        }).then(function() {
+        }).then(function () {
           return delContract(ids);
         }).then(() => {
           this.getList();
           this.msgSuccess("删除成功");
-        }).catch(function() {});
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有合同数据项?', "警告", {
+        }).catch(function () {
+        });
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        const queryParams = this.queryParams;
+        this.$confirm('是否确认导出所有合同数据项?', "警告", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
-        }).then(function() {
+        }).then(function () {
           return exportContract(queryParams);
         }).then(response => {
           this.download(response.msg);
-        }).catch(function() {});
+        }).catch(function () {
+        });
+      }
     }
-  }
-};
+  };
 </script>
diff --git a/ruoyi-ui/src/views/custom/signContract/index.vue b/ruoyi-ui/src/views/custom/signContract/index.vue
index b1cd1999b..0919a17b2 100644
--- a/ruoyi-ui/src/views/custom/signContract/index.vue
+++ b/ruoyi-ui/src/views/custom/signContract/index.vue
@@ -1,37 +1,179 @@
 <template>
-  <div v-if="show">
+  <div v-if="show" class="sign-contract-container">
+    <div class="contract-title">合同简要</div>
     <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-      <el-form-item label="姓名" prop="name">
-        <el-input v-model="form.name" placeholder="请输入客户姓名"/>
+      <el-form-item label="服务方" style="margin: 0">
+        <span>深圳市胜唐科技有限公司</span>
+      </el-form-item>
+      <el-form-item label="服务费" style="margin: 0">
+        <span>¥{{form.amount}}</span>
+      </el-form-item>
+      <el-form-item label="服务时长" style="margin: 0">
+        <span>{{form.serveTime}}</span>
+      </el-form-item>
+      <el-form-item label="姓名" prop="userName">
+        <el-input v-model="form.userName" placeholder="请输入客户姓名"/>
+      </el-form-item>
+      <el-form-item label="证件号" prop="cusId">
+        <el-input v-model="form.cusId" placeholder="请输入证件号"/>
       </el-form-item>
       <el-form-item label="电话" prop="phone">
         <el-input v-model="form.phone" placeholder="请输入电话"/>
       </el-form-item>
     </el-form>
-    <el-button type="primary" @click="submitForm">提交</el-button>
+    <div>
+      <el-checkbox v-model="read" @change="handleRadioChange" style="margin-bottom: 12px">已阅读合同相关
+      </el-checkbox>
+      <span class="detail" @click="dialogVisible = true">详情</span>
+    </div>
+    <el-button type="primary" style="width: 100%" @click="submitForm" :disabled="!read">提交签约</el-button>
+    <el-dialog
+      title="服务合同"
+      :visible.sync="dialogVisible"
+      width="90%"
+      custom-class="contract_dialog"
+      center>
+      <div class="dialog-detail">
+        <p>甲方:胜唐体控(深圳市胜唐科技有限公司)</p>
+        <p>乙方:<b>{{form.name}}</b></p>
+        <p>甲乙双方本着诚信合作、互惠互利的原则,依据中华人民共和国有关法律,经友好协商,现就胜唐体控减肥咨询指导服务合作相关事宣达成一致协议,以兹共同遵守。
+          如果需要减脂的乙方未成年,由应由乙方法定监护人代签本合同,乙方享受同等法律权益。</p>
+        <p>
+          第一条甲方资质与服务保证
+        <div class="line-rule">1、甲方保证是在工商部门注册、合法经营的正规公司。</div>
+        <div class="line-rule">2、甲方保证为乙方提供知名体重管理专家导师全程服务。</div>
+        <div class="line-rule">3、甲方保证按承诺的方式(即:靠一日三餐吃瘦、绝不使用仪器及针药、亦不服用药物等)达到双方约定效果。</div>
+        <div class="line-rule">4、甲方保证全程为乙方提供本合同所承诺的服务内容。</div>
+        <div class="line-rule">5、服务标准</div>
+        <div style="margin-left: 24px">a、拥有体重管理专家导师亲自每天主动服务。(节假日除外)</div>
+        <div style="margin-left: 24px">b、享受免费赠送营养基础知识学习,肥胖与生活习惯知识学习,享受专家亲自培训初級自我管理体重知识。</div>
+        </p>
+
+        <p>第二条 合作内容及费用
+        <div class="line-rule">11、经甲乙双方协商确定,乙方向甲方购买<b>{{form.serveTime}}</b>“胜唐体控瘦身指导服务”(以下简称服务)。</div>
+        <div class="line-rule">12、乙方向甲方购买<b>{{form.serveTime}}</b>,经甲乙双方协商确定,乙方向甲方支付疗程费用共为人民币:<b>{{form.amount}}</b>元,大写:<b>{{form.amountUppercase}}</b>)。
+        </div>
+        </p>
+
+        <p>第三条 服务期约定
+        <div class="line-rule">1、服务时间阶段(服务指导期、服务跟踪期、免费咨询期)具体安排,由甲方根据乙方的实际情况与乙方协商确定。</div>
+        <div class="line-rule">2、因不可抗拒的因素(如意外怀孕等)而暂停服务指导,其后续服务期限由甲乙方协商确定。</div>
+        <div class="line-rule">3、减肥需要双方的配合,在不是甲方技术问题的情况下,乙方不执行营养师的指导导致没有达到预期效果,责任由乙方承担。根据个人体质不同,在调理营养健康的前提下,健康吃瘦25-35斤
+        </div>
+        <div class="line-rule">
+          4、乙方应按甲方制定的饮食方案来饮食,承诺在未与甲方沟通前,不擅自吃方案之外的高热量、高油、高盐、高糖等不利于健康和减脂的饮食,服务期内擅自暴食导致体重上涨,次数超过3次视为乙方主动放弃营养减脂,且甲方无需免费延长服务时间。
+        </div>
+        <div class="line-rule">
+          5、乙方在一个疗程内享有2次暂停服务的机会,在暂停前应与甲方沟通,确认暂停前已减重斤数,累积到总减重结果中。在暂停结束后,从新体重开始,甲方服务乙方继续完成承诺的减重斤数,即:包瘦斤数 - 暂停前已成功减重数。
+        </div>
+        </p>
+
+        <p>公司地址:深圳市宝安区西乡街道宝立方中心创意研发大厦B座708</p>
+        <p>联系电话:0755-23213903</p>
+      </div>
+      <span slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="handleConfirm">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
+
 </template>
 
 <script>
 
-  import {getFile} from "@/api/custom/contract";
+  import {getFile, signContract} from "@/api/custom/contract";
+  import {digitUppercase} from "../../../utils/ruoyi";
 
   export default {
     name: 'sign',
     data() {
+
+      const checkUserName = (rule, value, callback) => {
+        if (!value) {
+          return callback(new Error('姓名不能为空'))
+        }
+        if(value !== this.form.name){
+          return callback(new Error('输入姓名不匹配,请联系客服核对'))
+        }
+        callback();
+      }
+
+      const checkPhone = (rule, value, callback) => {
+        const phoneReg = /^1[3|4|5|7|8][0-9]{9}$/
+        if (!value) {
+          return callback(new Error('电话号码不能为空'))
+        }
+        setTimeout(() => {
+          // Number.isInteger是es6验证数字是否为整数的方法,实际输入的数字总是识别成字符串
+          // 所以在前面加了一个+实现隐式转换
+          if (!Number.isInteger(+value)) {
+            callback(new Error('请输入数字值'))
+          } else {
+            if (phoneReg.test(value)) {
+              callback()
+            } else {
+              callback(new Error('电话号码格式不正确'))
+            }
+          }
+        }, 100)
+      }
+
+      const checkcusId = (rule, value, callback) => {
+        const phoneReg = /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}$)/
+        if (!value) {
+          return callback(new Error('证件号码不能为空'))
+        }
+        setTimeout(() => {
+          // Number.isInteger是es6验证数字是否为整数的方法,实际输入的数字总是识别成字符串
+          // 所以在前面加了一个+实现隐式转换
+          if (!Number.isInteger(+value)) {
+            callback(new Error('请输入数字值'))
+          } else {
+            if (phoneReg.test(value)) {
+              callback()
+            } else {
+              callback(new Error('证件号码格式不正确'))
+            }
+          }
+        }, 100)
+      }
+
       return {
         show: false,
         form: {},
+        read: false,
+        dialogVisible: false,
+        serveTimeIdOption: [
+          {label: '7天', value: 7},
+          {label: '1个月', value: 30},
+          {label: '2个月', value: 60},
+          {label: '3个月', value: 90},
+          {label: '4个月', value: 120},
+          {label: '5个月', value: 150},
+          {label: '6个月', value: 180},
+          {label: '7个月', value: 210},
+          {label: '8个月', value: 240},
+          {label: '9个月', value: 270},
+          {label: '10个月', value: 300},
+          {label: '11个月', value: 330},
+          {label: '12个月', value: 360},
+        ],
         rules: {
-          name: [
-            {required: true, message: "姓名不能为空", trigger: "blur"}
+          userName: [
+            {required: true, trigger: "blur", validator: checkUserName}
           ],
           phone: [
-            {required: true, message: "电话不能为空", trigger: "blur"}
+            {required: true, trigger: "blur", validator: checkPhone}
+          ],
+          cusId: [
+            {required: true, trigger: "blur", validator: checkcusId}
           ]
         }
       }
     },
+    mounted() {
+      document.title = this.$route.meta.title
+    },
     created() {
       this.getContract();
     },
@@ -39,11 +181,15 @@
       getContract() {
         const {pathname} = window.location;
         const id = pathname.substring(pathname.lastIndexOf('/') + 1);
-        console.log(id)
+        // console.log(id)
         getFile(id).then(result => {
           if (result.url) {
             this.$router.push(result.url);
           } else if (result.data) {
+            this.form = result.data;
+            this.form.amount = parseInt(result.data.amount);
+            this.form.amountUppercase = digitUppercase(this.form.amount);
+            this.form.serveTime = this.serveTimeIdOption.find(obj => obj.value === parseInt(result.data.serveTime)).label
             this.show = true;
           }
         })
@@ -51,20 +197,62 @@
       submitForm() {
         this.$refs["form"].validate(valid => {
           if (valid) {
-            this.$emit('handleOnSubmit', this.form);
+            signContract(this.form).then(result => {
+              if (result.code === 200) {
+                // this.$router.push(result.url);
+              }
+            });
           }
         })
-      }
+      },
+      handleRadioChange(val) {
+        this.read = val;
+      },
+      handleConfirm() {
+        this.dialogVisible = false;
+        this.read = true;
+      },
+
     }
   }
 </script>
 
 <style lang="scss" scoped>
-  .dashboard-editor-container {
+  .sign-contract-container {
+    font-family: Helvetica Neue, Helvetica, Arial, Microsoft Yahei, Hiragino Sans GB, Heiti SC, WenQuanYi Micro Hei, sans-serif;
     padding: 32px;
-    background-color: rgb(240, 242, 245);
+    /*background-color: rgb(240, 242, 245);*/
     position: relative;
 
+    .contract-title {
+      text-align: center;
+      font-size: 20px;
+      margin-bottom: 32px;
+    }
+
+
+    .detail {
+      color: #0066cc;
+      cursor: pointer;
+      font-size: 14px;
+    }
+
+    .contract_dialog {
+
+
+      .dialog-detail {
+        height: 60vh;
+        margin-top: -12px;
+        margin-bottom: -12px;
+        overflow: auto;
+      }
+    }
+
+    .line-rule {
+      margin: 4px 0;
+      line-height: 18px;
+    }
+
     .chart-wrapper {
       background: #fff;
       padding: 16px 16px 0;
diff --git a/ruoyi-ui/src/views/custom/signContract/signView/index.vue b/ruoyi-ui/src/views/custom/signContract/signView/index.vue
deleted file mode 100644
index 078adcda3..000000000
--- a/ruoyi-ui/src/views/custom/signContract/signView/index.vue
+++ /dev/null
@@ -1,41 +0,0 @@
-<template>
-  <div>
-    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-      <el-form-item label="姓名" prop="name">
-        <el-input v-model="form.name" placeholder="请输入客户姓名"/>
-      </el-form-item>
-      <el-form-item label="电话" prop="phone">
-        <el-input v-model="form.phone" placeholder="请输入电话"/>
-      </el-form-item>
-    </el-form>
-    <el-button type="primary" @click="submitForm">提交</el-button>
-  </div>
-</template>
-
-<script>
-  export default {
-    name: 'signContract',
-    data() {
-      return {
-        form: {},
-        rules: {
-          name: [
-            {required: true, message: "姓名不能为空", trigger: "blur"}
-          ],
-          phone: [
-            {required: true, message: "电话不能为空", trigger: "blur"}
-          ]
-        }
-      }
-    },
-    methods: {
-      submitForm() {
-        this.$refs["form"].validate(valid => {
-          if (valid) {
-            this.$emit('handleOnSubmit', this.form);
-          }
-        })
-      }
-    }
-  }
-</script>