点检、巡检、保养工单页面优化

master
wws 12 months ago
parent d06d2f76b2
commit 16801690bf

@ -26,12 +26,14 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="车间编码" prop="planWorkshop"> <el-form-item label="车间编码" prop="planWorkshop">
<el-input <el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
v-model="queryParams.planWorkshop" <el-option
placeholder="请输入车间编码" v-for="work in workCenterList"
clearable :key="work.factoryCode"
@keyup.enter.native="handleQuery" :label="work.factoryName"
:value="work.factoryCode"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine"> <el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input <el-input
@ -41,6 +43,16 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable>
<el-option
v-for="dict in dict.type.device_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop"> <el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable> <el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option <el-option
@ -51,6 +63,14 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input
v-model="queryParams.planLoop"
placeholder="请输入循环周期"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="循环执行时间开始" prop="planLoopStart"> <el-form-item v-if="false" label="循环执行时间开始" prop="planLoopStart">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.planLoopStart" v-model="queryParams.planLoopStart"
@ -83,7 +103,7 @@
placeholder="请选择实际结束时间"> placeholder="请选择实际结束时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="设备编码" prop="equipmentCode"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.equipmentCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
@ -91,6 +111,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost"> <el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input <el-input
v-model="queryParams.orderCost" v-model="queryParams.orderCost"
@ -99,10 +127,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="检人" prop="planPerson"> <el-form-item label="检人" prop="planPerson">
<el-input <el-input
v-model="queryParams.planPerson" v-model="queryParams.planPerson"
placeholder="请输入检人" placeholder="请输入检人"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -163,7 +191,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建人" prop="createBy"> <el-form-item v-if="false" label="创建人" prop="createBy">
<el-input <el-input
v-model="queryParams.createBy" v-model="queryParams.createBy"
placeholder="请输入创建人" placeholder="请输入创建人"
@ -171,7 +199,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.createTime" v-model="queryParams.createTime"
type="date" type="date"
@ -179,7 +207,7 @@
placeholder="请选择创建时间"> placeholder="请选择创建时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="更新人" prop="updateBy"> <el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input <el-input
v-model="queryParams.updateBy" v-model="queryParams.updateBy"
placeholder="请输入更新人" placeholder="请输入更新人"
@ -187,7 +215,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="更新时间" prop="updateTime"> <el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.updateTime" v-model="queryParams.updateTime"
type="date" type="date"
@ -195,6 +223,58 @@
placeholder="请选择更新时间"> placeholder="请选择更新时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
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-width="100px" label="循环范围结束" prop="planLoopEnd">
<el-date-picker
v-model="queryParams.loopEndArray"
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-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
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-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
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-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -252,62 +332,64 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="deviceOrderList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="deviceOrderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId"/> <el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column width="150" label="计划编码" align="center" prop="planCode"/> <el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType"/> <el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column width="150" label="工单号" align="center" prop="orderCode"/> <el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column label="车间编码" align="center" prop="planWorkshop"/> <el-table-column width="150" label="巡检单号" align="center" prop="orderCode" />
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/> <el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column label="循环周期" align="center" prop="planLoop"/> <el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column width="100" label="循环周期类型" align="center" prop="planLoopType"> <el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/> <dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180"> <el-table-column width="120" label="循环范围开始" align="center" prop="planLoopStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180"> <el-table-column width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="180"> <el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="180"> <el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode"/> <el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName"/> <el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus"> <el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/> <dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost"/> <el-table-column v-if="false" label="工单费用" align="center" prop="orderCost" />
<el-table-column v-if="false" label="巡检人" align="center" prop="planPerson"/> <el-table-column label="巡检人" align="center" prop="planPerson" />
<el-table-column label="工单用时" align="center" prop="orderCostTime"/> <el-table-column v-if="false" label="工单用时" align="center" prop="orderCostTime" />
<el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson"/> <el-table-column v-if="false" label="签字" align="center" prop="orderSignPerson" />
<el-table-column label="工厂" align="center" prop="factoryCode"/> <el-table-column v-if="false" label="工厂" align="center" prop="factoryCode" />
<el-table-column v-if="false" label="备用字段1" align="center" prop="attr1"/> <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="备用字段2" align="center" prop="attr2" />
<el-table-column v-if="false" label="备用字段3" align="center" prop="attr3"/> <el-table-column v-if="false" label="备用字段3" align="center" prop="attr3" />
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag"/> <el-table-column v-if="false" label="删除标志" align="center" prop="delFlag" />
<el-table-column label="创建人" align="center" prop="createBy"/> <el-table-column label="创建人" align="center" prop="createBy" />
<el-table-column label="创建时间" align="center" prop="createTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="更新人" align="center" prop="updateBy"/> <el-table-column label="更新人" align="center" prop="updateBy" />
<el-table-column label="更新时间" align="center" prop="updateTime" width="180"> <el-table-column label="更新时间" align="center" prop="updateTime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
@ -320,17 +402,15 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['device:deviceOrder:edit']" v-hasPermi="['device:spotInspectionOrder:edit']"
>填写记录 >填写记录</el-button>
</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['device:deviceOrder:remove']" v-hasPermi="['device:spotInspectionOrder:remove']"
>删除 >删除</el-button>
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -453,12 +533,43 @@ import {
addDeviceOrder, addDeviceOrder,
updateDeviceOrder updateDeviceOrder
} from "@/api/device/deviceOrder"; } from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
export default { export default {
name: "DeviceOrder", name: "DeviceOrder",
dicts: ['device_order_status', 'device_loop_type','device_reach_standard'], dicts: ['device_order_status', 'device_loop_type','device_reach_standard'],
data() { data() {
return { 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]);
}
}]
},
//
workCenterList:[],
// //
recordList: [], recordList: [],
// //
@ -509,7 +620,11 @@ export default {
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
}, },
// //
form: { form: {
@ -520,9 +635,17 @@ export default {
}; };
}, },
created() { created() {
this.setWorkCenter();
this.getList(); this.getList();
}, },
methods: { methods: {
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
console.log(this.workCenterList)
})
},
/** 查询计划工单列表 */ /** 查询计划工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
@ -569,6 +692,10 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
equ: {equipmentName: null}, equ: {equipmentName: null},
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: []
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -579,6 +706,10 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.queryParams.loopEndArray = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },

@ -42,6 +42,26 @@
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable>
<el-option
v-for="dict in dict.type.device_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop"> <el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input <el-input
@ -171,7 +191,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建人" prop="createBy"> <el-form-item v-if="false" label="创建人" prop="createBy">
<el-input <el-input
v-model="queryParams.createBy" v-model="queryParams.createBy"
placeholder="请输入创建人" placeholder="请输入创建人"
@ -179,7 +199,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.createTime" v-model="queryParams.createTime"
type="date" type="date"
@ -187,7 +207,7 @@
placeholder="请选择创建时间"> placeholder="请选择创建时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="更新人" prop="updateBy"> <el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input <el-input
v-model="queryParams.updateBy" v-model="queryParams.updateBy"
placeholder="请输入更新人" placeholder="请输入更新人"
@ -195,7 +215,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="更新时间" prop="updateTime"> <el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.updateTime" v-model="queryParams.updateTime"
type="date" type="date"
@ -203,6 +223,45 @@
placeholder="请选择更新时间"> placeholder="请选择更新时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label-width="100px" label="循环开始时间" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
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-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
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-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
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-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -259,10 +318,11 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="主键" align="center" prop="orderId" /> <el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId" /> <el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column width="120" label="计划编码" align="center" prop="planCode" /> <el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" /> <el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column width="120" label="工单号" align="center" prop="orderCode" /> <el-table-column width="150" label="点检单号" align="center" prop="orderCode" />
<el-table-column label="车间编码" align="center" prop="planWorkshop" /> <el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine" /> <el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期" align="center" prop="planLoop" /> <el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" > <el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
@ -270,29 +330,28 @@
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/> <dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180"> <el-table-column width="120" label="循环开始时间" align="center" prop="planLoopStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180"> <el-table-column v-if="false" width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="180"> <el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="180"> <el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" /> <el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" /> <el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" > <el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/> <dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
@ -461,6 +520,34 @@ export default {
return { return {
dialogImageUrl: '', dialogImageUrl: '',
dialogVisible: false, dialogVisible: false,
//
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]);
}
}]
},
// //
recordList: [], recordList: [],
disabled: false, disabled: false,
@ -518,6 +605,9 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
}, },
// //
form: { form: {
@ -598,6 +688,9 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
equ: {equipmentName: null}, equ: {equipmentName: null},
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -608,6 +701,9 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },

@ -17,21 +17,23 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="保养单号" prop="orderCode"> <el-form-item label="单号" prop="orderCode">
<el-input <el-input
v-model="queryParams.orderCode" v-model="queryParams.orderCode"
placeholder="请输入单号" placeholder="请输入单号"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="车间" prop="planWorkshop"> <el-form-item label="车间编码" prop="planWorkshop">
<el-input <el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
v-model="queryParams.planWorkshop" <el-option
placeholder="请输入车间" v-for="work in workCenterList"
clearable :key="work.factoryCode"
@keyup.enter.native="handleQuery" :label="work.factoryName"
:value="work.factoryCode"
/> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="产线" prop="planProdLine"> <el-form-item v-if="false" label="产线" prop="planProdLine">
<el-input <el-input
@ -41,7 +43,27 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单状态" prop="orderStatus">
<el-select v-model="queryParams.planStatus" placeholder="请选择工单状态" clearable>
<el-option
v-for="dict in dict.type.device_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="循环周期" prop="planLoop"> <el-form-item label="循环周期" prop="planLoop">
<el-select v-model="queryParams.planLoopType" placeholder="请选择循环周期" clearable>
<el-option
v-for="dict in dict.type.device_loop_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input <el-input
v-model="queryParams.planLoop" v-model="queryParams.planLoop"
placeholder="请输入循环周期" placeholder="请输入循环周期"
@ -89,7 +111,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="工单费用" prop="orderCost"> <el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input <el-input
v-model="queryParams.orderCost" v-model="queryParams.orderCost"
placeholder="请输入工单费用" placeholder="请输入工单费用"
@ -97,10 +127,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="保养人" prop="planPerson"> <el-form-item label="点检人" prop="planPerson">
<el-input <el-input
v-model="queryParams.planPerson" v-model="queryParams.planPerson"
placeholder="请输入保养人" placeholder="请输入点检人"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -161,7 +191,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建人" prop="createBy"> <el-form-item v-if="false" label="创建人" prop="createBy">
<el-input <el-input
v-model="queryParams.createBy" v-model="queryParams.createBy"
placeholder="请输入创建人" placeholder="请输入创建人"
@ -169,7 +199,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="创建时间" prop="createTime"> <el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.createTime" v-model="queryParams.createTime"
type="date" type="date"
@ -177,7 +207,7 @@
placeholder="请选择创建时间"> placeholder="请选择创建时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="更新人" prop="updateBy"> <el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input <el-input
v-model="queryParams.updateBy" v-model="queryParams.updateBy"
placeholder="请输入更新人" placeholder="请输入更新人"
@ -185,7 +215,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="更新时间" prop="updateTime"> <el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable <el-date-picker clearable
v-model="queryParams.updateTime" v-model="queryParams.updateTime"
type="date" type="date"
@ -193,6 +223,78 @@
placeholder="请选择更新时间"> placeholder="请选择更新时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label-width="100px" label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
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-width="100px" label="循环范围结束" prop="planLoopEnd">
<el-date-picker
v-model="queryParams.loopEndArray"
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-width="100px" label="执行开始时间" prop="orderStart">
<el-date-picker
v-model="queryParams.orderStartArray"
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-width="100px" label="执行结束时间" prop="orderEnd">
<el-date-picker
v-model="queryParams.orderEndArray"
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="upkeep">
<el-select v-model="queryParams.upkeep" placeholder="请选择保养类型" clearable>
<el-option
v-for="dict in dict.type.device_upkeep_type"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="检验状态" prop="orderInspect">
<el-select v-model="queryParams.orderInspect" placeholder="请选择保养类型" clearable>
<el-option
v-for="dict in dict.type.device_inspect_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
@ -249,40 +351,58 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="upkeepOrderList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="upkeepOrderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center"/> <el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="主键" align="center" prop="orderId"/> <el-table-column v-if="false" label="主键" align="center" prop="orderId" />
<el-table-column v-if="false" label="计划id" align="center" prop="planId"/> <el-table-column v-if="false" label="计划id" align="center" prop="planId" />
<el-table-column label="计划编码" align="center" prop="planCode"/> <el-table-column width="150" label="计划编码" align="center" prop="planCode" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType"/> <el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column label="保养单号" align="center" prop="orderCode"/> <el-table-column width="150" label="巡检单号" align="center" prop="orderCode" />
<el-table-column label="车间" align="center" prop="planWorkshop"/> <el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column v-if="false" label="产线" align="center" prop="planProdLine"/> <el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column label="循环周期" align="center" prop="planLoop"/> <el-table-column v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column label="循环周期类型" align="center" prop="planLoopType"/> <el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180"> <el-table-column width="120" label="循环周期类型" align="center" prop="planLoopType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</el-table-column>
<el-table-column width="120" label="循环范围开始" align="center" prop="planLoopStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="循环执行时间结束" align="center" prop="planLoopEnd" width="180"> <el-table-column width="120" label="循环范围结束" align="center" prop="planLoopEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际开始时间" align="center" prop="orderStart" width="180"> <el-table-column width="120" label="执行开始时间" align="center" prop="orderStart">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="实际结束时间" align="center" prop="orderEnd" width="180"> <el-table-column width="120" label="执行结束时间" align="center" prop="orderEnd">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode"/> <el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName"/> <el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus"/> <el-table-column width="80" label="保养类型" align="center" prop="upkeep" >
<el-table-column label="审核状态" align="center" prop="orderInspect"/> <template slot-scope="scope">
<dict-tag :options="dict.type.device_upkeep_type" :value="scope.row.upkeep"/>
</template>
</el-table-column>
<el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
</template>
</el-table-column>
<el-table-column label="检验状态" align="center" prop="orderInspect">
<template slot-scope="scope">
<dict-tag :options="dict.type.device_inspect_status" :value="scope.row.orderInspect"/>
</template>
</el-table-column>
<el-table-column label="工单费用" align="center" prop="orderCost"/> <el-table-column label="工单费用" align="center" prop="orderCost"/>
<el-table-column label="保养人" align="center" prop="planPerson"/> <el-table-column label="保养人" align="center" prop="planPerson"/>
<el-table-column label="工单用时" align="center" prop="orderCostTime"/> <el-table-column label="工单用时" align="center" prop="orderCostTime"/>
@ -307,6 +427,7 @@
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right"> <el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.upkeep != '1' "
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@ -339,9 +460,9 @@
title="保养结果检验" title="保养结果检验"
:visible.sync="inspectDialog" :visible.sync="inspectDialog"
width="30%"> width="30%">
<el-radio v-model="inspect" label="0"></el-radio> <el-radio v-model="inspect" label="waiting"></el-radio>
<el-radio v-model="inspect" label="1"></el-radio> <el-radio v-model="inspect" label="noPass"></el-radio>
<el-radio v-model="inspect" label="2"></el-radio> <el-radio v-model="inspect" label="pass"></el-radio>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="inspectDialog = false"> </el-button> <el-button @click="inspectDialog = false"> </el-button>
<el-button type="primary" @click="subInspect"> </el-button> <el-button type="primary" @click="subInspect"> </el-button>
@ -879,9 +1000,37 @@ import {updateInspectionWork} from "@/api/device/inspectionWork";
export default { export default {
name: "UpkeepOrder", name: "UpkeepOrder",
dicts: ['device_order_status', 'device_loop_type','device_reach_standard'], dicts: ['device_order_status', 'device_loop_type','device_reach_standard','device_upkeep_type','device_inspect_status'],
data() { data() {
return { 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]);
}
}]
},
// //
recordList: [], recordList: [],
// //
@ -992,6 +1141,10 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
equ: {equipmentName: null}, equ: {equipmentName: null},
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
}, },
// //
form: { form: {
@ -1318,6 +1471,10 @@ export default {
updateTime: null, updateTime: null,
equ: {equipmentName: null}, equ: {equipmentName: null},
timeArray:[], timeArray:[],
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
loopEndArray: [],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -1328,6 +1485,10 @@ export default {
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.queryParams.loopEndArray = [];
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },

Loading…
Cancel
Save