报表优化

master
wws 1 year ago
parent 993fdee52c
commit 780b648027

@ -208,7 +208,8 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['device:inspectionWork:add']" v-hasPermi="['device:inspectionWork:add']"
>新增</el-button> >新增
</el-button>
</el-col> </el-col>
<el-col v-if="false" :span="1.5"> <el-col v-if="false" :span="1.5">
<el-button <el-button
@ -219,7 +220,8 @@
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['device:inspectionWork:edit']" v-hasPermi="['device:inspectionWork:edit']"
>修改</el-button> >修改
</el-button>
</el-col> </el-col>
<el-col v-if="false" :span="1.5"> <el-col v-if="false" :span="1.5">
<el-button <el-button
@ -230,7 +232,8 @@
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['device:inspectionWork:remove']" v-hasPermi="['device:inspectionWork:remove']"
>删除</el-button> >删除
</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
@ -240,21 +243,22 @@
size="mini" size="mini"
@click="handleExport" @click="handleExport"
v-hasPermi="['device:inspectionWork:export']" v-hasPermi="['device:inspectionWork:export']"
>导出</el-button> >导出
</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table @cell-click="showWork" v-loading="loading" :data="inspectionWorkList"> <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="主键" 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 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 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 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 label="循环周期类型" align="center" prop="planLoopType" /> <el-table-column label="循环周期类型" align="center" prop="planLoopType"/>
<el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180"> <el-table-column label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<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>
@ -275,28 +279,28 @@
<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 label="设备编码" align="center" prop="equipmentCode"/>
<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 label="责任人" align="center" prop="planPerson" /> <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="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 v-if="false" 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>
@ -310,14 +314,16 @@
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['device:inspectionWork:edit']" v-hasPermi="['device:inspectionWork: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:inspectionWork:remove']" v-hasPermi="['device:inspectionWork:remove']"
>删除</el-button> >删除
</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -330,61 +336,85 @@
@pagination="getList" @pagination="getList"
/> />
<el-drawer <el-dialog
title="巡检详情" title="巡检详情"
:visible.sync="workDetail" :visible.sync="workDetail"
size="700px"> width="900px"
>
<div class="my-margin-lr"> <el-tabs type="border-card">
<el-descriptions title="巡检信息"> <el-tab-pane label="巡检信息">
<el-descriptions-item label="计划编码">{{workVO.order.planCode}}</el-descriptions-item> <el-descriptions title="" border :column="2">
<el-descriptions-item label="计划名称">{{workVO.order.planName}}</el-descriptions-item> <el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{workVO.order.planLoop}}{{workVO.order.planLoopType}}</el-descriptions-item> <el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="工单编码">{{workVO.order.orderCode}}</el-descriptions-item> <el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
<el-descriptions-item label="车间编码">{{workVO.order.planWorkshop}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="巡检执行开始时间">{{workVO.order.planLoopStart}}</el-descriptions-item> <el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="巡检执行结束时间">{{workVO.order.planLoopEnd}}</el-descriptions-item> <el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{workVO.order.orderStart}}</el-descriptions-item> <el-descriptions-item label="巡检执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{workVO.order.orderEnd}}</el-descriptions-item> <el-descriptions-item label="巡检执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="巡检人">{{workVO.order.planPerson}}</el-descriptions-item> <el-descriptions-item label="实际开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item label="报修单号">{{workVO.order.repairCode}}</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-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions title="设备信息"> <el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<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.equipmentName}}</el-descriptions-item> <el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</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.equipmentTypeCode}}</el-descriptions-item> <el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</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.workshopCode}}</el-descriptions-item> <el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{workVO.equ.workshopName}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="检查项信息">
<el-descriptions v-if="workVO.detailList.length > 0" title="检查项信息"/>
<div v-for="(detail,index) in workVO.detailList" :key="index"> <div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="right">{{detail.itemName}}</el-divider> <el-divider content-position="left">{{ detail.itemName }}</el-divider>
<div v-for="(standard,index) in detail.standardList" :key="index"> <el-table
<el-descriptions title=""> :data="detail.standardList"
<el-descriptions-item label="标准名称">{{standard.standardName}}</el-descriptions-item> border
<el-descriptions-item label="标准类型">{{standard.standardTypeName}}</el-descriptions-item> style="width: 100%">
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="上限">{{standard.detailUpLimit}}</el-descriptions-item> <el-table-column
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="下限">{{standard.detailDownLimit}}</el-descriptions-item> prop="standardName"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="单位">{{standard.detailUnit}}</el-descriptions-item> label="标准名称"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="实际值">{{standard.actualValue}}</el-descriptions-item> width="180">
<el-descriptions-item v-if="standard.standardType == 'qualitative' " label="是否达标">{{standard.detailReach}}</el-descriptions-item> </el-table-column>
</el-descriptions> <el-table-column
<el-divider></el-divider> prop="standardType"
</div> label="标准类型"
width="180">
</div> </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> </div>
</el-tab-pane>
</el-drawer> </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>
<!-- 添加或修改巡检记录对话框 --> <!-- 添加或修改巡检记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@ -397,38 +427,45 @@
</template> </template>
<script> <script>
import { listInspectionWork, getInspectionWork, delInspectionWork, addInspectionWork, updateInspectionWork } from "@/api/device/inspectionWork"; import {
listInspectionWork,
getInspectionWork,
delInspectionWork,
addInspectionWork,
updateInspectionWork
} from "@/api/device/inspectionWork";
export default { export default {
name: "InspectionWork", name: "InspectionWork",
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type'],
data() { data() {
return { return {
test: false,
// VO // VO
workVO: { workVO: {
order: { order: {
planCode:null, planCode: null,
planName:null, planName: null,
planLoop:null, planLoop: null,
planLoopType:null, planLoopType: null,
orderCode:null, orderCode: null,
planWorkShop:null, planWorkShop: null,
planLoopStart:null, planLoopStart: null,
planLoopEnd:null, planLoopEnd: null,
orderStart:null, orderStart: null,
orderEnd:null, orderEnd: null,
planPerson:null, planPerson: null,
},equ: { }, equ: {
equipmentCode:null, equipmentCode: null,
equipmentName: null, equipmentName: null,
equipmentLocation:null, equipmentLocation: null,
equipmentTypeCode:null, equipmentTypeCode: null,
equipmentTypeName:null, equipmentTypeName: null,
workshopCode:null, workshopCode: null,
workshopName:null, workshopName: null,
},detailList:[] }, detailList: []
}, },
// //
workDetail: false, workDetail: false,
// //
loading: true, loading: true,
@ -483,8 +520,7 @@ export default {
// //
form: {}, form: {},
// //
rules: { rules: {}
}
}; };
}, },
created() { created() {
@ -565,7 +601,7 @@ export default {
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId) this.ids = selection.map(item => item.orderId)
this.single = selection.length!==1 this.single = selection.length !== 1
this.multiple = !selection.length this.multiple = !selection.length
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
@ -607,12 +643,13 @@ export default {
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const orderIds = row.orderId || this.ids; const orderIds = row.orderId || this.ids;
this.$modal.confirm('是否确认删除巡检记录编号为"' + orderIds + '"的数据项?').then(function() { this.$modal.confirm('是否确认删除巡检记录编号为"' + orderIds + '"的数据项?').then(function () {
return delInspectionWork(orderIds); return delInspectionWork(orderIds);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {
});
}, },
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
@ -624,8 +661,5 @@ export default {
}; };
</script> </script>
<style> <style>
.my-margin-lr{
margin-right: 10px;
margin-left: 10px;
}
</style> </style>

@ -330,71 +330,107 @@
@pagination="getList" @pagination="getList"
/> />
<el-drawer <el-dialog
title="保养详情" title="保养详情"
:visible.sync="workDetail" :visible.sync="workDetail"
size="700px"> width="900px"
>
<div class="my-margin-lr"> <el-tabs type="border-card">
<el-descriptions title="保养信息"> <el-tab-pane label="保养信息">
<el-descriptions-item label="计划编码">{{workVO.order.planCode}}</el-descriptions-item> <el-descriptions title="" border :column="2">
<el-descriptions-item label="计划名称">{{workVO.order.planName}}</el-descriptions-item> <el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{workVO.order.planLoop}}{{workVO.order.planLoopType}}</el-descriptions-item> <el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="工单编码">{{workVO.order.orderCode}}</el-descriptions-item> <el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
<el-descriptions-item label="车间编码">{{workVO.order.planWorkshop}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="保养执行开始时间">{{workVO.order.planLoopStart}}</el-descriptions-item> <el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="保养执行结束时间">{{workVO.order.planLoopEnd}}</el-descriptions-item> <el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{workVO.order.orderStart}}</el-descriptions-item> <el-descriptions-item label="保养执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{workVO.order.orderEnd}}</el-descriptions-item> <el-descriptions-item label="保养执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="保养人">{{workVO.order.planPerson}}</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-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions title="设备信息"> <el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<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.equipmentName}}</el-descriptions-item> <el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</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.equipmentTypeCode}}</el-descriptions-item> <el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</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.workshopCode}}</el-descriptions-item> <el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{workVO.equ.workshopName}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="备件信息">
<el-table
<el-descriptions v-if="workVO.spareList.length > 0" title="备件信息"/> :data="workVO.spareList"
<div v-for="(spare,index) in workVO.spareList" :key="index"> border
<el-descriptions title=""> style="width: 100%">
<el-descriptions-item label="备件编码">{{spare.materialCode}}</el-descriptions-item> <el-table-column
<el-descriptions-item label="备件名称">{{spare.materialDesc}}</el-descriptions-item> prop="materialCode"
<el-descriptions-item label="申领数量">{{spare.applyNum}}</el-descriptions-item> label="备件编码"
</el-descriptions> width="180">
</el-table-column>
<el-divider></el-divider> <el-table-column
</div> prop="materialDesc"
label="备件名称"
<el-descriptions v-if="workVO.detailList.length > 0" title="检查项信息"/> 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"> <div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="right">{{detail.itemName}}</el-divider> <el-divider content-position="left">{{ detail.itemName }}</el-divider>
<div v-for="(standard,index) in detail.standardList" :key="index"> <el-table
<el-descriptions title=""> :data="detail.standardList"
<el-descriptions-item label="标准名称">{{standard.standardName}}</el-descriptions-item> border
<el-descriptions-item label="标准类型">{{standard.standardTypeName}}</el-descriptions-item> style="width: 100%">
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="上限">{{standard.detailUpLimit}}</el-descriptions-item> <el-table-column
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="下限">{{standard.detailDownLimit}}</el-descriptions-item> prop="standardName"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="单位">{{standard.detailUnit}}</el-descriptions-item> label="标准名称"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="实际值">{{standard.actualValue}}</el-descriptions-item> width="180">
<el-descriptions-item v-if="standard.standardType == 'qualitative' " label="是否达标">{{standard.detailReach}}</el-descriptions-item> </el-table-column>
</el-descriptions> <el-table-column
<el-divider></el-divider> prop="standardType"
</div> label="标准类型"
width="180">
</div> </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> </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>
</el-drawer>
<!-- 添加或修改保养记录对话框 --> <!-- 添加或修改保养记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@ -637,7 +673,10 @@ export default {
</script> </script>
<style> <style>
.my-margin-lr{ .my-margin-lr{
margin-right: 10px; margin-right: 20px;
margin-left: 10px; margin-left: 20px;
}
.my-margin-top{
margin-top: 10px;
} }
</style> </style>

@ -18,12 +18,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
@ -101,10 +103,10 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否可生产-限制" prop="planRestrict"> <el-form-item label-width="90px" label="是否可生产" prop="planRestrict">
<el-input <el-input
v-model="queryParams.planRestrict" v-model="queryParams.planRestrict"
placeholder="请输入是否可生产-限制" placeholder="请输入是否可生产"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
@ -277,14 +279,14 @@
<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="planId" /> <el-table-column v-if="false" label="主键" align="center" prop="planId" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column> <el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column label="计划编码" align="center" prop="planCode" /> <el-table-column width="120" label="计划编码" align="center" prop="planCode" />
<el-table-column label="计划名称" align="center" prop="planName" /> <el-table-column width="120" label="计划名称" align="center" prop="planName" />
<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 v-if="false" label="产线" align="center" prop="planProdLine" />
<el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName" /> <el-table-column v-if="false" label="设备名称" align="center" prop="equipmentName" />
<el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode" /> <el-table-column v-if="false" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="循环周期" align="center" prop="planLoop" /> <el-table-column label="循环周期" align="center" prop="planLoop" />
<el-table-column label="循环周期类型" align="center" prop="planLoopType"> <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>
@ -305,7 +307,11 @@
<dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.planStatus"/> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.planStatus"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否可生产-限制" align="center" prop="planRestrict" /> <el-table-column width="120" label="是否可生产" align="center" prop="planRestrict" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_yes_no" :value="scope.row.planRestrict"/>
</template>
</el-table-column>
<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 v-if="false" label="是否委外" align="center" prop="planOutsource" /> <el-table-column v-if="false" label="是否委外" align="center" prop="planOutsource" />
<el-table-column v-if="false" label="委外工单编码" align="center" prop="workCode" /> <el-table-column v-if="false" label="委外工单编码" align="center" prop="workCode" />
@ -329,7 +335,7 @@
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column 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
size="mini" size="mini"
@ -637,7 +643,7 @@ import {addPlan, getEquList, getPersonList, getWorkCenter, initUpdatePlanInfo, u
export default { export default {
name: "SpotCheckPlan", name: "SpotCheckPlan",
dicts: ['device_loop_type', 'sys_normal_disable'], dicts: ['device_loop_type', 'sys_normal_disable','device_yes_no'],
data() { data() {
return { return {
// list // list
@ -743,12 +749,14 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.setWorkCenter();
}, },
methods: { methods: {
// //
setWorkCenter() { setWorkCenter() {
getWorkCenter().then(response => { getWorkCenter().then(response => {
this.workCenterList = response.data; this.workCenterList = response.data;
console.log(this.workCenterList)
}) })
}, },
// //

@ -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,7 +43,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="循环周期" prop="planLoop"> <el-form-item v-if="false" label="循环周期" prop="planLoop">
<el-input <el-input
v-model="queryParams.planLoop" v-model="queryParams.planLoop"
placeholder="请输入循环周期" placeholder="请输入循环周期"
@ -249,13 +251,17 @@
<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="120" 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="120" 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 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 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 label="循环执行时间开始" align="center" prop="planLoopStart" width="180">
<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>
@ -277,7 +283,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" /> <el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="工单状态" align="center" prop="orderStatus" /> <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="orderCost" />
<el-table-column label="点检人" align="center" prop="planPerson" /> <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="orderCostTime" />
@ -451,12 +461,15 @@
<script> <script>
import { listSpotInspectionOrder, getSpotInspectionOrder, delSpotInspectionOrder, addSpotInspectionOrder, updateSpotInspectionOrder } from "@/api/device/spotInspectionOrder"; import { listSpotInspectionOrder, getSpotInspectionOrder, delSpotInspectionOrder, addSpotInspectionOrder, updateSpotInspectionOrder } from "@/api/device/spotInspectionOrder";
import {getDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder"; import {getDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
export default { export default {
name: "SpotInspectionOrder", name: "SpotInspectionOrder",
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type'],
data() { data() {
return { return {
//
workCenterList:[],
// //
loading: true, loading: true,
// //
@ -519,8 +532,16 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.setWorkCenter();
}, },
methods: { methods: {
//
setWorkCenter() {
getWorkCenter().then(response => {
this.workCenterList = response.data;
console.log(this.workCenterList)
})
},
/** 查询点检工单列表 */ /** 查询点检工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;

@ -330,61 +330,85 @@
@pagination="getList" @pagination="getList"
/> />
<el-drawer <el-dialog
title="点检详情" title="点检详情"
:visible.sync="workDetail" :visible.sync="workDetail"
size="700px"> width="900px"
>
<div class="my-margin-lr"> <el-tabs type="border-card">
<el-descriptions title="点检信息"> <el-tab-pane label="点检信息">
<el-descriptions-item label="计划编码">{{workVO.order.planCode}}</el-descriptions-item> <el-descriptions title="" border :column="2">
<el-descriptions-item label="计划名称">{{workVO.order.planName}}</el-descriptions-item> <el-descriptions-item label="计划编码">{{ workVO.order.planCode }}</el-descriptions-item>
<el-descriptions-item label="循环周期">{{workVO.order.planLoop}}{{workVO.order.planLoopType}}</el-descriptions-item> <el-descriptions-item label="计划名称">{{ workVO.order.planName }}</el-descriptions-item>
<el-descriptions-item label="工单编码">{{workVO.order.orderCode}}</el-descriptions-item> <el-descriptions-item label="循环周期">{{ workVO.order.planLoop }}{{ workVO.order.planLoopType }}
<el-descriptions-item label="车间编码">{{workVO.order.planWorkshop}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="点检执行开始时间">{{workVO.order.planLoopStart}}</el-descriptions-item> <el-descriptions-item label="工单编码">{{ workVO.order.orderCode }}</el-descriptions-item>
<el-descriptions-item label="点检执行结束时间">{{workVO.order.planLoopEnd}}</el-descriptions-item> <el-descriptions-item label="车间编码">{{ workVO.order.planWorkshop }}</el-descriptions-item>
<el-descriptions-item label="实际开始时间">{{workVO.order.orderStart}}</el-descriptions-item> <el-descriptions-item label="点检执行开始时间">{{ workVO.order.planLoopStart }}</el-descriptions-item>
<el-descriptions-item label="实际结束时间">{{workVO.order.orderEnd}}</el-descriptions-item> <el-descriptions-item label="点检执行结束时间">{{ workVO.order.planLoopEnd }}</el-descriptions-item>
<el-descriptions-item label="点检人">{{workVO.order.planPerson}}</el-descriptions-item> <el-descriptions-item label="实际开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item label="报修单号">{{workVO.order.repairCode}}</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-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border>
<el-descriptions title="设备信息"> <el-descriptions-item label="设备编码">{{ workVO.equ.equipmentCode }}</el-descriptions-item>
<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.equipmentName}}</el-descriptions-item> <el-descriptions-item label="设备位置">{{ workVO.equ.equipmentLocation }}</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.equipmentTypeCode}}</el-descriptions-item> <el-descriptions-item label="设备类型名称">{{ workVO.equ.equipmentTypeName }}</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.workshopCode}}</el-descriptions-item> <el-descriptions-item label="所属工作中心名称">{{ workVO.equ.workshopName }}</el-descriptions-item>
<el-descriptions-item label="所属工作中心名称">{{workVO.equ.workshopName}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane>
<el-divider></el-divider> <el-tab-pane label="检查项信息">
<el-descriptions v-if="workVO.detailList.length > 0" title="检查项信息"/>
<div v-for="(detail,index) in workVO.detailList" :key="index"> <div v-for="(detail,index) in workVO.detailList" :key="index">
<el-divider content-position="right">{{detail.itemName}}</el-divider> <el-divider content-position="left">{{ detail.itemName }}</el-divider>
<div v-for="(standard,index) in detail.standardList" :key="index"> <el-table
<el-descriptions title=""> :data="detail.standardList"
<el-descriptions-item label="标准名称">{{standard.standardName}}</el-descriptions-item> border
<el-descriptions-item label="标准类型">{{standard.standardTypeName}}</el-descriptions-item> style="width: 100%">
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="上限">{{standard.detailUpLimit}}</el-descriptions-item> <el-table-column
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="下限">{{standard.detailDownLimit}}</el-descriptions-item> prop="standardName"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="单位">{{standard.detailUnit}}</el-descriptions-item> label="标准名称"
<el-descriptions-item v-if="standard.standardType == 'quantify' " label="实际值">{{standard.actualValue}}</el-descriptions-item> width="180">
<el-descriptions-item v-if="standard.standardType == 'qualitative' " label="是否达标">{{standard.detailReach}}</el-descriptions-item> </el-table-column>
</el-descriptions> <el-table-column
<el-divider></el-divider> prop="standardType"
</div> label="标准类型"
width="180">
</div> </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> </div>
</el-tab-pane>
</el-drawer> </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>
<!-- 添加或修改点检记录对话框 --> <!-- 添加或修改点检记录对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
@ -625,7 +649,10 @@ export default {
</script> </script>
<style> <style>
.my-margin-lr{ .my-margin-lr{
margin-right: 10px; margin-right: 20px;
margin-left: 10px; margin-left: 20px;
}
.my-margin-top{
margin-top: 10px;
} }
</style> </style>

Loading…
Cancel
Save