设备模块添加表单校验

1.2.6
zhouhy 10 months ago
parent ce1773f640
commit 6544f3b74d

@ -23,7 +23,7 @@ import com.hw.common.core.utils.poi.ExcelUtil;
/**
* Controller
*
*
* @author xins
* @date 2023-12-27
*/
@ -100,4 +100,12 @@ public class DmsBaseDeviceTypeController extends BaseController
{
return toAjax(dmsBaseDeviceTypeService.deleteDmsBaseDeviceTypeByDeviceTypeIds(deviceTypeIds));
}
@RequiresPermissions("dms:devicetype:list")
@GetMapping("/selectDevicetypeByDeviceId")
public AjaxResult selectDevicetypeByDeviceId(Long deviceId)
{
List<DmsBaseDeviceType> list = dmsBaseDeviceTypeService.selectDevicetypeByDeviceId(deviceId);
return success(list);
}
}

@ -10,7 +10,7 @@ import com.hw.common.core.web.domain.BaseEntity;
/**
* dms_base_device_depreciation
*
*
* @author xins
* @date 2023-12-27
*/
@ -49,76 +49,85 @@ public class DmsBaseDeviceDepreciation extends BaseEntity
/** 是否标识1-是2-否 */
@Excel(name = "是否标识1-是2-否")
private Long isFlag;
private String deviceName;
public void setDeviceDepreciationId(Long deviceDepreciationId)
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public void setDeviceDepreciationId(Long deviceDepreciationId)
{
this.deviceDepreciationId = deviceDepreciationId;
}
public Long getDeviceDepreciationId()
public Long getDeviceDepreciationId()
{
return deviceDepreciationId;
}
public void setDeviceId(Long deviceId)
public void setDeviceId(Long deviceId)
{
this.deviceId = deviceId;
}
public Long getDeviceId()
public Long getDeviceId()
{
return deviceId;
}
public void setRepairFrequency(Long repairFrequency)
public void setRepairFrequency(Long repairFrequency)
{
this.repairFrequency = repairFrequency;
}
public Long getRepairFrequency()
public Long getRepairFrequency()
{
return repairFrequency;
}
public void setRepairCosts(BigDecimal repairCosts)
public void setRepairCosts(BigDecimal repairCosts)
{
this.repairCosts = repairCosts;
}
public BigDecimal getRepairCosts()
public BigDecimal getRepairCosts()
{
return repairCosts;
}
public void setDepreciationCost(BigDecimal depreciationCost)
public void setDepreciationCost(BigDecimal depreciationCost)
{
this.depreciationCost = depreciationCost;
}
public BigDecimal getDepreciationCost()
public BigDecimal getDepreciationCost()
{
return depreciationCost;
}
public void setPutintoTime(Date putintoTime)
public void setPutintoTime(Date putintoTime)
{
this.putintoTime = putintoTime;
}
public Date getPutintoTime()
public Date getPutintoTime()
{
return putintoTime;
}
public void setUseLife(BigDecimal useLife)
public void setUseLife(BigDecimal useLife)
{
this.useLife = useLife;
}
public BigDecimal getUseLife()
public BigDecimal getUseLife()
{
return useLife;
}
public void setIsFlag(Long isFlag)
public void setIsFlag(Long isFlag)
{
this.isFlag = isFlag;
}
public Long getIsFlag()
public Long getIsFlag()
{
return isFlag;
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBaseDeviceType;
/**
* Mapper
*
*
* @author xins
* @date 2023-12-27
*/
public interface DmsBaseDeviceTypeMapper
public interface DmsBaseDeviceTypeMapper
{
/**
*
*
*
* @param deviceTypeId
* @return
*/
@ -21,7 +21,7 @@ public interface DmsBaseDeviceTypeMapper
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -29,7 +29,7 @@ public interface DmsBaseDeviceTypeMapper
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -37,7 +37,7 @@ public interface DmsBaseDeviceTypeMapper
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -45,7 +45,7 @@ public interface DmsBaseDeviceTypeMapper
/**
*
*
*
* @param deviceTypeId
* @return
*/
@ -53,9 +53,11 @@ public interface DmsBaseDeviceTypeMapper
/**
*
*
*
* @param deviceTypeIds
* @return
*/
public int deleteDmsBaseDeviceTypeByDeviceTypeIds(Long[] deviceTypeIds);
public List<DmsBaseDeviceType> selectDevicetypeByDeviceId(Long deviceId);
}

@ -5,15 +5,15 @@ import com.hw.dms.domain.DmsBaseDeviceType;
/**
* Service
*
*
* @author xins
* @date 2023-12-27
*/
public interface IDmsBaseDeviceTypeService
public interface IDmsBaseDeviceTypeService
{
/**
*
*
*
* @param deviceTypeId
* @return
*/
@ -21,7 +21,7 @@ public interface IDmsBaseDeviceTypeService
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -29,7 +29,7 @@ public interface IDmsBaseDeviceTypeService
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -37,7 +37,7 @@ public interface IDmsBaseDeviceTypeService
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -45,7 +45,7 @@ public interface IDmsBaseDeviceTypeService
/**
*
*
*
* @param deviceTypeIds
* @return
*/
@ -53,9 +53,11 @@ public interface IDmsBaseDeviceTypeService
/**
*
*
*
* @param deviceTypeId
* @return
*/
public int deleteDmsBaseDeviceTypeByDeviceTypeId(Long deviceTypeId);
public List<DmsBaseDeviceType> selectDevicetypeByDeviceId(Long deviceId);
}

@ -2,6 +2,7 @@ package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBaseDeviceDepreciationMapper;
@ -10,19 +11,19 @@ import com.hw.dms.service.IDmsBaseDeviceDepreciationService;
/**
* Service
*
*
* @author xins
* @date 2023-12-27
*/
@Service
public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepreciationService
public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepreciationService
{
@Autowired
private DmsBaseDeviceDepreciationMapper dmsBaseDeviceDepreciationMapper;
/**
*
*
*
* @param deviceDepreciationId
* @return
*/
@ -34,7 +35,7 @@ public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepre
/**
*
*
*
* @param dmsBaseDeviceDepreciation
* @return
*/
@ -46,33 +47,38 @@ public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepre
/**
*
*
*
* @param dmsBaseDeviceDepreciation
* @return
*/
@Override
public int insertDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
{
LoginUser user = new LoginUser();
dmsBaseDeviceDepreciation.setCreateBy(user.getUsername());
dmsBaseDeviceDepreciation.setIsFlag(1l);
dmsBaseDeviceDepreciation.setCreateTime(DateUtils.getNowDate());
return dmsBaseDeviceDepreciationMapper.insertDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation);
}
/**
*
*
*
* @param dmsBaseDeviceDepreciation
* @return
*/
@Override
public int updateDmsBaseDeviceDepreciation(DmsBaseDeviceDepreciation dmsBaseDeviceDepreciation)
{
LoginUser user = new LoginUser();
dmsBaseDeviceDepreciation.setUpdateBy(user.getUsername());
dmsBaseDeviceDepreciation.setUpdateTime(DateUtils.getNowDate());
return dmsBaseDeviceDepreciationMapper.updateDmsBaseDeviceDepreciation(dmsBaseDeviceDepreciation);
}
/**
*
*
*
* @param deviceDepreciationIds
* @return
*/
@ -84,7 +90,7 @@ public class DmsBaseDeviceDepreciationServiceImpl implements IDmsBaseDeviceDepre
/**
*
*
*
* @param deviceDepreciationId
* @return
*/

@ -2,6 +2,8 @@ package com.hw.dms.service.impl;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.dms.domain.DmsBaseDeviceBom;
import com.hw.system.api.model.LoginUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsBaseDeviceTypeMapper;
@ -10,19 +12,19 @@ import com.hw.dms.service.IDmsBaseDeviceTypeService;
/**
* Service
*
*
* @author xins
* @date 2023-12-27
*/
@Service
public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
{
@Autowired
private DmsBaseDeviceTypeMapper dmsBaseDeviceTypeMapper;
/**
*
*
*
* @param deviceTypeId
* @return
*/
@ -34,7 +36,7 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@ -46,33 +48,58 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@Override
public int insertDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType)
{
LoginUser user = new LoginUser();
dmsBaseDeviceType.setCreateBy(user.getUsername());
dmsBaseDeviceType.setIsFlag(1l);
dmsBaseDeviceType.setCreateTime(DateUtils.getNowDate());
//如果有父级 则查询父级祖籍列表 +父级编号
if (dmsBaseDeviceType.getParentId()==0){
dmsBaseDeviceType.setAncestors("0");
}
else{
DmsBaseDeviceType dmsBaseDeviceType1 = new DmsBaseDeviceType();
dmsBaseDeviceType1.setParentId(dmsBaseDeviceType.getParentId());
String ancestors = dmsBaseDeviceTypeMapper.selectDmsBaseDeviceTypeList(dmsBaseDeviceType1).get(0).getAncestors();
dmsBaseDeviceType.setAncestors(ancestors+","+dmsBaseDeviceType.getParentId());
}
return dmsBaseDeviceTypeMapper.insertDmsBaseDeviceType(dmsBaseDeviceType);
}
/**
*
*
*
* @param dmsBaseDeviceType
* @return
*/
@Override
public int updateDmsBaseDeviceType(DmsBaseDeviceType dmsBaseDeviceType)
{
LoginUser user = new LoginUser();
dmsBaseDeviceType.setUpdateBy(user.getUsername());
dmsBaseDeviceType.setUpdateTime(DateUtils.getNowDate());
//如果有父级 则查询父级祖籍列表 +父级编号
if (dmsBaseDeviceType.getParentId()==0){
dmsBaseDeviceType.setAncestors("0");
}
else{
DmsBaseDeviceType dmsBaseDeviceType1 = new DmsBaseDeviceType();
dmsBaseDeviceType1.setParentId(dmsBaseDeviceType.getParentId());
String ancestors = dmsBaseDeviceTypeMapper.selectDmsBaseDeviceTypeList(dmsBaseDeviceType1).get(0).getAncestors();
dmsBaseDeviceType.setAncestors(ancestors+","+dmsBaseDeviceType.getParentId());
}
return dmsBaseDeviceTypeMapper.updateDmsBaseDeviceType(dmsBaseDeviceType);
}
/**
*
*
*
* @param deviceTypeIds
* @return
*/
@ -84,7 +111,7 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
/**
*
*
*
* @param deviceTypeId
* @return
*/
@ -93,4 +120,9 @@ public class DmsBaseDeviceTypeServiceImpl implements IDmsBaseDeviceTypeService
{
return dmsBaseDeviceTypeMapper.deleteDmsBaseDeviceTypeByDeviceTypeId(deviceTypeId);
}
@Override
public List<DmsBaseDeviceType> selectDevicetypeByDeviceId(Long deviceId) {
return dmsBaseDeviceTypeMapper.selectDevicetypeByDeviceId(deviceId);
}
}

