add:设备管理,人员单据
This commit is contained in:
@@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.device_manage.lubricate.service.DevicelubricatemstService;
|
import org.nl.wms.device_manage.lubricate.service.DevicelubricatemstService;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -33,6 +34,13 @@ public class DevicelubricatemstController {
|
|||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(devicelubricatemstService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(devicelubricatemstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/byuser")
|
||||||
|
@ApiOperation("润滑单维护查询")
|
||||||
|
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
whereJson.put("invstatus", "03");
|
||||||
|
return new ResponseEntity<>(devicelubricatemstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
@ApiOperation("润滑单审核查询")
|
@ApiOperation("润滑单审核查询")
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public class DevicelubricatemstServiceImpl implements DevicelubricatemstService
|
|||||||
map.put("invstatus", invstatus);
|
map.put("invstatus", invstatus);
|
||||||
map.put("begin_time", begin_time);
|
map.put("begin_time", begin_time);
|
||||||
map.put("end_time", end_time);
|
map.put("end_time", end_time);
|
||||||
|
map.put("update_optname", MapUtil.getStr(whereJson, "update_optname"));
|
||||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||||
//处理物料当前节点的所有子节点
|
//处理物料当前节点的所有子节点
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
输入.maint_code TYPEAS s_string
|
输入.maint_code TYPEAS s_string
|
||||||
输入.invstatus TYPEAS s_string
|
输入.invstatus TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
|
输入.update_optname TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
输入.maint_object TYPEAS s_string
|
输入.maint_object TYPEAS s_string
|
||||||
输入.deptIds TYPEAS f_string
|
输入.deptIds TYPEAS f_string
|
||||||
@@ -87,6 +88,10 @@
|
|||||||
mst.maintenancecycle = 输入.maintenancecycle
|
mst.maintenancecycle = 输入.maintenancecycle
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.update_optname <> ""
|
||||||
|
mst.update_optname = 输入.update_optname
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.plan_start_date >= 输入.begin_time
|
mst.plan_start_date >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import lombok.RequiredArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.common.anno.Log;
|
import org.nl.common.anno.Log;
|
||||||
import org.nl.common.utils.RedissonUtils;
|
import org.nl.common.utils.RedissonUtils;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.device_manage.repair.service.DevicerepairmstService;
|
import org.nl.wms.device_manage.repair.service.DevicerepairmstService;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -38,6 +39,13 @@ public class DevicerepairmstController {
|
|||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(devicerepairmstService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(devicerepairmstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/byuser")
|
||||||
|
@ApiOperation("查询维修单维护")
|
||||||
|
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
whereJson.put("invstatus", "03");
|
||||||
|
return new ResponseEntity<>(devicerepairmstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
@ApiOperation("查询维修单维护2")
|
@ApiOperation("查询维修单维护2")
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
map.put("invstatus",invstatus);
|
map.put("invstatus",invstatus);
|
||||||
map.put("begin_time",begin_time);
|
map.put("begin_time",begin_time);
|
||||||
map.put("end_time",end_time);
|
map.put("end_time",end_time);
|
||||||
|
map.put("update_optname",MapUtil.getStr(whereJson, "update_optname"));
|
||||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||||
if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%");
|
if (ObjectUtil.isNotEmpty(repair_code)) map.put("repair_code","%"+repair_code+"%");
|
||||||
//处理物料当前节点的所有子节点
|
//处理物料当前节点的所有子节点
|
||||||
@@ -428,13 +429,11 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
private void createIos(JSONObject whereJson) {
|
private void createIos(JSONObject whereJson) {
|
||||||
JSONObject mst = whereJson.getJSONObject("form2");
|
JSONObject mst = whereJson.getJSONObject("form2");
|
||||||
JSONArray tableDataDtl = mst.getJSONArray("tableDataDtl");
|
JSONArray tableDataDtl = mst.getJSONArray("tableDataDtl");
|
||||||
|
|
||||||
// 准备参数
|
// 准备参数
|
||||||
mst.put("biz_date", DateUtil.now());
|
mst.put("biz_date", DateUtil.now());
|
||||||
mst.put("tableData", tableDataDtl);
|
mst.put("tableData", tableDataDtl);
|
||||||
mst.put("source_id", whereJson.getString("repair_code"));
|
mst.put("source_id", whereJson.getString("repair_code"));
|
||||||
mst.put("remark", "由维修单创建");
|
mst.put("remark", "由维修单创建");
|
||||||
|
|
||||||
emBiIostorinvOutService.create(mst);
|
emBiIostorinvOutService.create(mst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
输入.device_bom_id TYPEAS s_string
|
输入.device_bom_id TYPEAS s_string
|
||||||
|
输入.update_optname TYPEAS s_string
|
||||||
输入.material_id TYPEAS s_string
|
输入.material_id TYPEAS s_string
|
||||||
输入.sparepart_only_id TYPEAS s_string
|
输入.sparepart_only_id TYPEAS s_string
|
||||||
输入.material_code TYPEAS s_string
|
输入.material_code TYPEAS s_string
|
||||||
@@ -95,6 +96,10 @@
|
|||||||
mst.maintenancecycle = 输入.maintenancecycle
|
mst.maintenancecycle = 输入.maintenancecycle
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.update_optname <> ""
|
||||||
|
mst.update_optname = 输入.update_optname
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.plan_start_date >= 输入.begin_time
|
mst.plan_start_date >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.device_manage.sportcheck.service.DevicesportcheckmstService;
|
import org.nl.wms.device_manage.sportcheck.service.DevicesportcheckmstService;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -34,6 +35,14 @@ public class DevicesportcheckmstController {
|
|||||||
return new ResponseEntity<>(devicesportcheckmstService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(devicesportcheckmstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/byuser")
|
||||||
|
@ApiOperation("查询人员点检单")
|
||||||
|
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
whereJson.put("invstatus", "03");
|
||||||
|
return new ResponseEntity<>(devicesportcheckmstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
@ApiOperation("点检单审核查询")
|
@ApiOperation("点检单审核查询")
|
||||||
public ResponseEntity<Object> query2(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query2(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ public class DevicesportcheckmstServiceImpl implements DevicesportcheckmstServic
|
|||||||
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
String invstatus = MapUtil.getStr(whereJson, "invstatus");
|
||||||
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||||
String end_time = MapUtil.getStr(whereJson, "end_time");
|
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||||
|
String update_optname = MapUtil.getStr(whereJson, "update_optname");
|
||||||
|
|
||||||
HashMap<String, String> map = new HashMap<>();
|
HashMap<String, String> map = new HashMap<>();
|
||||||
map.put("flag", "1");
|
map.put("flag", "1");
|
||||||
@@ -61,6 +62,7 @@ public class DevicesportcheckmstServiceImpl implements DevicesportcheckmstServic
|
|||||||
map.put("invstatus", invstatus);
|
map.put("invstatus", invstatus);
|
||||||
map.put("begin_time", begin_time);
|
map.put("begin_time", begin_time);
|
||||||
map.put("end_time", end_time);
|
map.put("end_time", end_time);
|
||||||
|
map.put("update_optname", update_optname);
|
||||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||||
//处理物料当前节点的所有子节点
|
//处理物料当前节点的所有子节点
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
输入.maintenancecycle TYPEAS s_string
|
输入.maintenancecycle TYPEAS s_string
|
||||||
输入.maint_id TYPEAS s_string
|
输入.maint_id TYPEAS s_string
|
||||||
输入.maint_code TYPEAS s_string
|
输入.maint_code TYPEAS s_string
|
||||||
|
输入.update_optname TYPEAS s_string
|
||||||
输入.invstatus TYPEAS s_string
|
输入.invstatus TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
@@ -87,6 +88,10 @@
|
|||||||
mst.maintenancecycle = 输入.maintenancecycle
|
mst.maintenancecycle = 输入.maintenancecycle
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.update_optname <> ""
|
||||||
|
mst.update_optname = 输入.update_optname
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.plan_start_date >= 输入.begin_time
|
mst.plan_start_date >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
|
|||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
import org.nl.wms.device_manage.upkeep.service.DevicemaintenancemstService;
|
import org.nl.wms.device_manage.upkeep.service.DevicemaintenancemstService;
|
||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
@@ -34,6 +35,13 @@ public class DevicemaintenancemstController {
|
|||||||
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, Pageable page) {
|
||||||
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
@GetMapping("/byuser")
|
||||||
|
@ApiOperation("保养单维护查询")
|
||||||
|
public ResponseEntity<Object> querybyuser(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
whereJson.put("update_optname", SecurityUtils.getCurrentNickName());
|
||||||
|
whereJson.put("invstatus", "03");
|
||||||
|
return new ResponseEntity<>(devicemaintenancemstService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/query")
|
@GetMapping("/query")
|
||||||
@ApiOperation("保养单审核查询")
|
@ApiOperation("保养单审核查询")
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ public class DevicemaintenancemstServiceImpl implements DevicemaintenancemstServ
|
|||||||
map.put("invstatus", invstatus);
|
map.put("invstatus", invstatus);
|
||||||
map.put("begin_time", begin_time);
|
map.put("begin_time", begin_time);
|
||||||
map.put("end_time", end_time);
|
map.put("end_time", end_time);
|
||||||
|
map.put("update_optname", MapUtil.getStr(whereJson, "update_optname"));
|
||||||
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code", "%" + device_code + "%");
|
||||||
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
if (ObjectUtil.isNotEmpty(maint_code)) map.put("maint_code", "%" + maint_code + "%");
|
||||||
//处理物料当前节点的所有子节点
|
//处理物料当前节点的所有子节点
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
输入.maintenancecycle TYPEAS s_string
|
输入.maintenancecycle TYPEAS s_string
|
||||||
输入.maint_id TYPEAS s_string
|
输入.maint_id TYPEAS s_string
|
||||||
输入.maint_code TYPEAS s_string
|
输入.maint_code TYPEAS s_string
|
||||||
|
输入.update_optname TYPEAS s_string
|
||||||
输入.invstatus TYPEAS s_string
|
输入.invstatus TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
@@ -87,6 +88,11 @@
|
|||||||
mst.maintenancecycle = 输入.maintenancecycle
|
mst.maintenancecycle = 输入.maintenancecycle
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
|
||||||
|
OPTION 输入.update_optname <> ""
|
||||||
|
mst.update_optname = 输入.update_optname
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.begin_time <> ""
|
OPTION 输入.begin_time <> ""
|
||||||
mst.plan_start_date >= 输入.begin_time
|
mst.plan_start_date >= 输入.begin_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -575,6 +575,7 @@ public class StIvtIostorinvCpOutServiceImpl extends ServiceImpl<StIvtIostorinvCp
|
|||||||
.eq(SchBasePoint::getIs_used, IOSEnum.IS_USED.code("是"))
|
.eq(SchBasePoint::getIs_used, IOSEnum.IS_USED.code("是"))
|
||||||
.eq(SchBasePoint::getRegion_code, PDAEnum.REGION_CODE.code("发货区域"))
|
.eq(SchBasePoint::getRegion_code, PDAEnum.REGION_CODE.code("发货区域"))
|
||||||
.eq(SchBasePoint::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
.eq(SchBasePoint::getLock_type, IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||||
|
.orderByDesc(SchBasePoint::getPriority)
|
||||||
.orderByAsc(SchBasePoint::getPoint_code)
|
.orderByAsc(SchBasePoint::getPoint_code)
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,334 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="110px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="设备类别">
|
||||||
|
<treeselect
|
||||||
|
v-model="query.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入设备编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="润滑类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.maintenancecycle"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.EM_DEVICE_RH_INVTYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.maint_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入单据编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" min-width="35" />
|
||||||
|
<el-table-column prop="maint_code" label="润滑单号" min-width="130" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.maint_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="device_code" label="设备编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="dept_name" label="归属部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="use_name" label="使用部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatInvsName" min-width="90" />
|
||||||
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" min-width="90" />
|
||||||
|
<el-table-column prop="plan_start_date" label="计划润滑日期" min-width="125" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="input_optname" label="创建人" min-width="90" />
|
||||||
|
<el-table-column prop="input_time" label="创建时间" min-width="140" />
|
||||||
|
<el-table-column prop="update_optname" label="润滑人" min-width="90" />
|
||||||
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
|
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
||||||
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
|
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||||
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
|
<el-table-column prop="source_bill_code" label="源单号" min-width="150px" />
|
||||||
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<AddDialog />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevicelubricatemst from '@/views/wms/device_manage/lubricate/devicelubricate/devicelubricatemst'
|
||||||
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
import AddDialog from '@/views/wms/device_manage/lubricate/devicelubricate/AddDialog'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Devicelubricate',
|
||||||
|
dicts: ['EM_DEVICE_RH_INVSTATUS', 'EM_DEVICE_RH_INVTYPE'],
|
||||||
|
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '润滑单维护',
|
||||||
|
url: 'api/devicelubricatemst/byuser',
|
||||||
|
idField: 'maint_id',
|
||||||
|
sort: 'maint_id,desc',
|
||||||
|
crudMethod: { ...crudDevicelubricatemst },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
|
permission: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const param = {
|
||||||
|
'materOpt_code': this.materOpt_code
|
||||||
|
}
|
||||||
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
|
this.class_idStr = res.class_idStr
|
||||||
|
this.crud.query.class_idStr = this.class_idStr
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.queryClassId()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
formatMainObject(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_MAINT_OBJECT[row.maint_object]
|
||||||
|
},
|
||||||
|
formatInvsName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_RH_INVSTATUS[row.invstatus]
|
||||||
|
},
|
||||||
|
formatMainName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_RH_INVTYPE[row.maintenancecycle]
|
||||||
|
},
|
||||||
|
putIn() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const data = _selectData[0]
|
||||||
|
if (data.invstatus !== '01') {
|
||||||
|
return this.crud.notify('只能对生成状态的单据提交', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
crudDevicelubricatemst.putIn(data).then(res => {
|
||||||
|
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadClass({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryClassId() {
|
||||||
|
const param = {
|
||||||
|
'class_idStr': this.class_idStr
|
||||||
|
}
|
||||||
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
|
this.classes = res.content.map(obj => {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep {
|
||||||
|
|
||||||
|
.vue-treeselect__menu {
|
||||||
|
|
||||||
|
overflow-x: auto !important;
|
||||||
|
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
max-height: 300px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__label {
|
||||||
|
|
||||||
|
overflow: unset;
|
||||||
|
|
||||||
|
text-overflow: unset;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__control {
|
||||||
|
|
||||||
|
height: 20px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-item-container,
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__limit-tip,
|
||||||
|
|
||||||
|
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
||||||
|
|
||||||
|
.vue-treeselect__input-container {
|
||||||
|
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
// margin-bottom: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__placeholder,
|
||||||
|
|
||||||
|
.vue-treeselect__single-value {
|
||||||
|
|
||||||
|
height: 28px;
|
||||||
|
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
font-size: small;
|
||||||
|
|
||||||
|
color: "#CCCFD6";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__input {
|
||||||
|
|
||||||
|
height: 18px !important;
|
||||||
|
|
||||||
|
line-height: 18px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect div,
|
||||||
|
|
||||||
|
.vue-treeselect span {
|
||||||
|
|
||||||
|
box-sizing: content-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中后的溢出隐藏
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-label {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__value-container {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -171,6 +171,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.query.material_type_id = this.openParam.material_type_id
|
this.query.material_type_id = this.openParam.material_type_id
|
||||||
|
const data = {}
|
||||||
|
data.id = this.openParam.material_type_id
|
||||||
|
data.parent_id = '2'
|
||||||
|
this.getSubTypes(data)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
@@ -236,6 +240,12 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': '2'
|
'class_idStr': '2'
|
||||||
|
|||||||
@@ -0,0 +1,332 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="110px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="设备类别">
|
||||||
|
<treeselect
|
||||||
|
v-model="query.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入设备编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据号">
|
||||||
|
<el-input
|
||||||
|
v-model="query.repair_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="维修类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.maintenancecycle"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.EM_DEVICE_WX_INVTYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="计划维修日期">
|
||||||
|
<date-range-picker v-model="query.createTime" class="date-item" />
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" min-width="35" />
|
||||||
|
<el-table-column prop="repair_code" label="维修单号" min-width="140px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.repair_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="device_code" label="设备编码" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="dept_name" label="归属部门" min-width="130" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="use_name" label="使用部门" min-width="130" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatStatusName" min-width="90" />
|
||||||
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatTypeName" min-width="90" />
|
||||||
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formatLevelName" min-width="90" />
|
||||||
|
<el-table-column prop="plan_start_date" label="计划维修日期" min-width="120" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="fault_desc" label="故障描述" min-width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="remark" label="备注" min-width="200" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="input_optname" label="制单人" min-width="120px" />
|
||||||
|
<el-table-column prop="input_time" label="制单时间" min-width="140" />
|
||||||
|
<el-table-column prop="update_optname" label="维修人" min-width="120px" />
|
||||||
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
|
<el-table-column prop="confirm_optname" label="确认人" min-width="120px" />
|
||||||
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
|
<el-table-column prop="audit_optname" label="审核人" min-width="120px" />
|
||||||
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
|
<el-table-column prop="source_bill_code" label="源单号" min-width="150px" />
|
||||||
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<AddDialog />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevicerepairmst from '@/views/wms/device_manage/repair/devicerepair/devicerepairmst'
|
||||||
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
|
import AddDialog from '@/views/wms/device_manage/repair/devicerepair/AddDialog'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Devicerepair',
|
||||||
|
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
|
||||||
|
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect },
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '维修单维护',
|
||||||
|
url: 'api/devicerepairmst/byuser',
|
||||||
|
idField: 'repair_id',
|
||||||
|
sort: 'repair_id,desc',
|
||||||
|
crudMethod: { ...crudDevicerepairmst },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
|
permission: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const param = {
|
||||||
|
'materOpt_code': this.materOpt_code
|
||||||
|
}
|
||||||
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
|
this.class_idStr = res.class_idStr
|
||||||
|
this.crud.query.class_idStr = this.class_idStr
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.queryClassId()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
loadClass({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryClassId() {
|
||||||
|
const param = {
|
||||||
|
'class_idStr': this.class_idStr
|
||||||
|
}
|
||||||
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
|
this.classes = res.content.map(obj => {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatStatusName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_WX_INVSTATUS[row.invstatus]
|
||||||
|
},
|
||||||
|
formatTypeName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_WX_INVTYPE[row.maintenancecycle]
|
||||||
|
},
|
||||||
|
formatLevelName(row, cloum) {
|
||||||
|
return this.dict.label.EM_FAULT_LEVEL[row.fault_level]
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const data = _selectData[0]
|
||||||
|
if (data.invstatus !== '01') {
|
||||||
|
return this.crud.notify('只能对生成状态的单据提交', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
if (data.update_optname === '') {
|
||||||
|
return this.crud.notify('维修人不允许为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
crudDevicerepairmst.submit(data).then(res => {
|
||||||
|
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep {
|
||||||
|
|
||||||
|
.vue-treeselect__menu {
|
||||||
|
|
||||||
|
overflow-x: auto !important;
|
||||||
|
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
max-height: 300px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__label {
|
||||||
|
|
||||||
|
overflow: unset;
|
||||||
|
|
||||||
|
text-overflow: unset;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__control {
|
||||||
|
|
||||||
|
height: 20px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-item-container,
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__limit-tip,
|
||||||
|
|
||||||
|
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
||||||
|
|
||||||
|
.vue-treeselect__input-container {
|
||||||
|
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
// margin-bottom: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__placeholder,
|
||||||
|
|
||||||
|
.vue-treeselect__single-value {
|
||||||
|
|
||||||
|
height: 28px;
|
||||||
|
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
font-size: small;
|
||||||
|
|
||||||
|
color: "#CCCFD6";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__input {
|
||||||
|
|
||||||
|
height: 18px !important;
|
||||||
|
|
||||||
|
line-height: 18px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect div,
|
||||||
|
|
||||||
|
.vue-treeselect span {
|
||||||
|
|
||||||
|
box-sizing: content-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中后的溢出隐藏
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-label {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__value-container {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -137,13 +137,15 @@ export default {
|
|||||||
crudMaterialbase.getMaterOptType(param).then(res => {
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
this.class_idStr = res.class_idStr
|
this.class_idStr = res.class_idStr
|
||||||
this.crud.query.class_idStr = this.class_idStr
|
this.crud.query.class_idStr = this.class_idStr
|
||||||
this.queryClassId()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.query.material_type_id = this.openParam.material_type_id
|
this.query.material_type_id = this.openParam.material_type_id
|
||||||
this.crud.toQuery()
|
const data = {}
|
||||||
|
data.id = this.openParam.material_type_id
|
||||||
|
data.parent_id = '2'
|
||||||
|
this.getSubTypes(data)
|
||||||
},
|
},
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
this.tableRadio = item
|
this.tableRadio = item
|
||||||
@@ -199,6 +201,12 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': '2'
|
'class_idStr': '2'
|
||||||
|
|||||||
@@ -0,0 +1,334 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="110px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="设备类别">
|
||||||
|
<treeselect
|
||||||
|
v-model="query.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入设备编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="点检类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.maintenancecycle"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.EM_DEVICE_DJ_INVTYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.maint_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入单据编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" min-width="35" />
|
||||||
|
<el-table-column prop="maint_code" label="点检单号" min-width="130" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.maint_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="device_code" label="设备编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="dept_name" label="归属部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="use_name" label="使用部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatInvsName" min-width="90" />
|
||||||
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" min-width="90" />
|
||||||
|
<el-table-column prop="plan_start_date" label="计划点检日期" min-width="125" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="input_optname" label="创建人" min-width="90" />
|
||||||
|
<el-table-column prop="input_time" label="创建时间" min-width="140" />
|
||||||
|
<el-table-column prop="update_optname" label="点检人" min-width="90" />
|
||||||
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
|
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
||||||
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
|
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||||
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
|
<el-table-column prop="source_bill_code" label="源单号" min-width="150px" />
|
||||||
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<AddDialog />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevicesportcheckmst from '@/views/wms/device_manage/sportcheck/devicesportcheck/devicesportcheckmst'
|
||||||
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
import AddDialog from '@/views/wms/device_manage/sportcheck/devicesportcheck/AddDialog'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Devicesportcheck',
|
||||||
|
dicts: ['EM_DEVICE_DJ_INVSTATUS', 'EM_DEVICE_DJ_INVTYPE', 'EM_DEVICE_MAINT_OBJECT'],
|
||||||
|
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '点检单维护',
|
||||||
|
url: 'api/devicesportcheckmst/byuser',
|
||||||
|
idField: 'maint_id',
|
||||||
|
sort: 'maint_id,desc',
|
||||||
|
crudMethod: { ...crudDevicesportcheckmst },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
|
permission: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const param = {
|
||||||
|
'materOpt_code': this.materOpt_code
|
||||||
|
}
|
||||||
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
|
this.class_idStr = res.class_idStr
|
||||||
|
this.crud.query.class_idStr = this.class_idStr
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.queryClassId()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
formatMainObject(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_MAINT_OBJECT[row.maint_object]
|
||||||
|
},
|
||||||
|
formatInvsName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_DJ_INVSTATUS[row.invstatus]
|
||||||
|
},
|
||||||
|
formatMainName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_DJ_INVTYPE[row.maintenancecycle]
|
||||||
|
},
|
||||||
|
putIn() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const data = _selectData[0]
|
||||||
|
if (data.invstatus !== '01') {
|
||||||
|
return this.crud.notify('只能对生成状态的单据提交', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
crudDevicesportcheckmst.putIn(data).then(res => {
|
||||||
|
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadClass({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryClassId() {
|
||||||
|
const param = {
|
||||||
|
'class_idStr': this.class_idStr
|
||||||
|
}
|
||||||
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
|
this.classes = res.content.map(obj => {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep {
|
||||||
|
|
||||||
|
.vue-treeselect__menu {
|
||||||
|
|
||||||
|
overflow-x: auto !important;
|
||||||
|
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
max-height: 300px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__label {
|
||||||
|
|
||||||
|
overflow: unset;
|
||||||
|
|
||||||
|
text-overflow: unset;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__control {
|
||||||
|
|
||||||
|
height: 20px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-item-container,
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__limit-tip,
|
||||||
|
|
||||||
|
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
||||||
|
|
||||||
|
.vue-treeselect__input-container {
|
||||||
|
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
// margin-bottom: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__placeholder,
|
||||||
|
|
||||||
|
.vue-treeselect__single-value {
|
||||||
|
|
||||||
|
height: 28px;
|
||||||
|
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
font-size: small;
|
||||||
|
|
||||||
|
color: "#CCCFD6";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__input {
|
||||||
|
|
||||||
|
height: 18px !important;
|
||||||
|
|
||||||
|
line-height: 18px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect div,
|
||||||
|
|
||||||
|
.vue-treeselect span {
|
||||||
|
|
||||||
|
box-sizing: content-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中后的溢出隐藏
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-label {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__value-container {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -171,6 +171,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.query.material_type_id = this.openParam.material_type_id
|
this.query.material_type_id = this.openParam.material_type_id
|
||||||
|
const data = {}
|
||||||
|
data.id = this.openParam.material_type_id
|
||||||
|
data.parent_id = '2'
|
||||||
|
this.getSubTypes(data)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
@@ -236,6 +240,12 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': '2'
|
'class_idStr': '2'
|
||||||
|
|||||||
@@ -0,0 +1,336 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<div v-if="crud.props.searchToggle">
|
||||||
|
<!-- 搜索 -->
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="110px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="设备类别">
|
||||||
|
<treeselect
|
||||||
|
v-model="query.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备">
|
||||||
|
<el-input
|
||||||
|
v-model="query.device_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入设备编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="保养类型">
|
||||||
|
<el-select
|
||||||
|
v-model="query.maintenancecycle"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请选择"
|
||||||
|
class="filter-item"
|
||||||
|
@change="hand"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in dict.EM_DEVICE_BY_INVTYPE"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="单据编码">
|
||||||
|
<el-input
|
||||||
|
v-model="query.maint_code"
|
||||||
|
clearable
|
||||||
|
size="mini"
|
||||||
|
placeholder="请输入单据编码、名称"
|
||||||
|
@keyup.enter.native="crud.toQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="query.createTime"
|
||||||
|
type="daterange"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
@change="hand"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<rrOperation />
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" min-width="35" />
|
||||||
|
<el-table-column prop="maint_code" label="保养单号" min-width="130" show-overflow-tooltip>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="crud.toView(scope.row)">{{ scope.row.maint_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="device_code" label="设备编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="device_name" label="设备名称" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="extend_code" label="设备自编码" min-width="100" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="dept_name" label="归属部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="use_name" label="使用部门" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="invstatus" label="单据状态" :formatter="formatInvsName" min-width="90" />
|
||||||
|
<el-table-column prop="maintenancecycle" label="单据类型" :formatter="formatMainName" min-width="90" />
|
||||||
|
<el-table-column prop="plan_start_date" label="计划保养日期" min-width="125" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="input_optname" label="创建人" min-width="90" />
|
||||||
|
<el-table-column prop="input_time" label="创建时间" min-width="140" />
|
||||||
|
<el-table-column prop="update_optname" label="保养人" min-width="90" />
|
||||||
|
<el-table-column prop="real_start_date" label="开始时间" min-width="140" />
|
||||||
|
<el-table-column prop="real_end_date" label="结束时间" min-width="140" />
|
||||||
|
<el-table-column prop="confirm_optname" label="确认人" min-width="90" />
|
||||||
|
<el-table-column prop="confirm_time" label="确认时间" min-width="140" />
|
||||||
|
<el-table-column prop="audit_optname" label="审核人" min-width="90" />
|
||||||
|
<el-table-column prop="audit_time" label="审核时间" min-width="140" />
|
||||||
|
<el-table-column prop="source_bill_code" label="源单号" min-width="150px" />
|
||||||
|
<el-table-column prop="source_bill_type" label="源单业务类型" min-width="120" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
<AddDialog />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudDevicemaintenancemst from '@/views/wms/device_manage/upkeep/devicemaintenance/devicemaintenancemst'
|
||||||
|
import CRUD, { presenter, header, crud } from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
import crudClassstandard from '@/api/wms/basedata/master/classstandard'
|
||||||
|
import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
||||||
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
import AddDialog from '@/views/wms/device_manage/upkeep/devicemaintenance/AddDialog'
|
||||||
|
import {download} from "@/api/data";
|
||||||
|
import {downloadFile} from "@/utils";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Devicemaintenance',
|
||||||
|
dicts: ['EM_DEVICE_BY_INVSTATUS', 'EM_DEVICE_BY_INVTYPE', 'EM_DEVICE_MAINT_OBJECT'],
|
||||||
|
components: { AddDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '保养单维护',
|
||||||
|
url: 'api/devicemaintenancemst/byuser',
|
||||||
|
idField: 'maint_id',
|
||||||
|
sort: 'maint_id,desc',
|
||||||
|
crudMethod: { ...crudDevicemaintenancemst },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
|
permission: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
const param = {
|
||||||
|
'materOpt_code': this.materOpt_code
|
||||||
|
}
|
||||||
|
crudMaterialbase.getMaterOptType(param).then(res => {
|
||||||
|
this.class_idStr = res.class_idStr
|
||||||
|
this.crud.query.class_idStr = this.class_idStr
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.queryClassId()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
hand(value) {
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
formatMainObject(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_MAINT_OBJECT[row.maint_object]
|
||||||
|
},
|
||||||
|
formatInvsName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_BY_INVSTATUS[row.invstatus]
|
||||||
|
},
|
||||||
|
formatMainName(row, cloum) {
|
||||||
|
return this.dict.label.EM_DEVICE_BY_INVTYPE[row.maintenancecycle]
|
||||||
|
},
|
||||||
|
putIn() {
|
||||||
|
const _selectData = this.$refs.table.selection
|
||||||
|
const data = _selectData[0]
|
||||||
|
if (data.invstatus !== '01') {
|
||||||
|
return this.crud.notify('只能对生成状态的单据提交', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
crudDevicemaintenancemst.putIn(data).then(res => {
|
||||||
|
this.crud.notify('提交成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
loadClass({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 100)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
queryClassId() {
|
||||||
|
const param = {
|
||||||
|
'class_idStr': this.class_idStr
|
||||||
|
}
|
||||||
|
crudClassstandard.queryClassById(param).then(res => {
|
||||||
|
this.classes = res.content.map(obj => {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss" scoped>
|
||||||
|
::v-deep {
|
||||||
|
|
||||||
|
.vue-treeselect__menu {
|
||||||
|
|
||||||
|
overflow-x: auto !important;
|
||||||
|
|
||||||
|
width: 300px;
|
||||||
|
|
||||||
|
max-height: 300px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__label {
|
||||||
|
|
||||||
|
overflow: unset;
|
||||||
|
|
||||||
|
text-overflow: unset;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__control {
|
||||||
|
|
||||||
|
height: 20px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-item-container,
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
line-height: 24px;
|
||||||
|
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__limit-tip,
|
||||||
|
|
||||||
|
.vue-treeselect--searchable.vue-treeselect--multi.vue-treeselect--has-value
|
||||||
|
|
||||||
|
.vue-treeselect__input-container {
|
||||||
|
|
||||||
|
padding-top: 0;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__multi-value {
|
||||||
|
|
||||||
|
// margin-bottom: 15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__placeholder,
|
||||||
|
|
||||||
|
.vue-treeselect__single-value {
|
||||||
|
|
||||||
|
height: 28px;
|
||||||
|
|
||||||
|
line-height: 32px;
|
||||||
|
|
||||||
|
font-size: small;
|
||||||
|
|
||||||
|
color: "#CCCFD6";
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect--has-value .vue-treeselect__input {
|
||||||
|
|
||||||
|
height: 18px !important;
|
||||||
|
|
||||||
|
line-height: 18px !important;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect div,
|
||||||
|
|
||||||
|
.vue-treeselect span {
|
||||||
|
|
||||||
|
box-sizing: content-box;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 选中后的溢出隐藏
|
||||||
|
|
||||||
|
.vue-treeselect__multi-value-label {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
width: 140px;
|
||||||
|
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
white-space: nowrap;
|
||||||
|
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.vue-treeselect__value-container {
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
height: 32px;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -171,6 +171,10 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.query.material_type_id = this.openParam.material_type_id
|
this.query.material_type_id = this.openParam.material_type_id
|
||||||
|
const data = {}
|
||||||
|
data.id = this.openParam.material_type_id
|
||||||
|
data.parent_id = '2'
|
||||||
|
this.getSubTypes(data)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
@@ -236,6 +240,12 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getSubTypes(id) {
|
||||||
|
crudClassstandard.getClassSuperior2(id).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.classes = date
|
||||||
|
})
|
||||||
|
},
|
||||||
queryClassId() {
|
queryClassId() {
|
||||||
const param = {
|
const param = {
|
||||||
'class_idStr': '2'
|
'class_idStr': '2'
|
||||||
|
|||||||
Reference in New Issue
Block a user