|
|
|
@ -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>
|
|
|
|
@ -252,62 +332,64 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<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="计划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 label="车间编码" align="center" prop="planWorkshop"/>
|
|
|
|
|
<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 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 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" >
|
|
|
|
|
<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 label="工单状态" align="center" prop="orderStatus">
|
|
|
|
|
<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 v-if="false" label="签字" align="center" prop="orderSignPerson"/>
|
|
|
|
|
<el-table-column 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"/>
|
|
|
|
|
<el-table-column v-if="false" label="删除标志" align="center" prop="delFlag"/>
|
|
|
|
|
<el-table-column label="创建人" align="center" prop="createBy"/>
|
|
|
|
|
<el-table-column v-if="false" label="工单费用" align="center" prop="orderCost" />
|
|
|
|
|
<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 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" />
|
|
|
|
|
<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="createTime" width="180">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</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">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
@ -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();
|
|
|
|
|
},
|
|
|
|
|