Browse Source

[update]:生产管理-成品SOP

dev
youjianchi 5 months ago
parent
commit
18ac6352ca
  1. 78
      ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSop.java
  2. 12
      ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSopMapper.java
  3. 21
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSopServiceImpl.java
  4. 63
      ruoyi-admin/src/main/resources/mapper/system/SysSopMapper.xml
  5. 24
      ruoyi-admin/src/main/resources/templates/system/sop/add.html
  6. 32
      ruoyi-admin/src/main/resources/templates/system/sop/edit.html
  7. 372
      ruoyi-admin/src/main/resources/templates/system/sop/sop.html

78
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysSop.java

@ -15,8 +15,23 @@ public class SysSop extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键ID */
private Long id;
/** 删除标志(0代表存在 1代表删除) */
private String delFlag;
/** sopid */
private Long sopId;
private String sopId;
/** sop编号 */
private String sopNum;
/** 品名 */
private String productName;
/** 设备型号 */
private String equipModel;
/** 描述 */
private String describe;
/** 成品代码 */
@Excel(name = "成品代码")
@ -101,15 +116,64 @@ public class SysSop extends BaseEntity
@Excel(name = "修改时间")
private String updateInfoTime;
public void setSopId(Long sopId)
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public void setSopId(String sopId)
{
this.sopId = sopId;
}
public Long getSopId()
public String getSopId()
{
return sopId;
}
public String getSopNum() {
return sopNum;
}
public void setSopNum(String sopNum) {
this.sopNum = sopNum;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getEquipModel() {
return equipModel;
}
public void setEquipModel(String equipModel) {
this.equipModel = equipModel;
}
public String getDescribe() {
return describe;
}
public void setDescribe(String describe) {
this.describe = describe;
}
public void setSopCode(String sopCode)
{
this.sopCode = sopCode;
@ -301,7 +365,13 @@ public class SysSop extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("delFlag", getDelFlag())
.append("sopId", getSopId())
.append("sopNum", getSopNum())
.append("productName", getProductName())
.append("equipModel", getEquipModel())
.append("describe", getDescribe())
.append("sopCode", getSopCode())
.append("sopName", getSopName())
.append("sopModel", getSopModel())
@ -321,8 +391,6 @@ public class SysSop extends BaseEntity
.append("sopRegistrant", getSopRegistrant())
.append("sopRemark", getSopRemark())
.append("currentVersion", getCurrentVersion())
.append("firstAddTime", getFirstAddTime())
.append("updateInfoTime", getUpdateInfoTime())
.toString();
}
}

12
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysSopMapper.java

@ -15,10 +15,10 @@ public interface SysSopMapper
/**
* 查询SOP
*
* @param sopId SOPID
* @param id 主键id
* @return SOP
*/
public SysSop selectSysSopById(Long sopId);
public SysSop selectSysSopById(Long id);
/**
* 查询SOP列表
@ -47,16 +47,16 @@ public interface SysSopMapper
/**
* 删除SOP
*
* @param sopId SOPID
* @param id 主键id
* @return 结果
*/
public int deleteSysSopById(Long sopId);
public int deleteSysSopById(Long id);
/**
* 批量删除SOP
*
* @param sopIds 需要删除的数据ID
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteSysSopByIds(String[] sopIds);
public int deleteSysSopByIds(String[] ids);
}

21
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysSopServiceImpl.java

@ -1,6 +1,9 @@
package com.ruoyi.system.service.impl;
import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.system.domain.SysSop;
import com.ruoyi.system.mapper.SysSopMapper;
import com.ruoyi.system.service.ISysSopService;
@ -21,6 +24,9 @@ public class SysSopServiceImpl implements ISysSopService
@Autowired
private SysSopMapper sysSopMapper;
@Autowired
private RedisCache redisCache;
/**
* 查询SOP
*
@ -54,6 +60,12 @@ public class SysSopServiceImpl implements ISysSopService
@Override
public int insertSysSop(SysSop sysSop)
{
String loginName = ShiroUtils.getLoginName();
sysSop.setCreateBy(loginName);
sysSop.setCreateTime(DateUtils.getNowDate());
// 生成编号
String billNo = redisCache.generateNo("SOP");
sysSop.setSopId(billNo);
return sysSopMapper.insertSysSop(sysSop);
}
@ -66,6 +78,9 @@ public class SysSopServiceImpl implements ISysSopService
@Override
public int updateSysSop(SysSop sysSop)
{
String loginName = ShiroUtils.getLoginName();
sysSop.setUpdateBy(loginName);
sysSop.setUpdateTime(DateUtils.getNowDate());
return sysSopMapper.updateSysSop(sysSop);
}
@ -84,12 +99,12 @@ public class SysSopServiceImpl implements ISysSopService
/**
* 删除SOP信息
*
* @param sopId SOPID
* @param id 主键id
* @return 结果
*/
@Override
public int deleteSysSopById(Long sopId)
public int deleteSysSopById(Long id)
{
return sysSopMapper.deleteSysSopById(sopId);
return sysSopMapper.deleteSysSopById(id);
}
}

