Explorar el Código

-修改BYX上岗证、作业证

jiangbiao hace 2 años
padre
commit
df08937989

+ 57 - 6
master/src/main/java/com/ruoyi/project/training/domain/TByxWorklicense.java

@@ -63,24 +63,43 @@ public class TByxWorklicense extends BaseEntity
 
     /** 分离取证日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    //@Excel(name = "分离取证日期", width = 30, dateFormat = "yyyy-MM-dd")
+    //@Excel(name = "取证日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date pipeDate;
 
     /** 压缩取证日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    //@Excel(name = "压缩取证日期", width = 30, dateFormat = "yyyy-MM-dd")
+    //@Excel(name = "取证日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date containerDate;
 
     /** PGU/AEU取证日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    //@Excel(name = "PGU/AEU取证日期", width = 30, dateFormat = "yyyy-MM-dd")
+    //@Excel(name = "取证日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date alkylationDate;
 
     /** 裂解取证日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-   // @Excel(name = "裂解取证日期", width = 30, dateFormat = "yyyy-MM-dd")
+   // @Excel(name = "取证日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date boilerDate;
 
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    //@Excel(name = "证件有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date pipeLifespan;
+
+    /** 压缩取证日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    //@Excel(name = "证件有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date containerLifespan;
+
+    /** PGU/AEU取证日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    //@Excel(name = "证件有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date alkylationLifespan;
+
+    /** 裂解取证日期 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    // @Excel(name = "证件有效期", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date boilerLifespan;
+
     /** 裂解 */
     @Excel(name = "裂解(裂化)", dictType = "YES_NO_EN")
     private String boiler;
@@ -103,12 +122,12 @@ public class TByxWorklicense extends BaseEntity
 
     /** 取复证日期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "取复证日期", width = 30, dateFormat = "yyyy-MM-dd")
+//    @Excel(name = "取复证日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date recertificatedate;
 
     /** 证书有效期 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
-    @Excel(name = "证书有效期", width = 30, dateFormat = "yyyy-MM-dd")
+//    @Excel(name = "证书有效期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date validity;
 
     /** 删除状态 */
@@ -146,6 +165,38 @@ public class TByxWorklicense extends BaseEntity
     /** 到期时间 */
     private Date expiringDate;
 