@ -54,6 +54,9 @@ public class DmsBaseInspectProjectServiceImpl implements IDmsBaseInspectProjectS
@Override
public int insertDmsBaseInspectProject(DmsBaseInspectProject dmsBaseInspectProject)
{
if (dmsBaseInspectProject.getInspectType()==null){
dmsBaseInspectProject.setInspectType("1");
}
LoginUser user = new LoginUser();
dmsBaseInspectProject.setIsFlag("1");
dmsBaseInspectProject.setCreateBy(user.getUsername());

@ -55,6 +55,9 @@ public class DmsBaseInspectRouteServiceImpl implements IDmsBaseInspectRouteServi
@Override
public int insertDmsBaseInspectRoute(DmsBaseInspectRoute dmsBaseInspectRoute)
{
if (dmsBaseInspectRoute.getInspectType()==null){
dmsBaseInspectRoute.setInspectType("1");
}
LoginUser user = new LoginUser();
dmsBaseInspectRoute.setCreateBy(user.getUsername());
dmsBaseInspectRoute.setIsFlag("1");

@ -59,9 +59,11 @@ public class DmsFlowCheckplanServiceImpl implements IDmsFlowCheckplanService
@Override
public int insertDmsFlowCheckplan(DmsFlowCheckplan dmsFlowCheckplan)
{
LoginUser loginUser = new LoginUser();
dmsFlowCheckplan.setCreateBy(loginUser.getUsername());
dmsFlowCheckplan.setCreateTime(DateUtils.getNowDate());
dmsFlowCheckplan.setCheckBy(loginUser.getUsername());
int rows = dmsFlowCheckplanMapper.insertDmsFlowCheckplan(dmsFlowCheckplan);
insertDmsFlowCheckplanDetail(dmsFlowCheckplan);
return rows;

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hw.dms.mapper.DmsBaseDeviceDepreciationMapper">
<resultMap type="DmsBaseDeviceDepreciation" id="DmsBaseDeviceDepreciationResult">
<result property="deviceDepreciationId" column="device_depreciation_id" />
<result property="deviceId" column="device_id" />
@ -25,23 +25,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectDmsBaseDeviceDepreciationList" parameterType="DmsBaseDeviceDepreciation" resultMap="DmsBaseDeviceDepreciationResult">
<include refid="selectDmsBaseDeviceDepreciationVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="repairFrequency != null "> and repair_frequency = #{repairFrequency}</if>
<if test="repairCosts != null "> and repair_costs = #{repairCosts}</if>
<if test="depreciationCost != null "> and depreciation_cost = #{depreciationCost}</if>
<if test="putintoTime != null "> and putinto_time = #{putintoTime}</if>
<if test="useLife != null "> and use_life = #{useLife}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
select a.device_depreciation_id, a.device_id, a.repair_frequency, a.repair_costs, a.depreciation_cost, a.putinto_time, a.use_life, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time
from dms_base_device_depreciation a
left join dms_base_device_ledger b on a.device_id = b.device_id
<where>
<if test="deviceId != null "> and a.device_id = #{deviceId}</if>
<if test="repairFrequency != null "> and a.repair_frequency = #{repairFrequency}</if>
<if test="repairCosts != null "> and a.repair_costs = #{repairCosts}</if>
<if test="depreciationCost != null "> and a.depreciation_cost = #{depreciationCost}</if>
<if test="params.beginTime != null and params.endTime != null">and a.putinto_time between #{params.beginTime} and #{params.endTime}</if>
<if test="useLife != null "> and a.use_life = #{useLife}</if>
<if test="isFlag != null "> and a.is_flag = #{isFlag}</if>
<if test="deviceName != null "> and b.device_name like concat('%', #{deviceName},'%')</if>
</where>
</select>
<select id="selectDmsBaseDeviceDepreciationByDeviceDepreciationId" parameterType="Long" resultMap="DmsBaseDeviceDepreciationResult">
<include refid="selectDmsBaseDeviceDepreciationVo"/>
where device_depreciation_id = #{deviceDepreciationId}
</select>
<insert id="insertDmsBaseDeviceDepreciation" parameterType="DmsBaseDeviceDepreciation" useGeneratedKeys="true" keyProperty="deviceDepreciationId">
insert into dms_base_device_depreciation
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -98,9 +101,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteDmsBaseDeviceDepreciationByDeviceDepreciationIds" parameterType="String">
delete from dms_base_device_depreciation where device_depreciation_id in
delete from dms_base_device_depreciation where device_depreciation_id in
<foreach item="deviceDepreciationId" collection="array" open="(" separator="," close=")">
#{deviceDepreciationId}
</foreach>
</delete>
</mapper>
</mapper>

@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hw.dms.mapper.DmsBaseDeviceTypeMapper">
<resultMap type="DmsBaseDeviceType" id="DmsBaseDeviceTypeResult">
<result property="deviceTypeId" column="device_type_id" />
<result property="parentId" column="parent_id" />
@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDmsBaseDeviceTypeList" parameterType="DmsBaseDeviceType" resultMap="DmsBaseDeviceTypeResult">
<include refid="selectDmsBaseDeviceTypeVo"/>
<where>
<where>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="typeCode != null and typeCode != ''"> and type_code = #{typeCode}</if>
<if test="typeName != null and typeName != ''"> and type_name like concat('%', #{typeName}, '%')</if>
@ -32,12 +32,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if>
</where>
</select>
<select id="selectDmsBaseDeviceTypeByDeviceTypeId" parameterType="Long" resultMap="DmsBaseDeviceTypeResult">
<include refid="selectDmsBaseDeviceTypeVo"/>
where device_type_id = #{deviceTypeId}
</select>
<insert id="insertDmsBaseDeviceType" parameterType="DmsBaseDeviceType" useGeneratedKeys="true" keyProperty="deviceTypeId">
insert into dms_base_device_type
<trim prefix="(" suffix=")" suffixOverrides=",">
@ -88,9 +88,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteDmsBaseDeviceTypeByDeviceTypeIds" parameterType="String">
delete from dms_base_device_type where device_type_id in
delete from dms_base_device_type where device_type_id in
<foreach item="deviceTypeId" collection="array" open="(" separator="," close=")">
#{deviceTypeId}
</foreach>
</delete>
</mapper>
<select id="selectDevicetypeByDeviceId" parameterType="Long" resultMap="DmsBaseDeviceTypeResult">
select a.device_type_id, a.parent_id, a.type_code, a.type_name, a.is_flag, a.ancestors, a.remark, a.create_by, a.create_time, a.update_by, a.update_time
from dms_base_device_type a
left join dms_base_device_ledger b on a.device_type_id = b.device_type_id
<where>
<if test="deviceId != null and deviceId != ''"> and b.device_id = #{deviceId}</if>
</where>
</select>
</mapper>

@ -42,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectDmsFlowCheckplanList" parameterType="DmsFlowCheckplan" resultMap="DmsFlowCheckplanResult">
<include refid="selectDmsFlowCheckplanVo"/>
<where>
<if test="flowCheckplanId!=null and flowCheckplanId!=''">and flow_checkplan_id = #{flowCheckplanId}</if>
<if test="checkCode != null and checkCode != ''"> and check_code like concat( '%',#{checkCode},'%')</if>
<if test="planTime != null "> and plan_time = #{planTime}</if>
<if test="checkBy != null and checkBy != ''"> and check_by = #{checkBy}</if>

@ -36,8 +36,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="inspectRouteId != null "> and inspect_route_id = #{inspectRouteId}</if>
<if test="deviceAmount != null "> and device_amount = #{deviceAmount}</if>
<if test="planTime != null "> and plan_time = #{planTime}</if>
<if test="realBeginTime != null "> and real_begin_time >=#{realBeginTime}</if>
<if test="realEndTime != null "> and #{realEndTime} >= real_end_time</if>
<if test="realBeginTime != null "> and #{realBeginTime}>=real_begin_time</if>
<if test="realEndTime != null "> and real_end_time >= #{realEndTime}</if>
<if test="performer != null and performer != ''"> and performer = #{performer}</if>
<if test="inspectStatus != null "> and inspect_status = #{inspectStatus}</if>
<if test="inspectDuration != null "> and inspect_duration = #{inspectDuration}</if>

@ -74,6 +74,8 @@
"connect": "3.6.6",
"eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0",
"less": "^4.2.0",
"less-loader": "^12.1.0",
"lint-staged": "10.5.3",
"runjs": "4.4.2",
"sass": "1.32.13",

@ -42,3 +42,13 @@ export function delDevicetype(deviceTypeId) {
method: 'delete'
})
}
//根据设备id查询设备类型信息
export function selectDevicetypeByDeviceId(query) {
return request({
url: '/dms/devicetype/selectDevicetypeByDeviceId',
method: 'get',
params: query
})
}

@ -1,14 +1,14 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="父级标识" prop="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入父级标识"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="父级标识" prop="parentId">-->
<!-- <el-input-->
<!-- v-model="queryParams.parentId"-->
<!-- placeholder="请输入父级标识"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="类型编号" prop="typeCode">
<el-input
v-model="queryParams.typeCode"
@ -25,22 +25,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否标识1-是2-否" prop="isFlag">
<el-input
v-model="queryParams.isFlag"
placeholder="请输入是否标识1-是2-否"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="祖级列表" prop="ancestors">
<el-input
v-model="queryParams.ancestors"
placeholder="请输入祖级列表"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="祖级列表" prop="ancestors">-->
<!-- <el-input-->
<!-- v-model="queryParams.ancestors"-->
<!-- placeholder="请输入祖级列表"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -78,11 +78,11 @@
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
>
<el-table-column label="父级标识" prop="parentId" />
<!-- <el-table-column label="父级标识" prop="parentId" />-->
<el-table-column label="类型编号" align="center" prop="typeCode" />
<el-table-column label="类型名称" align="center" prop="typeName" />
<el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />
<el-table-column label="祖级列表" align="center" prop="ancestors" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="祖级列表" align="center" prop="ancestors" />-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -123,9 +123,9 @@
<el-form-item label="类型名称" prop="typeName">
<el-input v-model="form.typeName" placeholder="请输入类型名称" />
</el-form-item>
<el-form-item label="是否标识1-是2-否" prop="isFlag">
<el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>

@ -268,7 +268,8 @@ export default {
{ required: true, message: "设备ID关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
],
bomAmount: [
{ required: true, message: "bom数量不能为空", trigger: "blur" }
{ required: true, message: "bom数量不能为空", trigger: "blur" },
{ pattern: /^-?\d+\.?\d*$/, message: '请输入数字', trigger: 'blur'}
],
}
};

@ -242,66 +242,66 @@
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-divider content-position="center">设备盘点明细信息</el-divider>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddDmsFlowCheckplanDetail"></el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteDmsFlowCheckplanDetail"></el-button>
</el-col>
</el-row>
<el-table :data="dmsFlowCheckplanDetailList" :row-class-name="rowDmsFlowCheckplanDetailIndex" @selection-change="handleDmsFlowCheckplanDetailSelectionChange" ref="dmsFlowCheckplanDetail">
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="序号" align="center" prop="index" width="50"/>
<el-table-column label="设备编号" prop="deviceId" width="150">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.deviceId" placeholder="请输入设备ID。关联dms_base_device_ledger的device_id" />-->
<el-select v-model="scope.row.deviceId" placeholder="请选择设备">
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
:label="item.deviceName"
:value="item.deviceId">
</el-option>
</el-select>
</template>
</el-table-column>
<!-- <el-divider content-position="center">设备盘点明细信息</el-divider>-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button type="primary" icon="el-icon-plus" size="mini" @click="handleAddDmsFlowCheckplanDetail"></el-button>-->
<!-- </el-col>-->
<!-- <el-col :span="1.5">-->
<!-- <el-button type="danger" icon="el-icon-delete" size="mini" @click="handleDeleteDmsFlowCheckplanDetail"></el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-table :data="dmsFlowCheckplanDetailList" :row-class-name="rowDmsFlowCheckplanDetailIndex" @selection-change="handleDmsFlowCheckplanDetailSelectionChange" ref="dmsFlowCheckplanDetail">-->
<!-- <el-table-column type="selection" width="50" align="center" />-->
<!-- <el-table-column label="序号" align="center" prop="index" width="50"/>-->
<!-- <el-table-column label="设备编号" prop="deviceId" width="150">-->
<!-- <template slot-scope="scope">-->
<!--&lt;!&ndash; <el-input v-model="scope.row.deviceId" placeholder="请输入设备ID。关联dms_base_device_ledger的device_id" />&ndash;&gt;-->
<!-- <el-select v-model="scope.row.deviceId" placeholder="请选择设备">-->
<!-- <el-option-->
<!-- v-for="item in ledgerList"-->
<!-- :key="item.deviceId"-->
<!-- :label="item.deviceName"-->
<!-- :value="item.deviceId">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="盘点时间" prop="checkTime" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.checkTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择盘点时间" />
</template>
</el-table-column>
<el-table-column label="盘点结果" prop="variationFlag" width="150">
<template slot-scope="scope">
<!-- <el-input v-model="scope.row.variationFlag" placeholder="请输入盘点结果(0:默认未盘点,1:已盘点)" />-->
<el-select v-model="scope.row.variationFlag" placeholder="请选择性别">
<el-option
v-for="dict in dict.type.dms_variation_flag"
:key="dict.value"
:label="dict.label"
:value="Number(dict.value)"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="跳过原因" prop="skipCause" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.skipCause" placeholder="请输入跳过原因" />
</template>
</el-table-column>
<el-table-column label="盘点人" prop="checkPerson" width="150">
<template slot-scope="scope">
<el-input v-model="scope.row.checkPerson" placeholder="请输入盘点人" />
</template>
</el-table-column>
<el-table-column label="上次盘点时间" prop="lastCheckTime" width="240">
<template slot-scope="scope">
<el-date-picker clearable v-model="scope.row.lastCheckTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择上次盘点时间" />
</template>
</el-table-column>
</el-table>
<!-- <el-table-column label="盘点时间" prop="checkTime" width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <el-date-picker clearable v-model="scope.row.checkTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择盘点时间" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="盘点结果" prop="variationFlag" width="150">-->
<!-- <template slot-scope="scope">-->
<!--&lt;!&ndash; <el-input v-model="scope.row.variationFlag" placeholder="请输入盘点结果(0:默认未盘点,1:已盘点)" />&ndash;&gt;-->
<!-- <el-select v-model="scope.row.variationFlag" placeholder="请选择性别">-->
<!-- <el-option-->
<!-- v-for="dict in dict.type.dms_variation_flag"-->
<!-- :key="dict.value"-->
<!-- :label="dict.label"-->
<!-- :value="Number(dict.value)"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="跳过原因" prop="skipCause" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.skipCause" placeholder="请输入跳过原因" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="盘点人" prop="checkPerson" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.checkPerson" placeholder="请输入盘点人" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="上次盘点时间" prop="lastCheckTime" width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <el-date-picker clearable v-model="scope.row.lastCheckTime" type="date" value-format="yyyy-MM-dd" placeholder="请选择上次盘点时间" />-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
@ -369,6 +369,9 @@ export default {
checkState: [
{ required: true, message: "盘点状态(0未盘点1已盘点2盘点中)不能为空", trigger: "blur" }
],
checkAmount:[{pattern:/^[1-9]\d*$/,message: "盘点数量必须为数字",trigger: "blur" }],
surplusCheckAmount:[{pattern:/^[1-9]\d*$/,message: "剩余数量必须为数字",trigger: "blur" }],
}
};
},

@ -168,13 +168,13 @@
<el-form-item label="项目编号" prop="inspectProjectCode">
<el-input v-model="form.inspectProjectCode" placeholder="请输入项目编号" />
</el-form-item>
<el-form-item label="巡检项目" prop="inspectProject">
<el-form-item label="项目名称" prop="inspectProject">
<el-input v-model="form.inspectProject" placeholder="请输入巡检项目" />
</el-form-item>
<el-form-item label="记录方式" prop="recordMethod">
<el-input v-model="form.recordMethod" placeholder="请输入记录方式" />
</el-form-item>
<el-form-item label="检查类型" prop="checkState">
<el-form-item label="检查类型" prop="inspectType">
<el-radio-group v-model="form.inspectType">
<el-radio
v-for="dict in dict.type.dms_inspect_type"
@ -251,14 +251,19 @@ export default {
//
rules: {
inspectProject: [
{ required: true, message: "巡检项目不能为空", trigger: "blur" }
{ required: true, message: "项目名称不能为空", trigger: "blur" }
],
inspectProjectCode: [
{ required: true, message: "项目编号不能为空", trigger: "blur" }
],
inspectType: [
{ required: true, message: "检查类型(1巡检,2点检)不能为空", trigger: "change" }
],
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
],
upLimit:[{pattern:/^[1-9]\d*$/,message: "上限必须为数字",trigger: "blur" }],
lowLimit:[{pattern:/^[1-9]\d*$/,message: "下限必须为数字",trigger: "blur" }],
defValue:[{pattern:/^[1-9]\d*$/,message: "默认值必须为数字",trigger: "blur" }],
}
};
},

