LAPTOP-R6EHHS26\86155 11 months ago
commit 63bdb5e263

@ -183,9 +183,10 @@ export function getMesListEquip(query) {
});
}
//报工按钮
export function reportSap(workorderCode) {
export function reportSap(workorderCode,machineCode) {
const data = {
workorderCode
workorderCode,
machineCode
}
return request({
url: '/mes/reportWork/reportSap',
@ -194,9 +195,10 @@ export function reportSap(workorderCode) {
});
}
//报工撤销按钮
export function reportSapCancel(workorderCode) {
export function reportSapCancel(workorderCode,machineCode) {
const data = {
workorderCode
workorderCode,
machineCode
}
return request({
url: '/mes/reportWork/reportSapCancel',

@ -152,7 +152,7 @@
<el-dialog
title="消息提示"
:visible.sync="dialogVisible"
width="40%"
width="49%"
:before-close="handleClose"
class="messagedialog"
>

File diff suppressed because it is too large Load Diff

@ -1,6 +1,13 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="100px"
>
<el-form-item v-if="false" label="计划id" prop="planId">
<el-input
v-model="queryParams.planId"
@ -9,6 +16,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检工单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入巡检工单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划编码" prop="planCode">
<el-input
v-model="queryParams.planCode"
@ -17,16 +32,20 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单号" prop="orderCode">
<el-form-item label="计划名称" prop="planName">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入工单号"
v-model="queryParams.planName"
placeholder="请输入计划名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="车间编码" prop="planWorkshop">
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable>
<el-select
v-model="queryParams.planWorkshop"
placeholder="请选择车间"
clearable
>
<el-option
v-for="work in workCenterList"
:key="work.factoryCode"
@ -43,16 +62,6 @@
@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"
@ -62,35 +71,43 @@
/>
</el-form-item>
<el-form-item v-if="false" label="循环执行时间开始" prop="planLoopStart">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.planLoopStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择循环执行时间开始">
placeholder="请选择循环执行时间开始"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="循环执行时间结束" prop="planLoopEnd">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.planLoopEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择循环执行时间结束">
placeholder="请选择循环执行时间结束"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="实际开始时间" prop="orderStart">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.orderStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际开始时间">
placeholder="请选择实际开始时间"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="实际结束时间" prop="orderEnd">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.orderEnd"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择实际结束时间">
placeholder="请选择实际结束时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="设备编码" prop="equipmentCode">
@ -112,17 +129,19 @@
<el-form-item label="巡检人" prop="planPerson">
<el-input
v-model="queryParams.planPerson"
placeholder="请输入检人"
placeholder="请输入检人"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="巡检时间" prop="orderStart">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.orderStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择点检时间">
placeholder="请选择点检时间"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="工单用时" prop="orderCostTime">
@ -190,11 +209,13 @@
/>
</el-form-item>
<el-form-item v-if="false" label="创建时间" prop="createTime">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.createTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择创建时间">
placeholder="请选择创建时间"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="更新人" prop="updateBy">
@ -206,13 +227,29 @@
/>
</el-form-item>
<el-form-item v-if="false" label="更新时间" prop="updateTime">
<el-date-picker clearable
<el-date-picker
clearable
v-model="queryParams.updateTime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
placeholder="请选择更新时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="循环周期" prop="planLoopType">
<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 label="循环范围开始" prop="planLoopStart">
<el-date-picker
v-model="queryParams.loopStartArray"
@ -223,7 +260,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item label="循环范围结束" prop="planLoopEnd">
@ -236,7 +274,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="执行开始时间" prop="orderStart">
@ -249,7 +288,8 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
<el-form-item v-if="false" label="执行结束时间" prop="orderEnd">
@ -262,12 +302,21 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
: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>
<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
>
</el-form-item>
</el-form>
@ -318,84 +367,244 @@
>导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<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="主键"
align="center"
prop="orderId"
/>
<!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号" fixed/>
<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 width="150" label="计划名称" align="center" prop="planName" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<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
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<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
v-if="false"
label="计划id"
align="center"
prop="planId"
/>
<el-table-column
width="150"
label="计划编码"
align="center"
prop="planCode"
/>
<el-table-column
width="200"
label="计划名称"
align="center"
prop="planName"
/>
<el-table-column
v-if="false"
label="计划类型"
align="center"
prop="planType"
/>
<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" >
<el-table-column
width="150"
label="车间"
align="center"
prop="workCenterName"
/>
<el-table-column
width="100"
label="设备编码"
align="center"
prop="equipmentCode"
/>
<el-table-column
width="120"
label="设备名称"
align="center"
prop="equipmentName"
/>
<el-table-column
width="150"
label="巡检时间"
align="center"
prop="orderEnd"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_loop_type" :value="scope.row.planLoopType"/>
<span>{{
parseTime(scope.row.orderEnd, "{y}-{m}-{d} {h}:{i}:{s}")
}}</span>
</template>
</el-table-column>
<el-table-column width="120" label="循环范围开始" align="center" prop="planLoopStart">
<el-table-column label="巡检人" align="center" prop="planPerson" />
<el-table-column
v-if="false"
label="产线"
align="center"
prop="planProdLine"
/>
<el-table-column label="循环周期" align="center" prop="planLoopType" />
<el-table-column
width="120"
label="循环周期类型"
align="center"
prop="planLoopType"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopStart, '{y}-{m}-{d}') }}</span>
<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="planLoopEnd">
<el-table-column
width="120"
label="循环范围开始"
align="center"
prop="planLoopStart"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.planLoopEnd, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.planLoopStart, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column v-if="false" width="120" label="执行开始时间" align="center" prop="orderStart">
<el-table-column
width="120"
label="循环范围结束"
align="center"
prop="planLoopEnd"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderStart, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.planLoopEnd, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column v-if="false" width="120" label="执行结束时间" align="center" prop="orderEnd">
<el-table-column
v-if="false"
width="120"
label="执行开始时间"
align="center"
prop="orderStart"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.orderStart, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<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" >
<el-table-column
v-if="false"
width="120"
label="执行结束时间"
align="center"
prop="orderEnd"
>
<template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
<span>{{ parseTime(scope.row.orderEnd, "{y}-{m}-{d}") }}</span>
</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="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="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">
<el-table-column
label="创建时间"
align="center"
prop="createTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
<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="updateTime" width="180">
<el-table-column
label="更新时间"
align="center"
prop="updateTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.updateTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column v-if="false" label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column
v-if="false"
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -418,103 +627,119 @@
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<el-dialog
title="巡检详情"
:visible.sync="workDetail"
width="1000px"
>
<el-dialog title="巡检详情" :visible.sync="workDetail" width="1000px">
<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 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 v-if="false" label="执行开始时间">{{ workVO.order.orderStart }}</el-descriptions-item>
<el-descriptions-item v-if="false" 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-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 v-if="false" label="执行开始时间">{{
workVO.order.orderStart
}}</el-descriptions-item>
<el-descriptions-item v-if="false" 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-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="standardListVo"
border
style="width: 100%">
<el-table-column
prop="itemName"
label="检查项"
width="180">
<el-table :data="standardListVo" border style="width: 100%">
<el-table-column prop="itemName" label="检查项" width="180">
</el-table-column>
<el-table-column
prop="standardName"
label="标准名称"
width="180">
<el-table-column prop="standardName" label="标准名称" width="180">
</el-table-column>
<el-table-column
prop="standardTypeName"
label="标准类型"
width="80">
</el-table-column>
<el-table-column
prop="detailReach"
label="是否达标">
width="80"
>
</el-table-column>
<el-table-column
prop="actualValue"
label="实际值">
<el-table-column prop="detailReach" label="是否达标">
</el-table-column>
<el-table-column
prop="detailUpLimit"
label="上限">
<el-table-column prop="actualValue" label="实际值">
</el-table-column>
<el-table-column
prop="detailDownLimit"
label="下限">
<el-table-column prop="detailUpLimit" label="上限">
</el-table-column>
<el-table-column
prop="detailUnit"
label="单位">
<el-table-column prop="detailDownLimit" label="下限">
</el-table-column>
<el-table-column
prop="picturePath"
label="图片">
<el-table-column prop="detailUnit" label="单位"> </el-table-column>
<el-table-column prop="picturePath" label="图片">
<template slot-scope="scope">
<el-popover
placement="right"
width="300"
trigger="hover">
<el-popover placement="right" width="300" trigger="hover">
<div class="demo-image__lazy">
<el-empty :image-size="200" v-if="scope.row.checkPictrueList.length == 0"></el-empty>
<div v-for="(url, index) in scope.row.checkPictrueList" :key="index">
<el-image
:src="url"
></el-image>
<el-empty
:image-size="200"
v-if="scope.row.checkPictrueList.length == 0"
></el-empty>
<div
v-for="(url, index) in scope.row.checkPictrueList"
:key="index"
>
<el-image :src="url"></el-image>
</div>
</div>
<el-button slot="reference" type="primary" icon="el-icon-picture" circle></el-button>
<el-button
slot="reference"
type="primary"
icon="el-icon-picture"
circle
></el-button>
</el-popover>
</template>
</el-table-column>
@ -542,46 +767,50 @@ import {
getInspectionWork,
delInspectionWork,
addInspectionWork,
updateInspectionWork
updateInspectionWork,
} from "@/api/device/inspectionWork";
import {listDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan";
import { listDeviceOrder } from "@/api/device/deviceOrder";
import { getWorkCenter } from "@/api/device/plan";
export default {
name: "InspectionWork",
dicts: ['device_order_status', 'device_loop_type'],
dicts: ["device_order_status", "device_loop_type"],
data() {
return {
standardListVo:[],
standardListVo: [],
workCenterList: [],
test: false,
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
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: '最近一个月',
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: '最近三个月',
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]);
}
}]
picker.$emit("pick", [start, end]);
},
},
],
},
// VO
workVO: {
@ -597,7 +826,8 @@ export default {
orderStart: null,
orderEnd: null,
planPerson: null,
}, equ: {
},
equ: {
equipmentCode: null,
equipmentName: null,
equipmentLocation: null,
@ -605,7 +835,8 @@ export default {
equipmentTypeName: null,
workshopCode: null,
workshopName: null,
}, detailList: []
},
detailList: [],
},
//
workDetail: false,
@ -633,6 +864,7 @@ export default {
pageSize: 10,
planId: null,
planCode: null,
planName: null,
planType: "inspection",
orderCode: null,
planWorkshop: null,
@ -644,7 +876,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: '1',
orderStatus: "1",
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -666,7 +898,7 @@ export default {
//
form: {},
//
rules: {}
rules: {},
};
},
created() {
@ -680,20 +912,20 @@ export default {
},
//
setWorkCenter() {
getWorkCenter().then(response => {
getWorkCenter().then((response) => {
this.workCenterList = response.data;
})
});
},
//
showWork(row) {
this.loading = true;
this.reset();
this.standardListVo = [];
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
const orderId = row.orderId || this.ids;
getInspectionWork(orderId).then((response) => {
this.workVO = response.data;
for (let i = 0; i < this.workVO.detailList.length; i++) {
for (let j = 0; j < this.workVO.detailList[i].standardList.length; j++) {
for (let j = 0;j < this.workVO.detailList[i].standardList.length;j++) {
this.workVO.detailList[i].standardList[j].itemName = this.workVO.detailList[i].itemName;
this.standardListVo.push(this.workVO.detailList[i].standardList[j]);
}
@ -701,12 +933,11 @@ export default {
this.loading = false;
this.workDetail = true;
});
},
/** 查询巡检记录列表 */
getList() {
this.loading = true;
listDeviceOrder(this.queryParams).then(response => {
listDeviceOrder(this.queryParams).then((response) => {
this.inspectionWorkList = response.rows;
this.total = response.total;
this.loading = false;
@ -734,7 +965,7 @@ export default {
orderStart: null,
orderEnd: null,
equipmentCode: null,
orderStatus: '1',
orderStatus: "1",
orderCost: null,
planPerson: null,
orderCostTime: null,
@ -771,9 +1002,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.orderId)
this.single = selection.length !== 1
this.multiple = !selection.length
this.ids = selection.map((item) => item.orderId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -784,8 +1015,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const orderId = row.orderId || this.ids
getInspectionWork(orderId).then(response => {
const orderId = row.orderId || this.ids;
getInspectionWork(orderId).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改巡检记录";
@ -793,16 +1024,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.orderId != null) {
updateInspectionWork(this.form).then(response => {
updateInspectionWork(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addInspectionWork(this.form).then(response => {
addInspectionWork(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -814,25 +1045,32 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const orderIds = row.orderId || this.ids;
this.$modal.confirm('是否确认删除巡检记录编号为"' + orderIds + '"的数据项?').then(function () {
this.$modal
.confirm('是否确认删除巡检记录编号为"' + orderIds + '"的数据项?')
.then(function () {
return delInspectionWork(orderIds);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/inspectionWork/export', {
...this.queryParams
}, `inspectionWork_${new Date().getTime()}.xlsx`)
}
}
this.download(
"device/inspectionWork/export",
{
...this.queryParams,
},
`inspectionWork_${new Date().getTime()}.xlsx`
);
},
},
};
</script>
<style>
.demo-image__lazy{
.demo-image__lazy {
height: 400px;
overflow-y: auto;
}

File diff suppressed because it is too large Load Diff

@ -1,6 +1,13 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="车间" prop="workshop">
<el-input
v-model="queryParams.workshop"
@ -41,7 +48,11 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="实际运行时间;运行时间-故障时间" prop="actualOperationTime">
<el-form-item
v-if="false"
label="实际运行时间;运行时间-故障时间"
prop="actualOperationTime"
>
<el-input
v-model="queryParams.actualOperationTime"
placeholder="请输入实际运行时间;运行时间-故障时间"
@ -155,12 +166,21 @@
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions">
: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>
<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
>
</el-form-item>
</el-form>
@ -173,7 +193,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['device:operation:add']"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -184,7 +205,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['device:operation:edit']"
>修改</el-button>
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -195,7 +217,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['device:operation:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -205,41 +228,166 @@
size="mini"
@click="handleExport"
v-hasPermi="['device:operation:export']"
>导出</el-button>
>导出</el-button
>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="operationList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="operationList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<el-table-column v-if="false" label="主键" align="center" prop="id" />
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" width="100" label="工厂" align="center" prop="factoryCode" />
<el-table-column width="120" label="日期" align="center" prop="createTime" >
<el-table-column
width="60"
align="center"
label="序号"
type="index"
></el-table-column>
<el-table-column
v-if="false"
width="100"
label="工厂"
align="center"
prop="factoryCode"
/>
<el-table-column
width="120"
label="日期"
align="center"
prop="createTime"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.createTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column width="120" label="车间" align="center" prop="workshop" />
<el-table-column width="120" label="组线" align="center" prop="groupLine" />
<el-table-column width="300" label="设备名称" align="left" prop="equipmentName" />
<el-table-column width="120" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="100" label="故障停机时间" align="center" prop="faultTime" />
<el-table-column width="100" label="实际运行时间" align="center" prop="actualOperationTime" />
<el-table-column width="100" label="运行时间" align="center" prop="operationTime" />
<el-table-column width="100" label="故障率" align="center" prop="failureRate" />
<el-table-column width="100" label="故障次数" align="center" prop="failureTimes" />
<el-table-column width="100" label="停机次数" align="center" prop="shutdownTimes" />
<el-table-column width="200" label="故障描述" align="center" prop="failureDescription" />
<el-table-column width="200" label="原因分析" align="center" prop="reasonAnalyze" />
<el-table-column width="200" label="设备状态描述" align="center" prop="equStatusDes" />
<el-table-column width="200" label="处理方式" align="center" prop="handlingMethod" />
<el-table-column width="200" label="更换备件" align="center" prop="replaceSpare" />
<el-table-column width="100" label="维修人" align="center" prop="repairPerson" />
<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 width="120" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
<el-table-column
width="120"
label="车间"
align="center"
prop="workshop"
/>
<el-table-column
width="120"
label="组线"
align="center"
prop="groupLine"
/>
<el-table-column
width="300"
label="设备名称"
align="left"
prop="equipmentName"
/>
<el-table-column
width="120"
label="设备编码"
align="center"
prop="equipmentCode"
/>
<el-table-column
width="100"
label="故障停机时间"
align="center"
prop="faultTime"
/>
<el-table-column
width="100"
label="实际运行时间"
align="center"
prop="actualOperationTime"
/>
<el-table-column
width="100"
label="运行时间"
align="center"
prop="operationTime"
/>
<el-table-column
width="100"
label="故障率"
align="center"
prop="failureRate"
/>
<el-table-column
width="100"
label="故障次数"
align="center"
prop="failureTimes"
/>
<el-table-column
width="100"
label="停机次数"
align="center"
prop="shutdownTimes"
/>
<el-table-column
width="200"
label="故障描述"
align="left"
prop="failureDescription"
/>
<el-table-column
width="200"
label="原因分析"
align="left"
prop="reasonAnalyze"
/>
<el-table-column
width="200"
label="设备状态描述"
align="left"
prop="equStatusDes"
/>
<el-table-column
width="200"
label="处理方式"
align="left"
prop="handlingMethod"
/>
<el-table-column
width="200"
label="更换备件"
align="left"
prop="replaceSpare"
/>
<el-table-column
width="100"
label="维修人"
align="left"
prop="repairPerson"
/>
<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
width="120"
label="操作"
align="center"
class-name="small-padding fixed-width"
fixed="right"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -247,7 +395,8 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['device:operation:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
v-if="false"
size="mini"
@ -255,13 +404,14 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['device:operation:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@ -278,7 +428,11 @@
<el-input v-model="form.groupLine" placeholder="请输入组线" />
</el-form-item>
<el-form-item label="设备" prop="equipmentName">
<el-input v-model="form.equipmentName" placeholder="请输入设备" :disabled="true"/>
<el-input
v-model="form.equipmentName"
placeholder="请输入设备"
:disabled="true"
/>
</el-form-item>
<el-form-item v-if="false" label="设备编码" prop="equipmentCode">
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
@ -287,31 +441,62 @@
<el-input v-model="form.faultTime" placeholder="请输入故障时间" />
</el-form-item>
<el-form-item label="实际运行时间" prop="actualOperationTime">
<el-input v-model="form.actualOperationTime" placeholder="请输入实际运行时间;运行时间-故障时间" />
<el-input
v-model="form.actualOperationTime"
placeholder="请输入实际运行时间;运行时间-故障时间"
/>
</el-form-item>
<el-form-item label="运行时间" prop="operationTime">
<el-input v-model="form.operationTime" placeholder="请输入运行时间" />
</el-form-item>
<el-form-item v-if="false" label="故障率" prop="failureRate">
<el-input v-model="form.failureRate" placeholder="请输入故障率" :disabled="true"/>
<el-input
v-model="form.failureRate"
placeholder="请输入故障率"
:disabled="true"
/>
</el-form-item>
<el-form-item label="故障描述" prop="failureDescription">
<el-input v-model="form.failureDescription" placeholder="请输入故障描述" :disabled="true"/>
<el-input
v-model="form.failureDescription"
placeholder="请输入故障描述"
:disabled="true"
/>
</el-form-item>
<el-form-item label="原因分析" prop="reasonAnalyze">
<el-input v-model="form.reasonAnalyze" placeholder="请输入原因分析" :disabled="true"/>
<el-input
v-model="form.reasonAnalyze"
placeholder="请输入原因分析"
:disabled="true"
/>
</el-form-item>
<el-form-item label="处理方式" prop="handlingMethod">
<el-input v-model="form.handlingMethod" placeholder="请输入处理方式" :disabled="true"/>
<el-input
v-model="form.handlingMethod"
placeholder="请输入处理方式"
:disabled="true"
/>
</el-form-item>
<el-form-item label="维修人" prop="repairPerson">
<el-input v-model="form.repairPerson" placeholder="请输入维修人" :disabled="true"/>
<el-input
v-model="form.repairPerson"
placeholder="请输入维修人"
:disabled="true"
/>
</el-form-item>
<el-form-item label="设备状态描述" prop="equStatusDes">
<el-input v-model="form.equStatusDes" placeholder="请输入设备状态描述" :disabled="true"/>
<el-input
v-model="form.equStatusDes"
placeholder="请输入设备状态描述"
:disabled="true"
/>
</el-form-item>
<el-form-item label="更换备件" prop="replaceSpare">
<el-input v-model="form.replaceSpare" placeholder="请输入更换备件" :disabled="true"/>
<el-input
v-model="form.replaceSpare"
placeholder="请输入更换备件"
:disabled="true"
/>
</el-form-item>
<el-form-item v-if="false" label="工厂" prop="factoryCode">
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
@ -338,8 +523,14 @@
</template>
<script>
import { listOperation, getOperation, delOperation, addOperation, updateOperation } from "@/api/device/operation";
import {parseTime} from "../../../utils/ruoyi";
import {
listOperation,
getOperation,
delOperation,
addOperation,
updateOperation,
} from "@/api/device/operation";
import { parseTime } from "../../../utils/ruoyi";
export default {
name: "Operation",
@ -347,31 +538,35 @@ export default {
return {
//
pickerOptions: {
shortcuts: [{
text: '最近一周',
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: '最近一个月',
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: '最近三个月',
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]);
}
}]
picker.$emit("pick", [start, end]);
},
},
],
},
//
loading: true,
@ -420,9 +615,9 @@ export default {
//
rules: {
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
{ required: true, message: "删除标识不能为空", trigger: "blur" },
],
}
},
};
},
created() {
@ -433,7 +628,7 @@ export default {
/** 查询设备运行记录列表 */
getList() {
this.loading = true;
listOperation(this.queryParams).then(response => {
listOperation(this.queryParams).then((response) => {
this.operationList = response.rows;
this.total = response.total;
this.loading = false;
@ -488,9 +683,9 @@ export default {
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -501,8 +696,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getOperation(id).then(response => {
const id = row.id || this.ids;
getOperation(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改设备运行记录";
@ -510,16 +705,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateOperation(this.form).then(response => {
updateOperation(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOperation(this.form).then(response => {
addOperation(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -531,19 +726,27 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除设备运行记录编号为"' + ids + '"的数据项?').then(function() {
this.$modal
.confirm('是否确认删除设备运行记录编号为"' + ids + '"的数据项?')
.then(function () {
return delOperation(ids);
}).then(() => {
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('device/operation/export', {
...this.queryParams
}, `operation_${new Date().getTime()}.xlsx`)
}
}
this.download(
"device/operation/export",
{
...this.queryParams,
},
`operation_${new Date().getTime()}.xlsx`
);
},
},
};
</script>

File diff suppressed because it is too large Load Diff

@ -9,6 +9,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="点检工单号" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入点检工单号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="计划编码" prop="planCode">
<el-input
v-model="queryParams.planCode"
@ -17,10 +25,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="工单号" prop="orderCode">
<el-form-item label="计划名称" prop="planName">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入工单号"
v-model="queryParams.planName"
placeholder="请输入计划名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -43,16 +51,7 @@
@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"
@ -101,7 +100,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-form-item label="设备名称" prop="equipmentName">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
@ -220,6 +219,16 @@
value-format="yyyy-MM-dd"
placeholder="请选择更新时间">
</el-date-picker>
</el-form-item>
<el-form-item label="循环周期" prop="planLoopType">
<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 label="循环开始时间" prop="planLoopStart">
<el-date-picker
@ -318,7 +327,7 @@
<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 width="150" label="计划名称" align="center" prop="planName" />
<el-table-column width="200" label="计划名称" align="center" prop="planName" />
<el-table-column v-if="false" label="计划类型" align="center" prop="planType" />
<el-table-column width="150" label="点检单号" align="center" prop="orderCode" fixed>
<template slot-scope="scope">
@ -331,7 +340,10 @@
</el-table-column>
<el-table-column label="车间编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/>
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="200" label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="150" label="点检时间" align="center" prop="orderStart"/>
<el-table-column label="点检人" align="center" prop="planPerson" />
<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" >
@ -359,15 +371,12 @@
<span>{{ parseTime(scope.row.orderEnd, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="200" 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" />
@ -624,6 +633,7 @@ export default {
pageSize: 10,
planId: null,
planCode: null,
planName: null,
planType: "spotInspection",
orderCode: null,
planWorkshop: null,

File diff suppressed because it is too large Load Diff

@ -306,6 +306,11 @@
<el-table-column v-if="false" label="主键" align="center" prop="planId"/>
<el-table-column width="150" label="计划编码" align="center" prop="planCode" fixed/>
<el-table-column width="150" label="计划名称" align="center" prop="planName"/>
<el-table-column width="150" label="生成规则" align="center" prop="calculationRule">
<template slot-scope="scope">
{{ scope.row.calculationRule == "0" ? "按照固定周期" : scope.row.one == "1" ? "按照上次保养时间" : "单次" }}
</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"/>
@ -468,6 +473,7 @@
<el-date-picker
v-model="form.planLoopStart"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择日期">
</el-date-picker>
</el-form-item>
@ -1461,7 +1467,7 @@ export default {
// 线
getGroupLine().then(response => {
this.groupLineList = response.data;
this.equipmentQuery.groupLine = response.data[0].equipmentCode;
// this.equipmentQuery.groupLine = response.data[0].equipmentCode;
this.getEquList();
})
@ -1696,6 +1702,10 @@ export default {
return
}
}
if(this.form.calculationRule == "2"){
this.form.planTimeArray = null;
this.form.planLoopEnd = this.form.planLoopStart;
}
this.planLoading = true;
if (this.form.planId != null) {
this.form.personList = this.selectPersonList.map(item => {

@ -11,14 +11,24 @@
<el-form-item label="生产时间" prop="productDateArray">
<el-date-picker
v-model="queryParams.productDateArray"
format="yyyy-MM-dd"
type="daterange"
format="yyyy-MM-dd HH:mm:ss"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="班次" prop="shiftId">
<el-select v-model="queryParams.shiftId" default-first-option clearable>
<el-option
v-for="item in shiftList"
:key="item.shiftId"
:label="item.shiftDesc"
:value="item.shiftId"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="产品编号" prop="productCode">
<el-input
v-model="queryParams.productCode"
@ -111,7 +121,7 @@ export default {
machineProList: [],
//
products: [],
shiftList: [],
//
title: "",
//
@ -125,6 +135,7 @@ export default {
workorderName: null,
parentOrder: null,
orderId: null,
shiftId: null,
orderCode: null,
productId: null,
productCode: null,
@ -140,7 +151,9 @@ export default {
created() {
this.getDate();
this.getList();
getProShifts().then(response => {
this.shiftList = response.data
})
},
methods: {
/**获取默认查询时间段**/
@ -163,10 +176,10 @@ export default {
if (this.queryParams.productDateArray != null) {
this.queryParams.productDateStart = moment(
this.queryParams.productDateArray[0]
).format("YYYY-MM-DD");
).format("YYYY-MM-DD HH:mm:ss");
this.queryParams.productDateEnd = moment(
this.queryParams.productDateArray[1]
).format("YYYY-MM-DD");
).format("YYYY-MM-DD HH:mm:ss");
}
this.loading = true;

@ -377,13 +377,14 @@
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="报工单编号" align="center" prop="reportCode" width="120" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
</el-table>
<div class="demo-input-suffix">
<p>备注</p>
<el-input type="textarea" @blur="addRemarksblur(item.libList, item.remark, index)"
v-model="item.remark" placeholder="请输入内容(300个字内)" maxlength=300 />
v-model="item.remark" placeholder="请输入内容(300个字内)" maxlength=300 >
</el-input>
</div>
</el-tab-pane>
@ -434,6 +435,7 @@
</el-select>
</template>
</el-table-column>
<el-table-column label="报工单编号" align="center" prop="reportCode" width="120" />
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
<el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope">
@ -995,6 +997,8 @@ export default {
updateBy: null,
endReport: "0"
};
this.queryParams.workorderCode = "";
this.queryParams.machineCode = "";
this.resetForm("form");
this.libTabs = [];
this.libConsumeTabs = [];
@ -1049,6 +1053,7 @@ export default {
}
this.queryParams.workorderCode = sr.workorderCode;
this.queryParams.machineCode = sr.machineCode;
// this.SAPCD=sr.workorderCodeSap;
//
this.queryParams.parentOrder = "0";
@ -1141,11 +1146,12 @@ export default {
}
const code = sr.workorderCode;
const machineCode = sr.machineCode;
let _this = this;
this.$modal
.confirm('是否确认工单"' + code + '"的数据项向sap报工')
.confirm('是否确认线体'+machineCode+',工单' + code + '的数据项向sap报工')
.then(function () {
reportSap(code).then((response) => {
reportSap(code,machineCode).then((response) => {
if (response != null && response.code == 200) {
_this.$modal.msgSuccess("报工成功");
}
@ -1161,11 +1167,12 @@ export default {
this.loading = true;
let sr = this.selectRow[0];
const code = sr.workorderCode;
const machineCode = sr.machineCode;
let _this = this;
this.$modal
.confirm('是否确认工单"' + code + '"的数据项撤销sap报工')
.then(function () {
reportSapCancel(code).then((response) => {
reportSapCancel(code,machineCode).then((response) => {
if (response != null && response.code == 200) {
_this.$modal.msgSuccess("报工撤销成功");
}
@ -1191,6 +1198,7 @@ export default {
}
this.queryParams.workorderCode = sr.workorderCode;
this.queryParams.machineCode = sr.machineCode;
//
getAllLevelReportList(this.queryParams).then((response) => {
@ -1260,6 +1268,8 @@ export default {
submitReportPS(this.reportRows).then((response) => {
this.$modal.msgSuccess("报工信息修改成功");
this.openReport = false;
this.queryParams.workorderCode = "";
this.queryParams.machineCode = "";
this.getList();
});
},
@ -1298,15 +1308,17 @@ export default {
}
this.queryParams.workorderCode = sr.workorderCode;
this.queryParams.machineCode = sr.machineCode;
//
getAllLevelConsumeList(this.queryParams).then((response) => {
this.libConsumeTabs = response;
this.openConsume = true;
this.titleConsume = "工单报工物料损耗详情";
this.queryParams.workorderCode = "";
this.queryParams.machineCode = "";
});
this.queryParams.workorderCode = sr.workorderCode;
//this.queryParams.workorderCode = sr.workorderCode;
//BOM
//this.queryParams.parentOrder = '0';
//getBomList(this.queryParams).then(response => {

@ -3,10 +3,9 @@
v-if="showFlag"
:visible.sync="showFlag"
:modal= false
width="1000px"
width="1100px"
>
<el-row :gutter="20">
<el-col :span="24" :xs="24">
<el-form :model="queryParams" ref="queryProjectForm" size="small" :inline="true" v-show="showSearch" label-width="105px" align="left">
<el-form-item label="检测项目名称" prop="ruleName">
@ -18,16 +17,13 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="检测方案名称" prop="projectType">
<el-select v-model="queryParams.projectType" filterable clearable placeholder="请选择检测方案">
<el-option
v-for="(item,index) in projectTypeOptions"
:key="index"
:label="item.projectTypeName"
:value="item.projectTypeCode">
</el-option>
</el-select>
<el-form-item v-show="false" label="检测项目名称" prop="projectType">
<el-input
v-model="queryParams.projectType"
placeholder="检测方案代码"
clearable
style="width: 240px"
/>
</el-form-item>
<el-form-item>
@ -35,6 +31,18 @@
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="20">
<el-col :span="5" :xs="24">
<el-tabs v-model="editTabsValue" @tab-click="handleClick" :tab-position="'right'" style="height: 600px;">
<el-tab-pane
v-for="(item) in projectTypeOptions"
:key="item.projectTypeCode"
:label="item.projectTypeName"
:name="item.projectTypeCode"
>{{ item.projectTypeName }}</el-tab-pane>
</el-tabs>
</el-col>
<el-col :span="19" :xs="24">
<el-table v-loading="loading" :data="itemList" @selection-change="handleBomSelectionChange" ref="myTable" >
<el-table-column width="50" align="center" type="selection">
</el-table-column>
@ -70,6 +78,8 @@
<el-table-column label="缺陷等级" align="left" prop="defectLevel" width="90"/>
<el-table-column label="检验方式" align="left" prop="checkMode" width="90" :show-overflow-tooltip="true"/>
<el-table-column label="检验工具" align="left" prop="checkTool" width="90"/>
<el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" />
<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/>
</el-table>
<pagination
v-show="total>0"
@ -80,6 +90,8 @@
/>
</el-col>
</el-row>
</el-col>
</el-row>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitProjectItems"> </el-button>
<el-button @click="showFlag=false"> </el-button>
@ -109,6 +121,8 @@ export default {
itemList: null,
ruleName: null,
projectType:null,
editTabsValue: '',
tabIndex: null,
//
bomCode: undefined,
defaultProps: {
@ -120,6 +134,8 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 10,
ruleName: null,
projectType: null,
groupId:null,
materialCode:null,
typeCode:null
@ -132,10 +148,21 @@ export default {
},
methods: {
//
itemTypeFormat(row, column, cellValue) {
if (cellValue != null) {
if(cellValue=='1'){
return '包装';
}else if(cellValue=='0'){
return '内容物';
}
}
},
//
getProjectList() {
getProjectOptions(this.queryParams).then(response => {
this.projectTypeOptions = response;
this.tabIndex = response.length;
});
},
@ -166,6 +193,8 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryProjectForm");
this.queryParams.projectType = '';
this.editTabsValue = '';
this.handleQuery();
},
@ -187,6 +216,11 @@ export default {
this.ruleName = '';
this.projectType = '';
},
handleClick(tab,event) {
this.queryParams.projectType = tab.name;
this.getList();
}
}
};
</script>

@ -120,6 +120,8 @@
</el-table-column>
<el-table-column label="抽样方案" align="center" prop="samplePlan" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="合格判定" align="center" prop="judge" :show-overflow-tooltip="true" width="200"/>
<el-table-column label="检测项分类" align="center" prop="itemType" width="100" :formatter="itemTypeFormat" />
<el-table-column label="合格判定比例" align="center" prop="judgeRate" width="150"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<el-button
@ -244,6 +246,21 @@
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="检测项分类" prop="itemType">
<el-radio v-model="form.itemType" label="1"></el-radio>
<el-radio v-model="form.itemType" label="0"></el-radio>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="合格判定比例" prop="judgeRate">
<el-input type='number' v-model="form.judgeRate" placeholder="合格判定比例" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
@ -365,6 +382,17 @@ export default {
this.getProjectTypeList();
},
methods: {
//
itemTypeFormat(row, column, cellValue) {
if (cellValue != null) {
if(cellValue=='1'){
return '包装';
}else if(cellValue=='0'){
return '内容物';
}
}
},
/** 查询检验项目维护列表 */
getList() {
this.loading = true;

@ -166,8 +166,8 @@
}}</el-button>
</template>
</el-table-column>
<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true"/>
<el-table-column label="订单号" align="center" prop="orderNo" width="120"/>
<!--<el-table-column label="批次号" align="center" prop="incomeBatchNo" width="200" :show-overflow-tooltip="true"/>-->
<el-table-column label="订单号" align="center" prop="orderNo" width="130"/>
<el-table-column label="物料号" align="center" prop="materialCode" width="170" />
<el-table-column label="物料名称" align="center" prop="materialName" width="250" :show-overflow-tooltip="true"/>
<el-table-column label="数量" align="center" prop="quality" />

Loading…
Cancel
Save