Merge remote-tracking branch 'origin/master'

master
mengjiao 1 year ago
commit fc1d71228b

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询故障描述列表
export function listFaultDescription(query) {
return request({
url: '/device/faultDescription/list',
method: 'get',
params: query
});
}
// 查询故障描述详细
export function getFaultDescription(faultId) {
return request({
url: '/device/faultDescription/' + faultId,
method: 'get'
});
}
// 新增故障描述
export function addFaultDescription(data) {
return request({
url: '/device/faultDescription',
method: 'post',
data: data
});
}
// 修改故障描述
export function updateFaultDescription(data) {
return request({
url: '/device/faultDescription',
method: 'put',
data: data
});
}
// 删除故障描述
export function delFaultDescription(faultId) {
return request({
url: '/device/faultDescription/' + faultId,
method: 'delete'
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询故障维修措施列表
export function listFaultMeasures(query) {
return request({
url: '/device/faultMeasures/list',
method: 'get',
params: query
});
}
// 查询故障维修措施详细
export function getFaultMeasures(faultId) {
return request({
url: '/device/faultMeasures/' + faultId,
method: 'get'
});
}
// 新增故障维修措施
export function addFaultMeasures(data) {
return request({
url: '/device/faultMeasures',
method: 'post',
data: data
});
}
// 修改故障维修措施
export function updateFaultMeasures(data) {
return request({
url: '/device/faultMeasures',
method: 'put',
data: data
});
}
// 删除故障维修措施
export function delFaultMeasures(faultId) {
return request({
url: '/device/faultMeasures/' + faultId,
method: 'delete'
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询故障原因列表
export function listFaultReason(query) {
return request({
url: '/device/faultReason/list',
method: 'get',
params: query
});
}
// 查询故障原因详细
export function getFaultReason(faultId) {
return request({
url: '/device/faultReason/' + faultId,
method: 'get'
});
}
// 新增故障原因
export function addFaultReason(data) {
return request({
url: '/device/faultReason',
method: 'post',
data: data
});
}
// 修改故障原因
export function updateFaultReason(data) {
return request({
url: '/device/faultReason',
method: 'put',
data: data
});
}
// 删除故障原因
export function delFaultReason(faultId) {
return request({
url: '/device/faultReason/' + faultId,
method: 'delete'
});
}

@ -77,3 +77,12 @@ export function getRepairPersonList(query) {
params: query
});
}
// 查询组线列表
export function getGroupLineList(query) {
return request({
url: '/device/faultReport/getGroupLineList',
method: 'get',
params: query
});
}

@ -2,43 +2,43 @@ import request from '@/utils/request'
// 查询故障类型维护列表
export function listFaultType(query) {
return request({
url: '/device/faultType/list',
method: 'get',
params: query
});
return request({
url: '/device/faultType/list',
method: 'get',
params: query
});
}
// 查询故障类型维护详细
export function getFaultType(faultId) {
return request({
url: '/device/faultType/' + faultId,
method: 'get'
});
return request({
url: '/device/faultType/' + faultId,
method: 'get'
});
}
// 新增故障类型维护
export function addFaultType(data) {
return request({
url: '/device/faultType',
method: 'post',
data: data
});
return request({
url: '/device/faultType',
method: 'post',
data: data
});
}
// 修改故障类型维护
export function updateFaultType(data) {
return request({
url: '/device/faultType',
method: 'put',
data: data
});
return request({
url: '/device/faultType',
method: 'put',
data: data
});
}
// 删除故障类型维护
export function delFaultType(faultId) {
return request({
url: '/device/faultType/' + faultId,
method: 'delete'
});
return request({
url: '/device/faultType/' + faultId,
method: 'delete'
});
}

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询设备运行记录列表
export function listOperation(query) {
return request({
url: '/device/operation/list',
method: 'get',
params: query
});
}
// 查询设备运行记录详细
export function getOperation(id) {
return request({
url: '/device/operation/' + id,
method: 'get'
});
}
// 新增设备运行记录
export function addOperation(data) {
return request({
url: '/device/operation',
method: 'post',
data: data
});
}
// 修改设备运行记录
export function updateOperation(data) {
return request({
url: '/device/operation',
method: 'put',
data: data
});
}
// 删除设备运行记录
export function delOperation(id) {
return request({
url: '/device/operation/' + id,
method: 'delete'
});
}

@ -43,6 +43,14 @@ export function getEquList(equQuery) {
});
}
// 获取设备组线信息
export function getGroupLine() {
return request({
url: '/device/inspectionPlan/getGroupLine',
method: 'get'
});
}
// 查询计划列表
export function listPlan(query) {
return request({

@ -0,0 +1,96 @@
import request from '@/utils/request'
// 获取工厂下拉列表
export function getBoardFactory(data) {
return request({
url: '/mes/wcsInterface/getBoardFactory',
method: 'post',
data: data
});
}
// 获取头部统计维度年月日
export function getDictData(data) {
return request({
url: '/quality/qcInterface/getDictData',
method: 'post',
data: data
});
}
// 来料--订单异常信息
export function getOverallInfo(data) {
return request({
url: '/quality/qcInterface/getOverallInfo',
method: 'post',
data: data,
});
}
// 来料--异常分布 过程检验--当日不良占比类型
export function getCheckProjectsPie(data) {
return request({
url: '/quality/qcInterface/getCheckProjectsPie',
method: 'post',
data: data
});
}
// 来料--供应商产品数量不良TOP5来料--供应商产品批次不良TOP5
export function getSupplierBadTOP5(data) {
return request({
url: '/quality/qcInterface/getSupplierBadTOP5',
method: 'post',
data: data
});
}
// 来料--订单异常详情
export function getSupplierNoOkList(data) {
return request({
url: '/quality/qcInterface/getSupplierNoOkList',
method: 'post',
data: data
});
}
// 来料--供应商来料检验及时性详情 生产过程--检验实时详情
export function getSupplierTaskList(data) {
return request({
url: '/quality/qcInterface/getSupplierTaskList',
method: 'post',
data: data
});
}// 过程检验-检验统计
export function getProduceStaticInfo(data) {
return request({
url: '/quality/qcInterface/getProduceStaticInfo',
method: 'post',
data: data
});
}
// 过程检验--质量异常信息
export function getProduceNoOkList(data) {
return request({
url: '/quality/qcInterface/getProduceNoOkList',
method: 'post',
data: data
});
}
// 过程检验--产品不合格数量对比
export function getProMonthNoOk(data) {
return request({
url: '/quality/qcInterface/getProMonthNoOk',
method: 'post',
data: data
});
}
// 过程检验--产品异常趋势
export function getLineDayNoOk(data) {
return request({
url: '/quality/qcInterface/getLineDayNoOk',
method: 'post',
data: data
});
}
// 过程检验--产品不合格率同期对比
export function getMonthOfYearContrast(data) {
return request({
url: '/quality/qcInterface/getMonthOfYearContrast',
method: 'post',
data: data
});
}

@ -81,6 +81,14 @@ export function getLineChartData() {
method: 'get'
});
}
// 获取组线每月设备故障数
export function getGroupLineEquInfo() {
return request({
url: '/device/deviceInterface/getGroupLineEquInfo',
method: 'get'
});
}
//查询设备小时表头
export function getHourProductionTitle(query) {
return request({
@ -115,7 +123,7 @@ export function getMesListUser(query) {
method: 'get',
params: query
});
}
}
//查询工单列表
export function getMesListWorkOrder(query) {
@ -124,7 +132,7 @@ export function getMesListWorkOrder(query) {
method: 'get',
params: query
});
}
}
//查询线体列表
export function getMesListEquip(query) {
@ -133,7 +141,7 @@ export function getMesListEquip(query) {
method: 'get',
params: query
});
}
}
//报工按钮
export function reportSap(workorderCode) {
const data = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Before

Width:  |  Height:  |  Size: 568 B

After

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

@ -16,6 +16,7 @@ axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'
const service = axios.create({
// axios中请求配置有baseURL选项表示请求URL公共部分
baseURL: process.env.VUE_APP_BASE_API,
// baseURL: 'http://192.168.202.34:30000/prod-api',
// 超时
timeout: 10000
})

@ -0,0 +1,101 @@
<template>
<div>
<div ref="chart" style="width:50%;height:376px"></div>
</div>
</template>
<script>
import {getGroupLineEquInfo} from "@/api/mes/reportWork";
export default {
data() {
return{
}
},
mounted() {
this.getGroupLineEquInfo();
this.getEchartData();
},
methods: {
getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => {
var info = response.data;
var groupLineNames = [];
for (let i = 0; i < info.length; i++) {
// 线
groupLineNames.push(info[i].name);
info[i].type = 'line';
info[i].smooth = true;
info[i].stack = 'Total';
}
//
var monthTemp = ['一月', '二月', '三月', '四月', '五月', '六月', '七月','八月','九月','十月','十一月','十二月']
monthTemp.splice(new Date().getMonth()+1)
const chart = this.$refs.chart
if (chart) {
const myChart = this.$echarts.init(chart)
const option = {
title: {
text: ''
},
tooltip: {
trigger: 'axis'
},
legend: {
data: groupLineNames
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
containLabel: true
},
toolbox: {
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: monthTemp
},
yAxis: {
type: 'value'
},
series: info
}
myChart.setOption(option)
window.addEventListener("resize", function() {
myChart.resize()
})
}
this.$on('hook:destroyed',()=>{
window.removeEventListener("resize", function() {
myChart.resize();
});
})
});
},
getEchartData() {
},
},
watch: {},
created() {
}
}
</script>

