工单优化

master
wws 12 months ago
parent 49f2bae80e
commit a8822645ee

@ -103,22 +103,6 @@
placeholder="请选择实际结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
placeholder="请输入设备编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item 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"
@ -127,14 +111,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="点检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入点检人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单用时" prop="orderCostTime">
<el-input
v-model="queryParams.orderCostTime"
@ -275,6 +251,22 @@
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item label="点检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入点检人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentCode"
placeholder="请输入设备编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<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>
@ -337,7 +329,15 @@
<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" fixed>
<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" />
@ -522,6 +522,87 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 巡检详情 -->
<el-dialog
title="巡检详情"
:visible.sync="workDetail"
width="900px"
>
<el-tabs type="border-card">
<el-tab-pane label="巡检信息">
<el-descriptions title="" border :column="2">
<el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
</el-descriptions-item>
<el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="巡检执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="巡检执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{ workVO.order.orderEnd }}</el-descriptions-item>
<el-descriptions-item label="巡检人">{{ workVO.order.planPerson }}</el-descriptions-item>
<el-descriptions-item label="报修单号">{{ workVO.order.repairCode }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<el-descriptions-item label="设备名称">{{ workVO.equ.equipmentName }}</el-descriptions-item>
<el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</el-descriptions-item>
<el-descriptions-item label="设备类型编码">{{ workVO.equ.equipmentTypeCode }}</el-descriptions-item>
<el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心编码">{{ workVO.equ.workshopCode }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="left">{{ detail.itemName }}</el-divider>
<el-table
:data="detail.standardList"
border
style="width: 100%">
<el-table-column
prop="standardName"
label="标准名称"
width="180">
</el-table-column>
<el-table-column
prop="standardTypeName"
label="标准类型"
width="180">
</el-table-column>
<el-table-column
prop="detailReach"
label="是否达标">
</el-table-column>
<el-table-column
prop="actualValue"
label="实际值">
</el-table-column>
<el-table-column
prop="detailUpLimit"
label="上限">
</el-table-column>
<el-table-column
prop="detailDownLimit"
label="下限">
</el-table-column>
<el-table-column
prop="detailUnit"
label="单位">
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -534,12 +615,39 @@ import {
updateDeviceOrder
} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
import {getInspectionWork} from "@/api/device/inspectionWork";
export default {
name: "DeviceOrder",
dicts: ['device_order_status', 'device_loop_type','device_reach_standard'],
data() {
return {
// VO
workVO: {
order: {
planCode: null,
planName: null,
planLoop: null,
planLoopType: null,
orderCode: null,
planWorkShop: null,
planLoopStart: null,
planLoopEnd: null,
orderStart: null,
orderEnd: null,
planPerson: null,
}, equ: {
equipmentCode: null,
equipmentName: null,
equipmentLocation: null,
equipmentTypeCode: null,
equipmentTypeName: null,
workshopCode: null,
workshopName: null,
}, detailList: []
},
//
workDetail: false,
//
pickerOptions: {
shortcuts: [{
@ -639,6 +747,16 @@ export default {
this.getList();
},
methods: {
//
showWork(row) {
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
this.workDetail = true;
});
},
//
setWorkCenter() {
getWorkCenter().then(response => {

@ -101,14 +101,6 @@
@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"
@ -326,7 +318,7 @@
<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" fixed>
<template slot-scope="scope">
<el-button
type="text"

@ -320,7 +320,15 @@
<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" fixed>
<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" />
@ -505,6 +513,87 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 点检详情 -->
<el-dialog
title="点检详情"
:visible.sync="workDetail"
width="900px"
>
<el-tabs type="border-card">
<el-tab-pane label="点检信息">
<el-descriptions title="" border :column="2">
<el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
</el-descriptions-item>
<el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="点检执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="点检执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{ workVO.order.orderEnd }}</el-descriptions-item>
<el-descriptions-item label="点检人">{{ workVO.order.planPerson }}</el-descriptions-item>
<el-descriptions-item label="报修单号">{{ workVO.order.repairCode }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<el-descriptions-item label="设备名称">{{ workVO.equ.equipmentName }}</el-descriptions-item>
<el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</el-descriptions-item>
<el-descriptions-item label="设备类型编码">{{ workVO.equ.equipmentTypeCode }}</el-descriptions-item>
<el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心编码">{{ workVO.equ.workshopCode }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="left">{{ detail.itemName }}</el-divider>
<el-table
:data="detail.standardList"
border
style="width: 100%">
<el-table-column
prop="standardName"
label="标准名称"
width="180">
</el-table-column>
<el-table-column
prop="standardTypeName"
label="标准类型"
width="180">
</el-table-column>
<el-table-column
prop="detailReach"
label="是否达标">
</el-table-column>
<el-table-column
prop="actualValue"
label="实际值">
</el-table-column>
<el-table-column
prop="detailUpLimit"
label="上限">
</el-table-column>
<el-table-column
prop="detailDownLimit"
label="下限">
</el-table-column>
<el-table-column
prop="detailUnit"
label="单位">
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -512,6 +601,7 @@
import { listSpotInspectionOrder, getSpotInspectionOrder, delSpotInspectionOrder, addSpotInspectionOrder, updateSpotInspectionOrder } from "@/api/device/spotInspectionOrder";
import {getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
import {getInspectionWork} from "@/api/device/inspectionWork";
export default {
name: "SpotInspectionOrder",
@ -520,6 +610,31 @@ export default {
return {
dialogImageUrl: '',
dialogVisible: false,
workDetail:false,
// VO
workVO: {
order: {
planCode:null,
planName:null,
planLoop:null,
planLoopType:null,
orderCode:null,
planWorkShop:null,
planLoopStart:null,
planLoopEnd:null,
orderStart:null,
orderEnd:null,
planPerson:null,
},equ: {
equipmentCode:null,
equipmentName: null,
equipmentLocation:null,
equipmentTypeCode:null,
equipmentTypeName:null,
workshopCode:null,
workshopName:null,
},detailList:[]
},
//
pickerOptions: {
shortcuts: [{
@ -631,6 +746,16 @@ export default {
this.dialogImageUrl = file.url;
this.dialogVisible = true;
},
//
showWork(row) {
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
this.workDetail = true;
});
},
handleDownload(file) {
console.log(file);
},

@ -356,7 +356,15 @@
<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" fixed>
<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" />
@ -982,6 +990,108 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 保养详情 -->
<el-dialog
title="保养详情"
:visible.sync="workDetail"
width="900px"
>
<el-tabs type="border-card">
<el-tab-pane label="保养信息">
<el-descriptions title="" border :column="2">
<el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
</el-descriptions-item>
<el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="保养执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="保养执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{ workVO.order.orderEnd }}</el-descriptions-item>
<el-descriptions-item label="保养人">{{ workVO.order.planPerson }}</el-descriptions-item>
<el-descriptions-item label="报修单号">{{ workVO.order.repairCode }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<el-descriptions-item label="设备名称">{{ workVO.equ.equipmentName }}</el-descriptions-item>
<el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</el-descriptions-item>
<el-descriptions-item label="设备类型编码">{{ workVO.equ.equipmentTypeCode }}</el-descriptions-item>
<el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心编码">{{ workVO.equ.workshopCode }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="备件信息">
<el-table
:data="workVO.spareList"
border
style="width: 100%">
<el-table-column
prop="materialCode"
label="备件编码"
width="180">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称"
width="180">
</el-table-column>
<el-table-column
prop="applyNum"
label="申领数量">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="检查项信息">
<div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="left">{{ detail.itemName }}</el-divider>
<el-table
:data="detail.standardList"
border
style="width: 100%">
<el-table-column
prop="standardName"
label="标准名称"
width="180">
</el-table-column>
<el-table-column
prop="standardTypeName"
label="标准类型"
width="180">
</el-table-column>
<el-table-column
prop="detailReach"
label="是否达标">
</el-table-column>
<el-table-column
prop="actualValue"
label="实际值">
</el-table-column>
<el-table-column
prop="detailUpLimit"
label="上限">
</el-table-column>
<el-table-column
prop="detailDownLimit"
label="下限">
</el-table-column>
<el-table-column
prop="detailUnit"
label="单位">
</el-table-column>
</el-table>
</div>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button @click="workDetail = false"> </el-button>
<el-button type="primary" @click="workDetail = false"> </el-button>
</span>
</el-dialog>
</div>
</template>
@ -996,13 +1106,40 @@ import {
import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan";
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
import {getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {updateInspectionWork} from "@/api/device/inspectionWork";
import {getInspectionWork, updateInspectionWork} from "@/api/device/inspectionWork";
export default {
name: "UpkeepOrder",
dicts: ['device_order_status', 'device_loop_type','device_reach_standard','device_upkeep_type','device_inspect_status'],
data() {
return {
workDetail:false,
// VO
workVO: {
order: {
planCode:null,
planName:null,
planLoop:null,
planLoopType:null,
orderCode:null,
planWorkShop:null,
planLoopStart:null,
planLoopEnd:null,
orderStart:null,
orderEnd:null,
planPerson:null,
},equ: {
equipmentCode:null,
equipmentName: null,
equipmentLocation:null,
equipmentTypeCode:null,
equipmentTypeName:null,
workshopCode:null,
workshopName:null,
},
detailList:[],
spareList:[],
},
//
pickerOptions: {
shortcuts: [{
@ -1171,6 +1308,16 @@ export default {
this.getList();
},
methods: {
//
showWork(row) {
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
this.workVO = response.data;
this.workDetail = true;
});
},
//
clickInspect() {
if (this.ids.length == 0 || this.ids == null) {

Loading…
Cancel
Save