+    public Date getPipeLifespan() {
+        return pipeLifespan;
+    }
+
+    public void setPipeLifespan(Date pipeLifespan) {
+        this.pipeLifespan = pipeLifespan;
+    }
+
+    public Date getContainerLifespan() {
+        return containerLifespan;
+    }
+
+    public void setContainerLifespan(Date containerLifespan) {
+        this.containerLifespan = containerLifespan;
+    }
+
+    public Date getAlkylationLifespan() {
+        return alkylationLifespan;
+    }
+
+    public void setAlkylationLifespan(Date alkylationLifespan) {
+        this.alkylationLifespan = alkylationLifespan;
+    }
+
+    public Date getBoilerLifespan() {
+        return boilerLifespan;
+    }
+
+    public void setBoilerLifespan(Date boilerLifespan) {
+        this.boilerLifespan = boilerLifespan;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

+ 17 - 1
master/src/main/resources/mybatis/training/TByxWorklicenseMapper.xml

@@ -30,15 +30,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="pipeIdnum"    column="pipe_idnum"    />
         <result property="alkylationIdnum"    column="alkylation_idnum"    />
         <result property="pipeDate"    column="pipe_date"    />
+        <result property="pipeLifespan"    column="pipe_lifespan"    />
         <result property="alkylationDate"    column="alkylation_date"    />
+        <result property="alkylationLifespan"    column="alkylation_lifespan"    />
         <result property="containerDate"    column="container_date"    />
+        <result property="containerLifespan"    column="container_lifespan"    />
         <result property="boilerIdnum"    column="boiler_idnum"    />
         <result property="boilerDate"    column="boiler_date"    />
+        <result property="boilerLifespan"    column="boiler_lifespan"    />
         <result property="deptName" column="dept_name" />
     </resultMap>
 
     <sql id="selectTByxWorklicenseVo">
-        select d.id, d.plant_code, d.name, d.employeeid, d.classes, d.post, d.idtype, d.container_idnum, d.boiler, d.container, d.pipe, d.alkylation, d.aromatic, d.recertificatedate, d.validity, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.pipe_idnum, d.alkylation_idnum, d.pipe_date, d.alkylation_date, d.container_date, d.boiler_idnum, d.boiler_date ,s.dept_name from t_byx_worklicense d
+        select d.id, d.plant_code, d.name, d.employeeid, d.classes, d.post, d.idtype, d.container_idnum, d.boiler, d.container, d.pipe, d.alkylation, d.aromatic, d.recertificatedate, d.validity, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id, d.pipe_idnum, d.alkylation_idnum, d.pipe_date, d.alkylation_date, d.container_date, d.boiler_idnum, d.boiler_date ,d.boiler_lifespan ,d.pipe_lifespan, d.alkylation_lifespan, d.container_lifespan,s.dept_name from t_byx_worklicense d
         left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -138,6 +142,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="containerDate != null">container_date,</if>
             <if test="boilerIdnum != null">boiler_idnum,</if>
             <if test="boilerDate != null">boiler_date,</if>
+            <if test="boilerLifespan != null">boiler_lifespan,</if>
+            <if test="pipeLifespan != null">pipe_lifespan,</if>
+            <if test="alkylationLifespan != null">alkylation_lifespan,</if>
+            <if test="containerLifespan != null">container_lifespan,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -172,6 +180,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="containerDate != null">#{containerDate},</if>
             <if test="boilerIdnum != null">#{boilerIdnum},</if>
             <if test="boilerDate != null">#{boilerDate},</if>
+            <if test="boilerLifespan != null">#{boilerLifespan},</if>
+            <if test="pipeLifespan != null">#{pipeLifespan},</if>
+            <if test="alkylationLifespan != null">#{alkylationLifespan},</if>
+            <if test="containerLifespan != null">#{containerLifespan},</if>
         </trim>
     </insert>
 
@@ -210,6 +222,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="containerDate != null">container_date = #{containerDate},</if>
             <if test="boilerIdnum != null">boiler_idnum = #{boilerIdnum},</if>
             <if test="boilerDate != null">boiler_date = #{boilerDate},</if>
+            <if test="boilerLifespan != null">boiler_lifespan=#{boilerLifespan},</if>
+            <if test="pipeLifespan != null">pipe_lifespan=#{pipeLifespan},</if>
+            <if test="alkylationLifespan != null">alkylation_lifespan=#{alkylationLifespan},</if>
+            <if test="containerLifespan != null">container_lifespan=#{containerLifespan},</if>
         </trim>
         where id = #{id}
     </update>

+ 12 - 1
ui/src/views/training/byxWorkcertificate/index.vue

@@ -85,7 +85,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="workcertificateList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+    <el-table v-loading="loading" :data="workcertificateList" :cell-style="tableCellStyle" :header-cell-style="tableCellStyle" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column :label="$t('姓名')" align="center" prop="name" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('员工号')" align="center" prop="employeeid" :show-overflow-tooltip="true"/>
@@ -551,6 +551,17 @@ import {
       });
     },
     methods: {
+      tableCellStyle({row, column, rowIndex, columnIndex}) {
+        if (columnIndex === 4||columnIndex === 5||columnIndex === 6) {
+          return "background:#DDFFDD;";
+        }
+        if (columnIndex === 7||columnIndex === 8||columnIndex === 9) {
+          return "background:#FFFFDD;";
+        }
+        if (columnIndex === 10||columnIndex === 11||columnIndex === 12) {
+          return "background:#DDFFFF;";
+        }
+      },
       /** 查询作业证书一览列表 */
       getList() {
         this.loading = true;

+ 155 - 12
ui/src/views/training/byxWorklicense/index.vue

@@ -109,40 +109,68 @@
       <el-table-column :label="$t('员工号')" align="center" prop="employeeid" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('班组')" align="center" prop="classes" :formatter="classesFormat" />
       <el-table-column :label="$t('职务')" align="center" prop="post" width="150" :formatter="actualpostFormat"/>
-      <el-table-column :label="$t('证件类型')" align="center" prop="idtype" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('证件号')" align="center" prop="containerIdnum" width="150" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('裂解(裂化)')" align="center" prop="boiler" :formatter="boilerFormat">
+      <el-table-column :label="$t('裂解(裂化)')" align="center" prop="boiler" width="100" :formatter="boilerFormat">
         <template slot-scope="scope">
           <span> {{boilerFormat(scope.row)}}</span>
           <el-button v-if="boilerFormat(scope.row) == 'YES'" icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'worklicense-boiler')"  circle></el-button>
         </template>
       </el-table-column>
+      <el-table-column :label="$t('取复证日期')" align="center" prop="boilerDate"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.boilerDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('证书有效期')" align="center" prop="boilerLifespan"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.boilerLifespan, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('压力容器')" align="center" prop="container" :formatter="crackingFormat">
         <template slot-scope="scope">
           <span> {{crackingFormat(scope.row)}}</span>
           <el-button v-if="crackingFormat(scope.row) == 'YES'" icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'worklicense-compression')"  circle></el-button>
         </template>
       </el-table-column>
