代码更新
This commit is contained in:
Binary file not shown.
@@ -40,6 +40,14 @@ public class DevicerepairrequestController {
|
|||||||
return new ResponseEntity<>(devicerepairrequestService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(devicerepairrequestService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/query2")
|
||||||
|
@Log("查询设备报修2")
|
||||||
|
@ApiOperation("查询设备报修2")
|
||||||
|
//@PreAuthorize("@el.check('devicerepairrequest:list')")
|
||||||
|
public ResponseEntity<Object> query2(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
return new ResponseEntity<>(devicerepairrequestService.query2(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Log("新增设备报修")
|
@Log("新增设备报修")
|
||||||
@ApiOperation("新增设备报修")
|
@ApiOperation("新增设备报修")
|
||||||
|
|||||||
@@ -26,6 +26,15 @@ public interface DevicerepairrequestService {
|
|||||||
*/
|
*/
|
||||||
Map<String, Object> queryAll(Map whereJson, Pageable page);
|
Map<String, Object> queryAll(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
*
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param page 分页参数
|
||||||
|
* @return Map<String, Object>
|
||||||
|
*/
|
||||||
|
Map<String, Object> query2(Map whereJson, Pageable page);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有数据不分页
|
* 查询所有数据不分页
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -80,4 +80,7 @@ public class DevicerepairrequestDto implements Serializable {
|
|||||||
|
|
||||||
/** 公司ID */
|
/** 公司ID */
|
||||||
private Long syscompanyid;
|
private Long syscompanyid;
|
||||||
|
|
||||||
|
/** 班组配合人 */
|
||||||
|
private String product_person_name;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,6 +289,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
// 1. 更新设备维修单主表
|
// 1. 更新设备维修单主表
|
||||||
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
||||||
jsonReMst.put("invstatus", "03");
|
jsonReMst.put("invstatus", "03");
|
||||||
|
jsonReMst.put("update_optname", whereJson.getString("update_optname"));
|
||||||
jsonReMst.put("real_start_date", DateUtil.now());
|
jsonReMst.put("real_start_date", DateUtil.now());
|
||||||
reMstTab.update(jsonReMst);
|
reMstTab.update(jsonReMst);
|
||||||
// 2.更新设备档案表
|
// 2.更新设备档案表
|
||||||
@@ -381,7 +382,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
|
|
||||||
// 1.更新维修主表
|
// 1.更新维修主表
|
||||||
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
JSONObject jsonReMst = reMstTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").uniqueResult(0);
|
||||||
jsonReMst.put("update_optname", whereJson.getString("update_optname"));
|
// jsonReMst.put("update_optname", whereJson.getString("update_optname"));
|
||||||
jsonReMst.put("product_person_name", whereJson.getString("product_person_name"));
|
jsonReMst.put("product_person_name", whereJson.getString("product_person_name"));
|
||||||
jsonReMst.put("update_time", DateUtil.now());
|
jsonReMst.put("update_time", DateUtil.now());
|
||||||
reMstTab.update(jsonReMst);
|
reMstTab.update(jsonReMst);
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ 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.security.service.dto.JwtUserDto;
|
import org.nl.modules.security.service.dto.JwtUserDto;
|
||||||
|
import org.nl.modules.system.service.DeptService;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
|
import org.nl.utils.SpringContextHolder;
|
||||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wms.sb.repair.service.DevicerepairrequestService;
|
import org.nl.wms.sb.repair.service.DevicerepairrequestService;
|
||||||
import org.nl.wms.sb.repair.service.dto.DevicerepairrequestDto;
|
import org.nl.wms.sb.repair.service.dto.DevicerepairrequestDto;
|
||||||
@@ -74,6 +76,44 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
|||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> query2(Map whereJson, Pageable page) {
|
||||||
|
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
|
||||||
|
|
||||||
|
String material_type_id = MapUtil.getStr(whereJson, "material_type_id");
|
||||||
|
String device_code = MapUtil.getStr(whereJson, "device_code");
|
||||||
|
String request_code = MapUtil.getStr(whereJson, "request_code");
|
||||||
|
String status = MapUtil.getStr(whereJson, "status");
|
||||||
|
String begin_time = MapUtil.getStr(whereJson, "begin_time");
|
||||||
|
String end_time = MapUtil.getStr(whereJson, "end_time");
|
||||||
|
String class_idStr = (String) whereJson.get("class_idStr");
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "3");
|
||||||
|
map.put("begin_time", begin_time);
|
||||||
|
map.put("end_time", end_time);
|
||||||
|
map.put("status", status);
|
||||||
|
if (ObjectUtil.isNotEmpty(device_code)) map.put("device_code","%"+device_code+"%");
|
||||||
|
if (ObjectUtil.isNotEmpty(request_code)) map.put("request_code","%"+request_code+"%");
|
||||||
|
//处理物料当前节点的所有子节点
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
// 归属部门
|
||||||
|
String dept_id = MapUtil.getStr(whereJson, "dept_id");
|
||||||
|
if (!StrUtil.isEmpty(dept_id)) {
|
||||||
|
String deptIds = deptService.getChildIdStr(Long.parseLong(dept_id));
|
||||||
|
map.put("deptIds", deptIds);
|
||||||
|
}
|
||||||
|
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIRREQUEST001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.create_time DESC");
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<DevicerepairrequestDto> queryAll(Map whereJson) {
|
public List<DevicerepairrequestDto> queryAll(Map whereJson) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairrequest");
|
WQLObject wo = WQLObject.getWQLObject("em_bi_devicerepairrequest");
|
||||||
@@ -176,7 +216,7 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
|||||||
jsonFile.put("status","20");
|
jsonFile.put("status","20");
|
||||||
fileTab.update(jsonFile);
|
fileTab.update(jsonFile);
|
||||||
|
|
||||||
// 2.更新设备保修单
|
// 2.更新设备报修单
|
||||||
JSONObject jsonRequest = requestTab.query("request_id = '" + whereJson.getString("request_id") + "'").uniqueResult(0);
|
JSONObject jsonRequest = requestTab.query("request_id = '" + whereJson.getString("request_id") + "'").uniqueResult(0);
|
||||||
jsonRequest.put("is_passed", "1");
|
jsonRequest.put("is_passed", "1");
|
||||||
jsonRequest.put("status", "02");
|
jsonRequest.put("status", "02");
|
||||||
@@ -192,6 +232,7 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
|||||||
jsonReMst.put("devicerecord_id", jsonRequest.get("devicerecord_id"));
|
jsonReMst.put("devicerecord_id", jsonRequest.get("devicerecord_id"));
|
||||||
jsonReMst.put("maintenancecycle", "02");
|
jsonReMst.put("maintenancecycle", "02");
|
||||||
jsonReMst.put("invstatus", "01");
|
jsonReMst.put("invstatus", "01");
|
||||||
|
jsonReMst.put("product_person_name", jsonRequest.getString("product_person_name"));
|
||||||
jsonReMst.put("fault_desc", jsonRequest.getString("fault_desc"));
|
jsonReMst.put("fault_desc", jsonRequest.getString("fault_desc"));
|
||||||
jsonReMst.put("fault_level", jsonRequest.getString("fault_level"));
|
jsonReMst.put("fault_level", jsonRequest.getString("fault_level"));
|
||||||
jsonReMst.put("plan_start_date", DateUtil.today());
|
jsonReMst.put("plan_start_date", DateUtil.today());
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
输入.request_code TYPEAS s_string
|
输入.request_code TYPEAS s_string
|
||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
|
输入.deptIds TYPEAS f_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -107,5 +108,61 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "3"
|
||||||
|
PAGEQUERY
|
||||||
|
SELECT
|
||||||
|
mst.*,
|
||||||
|
class.class_name,
|
||||||
|
file.device_code,
|
||||||
|
file.device_name,
|
||||||
|
file.extend_code,
|
||||||
|
class2.device_faultclass_name,
|
||||||
|
d1.name AS dept_name,
|
||||||
|
d2.name AS use_name
|
||||||
|
FROM
|
||||||
|
EM_BI_DeviceRepairRequest mst
|
||||||
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
|
LEFT JOIN md_pb_classstandard class ON file.material_type_id = class.class_id
|
||||||
|
LEFT JOIN EM_BI_DeviceFaultClass class2 ON mst.device_faultclass_id = class2.device_faultclass_id
|
||||||
|
LEFT JOIN sys_dept d1 ON file.belong_deptid = d1.dept_id
|
||||||
|
LEFT JOIN sys_dept d2 ON file.use_groupid = d2.dept_id
|
||||||
|
WHERE
|
||||||
|
mst.is_delete = '0'
|
||||||
|
AND file.is_delete = '0'
|
||||||
|
|
||||||
|
OPTION 输入.device_code <> ""
|
||||||
|
(file.device_code like 输入.device_code or
|
||||||
|
file.device_name like 输入.device_code)
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.request_code <> ""
|
||||||
|
(mst.request_code like 输入.request_code or
|
||||||
|
mst.request_code like 输入.request_code)
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.classIds <> ""
|
||||||
|
class.class_id in 输入.classIds
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.deptIds <> ""
|
||||||
|
d1.dept_id in 输入.deptIds
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.status <> ""
|
||||||
|
mst.status = 输入.status
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.begin_time <> ""
|
||||||
|
mst.create_time >= 输入.begin_time
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.end_time <> ""
|
||||||
|
mst.create_time <= 输入.end_time
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
|
ENDSELECT
|
||||||
|
ENDPAGEQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,12 +8,13 @@
|
|||||||
destroy-on-close
|
destroy-on-close
|
||||||
@close="close"
|
@close="close"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20">
|
<el-row>
|
||||||
<el-col :span="20" style="border: 1px solid white">
|
<el-col :span="18" style="border: 1px solid white">
|
||||||
<span />
|
<span />
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<el-col :span="6">
|
||||||
<span>
|
<span>
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="endRepair">结束维修</el-button>
|
||||||
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitMain">保存</el-button>
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitMain">保存</el-button>
|
||||||
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||||
</span>
|
</span>
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="生产配合人" prop="product_person_name">
|
<el-form-item label="班组配合人" prop="product_person_name">
|
||||||
<el-input v-model="form.product_person_name" style="width: 200px;"/>
|
<el-input v-model="form.product_person_name" style="width: 200px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
@@ -169,14 +170,19 @@ export default {
|
|||||||
},
|
},
|
||||||
submitMain() {
|
submitMain() {
|
||||||
const data = this.form
|
const data = this.form
|
||||||
if (this.form.update_optname === '') {
|
|
||||||
return this.crud.notify('维修人不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
crudDevicerepairmst.submitRepair(data).then(res => {
|
crudDevicerepairmst.submitRepair(data).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.dialogVisible = false
|
this.dialogVisible = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
endRepair() {
|
||||||
|
const data = this.form
|
||||||
|
crudDevicerepairmst.endRepair(data).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.dialogVisible = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
111
mes/qd/src/views/wms/sb/repair/devicerepairpa/StartDialog.vue
Normal file
111
mes/qd/src/views/wms/sb/repair/devicerepairpa/StartDialog.vue
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="开始维修"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
:before-close="handleClose"
|
||||||
|
width="550px"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
>
|
||||||
|
<el-form ref="form" :inline="true" :model="form4" size="mini" label-width="120px" label-suffix=":">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="维修人" prop="update_optname">
|
||||||
|
<el-input v-model="form4.update_optname" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<span slot="footer" class="dialog-footer">
|
||||||
|
<el-button icon="el-icon-check" size="mini" type="primary" @click="submitResuft">保存</el-button>
|
||||||
|
<el-button icon="el-icon-close" size="mini" type="info" @click="close">关闭</el-button>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud } from '@crud/crud'
|
||||||
|
import crudDevicerepairmst from '@/api/wms/sb/devicerepairmst'
|
||||||
|
export default {
|
||||||
|
name: 'StartDialog',
|
||||||
|
mixins: [crud()],
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
this.form4 = this.openParam
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form4: {
|
||||||
|
},
|
||||||
|
dialogVisible: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
submitResuft() {
|
||||||
|
if (!this.form4.update_optname) {
|
||||||
|
return this.crud.notify('维修人不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
const data = this.form4
|
||||||
|
crudDevicerepairmst.startRepair(data).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
this.dialogVisible = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.crud-opts2 {
|
||||||
|
padding: 0;
|
||||||
|
display: -webkit-flex;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .el-dialog__title2 {
|
||||||
|
line-height: 24px;
|
||||||
|
font-size:20px;
|
||||||
|
color:#303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.crud-opts2 .role-span {
|
||||||
|
padding: 10px 0px 10px 0px;
|
||||||
|
}
|
||||||
|
.crud-opts2 .crud-opts-form {
|
||||||
|
padding: 10px 0px 0px 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-with-select {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
>
|
>
|
||||||
开始维修
|
开始维修
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<!-- <el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -99,6 +99,17 @@
|
|||||||
@click="executeRepair"
|
@click="executeRepair"
|
||||||
>
|
>
|
||||||
维修执行
|
维修执行
|
||||||
|
</el-button>-->
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-position"
|
||||||
|
size="mini"
|
||||||
|
:disabled="open_flag"
|
||||||
|
@click="openReceive"
|
||||||
|
>
|
||||||
|
维修领用
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
@@ -111,17 +122,6 @@
|
|||||||
>
|
>
|
||||||
结束维修
|
结束维修
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
|
||||||
slot="right"
|
|
||||||
class="filter-item"
|
|
||||||
type="success"
|
|
||||||
icon="el-icon-position"
|
|
||||||
size="mini"
|
|
||||||
:disabled="open_flag"
|
|
||||||
@click="openReceive"
|
|
||||||
>
|
|
||||||
维修领用
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
:disabled="confirm_flag"
|
:disabled="confirm_flag"
|
||||||
@click="confirmRepair"
|
@click="confirmRepair"
|
||||||
>
|
>
|
||||||
维修确认
|
班组验收
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
@@ -179,6 +179,7 @@
|
|||||||
<ExecuteDialog :dialog-show.sync="executeDialog" :open-param="openParam" />
|
<ExecuteDialog :dialog-show.sync="executeDialog" :open-param="openParam" />
|
||||||
<resuftDialog :dialog-show.sync="resuftDialog" :open-param="openParam" />
|
<resuftDialog :dialog-show.sync="resuftDialog" :open-param="openParam" />
|
||||||
<ReceiveDialog :dialog-show.sync="receiveDialog" :open-param="openParam" />
|
<ReceiveDialog :dialog-show.sync="receiveDialog" :open-param="openParam" />
|
||||||
|
<StartDialog :dialog-show.sync="startDialog" :open-param="openParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -197,11 +198,12 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
|||||||
import ExecuteDialog from '@/views/wms/sb/repair/devicerepairpa/ExecuteDialog'
|
import ExecuteDialog from '@/views/wms/sb/repair/devicerepairpa/ExecuteDialog'
|
||||||
import resuftDialog from '@/views/wms/sb/repair/devicerepairpa/resuftDialog'
|
import resuftDialog from '@/views/wms/sb/repair/devicerepairpa/resuftDialog'
|
||||||
import ReceiveDialog from '@/views/wms/sb/repair/devicerepairpa/ReceiveDialog'
|
import ReceiveDialog from '@/views/wms/sb/repair/devicerepairpa/ReceiveDialog'
|
||||||
|
import StartDialog from '@/views/wms/sb/repair/devicerepairpa/StartDialog'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Devicerepairpa',
|
name: 'Devicerepairpa',
|
||||||
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
|
dicts: ['EM_DEVICE_WX_INVTYPE', 'EM_DEVICE_WX_INVSTATUS', 'EM_FAULT_LEVEL'],
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, ExecuteDialog, resuftDialog, ReceiveDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, ExecuteDialog, resuftDialog, ReceiveDialog, StartDialog },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -234,6 +236,7 @@ export default {
|
|||||||
executeDialog: false,
|
executeDialog: false,
|
||||||
resuftDialog: false,
|
resuftDialog: false,
|
||||||
receiveDialog: false,
|
receiveDialog: false,
|
||||||
|
startDialog: false,
|
||||||
permission: {
|
permission: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -300,18 +303,19 @@ export default {
|
|||||||
if (data.invstatus !== '02') {
|
if (data.invstatus !== '02') {
|
||||||
return this.crud.notify('只能对提交状态的单据维修', CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('只能对提交状态的单据维修', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
}
|
}
|
||||||
crudDevicerepairmst.startRepair(data).then(res => {
|
this.openParam = data
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.startDialog = true
|
||||||
this.crud.toQuery()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
endRepair() {
|
endRepair() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
const data = _selectData[0]
|
||||||
if (data.invstatus === '03' || data.invstatus === '05') {
|
if (data.invstatus === '03' || data.invstatus === '05') {
|
||||||
crudDevicerepairmst.endRepair(data).then(res => {
|
crudDevicerepairmst.getDtl(data).then(res => {
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
this.openParam = {
|
||||||
this.crud.toQuery()
|
'form': data,
|
||||||
|
'tableData': res
|
||||||
|
}
|
||||||
|
this.executeDialog = true
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return this.crud.notify('只能对开始或者委外验收的单据结束维修', CRUD.NOTIFICATION_TYPE.INFO)
|
return this.crud.notify('只能对开始或者委外验收的单据结束维修', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
|||||||
@@ -20,6 +20,15 @@
|
|||||||
placeholder="请选择"
|
placeholder="请选择"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="所属部门">
|
||||||
|
<treeselect
|
||||||
|
v-model="query.dept_id"
|
||||||
|
:load-options="loadDepts"
|
||||||
|
:options="depts"
|
||||||
|
style="width: 200px;"
|
||||||
|
placeholder="请选择"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="设备">
|
<el-form-item label="设备">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="query.device_code"
|
v-model="query.device_code"
|
||||||
@@ -95,6 +104,11 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
|
<el-col span="12">
|
||||||
|
<el-form-item label="班组配合人:" prop="product_person_name">
|
||||||
|
<el-input v-model="form.product_person_name" style="width: 200px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col span="12">
|
<el-col span="12">
|
||||||
<el-form-item label="故障等级:" prop="fault_level">
|
<el-form-item label="故障等级:" prop="fault_level">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -141,6 +155,9 @@
|
|||||||
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
<el-table-column prop="device_code" label="设备编码" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
<el-table-column prop="device_name" label="设备名称" show-overflow-tooltip />
|
||||||
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
<el-table-column prop="extend_code" label="设备自编码" width="90px" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="dept_name" label="所属部门" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="use_name" label="使用班组" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="product_person_name" label="班组配合人" width="90px" show-overflow-tooltip />
|
||||||
<el-table-column prop="device_faultclass_name" label="故障分类" />
|
<el-table-column prop="device_faultclass_name" label="故障分类" />
|
||||||
<el-table-column prop="fault_level" label="故障等级" :formatter="formaLevelName" />
|
<el-table-column prop="fault_level" label="故障等级" :formatter="formaLevelName" />
|
||||||
<el-table-column prop="status" label="状态" :formatter="formatStatusName"/>
|
<el-table-column prop="status" label="状态" :formatter="formatStatusName"/>
|
||||||
@@ -187,8 +204,9 @@ import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
|||||||
import PicDialog from '@/views/wms/sb/repair/devicerepairrequest/PicDialog'
|
import PicDialog from '@/views/wms/sb/repair/devicerepairrequest/PicDialog'
|
||||||
import DeviceDialog from '@/views/wms/sb/upkeep/devicemaintenanceplan/DeviceDialog'
|
import DeviceDialog from '@/views/wms/sb/upkeep/devicemaintenanceplan/DeviceDialog'
|
||||||
import FaultDialog from '@/views/wms/sb/repair/devicevprs/FaultDialog'
|
import FaultDialog from '@/views/wms/sb/repair/devicevprs/FaultDialog'
|
||||||
|
import { getDepts } from '@/api/system/dept'
|
||||||
|
|
||||||
const defaultForm = { device_faultclass_name: null, device_code: null, request_id: null, request_code: null, devicerecord_id: null, fault_time: null, device_faultclass_id: null, fault_desc: null, fault_level: null, remark: null, status: null, create_id: null, create_name: null, create_time: null, is_passed: null, process_id: null, process_name: null, process_time: null, finish_id: null, finish_name: null, finish_time: null, is_delete: null, sysdeptid: null, syscompanyid: null }
|
const defaultForm = { product_person_name: null, device_faultclass_name: null, device_code: null, request_id: null, request_code: null, devicerecord_id: null, fault_time: null, device_faultclass_id: null, fault_desc: null, fault_level: null, remark: null, status: null, create_id: null, create_name: null, create_time: null, is_passed: null, process_id: null, process_name: null, process_time: null, finish_id: null, finish_name: null, finish_time: null, is_delete: null, sysdeptid: null, syscompanyid: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Devicevprs',
|
name: 'Devicevprs',
|
||||||
dicts: ['EM_FAULT_LEVEL'],
|
dicts: ['EM_FAULT_LEVEL'],
|
||||||
@@ -197,7 +215,7 @@ export default {
|
|||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
title: '设备报修',
|
title: '设备报修',
|
||||||
url: 'api/devicerepairrequest',
|
url: 'api/devicerepairrequest/query2',
|
||||||
idField: 'request_id',
|
idField: 'request_id',
|
||||||
sort: 'request_id,desc',
|
sort: 'request_id,desc',
|
||||||
crudMethod: { ...crudDevicerepairrequest },
|
crudMethod: { ...crudDevicerepairrequest },
|
||||||
@@ -216,6 +234,7 @@ export default {
|
|||||||
faultDialog: false,
|
faultDialog: false,
|
||||||
classes: [],
|
classes: [],
|
||||||
class_idStr: null,
|
class_idStr: null,
|
||||||
|
depts: [],
|
||||||
materOpt_code: '23',
|
materOpt_code: '23',
|
||||||
statusList: [
|
statusList: [
|
||||||
{ 'label': '生成', 'value': '01' },
|
{ 'label': '生成', 'value': '01' },
|
||||||
@@ -234,6 +253,9 @@ export default {
|
|||||||
],
|
],
|
||||||
fault_level: [
|
fault_level: [
|
||||||
{ required: true, message: '故障等级不能为空', trigger: 'blur' }
|
{ required: true, message: '故障等级不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
product_person_name: [
|
||||||
|
{ required: true, message: '班组配合人不能为空', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,6 +270,7 @@ export default {
|
|||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
this.queryClassId()
|
this.queryClassId()
|
||||||
})
|
})
|
||||||
|
this.getDepts()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
@@ -350,6 +373,32 @@ export default {
|
|||||||
tableChanged(row) {
|
tableChanged(row) {
|
||||||
this.form.device_faultclass_id = row.device_faultclass_id
|
this.form.device_faultclass_id = row.device_faultclass_id
|
||||||
this.form.device_faultclass_name = row.device_faultclass_name
|
this.form.device_faultclass_name = row.device_faultclass_name
|
||||||
|
},
|
||||||
|
// 获取弹窗内部门数据
|
||||||
|
loadDepts({ action, parentNode, callback }) {
|
||||||
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
|
getDepts({ enabled: true, pid: parentNode.id }).then(res => {
|
||||||
|
parentNode.children = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
callback()
|
||||||
|
}, 200)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getDepts() {
|
||||||
|
getDepts({ enabled: true }).then(res => {
|
||||||
|
this.depts = res.content.map(function(obj) {
|
||||||
|
if (obj.hasChildren) {
|
||||||
|
obj.children = null
|
||||||
|
}
|
||||||
|
return obj
|
||||||
|
})
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
:disabled="crud.selections.length !== 1"
|
:disabled="crud.selections.length !== 1"
|
||||||
@click="createExcel"
|
@click="createExcel"
|
||||||
>
|
>
|
||||||
生成设备保养
|
生成保养单
|
||||||
</el-button>
|
</el-button>
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
|
|||||||
Reference in New Issue
Block a user