代码更新
This commit is contained in:
@@ -41,4 +41,10 @@ public class DownloadWordDto implements Serializable {
|
|||||||
@WordProperty("资产使用人")
|
@WordProperty("资产使用人")
|
||||||
private String user_name;
|
private String user_name;
|
||||||
|
|
||||||
|
@WordProperty("投产日期")
|
||||||
|
private String beginuse_date;
|
||||||
|
|
||||||
|
@WordProperty("存放地点")
|
||||||
|
private String setting_place;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -140,6 +140,8 @@ public class DeviceScrapServiceImpl implements DeviceScrapService {
|
|||||||
.oraginal_value(jsonFile.getString("oraginal_value"))
|
.oraginal_value(jsonFile.getString("oraginal_value"))
|
||||||
.net_amount(jsonFile.getString("net_amount"))
|
.net_amount(jsonFile.getString("net_amount"))
|
||||||
.belong_dept(jsonDept.getString("name"))
|
.belong_dept(jsonDept.getString("name"))
|
||||||
|
.beginuse_date(jsonFile.getString("beginuse_date"))
|
||||||
|
.setting_place(jsonFile.getString("setting_place"))
|
||||||
.user_name(jsonFile.getString("user_name")).build();
|
.user_name(jsonFile.getString("user_name")).build();
|
||||||
// 获取本地模板
|
// 获取本地模板
|
||||||
String path = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("DEVICE_WORD_PATH").getValue();
|
String path = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("DEVICE_WORD_PATH").getValue();
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestParam;
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,4 +41,18 @@ public class DeviceooestatController {
|
|||||||
return new ResponseEntity<>(deviceooestatService.queryAll(whereJson, page), HttpStatus.OK);
|
return new ResponseEntity<>(deviceooestatService.queryAll(whereJson, page), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/queryDtl")
|
||||||
|
@Log("设备OEE指标分析查询明细")
|
||||||
|
@ApiOperation("设备OEE指标分析查询明细")
|
||||||
|
//@PreAuthorize("@el.check('devicesparepartivt:list')")
|
||||||
|
public ResponseEntity<Object> queryDtl(@RequestParam Map whereJson, Pageable page) {
|
||||||
|
return new ResponseEntity<>(deviceooestatService.queryDtl(whereJson, page), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("导出数据")
|
||||||
|
@GetMapping(value = "/download")
|
||||||
|
public void download(HttpServletResponse response, @RequestParam Map whereJson) throws IOException {
|
||||||
|
deviceooestatService.download(whereJson, response);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,4 +25,15 @@ public interface DeviceooestatService {
|
|||||||
*/
|
*/
|
||||||
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> queryDtl(Map whereJson, Pageable page);
|
||||||
|
|
||||||
|
void download(Map whereJson, HttpServletResponse response) throws IOException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,9 +5,11 @@ package org.nl.wms.sb.stat.service.impl;
|
|||||||
import cn.hutool.core.map.MapUtil;
|
import cn.hutool.core.map.MapUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.utils.FileUtil;
|
||||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||||
import org.nl.wms.sb.stat.service.DeviceooestatService;
|
import org.nl.wms.sb.stat.service.DeviceooestatService;
|
||||||
import org.nl.wql.WQL;
|
import org.nl.wql.WQL;
|
||||||
@@ -15,8 +17,9 @@ import org.nl.wql.util.WqlUtil;
|
|||||||
import org.springframework.data.domain.Pageable;
|
import org.springframework.data.domain.Pageable;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Map;
|
import java.io.IOException;
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Liuxy
|
* @author Liuxy
|
||||||
@@ -51,15 +54,63 @@ public class DeviceooestatServiceImpl implements DeviceooestatService {
|
|||||||
map.put("classIds", classIds);
|
map.put("classIds", classIds);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(begin_time)) {
|
map.put("flag", "2");
|
||||||
map.put("flag", "1");
|
map.put("begin_time",begin_time);
|
||||||
} else {
|
map.put("end_time",end_time);
|
||||||
map.put("flag", "2");
|
|
||||||
map.put("begin_time",begin_time);
|
|
||||||
map.put("end_time",end_time);
|
|
||||||
}
|
|
||||||
JSONObject json = WQL.getWO("EM_DEVICEOOESTAT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.device_code ASC");
|
JSONObject json = WQL.getWO("EM_DEVICEOOESTAT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "file.device_code ASC");
|
||||||
|
|
||||||
return json;
|
return json;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> queryDtl(Map whereJson, Pageable page) {
|
||||||
|
|
||||||
|
String begin_time = MapUtil.getStr(whereJson, "startTime");
|
||||||
|
String end_time = MapUtil.getStr(whereJson, "endTime");
|
||||||
|
String devicerecord_id = MapUtil.getStr(whereJson, "devicerecord_id");
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("begin_time", begin_time);
|
||||||
|
map.put("end_time", end_time);
|
||||||
|
map.put("devicerecord_id", devicerecord_id);
|
||||||
|
JSONObject json = WQL.getWO("EM_DEVICEOOESTAT001").addParamMap(map).pageQuery(WqlUtil.getHttpContext(page), "run.run_date ASC");
|
||||||
|
|
||||||
|
return json;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void download(Map whereJson, HttpServletResponse response) throws IOException {
|
||||||
|
String begin_time = MapUtil.getStr(whereJson, "startTime");
|
||||||
|
String end_time = MapUtil.getStr(whereJson, "endTime");
|
||||||
|
String devicerecord_id = MapUtil.getStr(whereJson, "devicerecord_id");
|
||||||
|
|
||||||
|
HashMap<String, String> map = new HashMap<>();
|
||||||
|
map.put("flag", "1");
|
||||||
|
map.put("begin_time", begin_time);
|
||||||
|
map.put("end_time", end_time);
|
||||||
|
map.put("devicerecord_id", devicerecord_id);
|
||||||
|
|
||||||
|
JSONArray rows = WQL.getWO("EM_DEVICEOOESTAT001").addParamMap(map).process().getResultJSONArray(0);
|
||||||
|
|
||||||
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
|
for (int i = 0; i < rows.size(); i++) {
|
||||||
|
JSONObject jo = rows.getJSONObject(i);
|
||||||
|
Map<String, Object> dtl_map = new LinkedHashMap<>();
|
||||||
|
dtl_map.put("日期", jo.getString("run_date"));
|
||||||
|
dtl_map.put("设备编码", jo.getString("device_code"));
|
||||||
|
dtl_map.put("设备名称", jo.getString("device_name"));
|
||||||
|
dtl_map.put("工作时间(分钟)", jo.getString("run_times"));
|
||||||
|
dtl_map.put("准备时间(分钟)", jo.getString("prepare_times"));
|
||||||
|
dtl_map.put("故障时间(分钟)", jo.getString("error_times"));
|
||||||
|
dtl_map.put("工装调整时间(分钟)", jo.getString("adjust_times"));
|
||||||
|
dtl_map.put("生产总量", jo.getString("product_qty"));
|
||||||
|
dtl_map.put("不合格数", jo.getString("nok_qty"));
|
||||||
|
dtl_map.put("理论生产节拍(分钟)", jo.getString("theory_beat"));
|
||||||
|
dtl_map.put("OEE指标", jo.getString("oee_value"));
|
||||||
|
list.add(dtl_map);
|
||||||
|
}
|
||||||
|
FileUtil.downloadExcel(list, response);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
输入.begin_time TYPEAS s_string
|
输入.begin_time TYPEAS s_string
|
||||||
输入.end_time TYPEAS s_string
|
输入.end_time TYPEAS s_string
|
||||||
输入.dept_code TYPEAS s_string
|
输入.dept_code TYPEAS s_string
|
||||||
|
输入.devicerecord_id TYPEAS s_string
|
||||||
|
|
||||||
|
|
||||||
[临时表]
|
[临时表]
|
||||||
@@ -82,6 +83,10 @@
|
|||||||
run.run_date <= 输入.end_time
|
run.run_date <= 输入.end_time
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|
||||||
|
OPTION 输入.devicerecord_id <> ""
|
||||||
|
run.devicerecord_id = 输入.devicerecord_id
|
||||||
|
ENDOPTION
|
||||||
|
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDPAGEQUERY
|
ENDPAGEQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -264,22 +264,29 @@ export default {
|
|||||||
return this.dict.label.DEVICE_ATTRIBUTE_SCODE[row.device_type]
|
return this.dict.label.DEVICE_ATTRIBUTE_SCODE[row.device_type]
|
||||||
},
|
},
|
||||||
scrap() {
|
scrap() {
|
||||||
const _selectData = this.$refs.table.selection
|
const msg = '是否继续'
|
||||||
const data = _selectData[0]
|
this.$confirm(msg, '提示', {
|
||||||
// if (data.status !== '10') {
|
confirmButtonText: '确定',
|
||||||
// return this.crud.notify('设备未启用或不存在', CRUD.NOTIFICATION_TYPE.INFO)
|
cancelButtonText: '取消',
|
||||||
// }
|
type: 'warning'
|
||||||
if (data.device_is_delete === '1') {
|
}).then(() => {
|
||||||
return this.crud.notify('设备不存在或被删除', CRUD.NOTIFICATION_TYPE.INFO)
|
const _selectData = this.$refs.table.selection
|
||||||
}
|
const data = _selectData[0]
|
||||||
if (data.status === '10' || data.status === '11') {
|
// if (data.status !== '10') {
|
||||||
crudDevicescrap.scrap(data).then(res => {
|
// return this.crud.notify('设备未启用或不存在', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
// }
|
||||||
this.crud.toQuery()
|
if (data.device_is_delete === '1') {
|
||||||
})
|
return this.crud.notify('设备不存在或被删除', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
} else {
|
}
|
||||||
return this.crud.notify('设备状态不正确,需启动设备或完成维修单及保养单', CRUD.NOTIFICATION_TYPE.INFO)
|
if (data.status === '10' || data.status === '11') {
|
||||||
}
|
crudDevicescrap.scrap(data).then(res => {
|
||||||
|
this.crud.notify('操作成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||||
|
this.crud.toQuery()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
return this.crud.notify('设备状态不正确,需启动设备或完成维修单及保养单', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
downloadWord() {
|
downloadWord() {
|
||||||
const msg = '是否继续'
|
const msg = '是否继续'
|
||||||
|
|||||||
191
mes/qd/src/views/wms/sb/stat/deviceooestat/DtlDialog.vue
Normal file
191
mes/qd/src/views/wms/sb/stat/deviceooestat/DtlDialog.vue
Normal file
@@ -0,0 +1,191 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
title="明细"
|
||||||
|
append-to-body
|
||||||
|
:visible.sync="dialogVisible"
|
||||||
|
fullscreen
|
||||||
|
:before-close="handleClose"
|
||||||
|
destroy-on-close
|
||||||
|
@close="close"
|
||||||
|
@open="open"
|
||||||
|
>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-form
|
||||||
|
size="mini"
|
||||||
|
:inline="true"
|
||||||
|
class="demo-form-inline"
|
||||||
|
label-position="right"
|
||||||
|
label-width="80px"
|
||||||
|
label-suffix=":"
|
||||||
|
>
|
||||||
|
<el-form-item label="日期">
|
||||||
|
<!-- <date-range-picker v-model="dtlFrom.createTime" class="date-item" />-->
|
||||||
|
<div>
|
||||||
|
<el-input
|
||||||
|
v-model="dtlFrom.startTime"
|
||||||
|
disabled
|
||||||
|
style="width: 100px"
|
||||||
|
size="mini"
|
||||||
|
/> --
|
||||||
|
<el-input
|
||||||
|
v-model="dtlFrom.endTime"
|
||||||
|
disabled
|
||||||
|
style="width: 100px"
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备">
|
||||||
|
<el-input
|
||||||
|
v-model="dtlFrom.device_name"
|
||||||
|
disabled
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="oee指标">
|
||||||
|
<el-input
|
||||||
|
v-model="dtlFrom.oee_value"
|
||||||
|
disabled
|
||||||
|
size="mini"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<crudOperation :permission="permission">
|
||||||
|
<el-button
|
||||||
|
slot="right"
|
||||||
|
class="filter-item"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-check"
|
||||||
|
size="mini"
|
||||||
|
@click="downdtl"
|
||||||
|
>
|
||||||
|
导出Excel
|
||||||
|
</el-button>
|
||||||
|
</crudOperation>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table
|
||||||
|
ref="table"
|
||||||
|
v-loading="crud.loading"
|
||||||
|
:data="crud.data"
|
||||||
|
style="width: 100%;"
|
||||||
|
size="mini"
|
||||||
|
@selection-change="crud.selectionChangeHandler"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="run_date" label="日期" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="device_code" label="设备编码" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="device_name" label="设备名称" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="run_times" label="工作时间(分钟)" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="prepare_times" label="准备时间(分钟)" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="error_times" label="故障时间(分钟)" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="adjust_times" label="工装调整时间(分钟)" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="product_qty" label="生产总量" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="nok_qty" label="不合格数" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="theory_beat" label="理论生产节拍(分钟)" />
|
||||||
|
<el-table-column show-overflow-tooltip prop="oee_value" label="OEE指标" />
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import CRUD, { crud, presenter, header } 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 crudDeviceooestat from '@/api/wms/sb/deviceooestat'
|
||||||
|
import { download } from '@/api/data'
|
||||||
|
import { downloadFile } from '@/utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DtlShowDialog',
|
||||||
|
components: { rrOperation, crudOperation, udOperation, pagination, DateRangePicker },
|
||||||
|
mixins: [presenter(), header(), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
url: 'api/deviceooestat/queryDtl',
|
||||||
|
idField: 'request_id',
|
||||||
|
sort: 'request_id,desc',
|
||||||
|
crudMethod: { ... crudDeviceooestat },
|
||||||
|
optShow: {
|
||||||
|
add: false,
|
||||||
|
edit: false,
|
||||||
|
del: false,
|
||||||
|
download: false,
|
||||||
|
reset: false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
dialogShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
openParam: {
|
||||||
|
type: Object
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dialogVisible: false,
|
||||||
|
dtlFrom: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
dialogShow: {
|
||||||
|
handler(newValue, oldValue) {
|
||||||
|
this.dialogVisible = newValue
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClose(done) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done()
|
||||||
|
})
|
||||||
|
.catch(_ => {
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
debugger
|
||||||
|
this.dtlFrom = {}
|
||||||
|
this.$emit('update:dialogShow', false)
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
debugger
|
||||||
|
this.dtlFrom = this.openParam.dtlFrom
|
||||||
|
if (this.openParam.time !== null) {
|
||||||
|
this.dtlFrom.startTime = this.openParam.time.startTime
|
||||||
|
this.dtlFrom.endTime = this.openParam.time.endTime
|
||||||
|
}
|
||||||
|
|
||||||
|
this.crud.query.startTime = this.dtlFrom.startTime
|
||||||
|
this.crud.query.endTime = this.dtlFrom.endTime
|
||||||
|
this.crud.query.devicerecord_id = this.dtlFrom.devicerecord_id
|
||||||
|
this.crud.toQuery()
|
||||||
|
},
|
||||||
|
downdtl() {
|
||||||
|
if (this.currentRow !== null) {
|
||||||
|
crud.downloadLoading = true
|
||||||
|
download('/api/deviceooestat/download', this.crud.query).then(result => {
|
||||||
|
downloadFile(result, 'oee指标统计', 'xlsx')
|
||||||
|
crud.downloadLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
crud.downloadLoading = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
label-suffix=":"
|
label-suffix=":"
|
||||||
>
|
>
|
||||||
<el-form-item label="统计日期">
|
<el-form-item label="统计日期">
|
||||||
<date-range-picker v-model="query.createTime" class="date-item" value-format="yyyy-MM-dd"/>
|
<date-range-picker v-model="query.createTime" class="date-item" @change="changeTime" value-format="yyyy-MM-dd"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类别">
|
<el-form-item label="设备类别">
|
||||||
<treeselect
|
<treeselect
|
||||||
@@ -53,7 +53,11 @@
|
|||||||
<el-table-column v-if="false" prop="runrecord_id" label="记录标识" />
|
<el-table-column v-if="false" prop="runrecord_id" label="记录标识" />
|
||||||
<el-table-column prop="dept_name" label="使用部门" />
|
<el-table-column prop="dept_name" label="使用部门" />
|
||||||
<el-table-column prop="class_name" label="设备类型" />
|
<el-table-column prop="class_name" label="设备类型" />
|
||||||
<el-table-column prop="device_code" label="设备编码" />
|
<el-table-column prop="device_code" label="设备编码">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="warning" @click="openDtl(scope.row)">{{ scope.row.device_code }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column prop="device_name" label="设备名称" width="120px" show-overflow-tooltip />
|
<el-table-column prop="device_name" label="设备名称" width="120px" show-overflow-tooltip />
|
||||||
<el-table-column prop="run_times" label="工作时间(分钟)" width="120px" />
|
<el-table-column prop="run_times" label="工作时间(分钟)" width="120px" />
|
||||||
<el-table-column prop="prepare_times" label="准备时间(分钟)" width="120px" />
|
<el-table-column prop="prepare_times" label="准备时间(分钟)" width="120px" />
|
||||||
@@ -67,6 +71,7 @@
|
|||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<pagination />
|
<pagination />
|
||||||
</div>
|
</div>
|
||||||
|
<DtlDialog :dialog-show.sync="openDtldialog" :open-param="openParam" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -82,11 +87,12 @@ 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 DateRangePicker from '@/components/DateRangePicker'
|
import DateRangePicker from '@/components/DateRangePicker'
|
||||||
|
import DtlDialog from '@/views/wms/sb/stat/deviceooestat/DtlDialog'
|
||||||
|
|
||||||
const defaultForm = { runrecord_id: null, devicerecord_id: null, run_date: null, run_times: null, prepare_times: null, error_times: null, adjust_times: null, product_qty: null, nok_qty: null, oee_value: null, remark: null, create_id: null, create_name: null, create_time: null }
|
const defaultForm = { runrecord_id: null, devicerecord_id: null, run_date: null, run_times: null, prepare_times: null, error_times: null, adjust_times: null, product_qty: null, nok_qty: null, oee_value: null, remark: null, create_id: null, create_name: null, create_time: null }
|
||||||
export default {
|
export default {
|
||||||
name: 'Deviceooestat',
|
name: 'Deviceooestat',
|
||||||
components: { pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
components: { DtlDialog, pagination, crudOperation, rrOperation, udOperation, Treeselect, DateRangePicker },
|
||||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
cruds() {
|
cruds() {
|
||||||
return CRUD({
|
return CRUD({
|
||||||
@@ -108,8 +114,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
classes: [],
|
classes: [],
|
||||||
class_idStr: null,
|
class_idStr: null,
|
||||||
|
openParam: null,
|
||||||
|
changeTimeAge: null,
|
||||||
materOpt_code: '23',
|
materOpt_code: '23',
|
||||||
deviceDialog: false,
|
deviceDialog: false,
|
||||||
|
openDtldialog: false,
|
||||||
permission: {
|
permission: {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -160,6 +169,24 @@ export default {
|
|||||||
return obj
|
return obj
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
openDtl(row) {
|
||||||
|
if (!this.changeTimeAge) {
|
||||||
|
return this.crud.notify('请选择日期', CRUD.NOTIFICATION_TYPE.INFO)
|
||||||
|
}
|
||||||
|
this.openParam = {
|
||||||
|
'dtlFrom': row,
|
||||||
|
'time': this.changeTimeAge
|
||||||
|
}
|
||||||
|
this.openDtldialog = true
|
||||||
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
debugger
|
||||||
|
this.changeTimeAge = {
|
||||||
|
'startTime': val[0],
|
||||||
|
'endTime': val[1]
|
||||||
|
}
|
||||||
|
this.crud.toQuery()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user