代码更新
This commit is contained in:
@@ -3,12 +3,14 @@ package org.nl.wms.basedata.em.service.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.wms.basedata.em.service.DevicemaintenanceitemsService;
|
import org.nl.wms.basedata.em.service.DevicemaintenanceitemsService;
|
||||||
import org.nl.wms.basedata.em.service.dto.DevicemaintenanceitemsDto;
|
import org.nl.wms.basedata.em.service.dto.DevicemaintenanceitemsDto;
|
||||||
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -40,8 +42,13 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class DevicemaintenanceitemsServiceImpl implements DevicemaintenanceitemsService {
|
public class DevicemaintenanceitemsServiceImpl implements DevicemaintenanceitemsService {
|
||||||
|
|
||||||
|
private final ClassstandardService classstandardService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
|
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||||
|
String class_idStr = (String) whereJson.get("class_idStr");
|
||||||
|
|
||||||
String maint_item_code = MapUtil.getStr(whereJson, "maint_item_code");
|
String maint_item_code = MapUtil.getStr(whereJson, "maint_item_code");
|
||||||
String contents = MapUtil.getStr(whereJson, "contents");
|
String contents = MapUtil.getStr(whereJson, "contents");
|
||||||
String requirement = MapUtil.getStr(whereJson, "requirement");
|
String requirement = MapUtil.getStr(whereJson, "requirement");
|
||||||
@@ -54,6 +61,15 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
|
|||||||
if (ObjectUtil.isNotEmpty(contents)) map.put("contents","%"+contents+"%");
|
if (ObjectUtil.isNotEmpty(contents)) map.put("contents","%"+contents+"%");
|
||||||
if (ObjectUtil.isNotEmpty(requirement)) map.put("requirement","%"+requirement+"%");
|
if (ObjectUtil.isNotEmpty(requirement)) map.put("requirement","%"+requirement+"%");
|
||||||
|
|
||||||
|
//处理物料当前节点的所有子节点
|
||||||
|
if (!StrUtil.isEmpty(material_type_id)) {
|
||||||
|
map.put("material_type_id", material_type_id);
|
||||||
|
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||||
|
map.put("classIds", classIds);
|
||||||
|
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||||
|
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||||
|
map.put("classIds", classIds);
|
||||||
|
}
|
||||||
JSONObject json = WQL.getWO("QEM_BI_DEVICEMAINTAIN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time DESC");
|
JSONObject json = WQL.getWO("QEM_BI_DEVICEMAINTAIN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time DESC");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -97,6 +113,7 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
|
|||||||
json.put("maint_item_id", IdUtil.getSnowflake(1,1).nextId());
|
json.put("maint_item_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("maint_item_code", CodeUtil.getNewCode("MAINT_ITEM_CODE"));
|
json.put("maint_item_code", CodeUtil.getNewCode("MAINT_ITEM_CODE"));
|
||||||
json.put("maint_item_name", whereJson.getString("maint_item_name"));
|
json.put("maint_item_name", whereJson.getString("maint_item_name"));
|
||||||
|
json.put("material_type_id", whereJson.get("material_type_id"));
|
||||||
json.put("item_level", whereJson.getString("item_level"));
|
json.put("item_level", whereJson.getString("item_level"));
|
||||||
json.put("contents", whereJson.getString("contents"));
|
json.put("contents", whereJson.getString("contents"));
|
||||||
json.put("requirement", whereJson.getString("requirement"));
|
json.put("requirement", whereJson.getString("requirement"));
|
||||||
@@ -121,6 +138,7 @@ public class DevicemaintenanceitemsServiceImpl implements Devicemaintenanceitems
|
|||||||
JSONObject json = wo.query("maint_item_id = '" + whereJson.getString("maint_item_id") + "'").uniqueResult(0);
|
JSONObject json = wo.query("maint_item_id = '" + whereJson.getString("maint_item_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
json.put("maint_item_name", whereJson.getString("maint_item_name"));
|
json.put("maint_item_name", whereJson.getString("maint_item_name"));
|
||||||
|
json.put("material_type_id", whereJson.get("material_type_id"));
|
||||||
json.put("item_level", whereJson.getString("item_level"));
|
json.put("item_level", whereJson.getString("item_level"));
|
||||||
json.put("contents", whereJson.getString("contents"));
|
json.put("contents", whereJson.getString("contents"));
|
||||||
json.put("requirement", whereJson.getString("requirement"));
|
json.put("requirement", whereJson.getString("requirement"));
|
||||||
|
|||||||
@@ -3,12 +3,14 @@ package org.nl.wms.basedata.em.service.impl;
|
|||||||
|
|
||||||
|
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
import org.nl.wms.basedata.em.service.DevicerepairitemsService;
|
import org.nl.wms.basedata.em.service.DevicerepairitemsService;
|
||||||
import org.nl.wms.basedata.em.service.dto.DevicerepairitemsDto;
|
import org.nl.wms.basedata.em.service.dto.DevicerepairitemsDto;
|
||||||
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -39,9 +41,12 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
|
public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
|
||||||
|
private final ClassstandardService classstandardService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
public Map<String, Object> queryAll(Map whereJson, Pageable page) {
|
||||||
|
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||||
|
String class_idStr = (String) whereJson.get("class_idStr");
|
||||||
String repair_item_code = MapUtil.getStr(whereJson, "repair_item_code");
|
String repair_item_code = MapUtil.getStr(whereJson, "repair_item_code");
|
||||||
String requirement = MapUtil.getStr(whereJson, "requirement");
|
String requirement = MapUtil.getStr(whereJson, "requirement");
|
||||||
|
|
||||||
@@ -50,6 +55,16 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
|
|||||||
if (ObjectUtil.isNotEmpty(repair_item_code)) map.put("repair_item_code","%"+repair_item_code+"%");
|
if (ObjectUtil.isNotEmpty(repair_item_code)) map.put("repair_item_code","%"+repair_item_code+"%");
|
||||||
if (ObjectUtil.isNotEmpty(requirement)) map.put("requirement","%"+requirement+"%");
|
if (ObjectUtil.isNotEmpty(requirement)) map.put("requirement","%"+requirement+"%");
|
||||||
|
|
||||||
|
//处理物料当前节点的所有子节点
|
||||||
|
if (!StrUtil.isEmpty(material_type_id)) {
|
||||||
|
map.put("material_type_id", material_type_id);
|
||||||
|
String classIds = classstandardService.getChildIdStr(material_type_id);
|
||||||
|
map.put("classIds", classIds);
|
||||||
|
} else if (ObjectUtil.isNotEmpty(class_idStr)) {
|
||||||
|
String classIds = classstandardService.getAllChildIdStr(class_idStr);
|
||||||
|
map.put("classIds", classIds);
|
||||||
|
}
|
||||||
|
|
||||||
JSONObject json = WQL.getWO("QEM_BI_DEVICEREPAIRITEMS01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time DESC");
|
JSONObject json = WQL.getWO("QEM_BI_DEVICEREPAIRITEMS01").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "update_time DESC");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
@@ -93,6 +108,7 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
|
|||||||
json.put("repair_item_id", IdUtil.getSnowflake(1,1).nextId());
|
json.put("repair_item_id", IdUtil.getSnowflake(1,1).nextId());
|
||||||
json.put("repair_item_code", CodeUtil.getNewCode("REPAIR_ITEM_CODE"));
|
json.put("repair_item_code", CodeUtil.getNewCode("REPAIR_ITEM_CODE"));
|
||||||
json.put("repair_item_name", whereJson.getString("repair_item_name"));
|
json.put("repair_item_name", whereJson.getString("repair_item_name"));
|
||||||
|
json.put("material_type_id", whereJson.get("material_type_id"));
|
||||||
json.put("requirement", whereJson.getString("requirement"));
|
json.put("requirement", whereJson.getString("requirement"));
|
||||||
json.put("remark", whereJson.getString("remark"));
|
json.put("remark", whereJson.getString("remark"));
|
||||||
json.put("create_id",currentUserId );
|
json.put("create_id",currentUserId );
|
||||||
@@ -117,6 +133,7 @@ public class DevicerepairitemsServiceImpl implements DevicerepairitemsService {
|
|||||||
JSONObject json = wo.query("repair_item_id = '" + whereJson.getString("repair_item_id") + "'").uniqueResult(0);
|
JSONObject json = wo.query("repair_item_id = '" + whereJson.getString("repair_item_id") + "'").uniqueResult(0);
|
||||||
|
|
||||||
json.put("repair_item_name", whereJson.getString("repair_item_name"));
|
json.put("repair_item_name", whereJson.getString("repair_item_name"));
|
||||||
|
json.put("material_type_id", whereJson.get("material_type_id"));
|
||||||
json.put("requirement", whereJson.getString("requirement"));
|
json.put("requirement", whereJson.getString("requirement"));
|
||||||
json.put("remark", whereJson.getString("remark"));
|
json.put("remark", whereJson.getString("remark"));
|
||||||
json.put("update_optid",currentUserId );
|
json.put("update_optid",currentUserId );
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
输入.contents TYPEAS s_string
|
输入.contents TYPEAS s_string
|
||||||
输入.requirement TYPEAS s_string
|
输入.requirement TYPEAS s_string
|
||||||
输入.item_level TYPEAS s_string
|
输入.item_level TYPEAS s_string
|
||||||
|
输入.classIds TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -45,27 +46,33 @@
|
|||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
*
|
item.*,
|
||||||
|
class.class_name
|
||||||
FROM
|
FROM
|
||||||
EM_BI_DeviceMaintenanceItems
|
EM_BI_DeviceMaintenanceItems item
|
||||||
|
LEFT JOIN md_pb_classstandard class ON item.material_type_id = class.class_id
|
||||||
WHERE
|
WHERE
|
||||||
is_delete = '0'
|
item.is_delete = '0'
|
||||||
|
|
||||||
OPTION 输入.item_level <> ""
|
OPTION 输入.item_level <> ""
|
||||||
item_level = 输入.item_level
|
item.item_level = 输入.item_level
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.maint_item_code <> ""
|
OPTION 输入.maint_item_code <> ""
|
||||||
(maint_item_code like 输入.maint_item_code or
|
(item.maint_item_code like 输入.maint_item_code or
|
||||||
maint_item_name like 输入.maint_item_code)
|
item.maint_item_name like 输入.maint_item_code)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.contents <> ""
|
OPTION 输入.contents <> ""
|
||||||
contents like 输入.contents
|
item.contents like 输入.contents
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.requirement <> ""
|
OPTION 输入.requirement <> ""
|
||||||
requirement like 输入.requirement
|
item.requirement like 输入.requirement
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.classIds <> ""
|
||||||
|
class.class_id in 输入.classIds
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
输入.flag TYPEAS s_string
|
输入.flag TYPEAS s_string
|
||||||
输入.repair_item_code TYPEAS s_string
|
输入.repair_item_code TYPEAS s_string
|
||||||
输入.requirement TYPEAS s_string
|
输入.requirement TYPEAS s_string
|
||||||
|
输入.classIds TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -43,19 +44,25 @@
|
|||||||
IF 输入.flag = "1"
|
IF 输入.flag = "1"
|
||||||
PAGEQUERY
|
PAGEQUERY
|
||||||
SELECT
|
SELECT
|
||||||
*
|
item.*,
|
||||||
|
class.class_name
|
||||||
FROM
|
FROM
|
||||||
EM_BI_DeviceRepairItems
|
EM_BI_DeviceRepairItems item
|
||||||
|
LEFT JOIN md_pb_classstandard class ON item.material_type_id = class.class_id
|
||||||
WHERE
|
WHERE
|
||||||
is_delete = '0'
|
item.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.classIds <> ""
|
||||||
|
class.class_id in 输入.classIds
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.requirement <> ""
|
OPTION 输入.requirement <> ""
|
||||||
requirement like 输入.requirement
|
item.requirement like 输入.requirement
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
OPTION 输入.repair_item_code <> ""
|
OPTION 输入.repair_item_code <> ""
|
||||||
(repair_item_code like 输入.repair_item_code or
|
(item.repair_item_code like 输入.repair_item_code or
|
||||||
repair_item_name like 输入.repair_item_code)
|
item.repair_item_name like 输入.repair_item_code)
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
|
|||||||
Binary file not shown.
@@ -11,6 +11,15 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
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-form-item label="保养项目">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.maint_item_code"
|
v-model="query.maint_item_code"
|
||||||
@@ -89,6 +98,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col span="24">
|
||||||
|
<el-form-item label="设备类别:" prop="material_type_id">
|
||||||
|
<treeselect
|
||||||
|
v-model="form.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 230px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col span="24">
|
<el-col span="24">
|
||||||
<el-form-item label="保养内容:" prop="contents">
|
<el-form-item label="保养内容:" prop="contents">
|
||||||
@@ -124,6 +147,7 @@
|
|||||||
<el-table-column v-if="false" prop="maint_item_id" label="设备保养项目标识" />
|
<el-table-column v-if="false" prop="maint_item_id" label="设备保养项目标识" />
|
||||||
<el-table-column prop="maint_item_code" label="保养项目编码" />
|
<el-table-column prop="maint_item_code" label="保养项目编码" />
|
||||||
<el-table-column prop="maint_item_name" label="保养项目名称" />
|
<el-table-column prop="maint_item_name" label="保养项目名称" />
|
||||||
|
<el-table-column prop="class_name" label="设备类别" />
|
||||||
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
||||||
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
||||||
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
||||||
@@ -153,11 +177,15 @@ import rrOperation from '@crud/RR.operation'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
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'
|
||||||
|
|
||||||
const defaultForm = { maint_item_id: null, maint_item_code: null, maint_item_name: null, item_level: null, contents: null, requirement: null, acceptancecriteria: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
const defaultForm = { material_type_id: null, maint_item_id: null, maint_item_code: null, maint_item_name: null, item_level: null, contents: null, requirement: null, acceptancecriteria: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Devicemaintenanceitems',
|
name: 'Devicemaintenanceitems',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -176,6 +204,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
itemLevelList: [
|
itemLevelList: [
|
||||||
{ 'label': '日常', 'value': '01' },
|
{ 'label': '日常', 'value': '01' },
|
||||||
{ 'label': '一级', 'value': '02' },
|
{ 'label': '一级', 'value': '02' },
|
||||||
@@ -198,9 +229,23 @@ export default {
|
|||||||
],
|
],
|
||||||
acceptancecriteria: [
|
acceptancecriteria: [
|
||||||
{ required: true, message: '验收标准不能为空', trigger: 'blur' }
|
{ required: true, message: '验收标准不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
material_type_id: [
|
||||||
|
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
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: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
@@ -217,6 +262,34 @@ export default {
|
|||||||
} else if (row.item_level === '03') {
|
} else if (row.item_level === '03') {
|
||||||
return '二级'
|
return '二级'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,15 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
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-form-item label="维修项目">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.repair_item_code"
|
v-model="query.repair_item_code"
|
||||||
@@ -50,6 +59,20 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
|
<el-row>
|
||||||
|
<el-col span="24">
|
||||||
|
<el-form-item label="设备类别:" prop="material_type_id">
|
||||||
|
<treeselect
|
||||||
|
v-model="form.material_type_id"
|
||||||
|
:load-options="loadClass"
|
||||||
|
:options="classes"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col span="24">
|
<el-col span="24">
|
||||||
<el-form-item label="维修要求:" prop="requirement">
|
<el-form-item label="维修要求:" prop="requirement">
|
||||||
@@ -77,6 +100,7 @@
|
|||||||
<el-table-column v-if="false" prop="repair_item_id" label="设备维修项目标识" />
|
<el-table-column v-if="false" prop="repair_item_id" label="设备维修项目标识" />
|
||||||
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
||||||
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
||||||
|
<el-table-column prop="class_name" label="设备类别" />
|
||||||
<el-table-column prop="requirement" label="维修要求" show-overflow-tooltip />
|
<el-table-column prop="requirement" label="维修要求" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip />
|
||||||
<el-table-column prop="create_name" label="创建人姓名" />
|
<el-table-column prop="create_name" label="创建人姓名" />
|
||||||
@@ -103,11 +127,15 @@ import rrOperation from '@crud/RR.operation'
|
|||||||
import crudOperation from '@crud/CRUD.operation'
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
import udOperation from '@crud/UD.operation'
|
import udOperation from '@crud/UD.operation'
|
||||||
import pagination from '@crud/Pagination'
|
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'
|
||||||
|
|
||||||
const defaultForm = { repair_item_id: null, repair_item_code: null, repair_item_name: null, requirement: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
const defaultForm = { material_type_id: null, repair_item_id: null, repair_item_code: null, repair_item_name: null, requirement: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_delete: null, remark: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Devicerepairitems',
|
name: 'Devicerepairitems',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -126,6 +154,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
permission: {
|
permission: {
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
@@ -134,13 +165,55 @@ export default {
|
|||||||
],
|
],
|
||||||
requirement: [
|
requirement: [
|
||||||
{ required: true, message: '维修要求不能为空', trigger: 'blur' }
|
{ required: true, message: '维修要求不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
material_type_id: [
|
||||||
|
{ required: true, message: '设备类别不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}}
|
}}
|
||||||
},
|
},
|
||||||
|
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: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
[CRUD.HOOK.beforeRefresh]() {
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
return true
|
return true
|
||||||
|
},
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
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-form-item label="维修项目">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.repair_item_code"
|
v-model="query.repair_item_code"
|
||||||
@@ -53,6 +62,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
<el-table-column prop="repair_item_code" label="维修项目编码" />
|
||||||
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
<el-table-column prop="repair_item_name" label="维修项目名称" />
|
||||||
|
<el-table-column prop="class_name" label="设备类别" />
|
||||||
<el-table-column prop="requirement" label="要求" show-overflow-tooltip />
|
<el-table-column prop="requirement" label="要求" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column prop="create_name" label="创建人姓名" />
|
<el-table-column prop="create_name" label="创建人姓名" />
|
||||||
@@ -73,10 +83,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudDevicerepairitems from '@/api/wms/basedata/em/devicerepairitems'
|
import crudDevicerepairitems from '@/api/wms/basedata/em/devicerepairitems'
|
||||||
|
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'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Item',
|
name: 'Item',
|
||||||
components: { rrOperation, pagination },
|
components: { rrOperation, pagination, Treeselect },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '维修项目',
|
title: '维修项目',
|
||||||
@@ -96,6 +110,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
checkrow: null,
|
checkrow: null,
|
||||||
@@ -109,6 +126,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
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: {
|
methods: {
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
this.tableRadio = item
|
this.tableRadio = item
|
||||||
@@ -148,6 +176,34 @@ export default {
|
|||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.$emit('tableChanged1', this.rows)
|
this.$emit('tableChanged1', this.rows)
|
||||||
|
},
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,10 +48,11 @@
|
|||||||
|
|
||||||
<el-table-column prop="device_code" label="设备编码" min-width="130" show-overflow-tooltip />
|
<el-table-column prop="device_code" label="设备编码" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_name" label="设备名称" min-width="130" show-overflow-tooltip />
|
<el-table-column prop="device_name" label="设备名称" min-width="130" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||||
<el-table-column prop="class_name" label="设备类型" show-overflow-tooltip />
|
<el-table-column prop="class_name" label="设备类型" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_spec" label="规格" min-width="130" show-overflow-tooltip />
|
<el-table-column prop="device_spec" label="规格" min-width="130" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_model" label="型号" />
|
<el-table-column prop="device_model" label="型号" show-overflow-tooltip />
|
||||||
<el-table-column prop="supplier_name" label="供应商" />
|
<el-table-column prop="supplier_name" label="供应商" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_type" label="设备属性" :formatter="formatTypeName"/>
|
<el-table-column prop="device_type" label="设备属性" :formatter="formatTypeName"/>
|
||||||
<el-table-column prop="workprocedure_name" label="工序" />
|
<el-table-column prop="workprocedure_name" label="工序" />
|
||||||
<el-table-column prop="is_produceuse" label="生产用途" show-overflow-tooltip />
|
<el-table-column prop="is_produceuse" label="生产用途" show-overflow-tooltip />
|
||||||
|
|||||||
@@ -14,6 +14,15 @@
|
|||||||
label-width="80px"
|
label-width="80px"
|
||||||
label-suffix=":"
|
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-form-item label="保养项目">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.maint_item_code"
|
v-model="query.maint_item_code"
|
||||||
@@ -70,14 +79,15 @@
|
|||||||
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
<el-radio v-model="tableRadio" :label="scope.row"><i /></el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="maint_item_code" label="保养项目编码" />
|
<el-table-column prop="maint_item_code" label="保养项目编码" width="100px" />
|
||||||
<el-table-column prop="maint_item_name" label="保养项目名称" />
|
<el-table-column prop="maint_item_name" label="保养项目名称" width="100px" />
|
||||||
|
<el-table-column prop="class_name" label="设备类别" />
|
||||||
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
<el-table-column prop="item_level" label="保养等级" :formatter="formatLevel"/>
|
||||||
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
<el-table-column prop="contents" label="保养内容" show-overflow-tooltip />
|
||||||
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
<el-table-column prop="requirement" label="保养要求" show-overflow-tooltip />
|
||||||
<el-table-column prop="acceptancecriteria" label="验收标准" show-overflow-tooltip />
|
<el-table-column prop="acceptancecriteria" label="验收标准" show-overflow-tooltip />
|
||||||
<el-table-column prop="remark" label="备注" />
|
<el-table-column prop="remark" label="备注" />
|
||||||
<el-table-column prop="create_name" label="创建人姓名" />
|
<el-table-column prop="create_name" label="创建人" />
|
||||||
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
<el-table-column prop="create_time" label="创建时间" width="150px"/>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
@@ -95,10 +105,14 @@ import CRUD, { header, presenter } from '@crud/crud'
|
|||||||
import rrOperation from '@crud/RR.operation'
|
import rrOperation from '@crud/RR.operation'
|
||||||
import pagination from '@crud/Pagination'
|
import pagination from '@crud/Pagination'
|
||||||
import crudDevicemaintenanceitems from '@/api/wms/basedata/em/devicemaintenanceitems'
|
import crudDevicemaintenanceitems from '@/api/wms/basedata/em/devicemaintenanceitems'
|
||||||
|
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'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Item',
|
name: 'Item',
|
||||||
components: { rrOperation, pagination },
|
components: { rrOperation, pagination, Treeselect },
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '保养项目',
|
title: '保养项目',
|
||||||
@@ -118,6 +132,9 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
classes: [],
|
||||||
|
class_idStr: null,
|
||||||
|
materOpt_code: '23',
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
tableRadio: null,
|
tableRadio: null,
|
||||||
checkrow: null,
|
checkrow: null,
|
||||||
@@ -137,6 +154,17 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
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: {
|
methods: {
|
||||||
clickChange(item) {
|
clickChange(item) {
|
||||||
this.tableRadio = item
|
this.tableRadio = item
|
||||||
@@ -185,6 +213,34 @@ export default {
|
|||||||
this.crud.resetQuery(false)
|
this.crud.resetQuery(false)
|
||||||
this.$emit('update:dialogShow', false)
|
this.$emit('update:dialogShow', false)
|
||||||
this.$emit('tableChanged1', this.rows)
|
this.$emit('tableChanged1', this.rows)
|
||||||
|
},
|
||||||
|
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
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user