63
ruoyi-admin/src/main/resources/mapper/system/SysSopMapper.xml

@ -5,7 +5,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.system.mapper.SysSopMapper">
<resultMap type="SysSop" id="SysSopResult">
<result property="id" column="id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="delFlag" column="del_flag" />
<result property="sopId" column="sop_id" />
<result property="sopNum" column="sop_num" />
<result property="productName" column="product_name" />
<result property="equipModel" column="equip_model" />
<result property="describe" column="describe" />
<result property="sopCode" column="sop_code" />
<result property="sopName" column="sop_name" />
<result property="sopModel" column="sop_model" />
@ -25,17 +36,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="sopRegistrant" column="sop_registrant" />
<result property="sopRemark" column="sop_remark" />
<result property="currentVersion" column="current_version" />
<result property="firstAddTime" column="first_add_time" />
<result property="updateInfoTime" column="update_info_time" />
</resultMap>
<sql id="selectSysSopVo">
select sop_id, sop_code, sop_name, sop_model, type_of_machine, sop_unit, drawing_file, workhour_file, sop_file, sip_file, spp_file, bom_file, customer_file, other_file, customer_code, customer_name, date_of_registration, sop_registrant, sop_remark, current_version, first_add_time, update_info_time from sys_sop
select id,del_flag,create_by,create_time,update_by,update_time,remark,sop_id,sop_num,product_name,equip_model,`describe`,sop_code, sop_name, sop_model, type_of_machine, sop_unit, drawing_file, workhour_file, sop_file, sip_file, spp_file, bom_file, customer_file, other_file, customer_code, customer_name, date_of_registration, sop_registrant, sop_remark, current_version from sys_sop
</sql>
<select id="selectSysSopList" parameterType="SysSop" resultMap="SysSopResult">
<include refid="selectSysSopVo"/>
<where>
<if test="sopId != null and sopId != ''"> and sop_id = #{sopId}</if>
<if test="sopCode != null and sopCode != ''"> and sop_code like concat('%', #{sopCode}, '%')</if>
<if test="sopName != null and sopName != ''"> and sop_name like concat('%', #{sopName}, '%')</if>
<if test="customerCode != null and customerCode != ''"> and customer_code like concat('%', #{customerCode}, '%')</if>
@ -46,12 +56,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectSysSopById" parameterType="Long" resultMap="SysSopResult">
<include refid="selectSysSopVo"/>
where sop_id = #{sopId}
where id = #{id}
</select>
<insert id="insertSysSop" parameterType="SysSop" useGeneratedKeys="true" keyProperty="sopId">
insert into sys_sop
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="sopId != null and sopId != ''">sop_id,</if>
<if test="sopNum != null and sopNum != ''">sop_num,</if>
<if test="productName != null and productName != ''">product_name,</if>
<if test="equipModel != null and equipModel != ''">equip_model,</if>
<if test="describe != null and describe != ''">`describe`,</if>
<if test="sopCode != null and sopCode != ''">sop_code,</if>
<if test="sopName != null and sopName != ''">sop_name,</if>
<if test="sopModel != null and sopModel != ''">sop_model,</if>
@ -71,9 +86,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sopRegistrant != null and sopRegistrant != ''">sop_registrant,</if>
<if test="sopRemark != null and sopRemark != ''">sop_remark,</if>
<if test="currentVersion != null and currentVersion != ''">current_version,</if>
first_add_time,
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="remark != null">remark,</if>
<if test="delFlag != null">del_flag,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="sopId != null and sopId != ''">#{sopId},</if>
<if test="sopNum != null and sopNum != ''">#{sopNum},</if>
<if test="productName != null and productName != ''">#{productName},</if>
<if test="equipModel != null and equipModel != ''">#{equipModel},</if>
<if test="describe != null and describe != ''">#{describe},</if>
<if test="sopCode != null and sopCode != ''">#{sopCode},</if>
<if test="sopName != null and sopName != ''">#{sopName},</if>
<if test="sopModel != null and sopModel != ''">#{sopModel},</if>
@ -93,13 +118,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sopRegistrant != null and sopRegistrant != ''">#{sopRegistrant},</if>
<if test="sopRemark != null and sopRemark != ''">#{sopRemark},</if>
<if test="currentVersion != null and currentVersion != ''">#{currentVersion},</if>
now(),
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
<if test="delFlag != null">#{delFlag},</if>
</trim>
</insert>
<update id="updateSysSop" parameterType="SysSop">
update sys_sop
<trim prefix="SET" suffixOverrides=",">
<if test="sopNum != null and sopNum != ''">sop_num = #{sopNum},</if>
<if test="productName != null and productName != ''">product_name = #{productName},</if>
<if test="equipModel != null and equipModel != ''">equip_model = #{equipModel},</if>
<if test="describe != null and describe != ''">`describe` = #{describe},</if>
<if test="sopCode != null and sopCode != ''">sop_code = #{sopCode},</if>
<if test="sopName != null and sopName != ''">sop_name = #{sopName},</if>
<if test="sopModel != null and sopModel != ''">sop_model = #{sopModel},</if>
@ -119,19 +153,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sopRegistrant != null and sopRegistrant != ''">sop_registrant = #{sopRegistrant},</if>
<if test="sopRemark != null and sopRemark != ''">sop_remark = #{sopRemark},</if>
<if test="currentVersion != null and currentVersion != ''">current_version = #{currentVersion},</if>
update_info_time = CONCAT_WS(',',NOW(),update_info_time),
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="delFlag != null">del_flag = #{delFlag},</if>
</trim>
where sop_id = #{sopId}
where id = #{sopId}
</update>
<delete id="deleteSysSopById" parameterType="Long">
delete from sys_sop where sop_id = #{sopId}
delete from sys_sop where id = #{id}
</delete>
<delete id="deleteSysSopByIds" parameterType="String">
delete from sys_sop where sop_id in
<foreach item="sopId" collection="array" open="(" separator="," close=")">
#{sopId}
delete from sys_sop where id in
<foreach item="item" collection="array" open="(" separator="," close=")">
#{item}
</foreach>
</delete>

24
ruoyi-admin/src/main/resources/templates/system/sop/add.html

@ -16,6 +16,30 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-sop-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">设备型号:</label>
<div class="col-sm-8">
<input name="equipModel" id="equipModel" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">SOP编号:</label>
<div class="col-sm-8">
<input name="sopNum" id="sopNum" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品名:</label>
<div class="col-sm-8">
<input name="productName" id="productName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input name="describe" id="describe" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">成品代码:</label>
<div class="col-sm-8">

32
ruoyi-admin/src/main/resources/templates/system/sop/edit.html

@ -10,7 +10,37 @@
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-sop-edit" th:object="${sysSop}">
<input name="sopId" th:field="*{sopId}" type="hidden">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">sopId:</label>
<div class="col-sm-8">
<input readonly name="sopId" th:field="*{sopId}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">设备型号:</label>
<div class="col-sm-8">
<input name="equipModel" th:field="*{equipModel}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">SOP编号:</label>
<div class="col-sm-8">
<input name="sopNum" th:field="*{sopNum}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">品名:</label>
<div class="col-sm-8">
<input name="productName" th:field="*{productName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input name="describe" th:field="*{describe}" class="form-control" type="text">
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">成品代码:</label>
<div class="col-sm-8">

372
ruoyi-admin/src/main/resources/templates/system/sop/sop.html

@ -39,6 +39,10 @@
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select>
</li>
<li>
<label>sopId:</label>
<input type="text" name="sopId"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -87,192 +91,212 @@
columns: [{
checkbox: true
},
{
field: 'sopId',
title: 'sopid',
visible: false
},
{
field: 'sopCode',
title: '成品代码'
},
{
field: 'sopName',
title: '成品名称'
},
{
field: 'sopModel',
title: '规格型号'
},
{
field: 'typeOfMachine',
title: '机种'
},
{
field: 'sopUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sopUnitDatas, value);
}
},
{
field: 'drawingFile',
title: '图纸文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
}
},
{
field: 'workhourFile',
title: '工时文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
{
title: '主键ID',
field: 'id',
visible: false
},
{
field: 'sopId',
title: 'SOPID'
},
{
field: 'sopNum',
title: 'SOP编号'
},
{
field: 'productName',
title: '品名'
},
{
field: 'equipModel',
title: '设备型号'
},
{
field: 'describe',
title: '描述'
},
{
field: 'sopCode',
title: '成品代码'
},
{
field: 'sopName',
title: '成品名称'
},
{
field: 'sopModel',
title: '规格型号'
},
{
field: 'typeOfMachine',
title: '机种'
},
{
field: 'sopUnit',
title: '单位',
formatter: function(value, row, index) {
return $.table.selectDictLabel(sopUnitDatas, value);
}
},
{
field: 'drawingFile',
title: '图纸文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'sopFile',
title: 'SOP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'workhourFile',
title: '工时文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'sipFile',
title: 'SIP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'sopFile',
title: 'SOP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'sppFile',
title: 'SPP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'sipFile',
title: 'SIP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'bomFile',
title: 'BOM文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'sppFile',
title: 'SPP文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'customerFile',
title: '客户文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'bomFile',
title: 'BOM文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'otherFile',
title: '其他文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
return actions.join('');
return actions.join('');
}
},
{
field: 'customerFile',
title: '客户文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'customerCode',
title: '客户编号'
},
{
field: 'customerName',
title: '客户名称'
},
{
field: 'dateOfRegistration',
title: '登记日期'
},
{
field: 'sopRegistrant',
title: '登记人'
},
{
field: 'sopRemark',
title: '备注说明'
},
{
field: 'currentVersion',
title: '是否当前版本',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currentVersionDatas, value);
return actions.join('');
}
},
{
field: 'otherFile',
title: '其他文件',
formatter: function(value, row, index) {
var actions = [];
if (value !== null) {
var filepath = value.substring(value.lastIndexOf("/")+1)
actions.push('<a href="javascript:void(0)" onclick="downloadFile(\'' + value + '\')">'+filepath+'</a> ');
}
},
{
field: 'firstAddTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
return actions.join('');
}
},
{
field: 'customerCode',
title: '客户编号'
},
{
field: 'customerName',
title: '客户名称'
},
{
field: 'dateOfRegistration',
title: '登记日期'
},
{
field: 'sopRegistrant',
title: '登记人'
},
{
field: 'sopRemark',
title: '备注说明'
},
{
field: 'currentVersion',
title: '是否当前版本',
formatter: function (value, row, index) {
return $.table.selectDictLabel(currentVersionDatas, value);
}
},
{
field: 'createTime',
title: '录入时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
return value;
}
},
{
field: 'updateInfoTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
},
{
field: 'updateTime',
title: '上次修改时间',
formatter: function (value, row, index) {
if (value == null) {
return " ";
} else {
var vArr = value.split(',')
return vArr[0];
}
}
}
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sopId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sopId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
// {
// title: '操作',
// align: 'center',
// formatter: function(value, row, index) {
// var actions = [];
// actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.sopId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
// actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.sopId + '\')"><i class="fa fa-remove"></i>删除</a>');
// return actions.join('');
// }
// }
]
};
$.table.init(options);
});

Loading…
Cancel
Save