@ -0,0 +1,112 @@
<template>
<el-tabs type="border-card">
<el-tab-pane label="故障类型" >
<ItemFaultType></ItemFaultType>
</el-tab-pane>
<el-tab-pane label="故障描述" >
<ItemFaultDescription></ItemFaultDescription>
</el-tab-pane>
<el-tab-pane label="故障原因" >
<ItemFaultReason></ItemFaultReason>
</el-tab-pane>
<el-tab-pane label="维修措施" >
<ItemFaultMeasures></ItemFaultMeasures>
</el-tab-pane>
</el-tabs>
</template>
<script>
import ItemFaultType from "./itemFaultType.vue";
import ItemFaultReason from "./itemFaultReason.vue";
import ItemFaultDescription from "./itemFaultDescription.vue";
import ItemFaultMeasures from "./itemFaultMeasures.vue";
export default {
name: "FaultInformation",
components: { ItemFaultType , ItemFaultReason , ItemFaultDescription , ItemFaultMeasures },
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultTypeList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
},
methods: {
}
};
</script>

@ -0,0 +1,444 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label-width="100px" label="故障描述编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障描述编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障描述类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障描述类型" clearable>
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障描述" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-input
class="my-select-input"
v-model="queryParams.createBy"
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['device:faultDescription:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:faultDescription:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:faultDescriptionn:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['device:faultDescription:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障描述编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障描述类型" align="center" prop="faultType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_type" :value="scope.row.faultType"/>
</template>
</el-table-column>
<el-table-column width="150" label="故障描述" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultDescription:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultDescription:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障描述维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障描述编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障描述编码" style="width: 300px"/>
</el-form-item>
<el-form-item label="故障描述" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障描述" clearable style="width: 300px">
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFaultDescription, getFaultDescription, delFaultDescription, addFaultDescription, updateFaultDescription } from "@/api/device/faultDescription";
export default {
name: "FaultType",
dicts: ['device_fault_description'],
data() {
return {
//
faultCategory : null,
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
//
faultCategory: null,
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障描述维护列表 */
getList() {
this.loading = true;
this.queryParams.faultCategory = "des";
listFaultDescription(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障描述维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultDescription(faultId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改故障描述维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultDescription(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultDescription(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
}
}
}
if (faultCodes == '') {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
}
}
}
this.$modal.confirm('是否确认删除故障描述维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultDescription(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultDescription/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,430 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label-width="100px" label="故障措施编码" prop="faultCode">
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障措施编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障措施类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障措施类型" clearable>
<el-option
v-for="dict in dict.type.device_fault_measures"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障措施" prop="faultSubclass">
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障措施"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['device:faultMeasures:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:faultMeasures:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:faultMeasures:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['device:faultMeasures:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障措施编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障措施类型" align="center" prop="faultType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_measures" :value="scope.row.faultType"/>
</template>
</el-table-column>
<el-table-column width="150" label="故障措施" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultMeasures:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultMeasures:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障措施维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障措施编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障措施编码" style="width: 300px"/>
</el-form-item>
<el-form-item label="故障措施" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障措施" clearable style="width: 300px">
<el-option
v-for="dict in dict.type.device_fault_measures"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFaultMeasures, getFaultMeasures, delFaultMeasures, addFaultMeasures, updateFaultMeasures } from "@/api/device/faultMeasures";
export default {
name: "FaultType",
dicts: ['device_fault_measures'],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障措施维护列表 */
getList() {
this.loading = true;
listFaultMeasures(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障措施维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultMeasures(faultId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改故障措施维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultMeasures(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultMeasures(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
}
}
}
if (faultCodes == '') {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
}
}
}
this.$modal.confirm('是否确认删除故障措施维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultMeasures(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultMeasures/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -0,0 +1,444 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form-item label="故障原因编码" prop="faultCode">
<el-input
style="width: 150px"
v-model="queryParams.faultCode"
placeholder="请输入编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障原因类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择原因类型" clearable style="width: 150px">
<el-option
v-for="dict in dict.type.device_fault_reason"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障原因" prop="faultSubclass" >
<el-input
v-model="queryParams.faultSubclass"
placeholder="请输入故障原因"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy" >
<el-input
class="my-select-input"
v-model="queryParams.createBy"
placeholder="请输入创建人"
clearable
style="width: 130px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
style="width: 130px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['device:faultReason:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:faultReason:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:faultReason:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['device:faultReason:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障原因编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障原因类型" align="center" prop="faultType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_reason" :value="scope.row.faultType"/>
</template>
</el-table-column>
<el-table-column width="200" label="故障原因" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column width="100" label="创建人" align="center" prop="createBy" />
<el-table-column width="180" label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="更新人" align="center" prop="updateBy" />
<el-table-column width="180" label="更新时间" align="center" prop="updateTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:faultReason:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:faultReason:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改故障原因维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障原因编码" prop="faultCode">
<el-input v-model="form.faultCode" placeholder="请输入故障原因编码" style="width: 300px"/>
</el-form-item>
<el-form-item label="故障原因" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障原因" clearable style="width: 300px">
<el-option
v-for="dict in dict.type.device_fault_reason"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标志" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFaultReason, getFaultReason, delFaultReason, addFaultReason, updateFaultReason } from "@/api/device/faultReason";
export default {
name: "FaultType",
dicts: ['device_fault_reason'],
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
faultList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
createTimeArray: [],
updateTimeArray: [],
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询故障原因维护列表 */
getList() {
this.loading = true;
listFaultReason(this.queryParams).then(response => {
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
faultId: null,
faultCode: null,
faultType: null,
faultSubclass: null,
faultRemark: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.queryParams.updateTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.faultId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加故障原因维护";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const faultId = row.faultId || this.ids
getFaultReason(faultId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改故障原因维护";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.faultId != null) {
updateFaultReason(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
}
});
} else {
addFaultReason(this.form).then(response => {
if (response.code != 500) {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
}
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const faultIds = row.faultId || this.ids;
var faultCodes = '';
//
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
}
}
}
if (faultCodes == '') {
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
}
}
}
this.$modal.confirm('是否确认删除故障原因维护编号为"' + faultCodes + '"的数据项?').then(function() {
return delFaultReason(faultIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/faultReason/export', {
...this.queryParams
}, `faultType_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -5,12 +5,13 @@
<el-input
v-model="queryParams.faultCode"
placeholder="请输入故障类型编码"
style="width: 180px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="故障类型" prop="faultType">
<el-select v-model="queryParams.faultType" placeholder="请选择故障类型" clearable>
<el-select v-model="queryParams.faultType" placeholder="请选择故障类型" clearable style="width: 180px">
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -24,6 +25,7 @@
v-model="queryParams.faultSubclass"
placeholder="请输入故障子类"
clearable
style="width: 180px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -82,6 +84,17 @@
placeholder="请输入创建人"
clearable
@keyup.enter.native="handleQuery"
style="width: 140px"
/>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
style="width: 140px"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
@ -97,15 +110,6 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-input
class="my-select-input"
v-model="queryParams.updateBy"
placeholder="请输入更新人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-date-picker
v-model="queryParams.updateTimeArray"
@ -171,7 +175,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="faultTypeList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="faultList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" />
@ -231,11 +235,11 @@
<!-- 添加或修改故障类型维护对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item v-if="false" label="故障类型编码" prop="faultCode">
<el-form-item v-if="false" label="故障类型编码" prop="faultCode" style="width: 300px">
<el-input v-model="form.faultCode" placeholder="请输入故障类型编码" />
</el-form-item>
<el-form-item label="故障类型" prop="faultType">
<el-select v-model="form.faultType" placeholder="请选择故障类型" clearable>
<el-select v-model="form.faultType" placeholder="请选择故障类型" clearable style="width: 300px">
<el-option
v-for="dict in dict.type.device_fault_type"
:key="dict.value"
@ -245,10 +249,10 @@
</el-select>
</el-form-item>
<el-form-item label="故障子类" prop="faultSubclass">
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" />
<el-input v-model="form.faultSubclass" placeholder="请输入故障子类" style="width: 300px"/>
</el-form-item>
<el-form-item label="备注" prop="faultRemark">
<el-input v-model="form.faultRemark" placeholder="请输入备注" />
<el-input v-model="form.faultRemark" placeholder="请输入备注" style="width: 300px"/>
</el-form-item>
<el-form-item v-if="false" label="工厂编码" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂编码" />
@ -323,7 +327,7 @@ export default {
//
total: 0,
//
faultTypeList: [],
faultList: [],
//
title: "",
//
@ -363,7 +367,7 @@ export default {
getList() {
this.loading = true;
listFaultType(this.queryParams).then(response => {
this.faultTypeList = response.rows;
this.faultList = response.rows;
this.total = response.total;
this.loading = false;
});
@ -458,18 +462,18 @@ export default {
var faultCodes = '';
//
for (let i = 0; i < this.faultTypeList.length; i++) {
for (let i = 0; i < this.faultList.length; i++) {
for (let j = 0; j < faultIds.length; j++) {
if (faultIds[j] == this.faultTypeList[i].faultId) {
faultCodes = faultCodes + this.faultTypeList[i].faultCode + ',';
if (faultIds[j] == this.faultList[i].faultId) {
faultCodes = faultCodes + this.faultList[i].faultCode + ',';
}
}
}
if (faultCodes == '') {
for (let i = 0; i < this.faultTypeList.length; i++) {
if (faultIds == this.faultTypeList[i].faultId) {
faultCodes = this.faultTypeList[i].faultCode;
for (let i = 0; i < this.faultList.length; i++) {
if (faultIds == this.faultList[i].faultId) {
faultCodes = this.faultList[i].faultCode;
}
}
}

@ -0,0 +1,333 @@
<template>
<el-dialog
title="设备选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="1200px"
center
:before-close="cancelEquipmentForm"
>
<el-row :gutter="20">
<!--分类数据-->
<el-col :span="5" :xs="24">
<el-card>
<span>请选择设备类型</span>
<div class="head-container" style="text-align: center">
<el-tree
:data="treeData"
:props="{ id: 'equipmentTypeCode', label: 'equipmentTypeName' }"
node-key="id"
:expand-on-click-node="false"
:filter-node-method="filterNode"
ref="tree"
default-expand-all
@node-click="handleNodeClick"
/>
</div>
</el-card>
</el-col>
<!--设备数据-->
<el-col :span="19" :xs="24">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="设备编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="组线" prop="groupLine">
<template>
<el-select
v-model="queryParams.groupLine"
filterable
placeholder="请选择组线"
style="width: 160px"
>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="itemList"
@selection-change="handleEquipmentSelectionChange"
ref="myTable"
>
<el-table-column width="50" align="center" type="selection">
<!-- <template v-slot="scope">
<el-radio v-model="selectedItemId" :label="scope.row.itemId" @change="handleRowChange(scope.row)">{{""}}</el-radio>
</template> -->
</el-table-column>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
></el-table-column>
<el-table-column
label="设备编码"
align="center"
key="itemCode"
prop="equipmentCode"
v-if="columns[0].visible"
>
</el-table-column>
<el-table-column
label="设备类型编码"
align="center"
key="itemTypeCode"
prop="equipmentTypeCode"
v-if="columns[2].visible"
>
</el-table-column>
<el-table-column
label="设备名称"
align="left"
key="itemName"
prop="equipmentName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitEquipmentForm"> </el-button>
<el-button @click="cancelEquipmentForm"> </el-button>
</div>
</el-dialog>
</template>
<script>
import {
getEquipmentList,
getEquipmentTypeList,
getGroupLineList,
} from "@/api/device/faultReport";
import {getEquList} from "@/api/device/plan";
import { treeselect } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
data() {
return {
treeData: [],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
itemTypeOptions: undefined,
//
equipmentTypeCode: undefined,
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: undefined,
equipmentTypeCode: undefined,
itemTypeId: 0,
itemCodeGet: "",
itemCode: undefined,
equipmentCode: null,
equipmentName: null,
groupLine: null,
},
//
columns: [
{ key: 0, label: `设备编码`, visible: true },
{ key: 1, label: `设备名称`, visible: true },
{ key: 2, label: `设备类型`, visible: true },
],
};
},
created() {
this.getList();
this.getEquipmentType();
},
methods: {
//
reset() {
this.form = {
itemId: null,
itemCode: null,
itemType: null,
groupLine :null,
};
this.resetForm("form");
},
handleEquipmentSelectionChange(val) {
this.itemList = val;
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquipmentList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
//线
getGroupLineList().then((response) => {
this.options = response.rows;
});
},
//
getEquList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
this.treeData = response.rows;
});
},
//
filterNode(value, data) {
console.log(value, data);
if (!value) return true;
return data.label.indexOf(value) !== -1;
},
//
handleNodeClick(data) {
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.queryParams.equipmentTypeCode);
this.queryParams.pageNum = 1;
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getEquList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.queryParams.pageNum = 1;
this.getList()
},
//
handleEquipmentSelectionChange(selection) {
this.ids = selection.map((item) => item.equipmentCode);
this.single = selection.length !== 1;
this.multiple = !selection.length;
console.log("多选框", this.ids);
},
submitEquipmentForm() {
const data = this.ids;
if (data.length > 1) {
Message.warning("只能选择一个报修机器,请勿选择多个!");
} else {
const equipmentCode = data.toString();
if (this.queryParams.itemCodeGet == "") {
this.queryParams.itemCodeGet = equipmentCode;
} else {
this.queryParams.itemCodeGet =
this.queryParams.itemCodeGet + "," + equipmentCode;
}
this.selectedRows = this.queryParams.itemCodeGet;
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
},
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
this.showFlag = false;
},
},
};
</script>

@ -0,0 +1,229 @@
<template>
<el-dialog
title="人员选择"
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="800px"
center
:before-close="cancel"
>
<el-row :gutter="20">
<!--人员数据-->
<el-col :span="24">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="人员编码" prop="itemCode">
<el-input
v-model="queryParams.itemCode"
placeholder="请输入人员编码"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="人员名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入人员名称"
clearable
style="width: 150px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="itemList"
@selection-change="handleSelectionChange"
ref="multipleTable"
>
<el-table-column
width="50"
align="center"
type="selection"
></el-table-column>
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
></el-table-column>
<el-table-column
label="人员编码"
align="center"
key="itemCode"
prop="userName"
v-if="columns[0].visible"
>
</el-table-column>
<el-table-column
label="人员名称"
align="left"
key="itemName"
prop="nickName"
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
<el-table-column
label="人员联系方式"
align="left"
prop="phonenumber"
v-if="columns[2].visible"
:show-overflow-tooltip="true"
/>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm" :disabled="multiple"
> </el-button
>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</template>
<script>
import { getRepairPersonList } from "@/api/device/faultReport";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
data() {
return {
treeData1: [],
showFlag: false,
//
selectedItemId: undefined,
selectedRows: undefined,
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
itemList: null,
//
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: null,
itemCodeGet: "",
itemCode: null,
nickName: null,
userName: null,
},
//
columns: [
{ key: 0, label: `人员编码`, visible: true },
{ key: 1, label: `人员名称`, visible: true },
{ key: 1, label: `联系方式`, visible: true },
],
};
},
created() {
this.getList();
},
methods: {
//
cancel() {
this.showFlag = false;
this.reset();
},
//
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemType: null,
};
this.resetForm("form");
},
handleSelectionChange(val) {
this.itemList = val;
},
//
indexMethod(index) {
return index + 1;
},
/** 查询设备编码列表*/
getList() {
this.loading = true;
this.queryParams.userName = this.queryParams.itemCode;
this.queryParams.nickName = this.queryParams.itemName;
getRepairPersonList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.userId);
this.userCodes = selection.map((item) => item.userName);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
submitForm() {
if (this.$refs.multipleTable.selection.length > 1) {
Message.warning("只能选择一个报修人,请勿选择多个!");
} else {
this.$emit("onSelected", this.$refs.multipleTable.selection);
this.showFlag = false;
this.getList();
}
},
},
};
</script>

@ -4,7 +4,7 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="1100px"
width="1200px"
center
:before-close="cancelEquipmentForm"
>
@ -15,7 +15,7 @@
<span>请选择设备类型</span>
<div class="head-container" style="text-align: center">
<el-tree
:data="treeData1"
:data="treeData"
:props="{ id: 'equipmentTypeCode', label: 'equipmentTypeName' }"
node-key="id"
:expand-on-click-node="false"
@ -43,7 +43,7 @@
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -52,10 +52,28 @@
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="组线" prop="groupLine">
<template>
<el-select
v-model="queryParams.groupLine"
filterable
placeholder="请选择组线"
style="width: 160px"
>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -134,15 +152,18 @@
import {
getEquipmentList,
getEquipmentTypeList,
getGroupLineList,
} from "@/api/device/faultReport";
import {getEquList} from "@/api/device/plan";
import { treeselect } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData1: [],
treeData: [],
showFlag: false,
//
selectedItemId: undefined,
@ -165,13 +186,14 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: null,
equipmentTypeCode: null,
itemName: undefined,
equipmentTypeCode: undefined,
itemTypeId: 0,
itemCodeGet: "",
itemCode: null,
itemCode: undefined,
equipmentCode: null,
equipmentName: null,
groupLine: null,
},
//
columns: [
@ -191,8 +213,9 @@ export default {
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemCode: null,
itemType: null,
groupLine :null,
};
this.resetForm("form");
},
@ -216,14 +239,29 @@ export default {
this.total = response.total;
this.loading = false;
});
//线
getGroupLineList().then((response) => {
this.options = response.rows;
});
},
//
getEquList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
console.log(response.rows);
this.treeData1 = response.rows;
console.log(this.treeData1);
this.treeData = response.rows;
});
},
@ -236,23 +274,24 @@ export default {
//
handleNodeClick(data) {
console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode);
this.handleQuery();
console.log(this.queryParams.equipmentTypeCode);
this.queryParams.pageNum = 1;
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getEquList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
this.queryParams.pageNum = 1;
this.getList()
},
//
@ -279,7 +318,6 @@ export default {
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
@ -288,7 +326,6 @@ export default {
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},

@ -539,11 +539,21 @@
<el-dialog
title="选择设备"
:visible.sync="selectEqu"
width="50%"
width="1100px"
append-to-body
>
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="组线" prop="groupLine">
<el-select v-model="equipmentQuery.groupLine" placeholder="请选择组线">
<el-option
v-for="group in groupLineList"
:key="group.equipmentCode"
:label="group.equipmentName"
:value="group.equipmentCode"
/>
</el-select>
</el-form-item>
<el-form-item label="设备编码">
<el-input
v-model="equipmentQuery.equipmentCode"
@ -645,7 +655,7 @@ import {
updatePlan,
getEquList,
formatEquItem,
getPersonList, getWorkCenter, initUpdatePlanInfo
getPersonList, getWorkCenter, initUpdatePlanInfo, getGroupLine
} from "@/api/device/plan";
import plan from "@/views/plan/plan/index.vue";
@ -654,6 +664,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable'],
data() {
return {
// 线
groupLineList:[],
//
planLoading:false,
// list
@ -678,6 +690,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
},
@ -903,7 +916,21 @@ export default {
},
//
selectEquBtn() {
this.getEquList();
this.equipmentQuery = {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
};
// 线
getGroupLine().then(response => {
this.groupLineList = response.data;
this.equipmentQuery.groupLine = response.data[0].equipmentCode;
this.getEquList();
})
this.selectEqu = true;
},
//
@ -1032,6 +1059,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:this.groupLineList[0].equipmentCode,
pageNum: 1,
pageSize: 10,
};

@ -0,0 +1,547 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="车间" prop="workshop">
<el-input
v-model="queryParams.workshop"
placeholder="请输入车间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="组线" prop="groupLine">
<el-input
v-model="queryParams.groupLine"
placeholder="请输入组线"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备" prop="equipmentName">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
placeholder="请输入设备编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="故障时间" prop="faultTime">
<el-input
v-model="queryParams.faultTime"
placeholder="请输入故障时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="实际运行时间;运行时间-故障时间" prop="actualOperationTime">
<el-input
v-model="queryParams.actualOperationTime"
placeholder="请输入实际运行时间;运行时间-故障时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="运行时间" prop="operationTime">
<el-input
v-model="queryParams.operationTime"
placeholder="请输入运行时间"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="故障率" prop="failureRate">
<el-input
v-model="queryParams.failureRate"
placeholder="请输入故障率"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="故障描述" prop="failureDescription">
<el-input
v-model="queryParams.failureDescription"
placeholder="请输入故障描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="原因分析" prop="reasonAnalyze">
<el-input
v-model="queryParams.reasonAnalyze"
placeholder="请输入原因分析"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="处理方式" prop="handlingMethod">
<el-input
v-model="queryParams.handlingMethod"
placeholder="请输入处理方式"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="维修人" prop="repairPerson">
<el-input
v-model="queryParams.repairPerson"
placeholder="请输入维修人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="设备状态描述" prop="equStatusDes">
<el-input
v-model="queryParams.equStatusDes"
placeholder="请输入设备状态描述"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="更换备件" prop="replaceSpare">
<el-input
v-model="queryParams.replaceSpare"
placeholder="请输入更换备件"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂" prop="factoryCode">
<el-input
v-model="queryParams.factoryCode"
placeholder="请输入工厂"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input
v-model="queryParams.attr1"
placeholder="请输入备用字段1"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input
v-model="queryParams.attr2"
placeholder="请输入备用字段2"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input
v-model="queryParams.attr3"
placeholder="请输入备用字段3"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="日期" prop="createTime">
<el-date-picker
v-model="queryParams.createTimeArray"
type="daterange"
align="right"
unlink-panels
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row v-if="false" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['device:operation:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:operation:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:operation:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['device:operation:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="operationList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="主键" align="center" prop="id" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column width="100" label="工厂" align="center" prop="factoryCode" />
<el-table-column width="120" label="日期" align="center" prop="createTime" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="120" label="车间" align="center" prop="workshop" />
<el-table-column width="120" label="组线" align="center" prop="groupLine" />
<el-table-column width="120" label="设备" align="center" prop="equipmentName" />
<el-table-column width="120" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="100" label="故障时间" align="center" prop="faultTime" />
<el-table-column width="100" label="实际运行时间" align="center" prop="actualOperationTime" />
<el-table-column width="100" label="运行时间" align="center" prop="operationTime" />
<el-table-column width="100" label="故障率" align="center" prop="failureRate" />
<el-table-column width="200" label="故障描述" align="center" prop="failureDescription" />
<el-table-column width="200" label="原因分析" align="center" prop="reasonAnalyze" />
<el-table-column width="200" label="设备状态描述" align="center" prop="equStatusDes" />
<el-table-column width="200" label="处理方式" align="center" prop="handlingMethod" />
<el-table-column width="200" label="更换备件" align="center" prop="replaceSpare" />
<el-table-column width="100" label="维修人" align="center" prop="repairPerson" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1" />
<el-table-column v-if="false" label="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column width="120" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:operation:edit']"
>修改</el-button>
<el-button
v-if="false"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:operation:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改设备运行记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item v-if="false" label="车间" prop="workshop">
<el-input v-model="form.workshop" placeholder="请输入车间" />
</el-form-item>
<el-form-item v-if="false" label="组线" prop="groupLine">
<el-input v-model="form.groupLine" placeholder="请输入组线" />
</el-form-item>
<el-form-item label="设备" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备" :disabled="true"/>
</el-form-item>
<el-form-item v-if="false" label="设备编码" prop="equipmentCode">
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
</el-form-item>
<el-form-item label="故障时间" prop="faultTime">
<el-input v-model="form.faultTime" placeholder="请输入故障时间" />
</el-form-item>
<el-form-item label="实际运行时间" prop="actualOperationTime">
<el-input v-model="form.actualOperationTime" placeholder="请输入实际运行时间;运行时间-故障时间" />
</el-form-item>
<el-form-item label="运行时间" prop="operationTime">
<el-input v-model="form.operationTime" placeholder="请输入运行时间" />
</el-form-item>
<el-form-item v-if="false" label="故障率" prop="failureRate">
<el-input v-model="form.failureRate" placeholder="请输入故障率" :disabled="true"/>
</el-form-item>
<el-form-item label="故障描述" prop="failureDescription">
<el-input v-model="form.failureDescription" placeholder="请输入故障描述" :disabled="true"/>
</el-form-item>
<el-form-item label="原因分析" prop="reasonAnalyze">
<el-input v-model="form.reasonAnalyze" placeholder="请输入原因分析" :disabled="true"/>
</el-form-item>
<el-form-item label="处理方式" prop="handlingMethod">
<el-input v-model="form.handlingMethod" placeholder="请输入处理方式" :disabled="true"/>
</el-form-item>
<el-form-item label="维修人" prop="repairPerson">
<el-input v-model="form.repairPerson" placeholder="请输入维修人" :disabled="true"/>
</el-form-item>
<el-form-item label="设备状态描述" prop="equStatusDes">
<el-input v-model="form.equStatusDes" placeholder="请输入设备状态描述" :disabled="true"/>
</el-form-item>
<el-form-item label="更换备件" prop="replaceSpare">
<el-input v-model="form.replaceSpare" placeholder="请输入更换备件" :disabled="true"/>
</el-form-item>
<el-form-item v-if="false" label="工厂" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
</el-form-item>
<el-form-item v-if="false" label="备用字段1" prop="attr1">
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
</el-form-item>
<el-form-item v-if="false" label="备用字段2" prop="attr2">
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
</el-form-item>
<el-form-item v-if="false" label="备用字段3" prop="attr3">
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
</el-form-item>
<el-form-item v-if="false" label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listOperation, getOperation, delOperation, addOperation, updateOperation } from "@/api/device/operation";
import {parseTime} from "../../../utils/ruoyi";
export default {
name: "Operation",
data() {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近一个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit('pick', [start, end]);
}
}, {
text: '最近三个月',
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit('pick', [start, end]);
}
}]
},
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
operationList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
workshop: null,
groupLine: null,
equipmentName: null,
equipmentCode: null,
faultTime: null,
actualOperationTime: null,
operationTime: null,
failureRate: null,
failureDescription: null,
reasonAnalyze: null,
handlingMethod: null,
repairPerson: null,
equStatusDes: null,
replaceSpare: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
createTimeArray: [],
},
//
form: {},
//
rules: {
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}
};
},
created() {
this.getList();
},
methods: {
parseTime,
/** 查询设备运行记录列表 */
getList() {
this.loading = true;
listOperation(this.queryParams).then(response => {
this.operationList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
workshop: null,
groupLine: null,
equipmentName: null,
equipmentCode: null,
faultTime: null,
actualOperationTime: null,
operationTime: null,
failureRate: null,
failureDescription: null,
reasonAnalyze: null,
handlingMethod: null,
repairPerson: null,
equStatusDes: null,
replaceSpare: null,
factoryCode: null,
attr1: null,
attr2: null,
attr3: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
//
this.queryParams.createTimeArray = [];
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加设备运行记录";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getOperation(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改设备运行记录";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateOperation(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOperation(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除设备运行记录编号为"' + ids + '"的数据项?').then(function() {
return delOperation(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/operation/export', {
...this.queryParams
}, `operation_${new Date().getTime()}.xlsx`)
}
}
};
</script>

@ -343,6 +343,12 @@
prop="workReason"
width="300"
/>
<el-table-column
label="维修处理措施"
align="center"
prop="repairMeasures"
width="300"
/>
<el-table-column
label="维修开始时间"
align="center"
@ -1093,6 +1099,19 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="处理措施" prop="repairMeasures">
<el-input
v-model="form.repairMeasures"
placeholder="请输入处理措施"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 940px"
/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="故障图片" prop="afterRepairFile">
@ -1423,6 +1442,20 @@
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="10" class="mb8">
<el-col :span="24">
<el-form-item label="处理措施" prop="repairMeasures">
<el-input
disabled
v-model="form.repairMeasures"
placeholder="请输入处理措施"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
style="width: 940px"
/>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane>
<el-tab-pane label="查看备件申领记录">
<!-- 使用备件领用记录 -->

@ -4,7 +4,7 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal="false"
width="1100px"
width="1200px"
center
:before-close="cancelEquipmentForm"
>
@ -15,7 +15,7 @@
<span>请选择设备类型</span>
<div class="head-container" style="text-align: center">
<el-tree
:data="treeData1"
:data="treeData"
:props="{ id: 'equipmentTypeCode', label: 'equipmentTypeName' }"
node-key="id"
:expand-on-click-node="false"
@ -43,7 +43,7 @@
v-model="queryParams.itemCode"
placeholder="请输入设备编码"
clearable
style="width: 240px"
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -52,10 +52,28 @@
v-model="queryParams.itemName"
placeholder="请输入设备名称"
clearable
style="width: 240px"
style="width: 160px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="组线" prop="groupLine">
<template>
<el-select
v-model="queryParams.groupLine"
filterable
placeholder="请选择组线"
style="width: 160px"
>
<el-option
v-for="item in options"
:key="item.equipmentCode"
:label="item.equipmentName"
:value="item.equipmentCode"
>
</el-option>
</el-select>
</template>
</el-form-item>
<el-form-item>
<el-button
type="primary"
@ -134,16 +152,18 @@
import {
getEquipmentList,
getEquipmentTypeList,
getGroupLineList,
} from "@/api/device/faultReport";
import {getEquList} from "@/api/device/plan";
import { treeselect } from "@/api/wms/equipment";
import { Message } from "element-ui";
export default {
name: "MdItemSingle",
// components: { Treeselect },
data() {
return {
treeData1: [],
treeData: [],
showFlag: false,
//
selectedItemId: undefined,
@ -173,6 +193,7 @@ export default {
itemCode: undefined,
equipmentCode: null,
equipmentName: null,
groupLine: null,
},
//
columns: [
@ -192,8 +213,9 @@ export default {
reset() {
this.form = {
itemId: null,
itemCode: this.processId,
itemCode: null,
itemType: null,
groupLine :null,
};
this.resetForm("form");
},
@ -217,14 +239,29 @@ export default {
this.total = response.total;
this.loading = false;
});
//线
getGroupLineList().then((response) => {
this.options = response.rows;
});
},
//
getEquList() {
this.loading = true;
this.queryParams.equipmentCode = this.queryParams.itemCode;
this.queryParams.equipmentName = this.queryParams.itemName;
getEquList(this.queryParams).then((response) => {
this.itemList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 查询分类下拉树结构 */
getEquipmentType() {
getEquipmentTypeList().then((response) => {
console.log(response.rows);
this.treeData1 = response.rows;
console.log(this.treeData1);
this.treeData = response.rows;
});
},
@ -237,23 +274,24 @@ export default {
//
handleNodeClick(data) {
console.log("id", data.id);
this.queryParams.equipmentTypeCode = data.equipmentTypeCode;
console.log(this.equipmentTypeCode);
this.handleQuery();
console.log(this.queryParams.equipmentTypeCode);
this.queryParams.pageNum = 1;
this.getList();
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
this.getEquList();
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.equipmentTypeCode = null;
this.resetForm("queryForm");
this.handleQuery();
this.queryParams.pageNum = 1;
this.getList()
},
//
@ -267,7 +305,7 @@ export default {
submitEquipmentForm() {
const data = this.ids;
if (data.length > 1) {
Message.warning("只能选择一个修机器,请勿选择多个!");
Message.warning("只能选择一个修机器,请勿选择多个!");
} else {
const equipmentCode = data.toString();
if (this.queryParams.itemCodeGet == "") {
@ -280,7 +318,6 @@ export default {
this.$emit("onSelected", this.selectedRows);
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
this.queryParams.itemCodeGet = "";
}
@ -289,7 +326,6 @@ export default {
cancelEquipmentForm() {
this.queryParams.equipmentTypeCode = null;
this.getList();
console.log("111111", this.queryParams.equipmentTypeCode);
this.showFlag = false;
},
},

@ -6,7 +6,7 @@
:modal="false"
width="1100px"
center
:before-close="cancel"
:before-close = "cancel"
>
<el-form
:model="queryParams"
@ -247,6 +247,8 @@ export default {
},
/** 查询备品备件台账管理列表 */
getList() {
this.sparePartsLedgerList = null;
this.total = 0;
this.loading = true;
listSparePartsLedger(this.queryParams).then((response) => {
this.sparePartsLedgerList = response.rows;

@ -306,15 +306,15 @@
<el-form-item label="备品备件名称" prop="spareName">
<el-input
v-model="form.spareName"
placeholder="请选择备品备件名称"
style="width: 280px"
disabled
/>
</el-form-item>
<el-form-item label="规格型号" prop="spareModel">
<el-input
v-model="form.spareModel"
placeholder="请选择规格型号"
style="width: 280px"
disabled
/>
</el-form-item>
<el-form-item label="库存总数量" prop="amount">
@ -486,9 +486,6 @@ export default {
spareName: [
{ required: true, message: "备品备件名称不能为空", trigger: "blur" },
],
spareModel: [
{ required: true, message: "规格型号不能为空", trigger: "blur" },
],
spareQuantity: [
{ required: true, message: "数量不能为空", trigger: "blur" },
],
@ -517,6 +514,7 @@ export default {
this.form.amount = obj[0].amount;
this.form.storageAmount = obj[0].storageAmount;
this.form.availableQuantity = obj[0].amount - obj[0].storageAmount;
this.form.spareQuantity = obj[0].spareQuantity;
},
//
handleSelectEquipment() {

@ -84,18 +84,6 @@
v-if="columns[1].visible"
:show-overflow-tooltip="true"
/>
<el-table-column
label="部门编码"
align="center"
prop="postCode"
v-if="columns[2].visible"
></el-table-column>
<el-table-column
label="部门名称"
align="center"
prop="postName"
v-if="columns[3].visible"
></el-table-column>
</el-table>
<pagination
@ -149,8 +137,6 @@ export default {
columns: [
{ key: 0, label: `人员编码`, visible: true },
{ key: 1, label: `人员名称`, visible: true },
{ key: 2, label: `部门编码`, visible: true },
{ key: 3, label: `部门名称`, visible: true },
],
};
},

@ -55,13 +55,6 @@
>
</el-form-item>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table
v-loading="loading"
:data="sparePartsLedgerList"
@ -136,7 +129,7 @@
</div>
</el-dialog>
</template>
<script>
import {
listSparePartsLedger,
@ -252,6 +245,8 @@ export default {
},
/** 查询备品备件台账管理列表 */
getList() {
this.sparePartsLedgerList = null;
this.total = 0;
this.loading = true;
listSparePartsLedger(this.queryParams).then((response) => {
this.sparePartsLedgerList = response.rows;
@ -340,22 +335,12 @@ export default {
message: "请勿选择多种备件!",
type: "warning",
});
// const number =
// this.$refs.multipleTable.selection.amount -
// this.$refs.multipleTable.selection.storageAmount;
// console.log("number", number);
// if (this.$refs.multipleTable.selection.spareQuantity > number) {
// this.$message({
// message: "",
// type: "warning",
// });
// }
} else {
this.$emit("onSelected", this.$refs.multipleTable.selection);
this.showFlag = false;
this.getList();
}
},
},
};
</script>

@ -567,11 +567,21 @@
border
title="选择设备"
:visible.sync="selectEqu"
width="50%"
width="1100px"
append-to-body
>
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="组线" prop="groupLine">
<el-select v-model="equipmentQuery.groupLine" placeholder="请选择组线">
<el-option
v-for="group in groupLineList"
:key="group.equipmentCode"
:label="group.equipmentName"
:value="group.equipmentCode"
/>
</el-select>
</el-form-item>
<el-form-item label="设备编码">
<el-input
v-model="equipmentQuery.equipmentCode"
@ -676,7 +686,7 @@ import {
import {
addPlan,
delPlan,
getEquList,
getEquList, getGroupLine,
getPersonList,
getWorkCenter,
initUpdatePlanInfo, listPlan,
@ -688,6 +698,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'],
data() {
return {
// 线
groupLineList:[],
//
rules: {},
//
@ -742,6 +754,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
},
@ -948,7 +961,21 @@ export default {
},
//
selectEquBtn() {
this.getEquList();
this.equipmentQuery = {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
};
// 线
getGroupLine().then(response => {
this.groupLineList = response.data;
this.equipmentQuery.groupLine = response.data[0].equipmentCode;
this.getEquList();
})
this.selectEqu = true;
},
//
@ -1077,6 +1104,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:this.groupLineList[0].equipmentCode,
pageNum: 1,
pageSize: 10,
};

@ -76,7 +76,7 @@
<el-table-column prop="standardName" label="标准名称" width="500">
</el-table-column>
<el-table-column prop="itemLoop" label="次" width="55"> </el-table-column>
<el-table-column prop="itemLoopType" label="周期" width="55">
<el-table-column prop="itemLoopType" label="周期" width="60">
</el-table-column>
<el-table-column prop="head" label="责任人" width="70"> </el-table-column>
<el-table-column prop="one" label="1" width="40">

@ -617,11 +617,21 @@
<el-dialog
title="选择设备"
:visible.sync="selectEqu"
width="800px"
width="1100px"
append-to-body
>
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="组线" prop="groupLine">
<el-select v-model="equipmentQuery.groupLine" placeholder="请选择组线">
<el-option
v-for="group in groupLineList"
:key="group.equipmentCode"
:label="group.equipmentName"
:value="group.equipmentCode"
/>
</el-select>
</el-form-item>
<el-form-item label="设备编码">
<el-input
v-model="equipmentQuery.equipmentCode"
@ -1170,7 +1180,7 @@ import {
updateUpkeepOrder, subInspect
} from "@/api/device/upkeepOrder";
import {formatEquItem, formatEquItemNoCondition, querySpareList} from "@/api/device/upkeepPlan";
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
import {getEquList, getGroupLine, getPersonList, getWorkCenter} from "@/api/device/plan";
import {delDeviceOrder, getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {getInspectionWork, updateInspectionWork} from "@/api/device/inspectionWork";
@ -1179,6 +1189,8 @@ export default {
dicts: ['device_order_status', 'device_loop_type','device_reach_standard','device_upkeep_type','device_inspect_status'],
data() {
return {
// 线
groupLineList:[],
// list
spareOnList:[],
//
@ -1291,6 +1303,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
},
@ -1414,6 +1427,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:this.groupLineList[0].equipmentCode,
pageNum: 1,
pageSize: 10,
};
@ -1663,7 +1677,21 @@ export default {
},
//
selectEquBtn() {
this.getEquList();
this.equipmentQuery = {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
};
// 线
getGroupLine().then(response => {
this.groupLineList = response.data;
this.equipmentQuery.groupLine = response.data[0].equipmentCode;
this.getEquList();
})
this.selectEqu = true;
},
//

@ -597,11 +597,21 @@
<el-dialog
title="选择设备"
:visible.sync="selectEqu"
width="50%"
width="1100px"
append-to-body
>
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
label-width="68px">
<el-form-item label="组线" prop="groupLine">
<el-select v-model="equipmentQuery.groupLine" placeholder="请选择组线">
<el-option
v-for="group in groupLineList"
:key="group.equipmentCode"
:label="group.equipmentName"
:value="group.equipmentCode"
/>
</el-select>
</el-form-item>
<el-form-item label="设备编码">
<el-input
v-model="equipmentQuery.equipmentCode"
@ -878,7 +888,7 @@ import {
import {
addPlan,
delPlan,
getEquList,
getEquList, getGroupLine,
getPersonList,
getWorkCenter,
initUpdatePlanInfo,
@ -890,6 +900,8 @@ export default {
dicts: ['device_loop_type', 'sys_normal_disable','device_upkeep_type'],
data() {
return {
// 线
groupLineList:[],
// list
spareOnList:[],
//
@ -969,6 +981,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
},
@ -1438,7 +1451,21 @@ export default {
},
//
selectEquBtn() {
this.getEquList();
this.equipmentQuery = {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:null,
pageNum: 1,
pageSize: 10,
};
// 线
getGroupLine().then(response => {
this.groupLineList = response.data;
this.equipmentQuery.groupLine = response.data[0].equipmentCode;
this.getEquList();
})
this.selectEqu = true;
},
//
@ -1561,6 +1588,7 @@ export default {
equipmentCode: null,
equipmentName: null,
workshopCode: null,
groupLine:this.groupLineList[0].equipmentCode,
pageNum: 1,
pageSize: 10,
};

@ -22,6 +22,12 @@
</el-row>
<el-divider />
<el-row :gutter="20">
<el-col :sm="12" :lg="24">
<span style="font-size: 20px;margin: 20%;color: cadetblue;">{{deviceTitle}}</span>
</el-col>
</el-row>
<el-row :gutter="20">
<DeviceChartLine :chart-data="deviceChartLineData" ref="DeviceChartLine"/>
</el-row>
</div>
</template>
@ -30,10 +36,12 @@
import LineChart from './dashboard/LineChart';
import PieChart from './dashboard/PieChart';
import PieChart2 from './dashboard/PieChart2';
import {getLineChartData} from '@/api/mes/reportWork'
import {getGroupLineEquInfo, getLineChartData} from '@/api/mes/reportWork'
import DeviceChartLine from "./dashboard/DeviceChartLine";
export default {
name: "Index",
components: {
DeviceChartLine,
LineChart//,PieChart,PieChart2
},
data() {
@ -41,11 +49,14 @@ export default {
//
version: "1.0.0",
lineChartData: null,
title:"本月工厂产量"
deviceChartLineData:null,
title:"本月工厂产量",
deviceTitle: "各组线月设备故障数"
};
},
created() {
this.getLineChartData();
this.getGroupLineEquInfo();
},
methods: {
goTarget(href) {
@ -55,6 +66,11 @@ export default {
getLineChartData().then(data => {
this.lineChartData = data;
});
},
getGroupLineEquInfo(){
getGroupLineEquInfo().then(response => {
this.deviceChartLineData = response.data;
});
}
},
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,614 @@
<template>
<v-scale-screen width="1920" height="1080" :fullScreen="false">
<div class="app-container home" style="">
<div class="head">
<div class="head-content">
<div class="title">榄菊设备管理云平台</div>
</div>
<div class="head-logo">
<img src="../../../assets/images/logo.png" alt="" />
</div>
<div class="back">
<el-button @click="back()" type="primary" icon="el-icon-s-home"></el-button>
</div>
</div>
<div class="content-top">
<div class="factoryCode">
<div class="selectborder">
<select v-model="selectxt" class="select1" @change="selectline(selectxt)">
<option :key="index" :value="x.parentName" v-for="(x, index) in getLineList">
{{ x.deptName }}
</option>
<!-- <option :key="index" :value="x.seriesName" v-for="(x, index) in ceshib">{{ x.seriesName }}</option> -->
</select>
</div>
</div>
<div class="timebox">
<div class="time">
{{ gettimedata }}
</div>
</div>
</div>
<div class="content">
<div class="itembottom">
<div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;">
<div class="titlename">检验及时性详情</div>
</div>
<table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr style="height: 44px;">
<td style="width: 8%;">序号</td>
<td style="width: 8%;">检验编号</td>
<td style="width: 8%;">检验阶段</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 8%;">物料来源</td>
<td style="width: 8%;">物料名称</td>
<td style="width: 8%;">检验人</td>
<td style="width: 8%;">检验状态</td>
</tr>
</thead>
</table>
<div class="table-tbody">
<!-- <vue-seamless-scroll :data="Inspectiondetails" :class-option="classOption" class="wrapscroll"> -->
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in Inspectiondetails">
<td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 8%;">{{ n.checkNo }}</td>
<td style="width: 8%;">{{ n.checkName }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.supplierName }}</td>
<td style="width: 8%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
n.checkStatus }}</td>
</tr>
</tbody>
</table>
<!-- </vue-seamless-scroll> -->
</div>
</div>
<div class="item-table item-table1">
<div class="titlebox2" style="margin-bottom: 14px;">
<div class="titlename">检验实时详情</div>
</div>
<table class="table-thead" border="0" cellpadding="0" cellspacing="0">
<thead>
<tr style="height: 44px;">
<td style="width: 8%;">序号</td>
<td style="width: 8%;">检验编号</td>
<td style="width: 8%;">检验阶段</td>
<td style="width: 8%;">检验时间</td>
<td style="width: 8%;">物料来源</td>
<td style="width: 8%;">物料名称</td>
<td style="width: 8%;">检验人</td>
<td style="width: 8%;">检验状态</td>
</tr>
</thead>
</table>
<div class="table-tbody">
<!-- <vue-seamless-scroll :data="Inspectiondetails" :class-option="classOption" class="wrapscroll"> -->
<table border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr :class="[index % 2 == 1 ? 'active1' : 'active2']" style="height:48px" :key="index"
v-for="(n, index) in Inspectiondetails1">
<td style="width: 8%;">{{ index + 1 }}</td>
<td style="width: 8%;">{{ n.checkNo }}</td>
<td style="width: 8%;">{{ n.checkName }}</td>
<td style="width: 8%;">{{ n.incomeTime }}</td>
<td style="width: 8%;">{{ n.supplierName }}</td>
<td style="width: 8%;">{{ n.materialName }}</td>
<td style="width: 8%;">{{ n.checkManName }}</td>
<td style="width: 8%;" :class="[n.checkStatus == 1 ? 'color1' : 'color2']">{{
n.checkStatus }}</td>
</tr>
</tbody>
</table>
<!-- </vue-seamless-scroll> -->
</div>
</div>
</div>
</div>
<!-- <div class="item"></div> -->
<!-- <div class="item"></div> -->
</div>
</v-scale-screen>
</template>
<script>
import {
getBoardFactory,
getSupplierNoOkList,
} from "@/api/kanban/quality";;
import * as echarts from "echarts";
import moment from "moment";
// import Echarts3D from "./echarts3d.vue";
// import Echarts3D2 from "./echarts3d2.vue";
export default {
name: "Index",
components: {
},
data() {
return {
gettimedata: "",
selectxt: null,
selectxtclasses: null,
getLineList: [],
classesList: [],
number1: 0,
number2: 0,
number3: 0,
number4: 0,
nameList: [
"成型机一",
"成型机二",
"成型机三",
"成型机四",
"成型机五",
"成型机六",
"成型机五",
"成型机六",
],
valueList: [1639, 1422, 1306, 1131, 1040, 732, 1040, 732],
optionDatalist1: [],
optionDatalist2: [],
optionDatalist3: [],
optionDatalist4: [],
colorlist: ["#005aff", "#f8b551"],
datetime: null,
time1: null,
repairlist: [],
Inspectiondetails: [],
Inspectiondetails1: [],
equipmentrepairlist: [],
equipmentstabilizelist: [],
equipmentinfo: [],
};
},
created() { },
destroyed() {
clearInterval(this.time1);
this.time1 = null;
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectfactoryCodelist();
this.gettime();
},
methods: {
back() {
this.$router.push({ path: "/index" });
},
gettime() {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
setInterval(() => {
this.gettimedata = moment().format("YYYY-MM-DD HH:mm:ss ");
}, 1000);
},
selectfactoryCodelist() {
const _this = this;
getBoardFactory({
factory: null,
}).then((response) => {
if (response.data) {
_this.getLineList = response.data;
_this.selectxt = _this.getLineList[0].parentName;
_this.getSupplierNoOkList(_this.selectxt)
}
});
},
getSupplierNoOkList() {
const _this = this;
this.Inspectiondetails = []
getSupplierNoOkList({
ymdType: '统计维度',
typeCode: 'material',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
this.Inspectiondetails = response
this.Inspectiondetails.forEach((item) => {
item.incomeTime = moment(item.incomeTime).format('YYYY-MM-DD HH:mm:ss')
});
}
});
getSupplierNoOkList({
ymdType: 'dd',
typeCode: 'produce',
factoryCode: 'ds_' + _this.selectxt,
}).then((response) => {
if (response) {
this.Inspectiondetails1 = response
}
});
},
initChart1() { },
selectline() {
const _this = this;
this.optionDatalist1 = [];
this.optionDatalist2 = [];
this.optionDatalist3 = [];
this.optionDatalist4 = [];
_this.getSupplierNoOkList(_this.selectxt)
},
//
},
};
</script>
<style lang="scss" scoped>
.app-container {
padding: 0px 24px;
}
.home {
width: 100%;
height: 100vh;
background: url("../../../assets/images/bg-body.png") no-repeat;
background-size: 100% 100%;
background-color: #050711;
.head {
width: 100%;
height: 74px;
position: relative;
.head-content {
height: 74px;
background-image: url("../../../assets/images/bg-head.png");
background-repeat: no-repeat;
background-size: 100% 100%;
text-align: center;
.title {
font-size: 42px;
font-weight: 400;
color: #ffffff;
}
}
.head-logo {
position: absolute;
left: 0px;
top: 1px;
img {
height: 38px;
// width: ;
}
}
.back {
position: absolute;
right: 0px;
top: 5px;
}
}
.content-top {
display: flex;
justify-content: space-between;
position: relative;
.factoryCode {
width: 540px;
height: 60px;
background: url("../../../assets/images/bg- border1.png") no-repeat;
background-size: 100% 100%;
text-align: center;
position: absolute;
top: -17px;
left: 0px;
}
.timebox {
width: 480px;
height: 60px;
background: url("../../../assets/images/bg-border2.png") no-repeat;
background-size: 100% 100%;
text-align: center;
position: absolute;
top: -17px;
right: 0px;
.time {
font-size: 30px;
font-weight: 400;
color: #ffffff;
line-height: 71px;
}
}
}
.content {
margin-top: 63px;
.itembottom {
margin-top: 19px;
.item-table {
width: 1877px;
height: 50%;
background: url('../../../assets/images/equipment/bg-border1.png') no-repeat;
background-size: 100% 100%;
padding: 27px 21px 30px 25px;
box-sizing: border-box;
box-sizing: border-box;
.table-thead {
width: 100%;
height: 44px;
margin: auto;
background: #0A1A33;
td {
font-size: 19px;
font-family: NotoSansHans-Medium, NotoSansHans;
font-weight: 500;
color: #159AFF;
text-align: center;
white-space: nowrap;
}
}
.table-tbody {
height: 192px;
// width: 1775px;
margin: auto;
overflow-y: scroll;
table {
width: 100%;
tbody {
width: 100%;
td {
font-size: 19px;
font-family: NotoSansHans-Medium, NotoSansHans;
font-weight: 500;
color: #FFFFFF;
text-align: center;
border-bottom: 1px dashed #6C8097
}
}
}
}
}
.item-table1:first-child {
margin-right: 10px;
}
.item-table1 {
flex: 1;
margin-top: 20px;
padding-top: 19px;
// .table-thead {
// width: 565.01px;
// }
.table-tbody {
height: 300px;
}
}
}
}
}
.titlebox {
width: 431px;
height: 38px;
background: url("../../../assets/images/bg-title.png") no-repeat;
background-size: 100% 100%;
// text-align: center;
font-size: 20px;
font-weight: bold;
color: #ffffff;
line-height: 38px;
letter-spacing: 2px;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
padding-left: 60px;
// .titlename{
// position: relative;
// left: 24px;
// }
}
.titlebox2 {
margin: auto;
width: 542px;
height: 41px;
background: url("../../../assets/images/quality/bg-border2title.png") no-repeat;
background-size: 100% 100%;
text-align: center;
font-size: 20px;
font-weight: bold;
color: #ffffff;
line-height: 41px;
letter-spacing: 2px;
text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.5);
// .titlename{
// position: relative;
// left: 24px;
// }
}
.factoryCode {
display: flex;
// justify-content: space-around;
}
.selectborder {
background-color: transparent;
border-radius: 4px;
// border: 2px solid #27408c;
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
width: 350px;
margin-left: 50px;
}
.selectborder1 {
background-color: transparent;
border-radius: 4px;
// border: 2px solid #27408c;
position: relative;
display: flex;
align-items: center;
justify-content: space-around;
width: 88px;
margin-left: 25px;
}
.selectborder select {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 100%;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
font-size: 25px;
font-weight: 400;
color: #ffffff;
line-height: 42px;
}
.selectborder option {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 100%;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-left: 20px;
font-size: 25px;
font-weight: 500;
color: #3fa2ff;
border-radius: 0%;
}
.selectborder1 option {
/*清除select的边框样式*/
border: none;
/*清除select聚焦时候的边框颜色*/
outline: none;
background-color: transparent;
/*将select的宽高等于div的宽高*/
width: 200px;
height: 50px;
/*隐藏select的下拉图标*/
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
padding-left: 20px;
font-size: 25px;
font-weight: 500;
color: #3fa2ff;
border-radius: 0%;
}
.selectborder:after {
content: "";
width: 24px;
height: 24px;
background: url(../../../assets/images/xiala.png) no-repeat center;
/*通过定位将图标放在合适的位置*/
position: absolute;
right: 0px;
top: 25%;
/*给自定义的图标实现点击下来功能*/
pointer-events: none;
}
.selectborder1:after {
content: "";
width: 24px;
height: 24px;
background: url(../../../assets/images/xiala.png) no-repeat center;
/*通过定位将图标放在合适的位置*/
position: absolute;
right: 0px;
top: 25%;
/*给自定义的图标实现点击下来功能*/
pointer-events: none;
}
::v-deep .el-button--primary {
color: #ffffff;
background-color: #325e82;
border-color: #0a0f19;
}
.active1 {
background: url('../../../assets/images/quality/bgtable.png');
}
.active2 {}
::-webkit-scrollbar {
width: 3px;
height: 0px;
background-color: #0c0642;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 8px;
background-color: #07356a;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
border-radius: 8px;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
background-color: #0091ff;
// opacity: 0.1;
}
.progress {
width: 100px;
background-color: rgba(15, 182, 217, 0.3);
border-radius: 10px;
.bar {
background: linear-gradient(90deg, rgba(15, 182, 217, 1), rgba(1, 255, 255, 1));
border-radius: 10px;
}
}
.color1 {
color: #F1D34C;
}
.color2 {
clear: #FF4D4F;
}
.color3 {
color: #66FFFF;
}
</style>

@ -9,9 +9,9 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="订单编码" prop="orderCode">
<el-form-item label="订单编码" prop="workorderCodeSap">
<el-input
v-model="queryParams.orderCode"
v-model="queryParams.workorderCodeSap"
placeholder="请输入订单编码"
clearable
@keyup.enter.native="handleQuery"
@ -51,17 +51,18 @@
>
</el-date-picker>
</el-form-item>
<!--
<el-form-item label="单据状态" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择单据状态"
@change="$forceUpdate()"
clearable
style="width:205px"
@keyup.enter.native="handleQuery">
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
</el-select>
</el-form-item>
<el-select
v-model="queryParams.status"
placeholder="请选择单据状态"
@change="$forceUpdate()"
clearable
style="width:205px"
@keyup.enter.native="handleQuery">
<el-option v-for="item in options" :key="item.status" :label="item.label" :value="item.status"></el-option>
</el-select>
</el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" >搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -128,41 +129,24 @@
<el-table v-loading="loading" :data="prepareList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column type="index" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="工单编码" align="center" prop="workorderCode" width="220" fixed/>
<!-- <el-table-column label="父工单" align="center" prop="parentOrder" /> -->
<el-table-column label="订单编码" align="center" prop="orderCode" width="220"/>
<el-table-column type="index" align="center" :index="indexMethod" label="序号" fixed/>
<el-table-column label="工单编码" align="center" prop="workorderCode" width="200" fixed/>
<el-table-column label="订单编码" align="center" prop="workorderCodeSap" width="200" fixed/>
<el-table-column label="产品编号" align="center" prop="productCode" width="180"/>
<!-- <el-table-column label="产品类型" align="center" prop="prodType" /> -->
<el-table-column label="产品名称" align="center" prop="productName" width="180"/>
<!-- <el-table-column label="规格型号" align="center" prop="productSpc" /> -->
<el-table-column label="产品名称" align="center" prop="productName" width="180" :show-overflow-tooltip="true"/>
<el-table-column label="工单生产日期" align="center" prop="productDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.productDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="班次" align="center" prop="shiftId" /> -->
<!--
<el-table-column label="单据状态" align="center" prop="status">
<template slot-scope="scope">
{{ scope.row.status == "L0" ? "待确认" : "已确认" }}
</template>
</el-table-column>
<el-table-column label="物料编号" align="center" prop="materialCode" width="180"/>
<el-table-column label="物料名称" align="center" prop="materialName" width="250"/>
<el-table-column label="物料规格型号" align="center" prop="materialSpc" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="生产数量" align="center" prop="quantity" />
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
@click="handlePrepareDetail(scope.row)"
v-hasPermi="['mes:prepareDetail:list']"
>查看备料单</el-button>
<Detail ref="detail"> </Detail>
{{ scope.row.status == "L0" ? "待确认" : "已确认" }}
</template>
</el-table-column> -->
</el-table-column>-->
<el-table-column label="生产数量" align="center" prop="quantity" />
<el-table-column label="单位" align="center" prop="unit" />
</el-table>
<pagination
@ -263,19 +247,21 @@
<el-table-column
prop="materialCode"
label="料号"
width="180">
width="170">
</el-table-column>
<el-table-column
prop="materailName"
prop="materialName"
label="物料描述"
width="300">
width="240">
</el-table-column>
<el-table-column
prop="unit"
width="50"
label="单位">
</el-table-column>
<el-table-column
prop="orderCode"
prop="workorderCode"
width="120"
label="生产订单">
</el-table-column>
<el-table-column
@ -288,7 +274,12 @@
</el-table-column>
<el-table-column
prop="routeCode"
width="80"
label="实发数量">
</el-table-column>
<el-table-column
prop="recoil"
label="反冲物料">
</el-table-column>
</el-table>
@ -454,7 +445,7 @@ export default {
printPrepareByCode(this.selectPrepare[0].workorderCode).then(response => {
console.log(response.data)
this.printData.factory = response.data.mesPrepareDetailList[0].factoryCode
this.printData.productDate = response.data.mesPrepare.productDate
this.printData.productDate = response.data.mesPrepareDetailList[0].productDate
this.printData.printDate = moment(new Date()).format('YYYY-MM-DD')
this.printData.workTable = response.data.mesPrepareDetailList
this.refreshNewWorkerTable = true // refreshProTabletrue

@ -935,7 +935,7 @@ export default {
return reportSap(code);
}).then(() => {
this.getList();
this.$modal.msgSuccess("报工成功");
//this.$modal.msgSuccess("");
}).catch(() => {});
},
/** 报工详情按钮操作 */

@ -253,17 +253,22 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="收货数量" prop="quality">
<el-input type="number" v-model="form.quality" placeholder="请输入收货数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="不合格数量" prop="noOkQuality">
<el-input type="number" v-model="form.noOkQuality" placeholder="请输入不合格数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option

@ -27,6 +27,7 @@
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="id" align="left" prop="recordId" width="100" v-if="false"/>
<el-table-column label="入库单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="质检状态" align="left" prop="qualityStatus" width="100"/>
<el-table-column label="批次号" align="left" prop="incomeBatchNo" width="120"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>

@ -319,17 +319,22 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="A类不良数量" prop="aNoOkquality">
<el-input type="number" v-model="form.aNoOkquality" placeholder="请输入不良数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="B类不良数量" prop="bNoOkquality">
<el-input type="number" v-model="form.bNoOkquality" placeholder="请输入不良数量" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="C类不良数量" prop="cNoOkquality">
<el-input type="number" v-model="form.cNoOkquality" placeholder="请输入不良数量" />
</el-form-item>

@ -25,12 +25,13 @@
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="120"/>
<el-table-column label="订单状态" align="left" prop="status" width="90"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="130"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" />
<el-table-column label="单位" align="left" prop="unit" :show-overflow-tooltip="true" width="80"/>
<el-table-column label="生产日期" align="left" prop="incomeTime" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<span>{{ parseTime(scope.row.incomeTime, '{y}-{m}-{d}') }}</span>

@ -280,9 +280,9 @@
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="入库时间" prop="incomeTime">
<el-date-picker clearable
<el-date-picker clearable style="width: 100%;"
v-model="form.incomeTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
@ -290,7 +290,17 @@
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8">
<el-col :span="6">
<el-form-item label="抽样数量" prop="sampleQuality">
<el-input type="number" v-model="form.sampleQuality" placeholder="请输入抽样数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="不合格数量" prop="noOkQuality">
<el-input type="number" v-model="form.noOkQuality" placeholder="请输入不合格数量" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单位" prop="unit" >
<el-select v-model="form.unit" placeholder="请选择单位" style="width: 100%;">
<el-option
@ -302,6 +312,9 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="批次号" prop="incomeBatchNo">
<el-select v-model="form.incomeBatchNo" class="selectItem" placeholder="请选择批次" clearable>
@ -313,8 +326,6 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="仓库名称" prop="supplierName">
<el-input v-model="form.supplierName" placeholder="请选择仓库名称">

@ -25,8 +25,9 @@
</el-form>
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="180"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="180"/>
<el-table-column label="订单号" align="left" prop="orderNo" width="120"/>
<el-table-column label="订单状态" align="left" prop="status" width="90"/>
<el-table-column label="工单号" align="left" prop="workorderCode" width="130"/>
<el-table-column label="产品编码" align="left" prop="materialCode" width="180" />
<el-table-column label="产品名称" align="left" prop="materialName" width="180"/>
<el-table-column label="排产数量" align="left" prop="quality" width="100" />

@ -60,7 +60,7 @@
</el-select>
</el-form-item>
<el-form-item label="设备类别" prop="equipmentStatus">
<el-form-item label="设备类别" prop="equipmentCategory">
<el-select
v-model="queryParams.equipmentCategory"
placeholder="设备类别(组线/设备)"
@ -698,11 +698,20 @@
<el-button v-if="this.repairRecordSteps > 0" @click="stepLast"
>上一步</el-button
>
<el-button v-if="this.repairRecordSteps < 4" @click="stepNext"
<el-button v-if="this.repairRecordSteps < 4 && this.form.equipmentCategory == '1' " @click="stepNext"
>下一步</el-button
>
<el-button v-if="this.repairRecordSteps < 3 && this.form.equipmentCategory == '0' " @click="stepNext"
>下一步</el-button
>
<el-button
v-if=" this.repairRecordSteps == 4 && this.form.equipmentCategory == '1' "
type="primary"
@click="submitForm"
> </el-button
>
<el-button
v-if="this.repairRecordSteps == 4"
v-if=" this.repairRecordSteps == 3 && this.form.equipmentCategory == '0' "
type="primary"
@click="submitForm"
> </el-button
@ -1097,11 +1106,17 @@ export default {
workshopSection: null,
equipmentLocation: null,
hourlyUnitPrice: null,
equipmentCategory : null,
},
queryEquipmentHeadParams: {
pageNum: 1,
pageSize: 10,
},
queryAuxiliaryEquipmentParams: {
pageNum: 1,
pageSize: 1000,
equipmentCategory : null,
},
options: [
{
status: "1",
@ -1158,6 +1173,9 @@ export default {
status: [
{ required: true, message: "设备状态不能为空", trigger: "blur" },
],
equipmentCategory: [
{ required: true, message: "设备类别不能为空", trigger: "blur" },
],
},
};
},
@ -1221,18 +1239,6 @@ export default {
getList() {
this.loading = true;
listEquipment(this.queryParams).then((response) => {
for (let i in response.rows) {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
});
}
for (let i in response.selected) {
this.auxiliaryEquipmentLeftList.push(response.selected[i].key);
this.form.auxiliaryEquipmentRightData =
this.auxiliaryEquipmentRightList;
}
this.equipmentList = response.rows;
this.total = response.total;
this.loading = false;
@ -1281,6 +1287,7 @@ export default {
equipmentLocation: null,
hourlyUnitPrice: null,
equipmentHead: null,
equipmentCategory : null,
};
this.resetForm("form");
},
@ -1336,7 +1343,18 @@ export default {
});
this.repairRecordSteps = 0;
this.rightList = [];
this.auxiliaryEquipmentLeftList = [];
this.auxiliaryEquipmentRightList = [];
this.queryAuxiliaryEquipmentParams.equipmentCategory = '0';
listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => {
for (let i in response.rows) {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
});
}
});
this.open = true;
this.title = "添加设备管理";
},
@ -1348,6 +1366,22 @@ export default {
getWorkCenterList().then((response) => {
this.options1 = response.rows;
});
this.queryAuxiliaryEquipmentParams.equipmentCategory = '0';
listEquipment(this.queryAuxiliaryEquipmentParams).then((response) => {
this.auxiliaryEquipmentLeftList = [];
this.auxiliaryEquipmentRightList = [];
for (let i in response.rows) {
// 穿
this.auxiliaryEquipmentLeftList.push({
key: response.rows[i].equipmentCode,
label: response.rows[i].equipmentName,
});
}
for (let i in response.selected) {
this.auxiliaryEquipmentRightList.push(response.selected[i].key);
this.form.auxiliaryEquipmentRightData = this.auxiliaryEquipmentRightList;
}
});
getEquipment(equipmentId).then((response) => {
this.form = response.data;
this.rightList = [];
@ -1477,6 +1511,10 @@ export default {
this.$message.error(
"【设备基础信息】设备类型为空,请选择设备类型!"
);
} else if (this.form.equipmentCategory == null) {
this.$message.error(
"【设备基础信息】设备类别为空,请选择设备类别!"
);
} else {
this.form.auxiliaryEquipmentRightData =
this.auxiliaryEquipmentRightList;

Loading…
Cancel
Save