|
|
|
@ -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,6 +43,16 @@
|
|
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
|
|
/>
|
|
|
|
|
</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"
|
|
|
|
@ -89,6 +101,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"
|
|
|
|
@ -97,10 +117,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 +181,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 +189,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 +197,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 +205,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 +213,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>
|
|
|
|
@ -249,59 +321,72 @@
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-table @cell-click="showWork" v-loading="loading" :data="inspectionWorkList">
|
|
|
|
|
<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 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 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 v-loading="loading" :data="inspectionWorkList">
|
|
|
|
|
<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" >
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click="showWork(scope.row)"
|
|
|
|
|
>{{ scope.row.orderCode }}</el-button
|
|
|
|
|
>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<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 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 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 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>
|
|
|
|
@ -435,6 +520,8 @@ import {
|
|
|
|
|
addInspectionWork,
|
|
|
|
|
updateInspectionWork
|
|
|
|
|
} from "@/api/device/inspectionWork";
|
|
|
|
|
import {listDeviceOrder} from "@/api/device/deviceOrder";
|
|
|
|
|
import {getWorkCenter} from "@/api/device/plan";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "InspectionWork",
|
|
|
|
@ -442,6 +529,34 @@ export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
test: 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]);
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
},
|
|
|
|
|
// 初始化VO
|
|
|
|
|
workVO: {
|
|
|
|
|
order: {
|
|
|
|
@ -503,7 +618,7 @@ export default {
|
|
|
|
|
orderStart: null,
|
|
|
|
|
orderEnd: null,
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
orderStatus: null,
|
|
|
|
|
orderStatus: '1',
|
|
|
|
|
orderCost: null,
|
|
|
|
|
planPerson: null,
|
|
|
|
|
orderCostTime: null,
|
|
|
|
@ -516,7 +631,11 @@ export default {
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null
|
|
|
|
|
updateTime: null,
|
|
|
|
|
loopStartArray: [],
|
|
|
|
|
orderStartArray: [],
|
|
|
|
|
orderEndArray: [],
|
|
|
|
|
loopEndArray: [],
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
@ -525,18 +644,22 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.setWorkCenter();
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 获取工作中心
|
|
|
|
|
setWorkCenter() {
|
|
|
|
|
getWorkCenter().then(response => {
|
|
|
|
|
this.workCenterList = response.data;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 测试
|
|
|
|
|
showWork(row) {
|
|
|
|
|
console.log("测试成功")
|
|
|
|
|
console.log(row)
|
|
|
|
|
this.reset();
|
|
|
|
|
const orderId = row.orderId || this.ids
|
|
|
|
|
getInspectionWork(orderId).then(response => {
|
|
|
|
|
this.workVO = response.data;
|
|
|
|
|
console.log(this.workVO);
|
|
|
|
|
this.workDetail = true;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -544,7 +667,7 @@ export default {
|
|
|
|
|
/** 查询巡检记录列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
|
listInspectionWork(this.queryParams).then(response => {
|
|
|
|
|
listDeviceOrder(this.queryParams).then(response => {
|
|
|
|
|
this.inspectionWorkList = response.rows;
|
|
|
|
|
this.total = response.total;
|
|
|
|
|
this.loading = false;
|
|
|
|
@ -572,7 +695,7 @@ export default {
|
|
|
|
|
orderStart: null,
|
|
|
|
|
orderEnd: null,
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
orderStatus: null,
|
|
|
|
|
orderStatus: '1',
|
|
|
|
|
orderCost: null,
|
|
|
|
|
planPerson: null,
|
|
|
|
|
orderCostTime: null,
|
|
|
|
@ -585,7 +708,11 @@ export default {
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null
|
|
|
|
|
updateTime: null,
|
|
|
|
|
loopStartArray: [],
|
|
|
|
|
orderStartArray: [],
|
|
|
|
|
orderEndArray: [],
|
|
|
|
|
loopEndArray: [],
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
@ -596,6 +723,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
/** 重置按钮操作 */
|
|
|
|
|
resetQuery() {
|
|
|
|
|
this.queryParams.loopStartArray = [];
|
|
|
|
|
this.queryParams.orderStartArray = [];
|
|
|
|
|
this.queryParams.orderEndArray = [];
|
|
|
|
|
this.queryParams.loopEndArray = [];
|
|
|
|
|
this.resetForm("queryForm");
|
|
|
|
|
this.handleQuery();
|
|
|
|
|
},
|
|
|
|
|