+      <el-table-column :label="$t('取复证日期')" align="center" prop="containerDate"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.containerDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('证书有效期')" align="center" prop="containerLifespan"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.containerLifespan, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('压力管道')" align="center" prop="pipe" :formatter="hotareaFormat">
         <template slot-scope="scope">
           <span> {{hotareaFormat(scope.row)}}</span>
           <el-button v-if="hotareaFormat(scope.row) == 'YES'" icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'worklicense-separation')" circle></el-button>
         </template>
       </el-table-column>
+      <el-table-column :label="$t('取复证日期')" align="center" prop="pipeDate"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.pipeDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('证书有效期')" align="center" prop="pipeLifespan"  width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.pipeLifespan, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
       <el-table-column label="烷基化" align="center" prop="alkylation" width="100" :formatter="coldareaFormat">
         <template slot-scope="scope">
           <span> {{coldareaFormat(scope.row)}}</span>
           <el-button v-if="coldareaFormat(scope.row) == 'YES'" icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'worklicense-pguaeu')"  circle></el-button>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('取复证日期')" align="center" prop="recertificatedate" width="100">
+      <el-table-column :label="$t('取复证日期')" align="center" prop="alkylationDate"  width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.recertificatedate, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.alkylationDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column :label="$t('证书有效期')" align="center" prop="validity" width="100">
+      <el-table-column :label="$t('证书有效期')" align="center" prop="alkylationLifespan"  width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.validity, '{y}-{m}-{d}') }}</span>
+          <span>{{ parseTime(scope.row.alkylationLifespan, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
@@ -213,35 +241,140 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item :label="$t('证件类型')" prop="idtype">
+<!--        <el-form-item :label="$t('证件类型')" prop="idtype">
           <el-input v-model="form.idtype" :placeholder="$t('请输入') + $t('证件类型')" />
         </el-form-item>
         <el-form-item :label="$t('证件号')" prop="containerIdnum">
           <el-input v-model="form.containerIdnum" :placeholder="$t('请输入') +$t('证件号') " />
-        </el-form-item>
+        </el-form-item>-->
         <el-row>
           <el-col :span="6">
             <el-form-item :label="$t('裂解(裂化)')" prop="boiler">
               <el-checkbox v-model="form.boiler" @change="changeBoiler()"></el-checkbox>
             </el-form-item>
           </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('取复证日期')" prop="boilerDate" v-if="this.boilerDisplay">
+              <el-date-picker
+                v-model="form.boilerDate"
+                type="date"
+                clearable
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('取复证日期')"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('证件有效期')" prop="boilerLifespan" v-if="this.boilerDisplay">
+              <el-date-picker
+                v-model="form.boilerLifespan"
+                type="date"
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('证件有效期')"
+                clearable>
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="6">
             <el-form-item :label="$t('压力容器')" prop="container">
               <el-checkbox v-model="form.container" @change="changeCracking()"></el-checkbox>
             </el-form-item>
           </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('取复证日期')" prop="containerDate" v-if="this.compressionDisplay">
+              <el-date-picker
+                v-model="form.containerDate"
+                type="date"
+                clearable
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('取复证日期')"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('证件有效期')" prop="containerLifespan" v-if="this.compressionDisplay">
+              <el-date-picker
+                v-model="form.containerLifespan"
+                type="date"
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('证件有效期')"
+                clearable>
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="6">
             <el-form-item :label="$t('压力管道')" prop="pipe">
               <el-checkbox v-model="form.pipe" @change="changeHotarea()"></el-checkbox>
             </el-form-item>
           </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('取复证日期')" prop="pipeDate" v-if="this.separationDisplay">
+              <el-date-picker
+                v-model="form.pipeDate"
+                type="date"
+                clearable
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('取复证日期')"
+                style="width: auto"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('证件有效期')" prop="pipeLifespan" v-if="this.separationDisplay">
+              <el-date-picker
+                clearable size="small" style="width: auto"
+                v-model="form.pipeLifespan"
+                type="date"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('证件有效期')">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="6">
             <el-form-item label="烷基化" prop="alkylation">
               <el-checkbox v-model="form.alkylation" @change="changeColdarea()"></el-checkbox>
             </el-form-item>
           </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('取复证日期')" prop="alkylationDate" v-if="this.pguaeuDisplay">
+              <el-date-picker
+                v-model="form.alkylationDate"
+                type="date"
+                clearable
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('取复证日期')"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="9">
+            <el-form-item :label="$t('证件有效期')" prop="alkylationLifespan" v-if="this.pguaeuDisplay">
+              <el-date-picker
+                v-model="form.alkylationLifespan"
+                type="date"
+                style="width: auto"
+                value-format="yyyy-MM-dd"
+                :placeholder="$t('请选择') + $t('证件有效期')"
+                clearable>
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
         </el-row>
-        <el-form-item :label="$t('取复证日期')" prop="recertificatedate">
+<!--        <el-form-item :label="$t('取复证日期')" prop="recertificatedate">
           <el-date-picker clearable size="small" style="width: 200px"
             v-model="form.recertificatedate"
             type="date"
@@ -256,7 +389,7 @@
             value-format="yyyy-MM-dd"
             :placeholder="$t('请选择') + $t('证书有效期')">
           </el-date-picker>
-        </el-form-item>
+        </el-form-item>-->
         <el-form-item :label="$t('备注')" prop="remarks">
           <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')" />
         </el-form-item>
@@ -674,7 +807,15 @@ export default {
         separationDate: null,
         compressionDate: null,
         pguaeuDate: null,
-        crackingDate: null
+        crackingDate: null,
+        boilerLifespan: null,
+        containerLifespan: null,
+        pipeLifespan: null,
+        alkylationLifespan: null,
+        boilerDate: null,
+        containerDate: null,
+        pipeDate: null,
+        alkylationDate: null,
       };
       this.resetForm("form");
     },
@@ -721,6 +862,8 @@ export default {
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
+        console.log('this.form')
+        console.log(this.form)
         if (valid) {
           if (this.form.id != null) {
             updateByxWorklicense(this.form).then(response => {