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

master
wws 12 months ago
parent d06d2f76b2
commit 16801690bf

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

@ -42,6 +42,26 @@
clearable
@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 v-if="false" label="循环周期" prop="planLoop">
<el-input
@ -171,7 +191,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建人" prop="createBy">
<el-form-item v-if="false" label="创建人" prop="createBy">
<el-input
v-model="queryParams.createBy"
placeholder="请输入创建人"
@ -179,7 +199,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="创建时间" prop="createTime">
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
v-model="queryParams.createTime"
type="date"
@ -187,7 +207,7 @@
placeholder="请选择创建时间">
</el-date-picker>
</el-form-item>
<el-form-item label="更新人" prop="updateBy">
<el-form-item v-if="false" label="更新人" prop="updateBy">
<el-input
v-model="queryParams.updateBy"
placeholder="请输入更新人"
@ -195,7 +215,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="更新时间" prop="updateTime">
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
v-model="queryParams.updateTime"
type="date"
@ -203,6 +223,45 @@
placeholder="请选择更新时间">
</el-date-picker>
</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-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>
@ -259,10 +318,11 @@
<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="计划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 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 width="150" label="车间" align="center" prop="workCenterName"/>
<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" >
@ -270,29 +330,28 @@
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
</template>
</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">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
</template>
</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">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
</template>
</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">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
</template>
</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">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="120" label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
@ -461,6 +520,34 @@ export default {
return {
dialogImageUrl: '',
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: [],
disabled: false,
@ -518,6 +605,9 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
},
//
form: {
@ -598,6 +688,9 @@ export default {
updateBy: null,
updateTime: null,
equ: {equipmentName: null},
loopStartArray: [],
orderStartArray: [],
orderEndArray: [],
};
this.resetForm("form");
},
@ -608,6 +701,9 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams.loopStartArray = [];
this.queryParams.orderStartArray = [];
this.queryParams.orderEndArray = [];
this.resetForm("queryForm");
this.handleQuery();
},

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

Loading…
Cancel
Save