代码更新
This commit is contained in:
Binary file not shown.
@@ -69,4 +69,11 @@ public class DeviceBigScreenController {
|
|||||||
public ResponseEntity<Object> getDeviceGroupStatus(){
|
public ResponseEntity<Object> getDeviceGroupStatus(){
|
||||||
return new ResponseEntity<>(deviceBigScreenService.getDeviceGroupStatus(),HttpStatus.OK);
|
return new ResponseEntity<>(deviceBigScreenService.getDeviceGroupStatus(),HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/getTodayTask")
|
||||||
|
@Log("当日任务列表")
|
||||||
|
@ApiOperation("当日任务列表")
|
||||||
|
public ResponseEntity<Object> getTodayTask(){
|
||||||
|
return new ResponseEntity<>(deviceBigScreenService.getTodayTask(),HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,4 +45,10 @@ public interface DeviceBigScreenService {
|
|||||||
* @return JSONObject
|
* @return JSONObject
|
||||||
*/
|
*/
|
||||||
JSONObject getDeviceGroupStatus();
|
JSONObject getDeviceGroupStatus();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当日任务列表
|
||||||
|
* @return JSONObject
|
||||||
|
*/
|
||||||
|
JSONObject getTodayTask();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import org.nl.wql.core.bean.WQLObject;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@@ -476,4 +477,22 @@ public class DeviceBigScreenServiceImpl implements DeviceBigScreenService {
|
|||||||
resultJson.put("desc", "查询成功");
|
resultJson.put("desc", "查询成功");
|
||||||
return resultJson;
|
return resultJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject getTodayTask() {
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
JSONObject resultData = new JSONObject();
|
||||||
|
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "4");
|
||||||
|
|
||||||
|
JSONArray resultJSONArray = WQL.getWO("TASK_AUTOWEBSOCKETTSK").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
resultData.put("device_group_arr", resultJSONArray);
|
||||||
|
|
||||||
|
resultJson.put("srb", resultData);
|
||||||
|
resultJson.put("code", "1");
|
||||||
|
resultJson.put("desc", "查询成功");
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
package org.nl.wms.sb.repair.service.impl;
|
package org.nl.wms.sb.repair.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateTime;
|
||||||
|
import cn.hutool.core.date.DateUnit;
|
||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
|
import cn.hutool.core.util.NumberUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.ExcelWriter;
|
import com.alibaba.excel.ExcelWriter;
|
||||||
@@ -370,7 +373,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
|
|
||||||
// 1.判断维修单明细中是否完成 都为是,不是则报错
|
// 1.判断维修单明细中是否完成 都为是,不是则报错
|
||||||
JSONArray reDtlArr = reDtlTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").getResultJSONArray(0);
|
JSONArray reDtlArr = reDtlTab.query("repair_id = '" + whereJson.getString("repair_id") + "'").getResultJSONArray(0);
|
||||||
if (ObjectUtil.isEmpty(reDtlArr)) throw new BadRequestException("明细为空");
|
if (ObjectUtil.isEmpty(reDtlArr)) throw new BadRequestException("明细不能为空");
|
||||||
for (int i = 0; i < reDtlArr.size(); i++) {
|
for (int i = 0; i < reDtlArr.size(); i++) {
|
||||||
JSONObject json = reDtlArr.getJSONObject(i);
|
JSONObject json = reDtlArr.getJSONObject(i);
|
||||||
if (!StrUtil.equals(json.getString("isfinish"), "1")) {
|
if (!StrUtil.equals(json.getString("isfinish"), "1")) {
|
||||||
@@ -735,6 +738,7 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
jsonSpareBom.put("qty", json.get("qty"));
|
jsonSpareBom.put("qty", json.get("qty"));
|
||||||
jsonSpareBom.put("qty_unit_id", json.get("qty_unit_id"));
|
jsonSpareBom.put("qty_unit_id", json.get("qty_unit_id"));
|
||||||
jsonSpareBom.put("qty_unit_name", json.getString("qty_unit_name"));
|
jsonSpareBom.put("qty_unit_name", json.getString("qty_unit_name"));
|
||||||
|
jsonSpareBom.put("current_change", DateUtil.now());
|
||||||
spareBOMTab.insert(jsonSpareBom);
|
spareBOMTab.insert(jsonSpareBom);
|
||||||
} else {
|
} else {
|
||||||
JSONObject jsonSpareBom = spareBOMTab.query("sparepart_only_id = '" + old_sparepart_only_id + "'").uniqueResult(0);
|
JSONObject jsonSpareBom = spareBOMTab.query("sparepart_only_id = '" + old_sparepart_only_id + "'").uniqueResult(0);
|
||||||
@@ -744,6 +748,23 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
jsonSpareBom.put("qty", json.get("qty"));
|
jsonSpareBom.put("qty", json.get("qty"));
|
||||||
jsonSpareBom.put("qty_unit_id", json.get("qty_unit_id"));
|
jsonSpareBom.put("qty_unit_id", json.get("qty_unit_id"));
|
||||||
jsonSpareBom.put("qty_unit_name", json.getString("qty_unit_name"));
|
jsonSpareBom.put("qty_unit_name", json.getString("qty_unit_name"));
|
||||||
|
jsonSpareBom.put("last_change", jsonSpareBom.getString("current_change"));
|
||||||
|
jsonSpareBom.put("current_change", DateUtil.now());
|
||||||
|
// 间隔时间:本次更新时间 - 上次更新时间(天)
|
||||||
|
String last_change = jsonSpareBom.getString("last_change");
|
||||||
|
String current_change = jsonSpareBom.getString("current_change");
|
||||||
|
if (ObjectUtil.isNotEmpty(last_change) && ObjectUtil.isNotEmpty(current_change)) {
|
||||||
|
// 都不为空才能插入间隔时间
|
||||||
|
DateTime date1 = DateUtil.parse(last_change);
|
||||||
|
DateTime date2 = DateUtil.parse(current_change);
|
||||||
|
try {
|
||||||
|
long betweenDay = DateUtil.between(date1, date2, DateUnit.HOUR);
|
||||||
|
double interval_time = NumberUtil.round(NumberUtil.div(betweenDay, 24), 1).doubleValue();
|
||||||
|
jsonSpareBom.put("interval_time",interval_time);
|
||||||
|
} catch (Exception e) {
|
||||||
|
jsonSpareBom.put("interval_time","");
|
||||||
|
}
|
||||||
|
}
|
||||||
spareBOMTab.update(jsonSpareBom);
|
spareBOMTab.update(jsonSpareBom);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1035,5 +1056,4 @@ public class DevicerepairmstServiceImpl implements DevicerepairmstService {
|
|||||||
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC");
|
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIR001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "mst.input_time DESC");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,12 +145,24 @@ public class DevicerepairrequestServiceImpl implements DevicerepairrequestServic
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void create(DevicerepairrequestDto dto) {
|
public void create(DevicerepairrequestDto dto) {
|
||||||
|
DeptService deptService = SpringContextHolder.getBean(DeptService.class);
|
||||||
|
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String nickName = SecurityUtils.getNickName();
|
String nickName = SecurityUtils.getNickName();
|
||||||
String now = DateUtil.now();
|
String now = DateUtil.now();
|
||||||
|
|
||||||
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
JwtUserDto currentUser = (JwtUserDto) SecurityUtils.getCurrentUser();
|
||||||
Long deptId = currentUser.getDeptId();
|
Long deptId = currentUser.getDeptId();
|
||||||
|
// 登录人所在班组下的设备维修单(结束维修) > 2 报错
|
||||||
|
JSONObject jsonUser = WQLObject.getWQLObject("sys_user").query("user_id = '" + currentUserId + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isNotEmpty(jsonUser)) {
|
||||||
|
String dept_str = deptService.getChildIdStr(jsonUser.getLong("dept_id"));
|
||||||
|
JSONObject json = WQL.getWO("EM_BI_DEVICEREPAIRREQUEST001").addParam("flag", "4").addParam("deptIds", dept_str).process().uniqueResult(0);
|
||||||
|
|
||||||
|
if (json.getIntValue("num") > 2) {
|
||||||
|
throw new BadRequestException("结束维修状态的设备数>2");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dto.setRequest_id(IdUtil.getSnowflake(1, 1).nextId());
|
dto.setRequest_id(IdUtil.getSnowflake(1, 1).nextId());
|
||||||
dto.setRequest_code(CodeUtil.getNewCode("BXD_CODE"));
|
dto.setRequest_code(CodeUtil.getNewCode("BXD_CODE"));
|
||||||
|
|||||||
@@ -264,6 +264,7 @@
|
|||||||
SELECT
|
SELECT
|
||||||
mst.*,
|
mst.*,
|
||||||
class.class_name,
|
class.class_name,
|
||||||
|
file.material_type_id,
|
||||||
file.device_code,
|
file.device_code,
|
||||||
file.device_name,
|
file.device_name,
|
||||||
file.extend_code,
|
file.extend_code,
|
||||||
@@ -283,7 +284,7 @@
|
|||||||
WHERE
|
WHERE
|
||||||
mst.is_delete = '0'
|
mst.is_delete = '0'
|
||||||
AND file.is_delete = '0'
|
AND file.is_delete = '0'
|
||||||
AND mst.invstatus not in ('01','04','06','99')
|
AND mst.invstatus not in ('04','06','99')
|
||||||
|
|
||||||
OPTION 输入.device_code <> ""
|
OPTION 输入.device_code <> ""
|
||||||
(file.device_code like 输入.device_code or
|
(file.device_code like 输入.device_code or
|
||||||
|
|||||||
@@ -165,5 +165,24 @@
|
|||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|
||||||
|
IF 输入.flag = "4"
|
||||||
|
QUERY
|
||||||
|
SELECT
|
||||||
|
count(*) AS num
|
||||||
|
FROM
|
||||||
|
EM_BI_DeviceRepairMst mst
|
||||||
|
LEFT JOIN EM_BI_EquipmentFile file ON file.devicerecord_id = mst.devicerecord_id
|
||||||
|
WHERE
|
||||||
|
mst.is_delete = '0'
|
||||||
|
AND file.is_delete = '0'
|
||||||
|
AND mst.invstatus = '06'
|
||||||
|
|
||||||
|
OPTION 输入.deptIds <> ""
|
||||||
|
file.use_groupid in 输入.deptIds
|
||||||
|
ENDOPTION
|
||||||
|
ENDSELECT
|
||||||
|
ENDQUERY
|
||||||
|
ENDIF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -270,16 +270,21 @@ public class DevicemaintenanceplanmstServiceImpl implements Devicemaintenancepla
|
|||||||
map.put("useIds", useIds);
|
map.put("useIds", useIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取当前登陆用户
|
// 如果班组为空 则默认当前用户部门
|
||||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
if (ObjectUtil.isEmpty(use_id) && ObjectUtil.isEmpty(dept_id)) {
|
||||||
JSONObject jsonUser = WQLObject.getWQLObject("sys_user").query("user_id = '" + currentUserId + "'").uniqueResult(0);
|
// 获取当前登陆用户
|
||||||
if (ObjectUtil.isNotEmpty(jsonUser)) {
|
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||||
String dept_str = deptService.getChildIdStr(jsonUser.getLong("dept_id"));
|
JSONObject jsonUser = WQLObject.getWQLObject("sys_user").query("user_id = '" + currentUserId + "'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(dept_str)) {
|
if (ObjectUtil.isNotEmpty(jsonUser)) {
|
||||||
map.put("dept_str",dept_str);
|
String dept_str = deptService.getChildIdStr(jsonUser.getLong("dept_id"));
|
||||||
|
if (ObjectUtil.isNotEmpty(dept_str)) {
|
||||||
|
map.put("dept_str",dept_str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
JSONObject json = WQL.getWO("EM_BIDEVICEMAINTENANCEPLAN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.update_time DESC");
|
JSONObject json = WQL.getWO("EM_BIDEVICEMAINTENANCEPLAN001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.update_time DESC");
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,7 +177,6 @@
|
|||||||
WHERE
|
WHERE
|
||||||
file.is_delete = '0'
|
file.is_delete = '0'
|
||||||
AND file.status not in (90,91)
|
AND file.status not in (90,91)
|
||||||
AND d2.dept_id in 输入.dept_str
|
|
||||||
|
|
||||||
OPTION 输入.device_code <> ""
|
OPTION 输入.device_code <> ""
|
||||||
(file.device_code like 输入.device_code or
|
(file.device_code like 输入.device_code or
|
||||||
@@ -192,6 +191,10 @@
|
|||||||
d2.dept_id in 输入.useIds
|
d2.dept_id in 输入.useIds
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.dept_str <> ""
|
||||||
|
d2.dept_id in 输入.dept_str
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ import Treeselect, { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
|
|||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
import crudMaterialbase from '@/api/wms/basedata/master/materialbase'
|
||||||
import AddDialog from '@/views/wms/sb/repair/devicerepair/AddDialog'
|
import AddDialog from '@/views/wms/sb/repair/devicerepair/AddDialog'
|
||||||
import { getDepts } from '@/api/system/dept'
|
import { getDepts, getDeptSuperior } from '@/api/system/dept'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -186,21 +186,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters([
|
...mapGetters({
|
||||||
'user'
|
user: 'user'
|
||||||
])
|
})
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
debugger
|
||||||
const param = {
|
const param = {
|
||||||
'materOpt_code': this.materOpt_code
|
'materOpt_code': this.materOpt_code
|
||||||
}
|
}
|
||||||
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.crud.toQuery()
|
|
||||||
this.queryClassId()
|
this.queryClassId()
|
||||||
})
|
})
|
||||||
this.getDepts()
|
this.getDepts()
|
||||||
|
this.query.dept_id = this.user.dept.id
|
||||||
|
this.getSupDepts(this.user.dept.id)
|
||||||
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
@@ -283,6 +286,25 @@ export default {
|
|||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
getSupDepts(deptId) {
|
||||||
|
debugger
|
||||||
|
var number = parseFloat(deptId)
|
||||||
|
getDeptSuperior(number).then(res => {
|
||||||
|
const date = res.content
|
||||||
|
this.buildDepts(date)
|
||||||
|
this.depts = date
|
||||||
|
})
|
||||||
|
},
|
||||||
|
buildDepts(depts) {
|
||||||
|
depts.forEach(data => {
|
||||||
|
if (data.children) {
|
||||||
|
this.buildDepts(data.children)
|
||||||
|
}
|
||||||
|
if (data.hasChildren && !data.children) {
|
||||||
|
data.children = null
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -209,11 +209,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
[CRUD.HOOK.beforeSubmit]() {
|
[CRUD.HOOK.beforeSubmit]() {
|
||||||
const arr = this.form.tableData
|
/* const arr = this.form.tableData
|
||||||
if (arr.length === 0) {
|
if (arr.length === 0) {
|
||||||
this.crud.notify('明细不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
this.crud.notify('明细不能为空', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
return false
|
return false
|
||||||
}
|
}*/
|
||||||
},
|
},
|
||||||
[CRUD.HOOK.afterToEdit]() {
|
[CRUD.HOOK.afterToEdit]() {
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
<crudOperation :permission="permission">
|
<crudOperation :permission="permission">
|
||||||
<el-button
|
<!-- <el-button
|
||||||
slot="right"
|
slot="right"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
type="success"
|
type="success"
|
||||||
@@ -88,7 +88,7 @@
|
|||||||
@click="submit"
|
@click="submit"
|
||||||
>
|
>
|
||||||
提交
|
提交
|
||||||
</el-button>
|
</el-button>-->
|
||||||
</crudOperation>
|
</crudOperation>
|
||||||
<!--表格渲染-->
|
<!--表格渲染-->
|
||||||
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
|||||||
@@ -161,6 +161,16 @@
|
|||||||
<el-table-column prop="audit_time" label="审核时间" width="150px" show-overflow-tooltip />
|
<el-table-column prop="audit_time" label="审核时间" width="150px" show-overflow-tooltip />
|
||||||
<el-table-column prop="source_bill_code" label="源单号" show-overflow-tooltip />
|
<el-table-column prop="source_bill_code" label="源单号" show-overflow-tooltip />
|
||||||
<el-table-column prop="source_bill_type" label="源单业务类型" width="120px" />
|
<el-table-column prop="source_bill_type" label="源单业务类型" width="120px" />
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
:disabled-edit="formterStatus(scope.row)"
|
||||||
|
:disabled-dle="scope.row.invstatus !== '01'"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
@@ -169,6 +179,7 @@
|
|||||||
<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" />
|
<StartDialog :dialog-show.sync="startDialog" :open-param="openParam" />
|
||||||
|
<AddDialog/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -188,11 +199,12 @@ 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'
|
import StartDialog from '@/views/wms/sb/repair/devicerepairpa/StartDialog'
|
||||||
|
import AddDialog from '@/views/wms/sb/repair/devicerepair/AddDialog'
|
||||||
|
|
||||||
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, StartDialog },
|
components: { pagination, crudOperation, rrOperation, udOperation, DateRangePicker, Treeselect, ExecuteDialog, resuftDialog, ReceiveDialog, StartDialog, AddDialog },
|
||||||
mixins: [presenter(), header(), crud()],
|
mixins: [presenter(), header(), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -202,7 +214,7 @@ export default {
|
|||||||
sort: 'repair_id,desc',
|
sort: 'repair_id,desc',
|
||||||
crudMethod: { ...crudDevicerepairmst },
|
crudMethod: { ...crudDevicerepairmst },
|
||||||
optShow: {
|
optShow: {
|
||||||
add: false,
|
add: true,
|
||||||
edit: false,
|
edit: false,
|
||||||
del: false,
|
del: false,
|
||||||
download: false,
|
download: false,
|
||||||
@@ -249,6 +261,9 @@ export default {
|
|||||||
hand(value) {
|
hand(value) {
|
||||||
this.crud.toQuery()
|
this.crud.toQuery()
|
||||||
},
|
},
|
||||||
|
formterStatus(row) {
|
||||||
|
return '06,07,99'.includes(row.invstatus)
|
||||||
|
},
|
||||||
loadClass({ action, parentNode, callback }) {
|
loadClass({ action, parentNode, callback }) {
|
||||||
if (action === LOAD_CHILDREN_OPTIONS) {
|
if (action === LOAD_CHILDREN_OPTIONS) {
|
||||||
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
crudClassstandard.getClass({ pid: parentNode.id }).then(res => {
|
||||||
@@ -289,9 +304,6 @@ export default {
|
|||||||
startRepair() {
|
startRepair() {
|
||||||
const _selectData = this.$refs.table.selection
|
const _selectData = this.$refs.table.selection
|
||||||
const data = _selectData[0]
|
const data = _selectData[0]
|
||||||
if (data.invstatus !== '02') {
|
|
||||||
return this.crud.notify('只能对提交状态的单据维修', CRUD.NOTIFICATION_TYPE.INFO)
|
|
||||||
}
|
|
||||||
this.openParam = data
|
this.openParam = data
|
||||||
this.startDialog = true
|
this.startDialog = true
|
||||||
},
|
},
|
||||||
@@ -383,7 +395,7 @@ export default {
|
|||||||
this.confirm_flag = false
|
this.confirm_flag = false
|
||||||
this.result_flag = false
|
this.result_flag = false
|
||||||
for (let i = 0; i < rows.length; i++) {
|
for (let i = 0; i < rows.length; i++) {
|
||||||
if ('01,03,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
if ('03,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
||||||
this.start_flag = true
|
this.start_flag = true
|
||||||
}
|
}
|
||||||
if ('01,02,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
if ('01,02,04,05,06,07,99'.includes(rows[i].invstatus)) {
|
||||||
|
|||||||
@@ -168,7 +168,7 @@
|
|||||||
<el-table-column prop="fault_desc" label="故障描述" show-overflow-tooltip width="120px" />
|
<el-table-column prop="fault_desc" label="故障描述" show-overflow-tooltip width="120px" />
|
||||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="120px" />
|
<el-table-column prop="remark" label="备注" show-overflow-tooltip width="120px" />
|
||||||
<el-table-column prop="fault_time" label="故障时间" width="150px" />
|
<el-table-column prop="fault_time" label="故障时间" width="150px" />
|
||||||
<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-column prop="process_name" label="处理人" />
|
<el-table-column prop="process_name" label="处理人" />
|
||||||
<el-table-column prop="process_time" label="处理时间" width="150px" />
|
<el-table-column prop="process_time" label="处理时间" width="150px" />
|
||||||
|
|||||||
Reference in New Issue
Block a user