@ -281,14 +281,14 @@ export default {
{ required: true, message: "线路名称不能为空", trigger: "blur" }
],
inspectType: [
{ required: true, message: "线路类型(1巡检,2点检)不能为空", trigger: "change" }
{ required: true, message: "线路类型", trigger: "blur" }
],
deviceTypeId: [
{ required: true, message: "设备类型ID关联dms_base_device_type的device_type_id不能为空", trigger: "blur" }
],
isFlag: [
{ required: true, message: "是否标识1-是0-否不能为空", trigger: "blur" }
],
// isFlag: [
// { required: true, message: "1-0-", trigger: "blur" }
// ],
}
};
},

@ -162,7 +162,12 @@
<span>{{ parseTime(scope.row.repairEndTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="循环周期" align="center" prop="cyclePeriod" />
<!-- <el-table-column label="循环周期" align="center" prop="cyclePeriod" />-->
<el-table-column label="循环周期" align="center" prop="cyclePeriod">
<template slot-scope="scope">
<dict-tag :options="dict.type.dms_cycle_period" :value="scope.row.cyclePeriod"/>
</template>
</el-table-column>
<!-- <el-table-column label="检修状态1-待检修2-检修中3-已完成" align="center" prop="repairStatus" />-->
<el-table-column label="检修状态" align="center" prop="repairStatus">
<template slot-scope="scope">
@ -242,8 +247,17 @@
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="循环周期" prop="cyclePeriod">-->
<!-- <el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />-->
<!-- </el-form-item>-->
<el-form-item label="循环周期" prop="cyclePeriod">
<el-input v-model="form.cyclePeriod" placeholder="请输入循环周期" />
<el-radio-group v-model="form.cyclePeriod">
<el-radio
v-for="dict in dict.type.dms_cycle_period"
:key="dict.value"
:label="parseInt(dict.value)"
>{{dict.label}}</el-radio>
</el-radio-group>
</el-form-item>
<!-- <el-form-item label="创建方式1-人工创建2-自动创建" prop="createMethod">-->
<!-- <el-input v-model="form.createMethod" placeholder="请输入创建方式1-人工创建2-自动创建" />-->
@ -286,7 +300,7 @@ import { listDmsRepair, getDmsRepair, delDmsRepair, addDmsRepair, updateDmsRepai
export default {
name: "DmsRepair",
dicts:['dms_create_method','dms_repair_status','dms_repair_type'],
dicts:['dms_create_method','dms_repair_status','dms_repair_type','dms_cycle_period'],
data() {
return {
//

@ -284,16 +284,16 @@
v-hasPermi="['dms:ledger:add']"
>设备折旧</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="getDeviceCheckplans"
v-hasPermi="['dms:ledger:add']"
>设备盘点</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- plain-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="getDeviceCheckplans"-->
<!-- v-hasPermi="['dms:ledger:add']"-->
<!-- >设备盘点</el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
type="primary"

@ -1,46 +1,46 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="设备ID,关联dms_base_device_ledger的device_id" prop="deviceId">
<el-form-item label="设备ID" prop="deviceId">
<el-input
v-model="queryParams.deviceId"
placeholder="请输入设备ID,关联dms_base_device_ledger的device_id"
placeholder="请输入设备ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="维修次数" prop="repairFrequency">
<el-form-item label="设备名称" prop="deviceName">
<el-input
v-model="queryParams.repairFrequency"
placeholder="请输入维修次数"
v-model="queryParams.deviceName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="维修费用" prop="repairCosts">
<el-input
v-model="queryParams.repairCosts"
placeholder="请输入维修费用"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="折旧费用" prop="depreciationCost">
<el-input
v-model="queryParams.depreciationCost"
placeholder="请输入折旧费用"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投入时间" prop="putintoTime">
<el-date-picker clearable
v-model="queryParams.putintoTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择投入时间">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="维修次数" prop="repairFrequency">-->
<!-- <el-input-->
<!-- v-model="queryParams.repairFrequency"-->
<!-- placeholder="请输入维修次数"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="维修费用" prop="repairCosts">-->
<!-- <el-input-->
<!-- v-model="queryParams.repairCosts"-->
<!-- placeholder="请输入维修费用"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="折旧费用" prop="depreciationCost">-->
<!-- <el-input-->
<!-- v-model="queryParams.depreciationCost"-->
<!-- placeholder="请输入折旧费用"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item label="使用年限" prop="useLife">
<el-input
v-model="queryParams.useLife"
@ -49,14 +49,34 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="是否标识1-是2-否" prop="isFlag">
<el-input
v-model="queryParams.isFlag"
placeholder="请输入是否标识1-是2-否"
clearable
@keyup.enter.native="handleQuery"
/>
<el-form-item label="投入时间">
<el-date-picker
v-model="queryParams.params.beginTime"
style="width: 240px"
type="date"
placeholder="选择日期时间"
value-format="yyyy-MM-dd "
></el-date-picker>
</el-form-item>
<el-form-item><div>-</div></el-form-item>
<el-form-item
><el-date-picker
v-model="queryParams.params.endTime"
value-format="yyyy-MM-dd "
style="width: 240px"
type="date"
placeholder="选择日期时间"
></el-date-picker
></el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input-->
<!-- v-model="queryParams.isFlag"-->
<!-- placeholder="请输入是否标识1-是2-否"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -111,8 +131,20 @@
<el-table v-loading="loading" :data="devicedepreciationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="主键标识" align="center" prop="deviceDepreciationId" />
<el-table-column label="设备ID,关联dms_base_device_ledger的device_id" align="center" prop="deviceId" />
<!-- <el-table-column label="主键标识" align="center" prop="deviceDepreciationId" />-->
<el-table-column label="设备ID" align="center" prop="deviceId" />
<el-table-column label="设备名称" align="center" prop="deviceId" >
<template slot-scope="scope">
<span
v-for="(item, index) in ledgerList"
:key="index"
:value="item.ledgerList"
v-if="scope.row.deviceId == item.deviceId"
>
{{ item.deviceName }}
</span>
</template>
</el-table-column>
<el-table-column label="维修次数" align="center" prop="repairFrequency" />
<el-table-column label="维修费用" align="center" prop="repairCosts" />
<el-table-column label="折旧费用" align="center" prop="depreciationCost" />
@ -122,7 +154,12 @@
</template>
</el-table-column>
<el-table-column label="使用年限" align="center" prop="useLife" />
<el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />
<!-- <el-table-column label="是否标识1-是2-否" align="center" prop="isFlag" />-->
<!-- <el-table-column label="标识" align="center" prop="isFlag">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.is_flag" :value="scope.row.isFlag"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -143,7 +180,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -155,8 +192,18 @@
<!-- 添加或修改设备折旧信息对话框 -->
<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="设备ID,关联dms_base_device_ledger的device_id" prop="deviceId">
<el-input v-model="form.deviceId" placeholder="请输入设备ID,关联dms_base_device_ledger的device_id" />
<!-- <el-form-item label="设备ID" prop="deviceId" >-->
<!-- <el-input v-model="form.deviceId" placeholder="请输入设备ID":disabled=isDis />-->
<!-- </el-form-item>-->
<el-form-item label="设备名称" prop="deviceId" >
<el-select v-model="form.deviceId" placeholder="请选择设备" :disabled=isDis>
<el-option
v-for="item in ledgerList"
:key="item.deviceId"
:label="item.deviceName"
:value="item.deviceId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="维修次数" prop="repairFrequency">
<el-input v-model="form.repairFrequency" placeholder="请输入维修次数" />
@ -178,9 +225,18 @@
<el-form-item label="使用年限" prop="useLife">
<el-input v-model="form.useLife" placeholder="请输入使用年限" />
</el-form-item>
<el-form-item label="是否标识1-是2-否" prop="isFlag">
<el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />
</el-form-item>
<!-- <el-form-item label="是否标识1-是2-否" prop="isFlag">-->
<!-- <el-input v-model="form.isFlag" placeholder="请输入是否标识1-是2-否" />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="标识" prop="isFlag">-->
<!-- <el-radio-group v-model="form.isFlag">-->
<!-- <el-radio-->
<!-- v-for="dict in dict.type.is_flag"-->
<!-- :key="dict.value"-->
<!-- :label="parseInt(dict.value)"-->
<!-- >{{dict.label}}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item>
@ -195,9 +251,11 @@
<script>
import { listDevicedepreciation, getDevicedepreciation, delDevicedepreciation, addDevicedepreciation, updateDevicedepreciation } from "@/api/dms/devicedepreciation";
import { listLedger } from '@/api/dms/ledger'
export default {
name: "Devicedepreciation",
dicts: ['is_flag'],
data() {
return {
//
@ -214,10 +272,14 @@ export default {
total: 0,
//
devicedepreciationList: [],
//
ledgerList:[],
//
title: "",
//
open: false,
//
isDis:false,
//
queryParams: {
pageNum: 1,
@ -229,24 +291,43 @@ export default {
putintoTime: null,
useLife: null,
isFlag: null,
deviceName: null,
params:{
beginTime: null,
endTime: null,
},
},
//
form: {},
//
rules: {
deviceId: [
{ required: true, message: "设备ID,关联dms_base_device_ledger的device_id不能为空", trigger: "blur" }
],
isFlag: [
{ required: true, message: "是否标识1-是2-否不能为空", trigger: "blur" }
{ required: true, message: "设备ID不能为空", trigger: "blur" }
],
}
repairFrequency:[
// { type: 'number', message: "",trigger: "blur" }
{pattern:/^[1-9]\d*$/,message: "维修次数必须为数字",trigger: "blur" }
],
repairCosts:[{pattern:/^[1-9]\d*$/,message: "维修费用必须为数字",trigger: "blur" }],
depreciationCost:[{pattern:/^[1-9]\d*$/,message: "折旧费用必须为数字",trigger: "blur" }],
useLife:[{pattern:/^[1-9]\d*$/,message: "使用年限必须为",trigger: "blur" }],
},
};
},
created() {
this.getList();
this.getDeviceLedger();
},
methods: {
/** 查询设备台账信息列表 */
getDeviceLedger() {
this.loading = true;
listLedger(this.queryParams).then(response => {
this.ledgerList = response.rows;
});
},
/** 查询设备折旧信息列表 */
getList() {
this.loading = true;
@ -276,7 +357,8 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
deviceName: null,
};
this.resetForm("form");
},
@ -287,6 +369,8 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.params.beginTime = null;
this.queryParams.params.endTime = null;
this.resetForm("queryForm");
this.handleQuery();
},
@ -299,12 +383,14 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.isDis = false;
this.open = true;
this.title = "添加设备折旧信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.isDis = true;
const deviceDepreciationId = row.deviceDepreciationId || this.ids
getDevicedepreciation(deviceDepreciationId).then(response => {
this.form = response.data;

@ -35,8 +35,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://175.27.215.92:7080`,
// target: `http://localhost:7080`,
// target: `http://175.27.215.92:7080`,
target: `http://localhost:7080`,
changeOrigin: true,
pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: ''

Loading…
Cancel
Save