|
|
|
@ -202,24 +202,25 @@
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
type="success"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-plus"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
@click="orderDialog = true"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:add']"
|
|
|
|
|
>新增</el-button>
|
|
|
|
|
>快速工单
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="success"
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
size="mini"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>结果检验
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -230,7 +231,8 @@
|
|
|
|
|
:disabled="multiple"
|
|
|
|
|
@click="handleDelete"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
@ -240,7 +242,8 @@
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleExport"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:export']"
|
|
|
|
|
>导出</el-button>
|
|
|
|
|
>导出
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
@ -299,7 +302,7 @@
|
|
|
|
|
<span>{{ parseTime(scope.row.updateTime, '{y}-{m}-{d}') }}</span>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
|
|
<el-table-column width="180" label="操作" align="center" class-name="small-padding fixed-width" fixed="right">
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
@ -307,14 +310,16 @@
|
|
|
|
|
icon="el-icon-edit"
|
|
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:edit']"
|
|
|
|
|
>修改</el-button>
|
|
|
|
|
>填写记录
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
size="mini"
|
|
|
|
|
type="text"
|
|
|
|
|
icon="el-icon-delete"
|
|
|
|
|
@click="handleDelete(scope.row)"
|
|
|
|
|
v-hasPermi="['device:upkeepOrder:remove']"
|
|
|
|
|
>删除</el-button>
|
|
|
|
|
>删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
@ -327,90 +332,389 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改保养工单对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
|
<!-- 快速工单弹出框 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="快速工单"
|
|
|
|
|
:visible.sync="orderDialog"
|
|
|
|
|
width="800px"
|
|
|
|
|
>
|
|
|
|
|
<el-tabs type="border-card">
|
|
|
|
|
<el-tab-pane label="工单基本信息">
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-form-item label="计划id" prop="planId">
|
|
|
|
|
<el-input v-model="form.planId" placeholder="请输入计划id" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="计划编码" prop="planCode">
|
|
|
|
|
<el-input v-model="form.planCode" placeholder="请输入计划编码" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="单号" prop="orderCode">
|
|
|
|
|
<el-input v-model="form.orderCode" placeholder="请输入单号" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="车间" prop="planWorkshop">
|
|
|
|
|
<el-input v-model="form.planWorkshop" placeholder="请输入车间" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="产线" prop="planProdLine">
|
|
|
|
|
<el-input v-model="form.planProdLine" placeholder="请输入产线" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="循环周期" prop="planLoop">
|
|
|
|
|
<el-input v-model="form.planLoop" placeholder="请输入循环周期" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="循环执行时间开始" prop="planLoopStart">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.planLoopStart"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择循环执行时间开始">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="循环执行时间结束" prop="planLoopEnd">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.planLoopEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择循环执行时间结束">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8">
|
|
|
|
|
<el-form-item label="保养名称:">
|
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入保养名称"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="实际开始时间" prop="orderStart">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.orderStart"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择实际开始时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span=12 :offset="1">
|
|
|
|
|
<el-form-item label="是否停机保养:">
|
|
|
|
|
<el-radio v-model="form.shutDown" label="0">停机保养</el-radio>
|
|
|
|
|
<el-radio v-model="form.shutDown" label="1">开机保养</el-radio>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="实际结束时间" prop="orderEnd">
|
|
|
|
|
<el-date-picker clearable
|
|
|
|
|
v-model="form.orderEnd"
|
|
|
|
|
type="date"
|
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
|
placeholder="请选择实际结束时间">
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="12">
|
|
|
|
|
<el-form-item label-width="100px" label="保养执行时间">
|
|
|
|
|
<el-date-picker
|
|
|
|
|
@change="changeArray"
|
|
|
|
|
v-model="form.planTimeArray"
|
|
|
|
|
type="datetimerange"
|
|
|
|
|
range-separator="至"
|
|
|
|
|
start-placeholder="开始时间"
|
|
|
|
|
end-placeholder="结束时间">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
|
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工单费用" prop="orderCost">
|
|
|
|
|
<el-input v-model="form.orderCost" placeholder="请输入工单费用" />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="责任人" prop="planPerson">
|
|
|
|
|
<el-input v-model="form.planPerson" placeholder="请输入责任人" />
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="选择设备、保养项">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col class="my-step-mar" :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="selectEquBtn">
|
|
|
|
|
选择设备
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="form.equipmentItem"
|
|
|
|
|
stripe
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="equipmentCode"
|
|
|
|
|
label="设备编码"
|
|
|
|
|
width="180">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="equipmentName"
|
|
|
|
|
label="设备名称"
|
|
|
|
|
width="180">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="itemTempName"
|
|
|
|
|
label="巡检项"
|
|
|
|
|
width="300">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="150"
|
|
|
|
|
fixed="right"
|
|
|
|
|
label="操作"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button @click="editorTheItem(scope.row)" type="text" size="small">标准</el-button>
|
|
|
|
|
<el-button @click="selectSpareBtn(scope.row)" type="text" size="small">备件</el-button>
|
|
|
|
|
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<!-- 编辑检查项弹窗 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="编辑检查项"
|
|
|
|
|
:visible.sync="editorItem"
|
|
|
|
|
width="50%"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<!-- 编辑检查标准 -->
|
|
|
|
|
<el-table
|
|
|
|
|
:data="itemDetailList"
|
|
|
|
|
v-loading="detailLoading"
|
|
|
|
|
stripe
|
|
|
|
|
@selection-change="selectChangeEqu"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column width="55" align="center"/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="itemName"
|
|
|
|
|
label="检查项">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="standardName"
|
|
|
|
|
label="检查标准">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="standardTypeName"
|
|
|
|
|
label="标准类型">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
fixed="right"
|
|
|
|
|
label="操作"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button @click="delStandard(scope.row)" type="text" size="small">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="standardBtn">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 选择设备弹窗 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="选择设备"
|
|
|
|
|
:visible.sync="selectEqu"
|
|
|
|
|
width="800px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
|
|
|
|
|
label-width="68px">
|
|
|
|
|
<el-form-item label="设备编码">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="equipmentQuery.equipmentCode"
|
|
|
|
|
placeholder="请输入设备编码"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工单用时" prop="orderCostTime">
|
|
|
|
|
<el-input v-model="form.orderCostTime" placeholder="请输入工单用时" />
|
|
|
|
|
<el-form-item label="设备名称">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="equipmentQuery.equipmentName"
|
|
|
|
|
placeholder="请输入设备名称"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="签字" prop="orderSignPerson">
|
|
|
|
|
<el-input v-model="form.orderSignPerson" placeholder="请输入签字" />
|
|
|
|
|
<el-form-item v-if="false" label="设备类型">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="equipmentQuery.equipmentName"
|
|
|
|
|
placeholder="请输入设备类型"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="工厂" prop="factoryCode">
|
|
|
|
|
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="getEquList">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetEqu">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段1" prop="attr1">
|
|
|
|
|
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- 搜索-设备列表 -->
|
|
|
|
|
<el-table
|
|
|
|
|
:data="queryEquipment"
|
|
|
|
|
v-loading="equLoading"
|
|
|
|
|
stripe
|
|
|
|
|
@selection-change="selectChangeEqu"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="equipmentCode"
|
|
|
|
|
label="设备编码">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="equipmentName"
|
|
|
|
|
label="设备名称">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="equipmentTypeName"
|
|
|
|
|
label="设备类型">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="workshopName"
|
|
|
|
|
label="工作中心">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="equTotal>0"
|
|
|
|
|
:total="equTotal"
|
|
|
|
|
:page.sync="equipmentQuery.pageNum"
|
|
|
|
|
:limit.sync="equipmentQuery.pageSize"
|
|
|
|
|
@pagination="getEquList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="selectEqu = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="confirmSelectEquBtn">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 选择备件弹窗 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="备件领用"
|
|
|
|
|
:visible.sync="spareDialog"
|
|
|
|
|
width="900px"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-tabs type="border-card">
|
|
|
|
|
<el-tab-pane label="备件选择">
|
|
|
|
|
<el-form :model="spareQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
|
|
|
|
|
label-width="68px">
|
|
|
|
|
<el-form-item label="备件编码">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="spareQuery.materialCode"
|
|
|
|
|
placeholder="请输入备件编码"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段2" prop="attr2">
|
|
|
|
|
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
|
|
|
|
|
<el-form-item label="备件名称">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="spareQuery.materialDesc"
|
|
|
|
|
placeholder="请输入备件名称"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="备用字段3" prop="attr3">
|
|
|
|
|
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
|
|
|
|
|
<el-form-item v-if="false" label="备件类型">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="spareQuery.spareType"
|
|
|
|
|
placeholder="请输入备件类型"
|
|
|
|
|
clearable
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="删除标志" prop="delFlag">
|
|
|
|
|
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSpareList">搜索</el-button>
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetSpare">重置</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<!-- 搜索-备件列表 -->
|
|
|
|
|
<el-table
|
|
|
|
|
:data="spareList"
|
|
|
|
|
v-loading="spareLoading"
|
|
|
|
|
stripe
|
|
|
|
|
@selection-change="selectChangeSpare"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column v-if="false" type="selection" width="55" align="center"/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialCode"
|
|
|
|
|
label="备件号">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialDesc"
|
|
|
|
|
label="备件名称">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="spareType"
|
|
|
|
|
label="备件类型">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="amount"
|
|
|
|
|
label="库存数量">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="150"
|
|
|
|
|
fixed="right"
|
|
|
|
|
label="操作"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button @click="addSpareList(scope.row)" type="text" size="small">添加</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
v-show="spareTotal>0"
|
|
|
|
|
:total="spareTotal"
|
|
|
|
|
:page.sync="spareQuery.pageNum"
|
|
|
|
|
:limit.sync="spareQuery.pageSize"
|
|
|
|
|
@pagination="getSpareList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="spareDialog = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="confirmSelectSpareBtn">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="备件数量">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col class="my-step-mar" :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
plain
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="applyNumDialog = true , applyNum = null">
|
|
|
|
|
领用数量
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-table
|
|
|
|
|
:data="chooseSpareList"
|
|
|
|
|
v-loading="spareLoading"
|
|
|
|
|
stripe
|
|
|
|
|
@selection-change="selectChangeSpare"
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialCode"
|
|
|
|
|
label="备件号">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="materialDesc"
|
|
|
|
|
label="备件名称">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="spareType"
|
|
|
|
|
label="备件类型">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="amount"
|
|
|
|
|
label="库存数量">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
prop="applyNum"
|
|
|
|
|
label="领用数量">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column
|
|
|
|
|
width="150"
|
|
|
|
|
fixed="right"
|
|
|
|
|
label="操作"
|
|
|
|
|
>
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
<el-button @click="delSpareList(scope.row)" type="text" size="small">删除</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="申领数量"
|
|
|
|
|
:visible.sync="applyNumDialog"
|
|
|
|
|
width="30%"
|
|
|
|
|
append-to-body
|
|
|
|
|
>
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="8" :offset="7">
|
|
|
|
|
<el-input-number v-model="applyNum" @change="changeApplySpareNum" :min="1" label="描述文字"></el-input-number>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button v-if="false" @click="applyNumDialog = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="applyNumDialog = false">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-button type="primary" class="dialog-footer" @click="spareChangeCom">完成</el-button>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button @click="orderDialog = false">取 消</el-button>
|
|
|
|
|
<el-button type="primary" @click="orderDialog = false">确 定</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改保养工单对话框 -->
|
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
|
|
<el-tabs type="border-card">
|
|
|
|
|
<el-tab-pane label="基础信息">
|
|
|
|
|
<el-descriptions title="">
|
|
|
|
|
<el-descriptions-item label="计划编码">{{ this.form.planCode }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="计划名称">{{ this.form.planName }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="循环周期">{{ this.form.planLoop }}{{ this.form.planLoopType }}
|
|
|
|
|
</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工单编码">{{ this.form.orderCode }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="车间编码">{{ this.form.planWorkshop }}</el-descriptions-item>
|
|
|
|
|
<el-descriptions-item label="工作中心">{{ this.form.workCenterName }}</el-descriptions-item>
|
|
|
|
|
</el-descriptions>
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="记录">
|
|
|
|
|
记录
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
<el-tab-pane label="备件">
|
|
|
|
|
备件
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
@ -420,12 +724,76 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listUpkeepOrder, getUpkeepOrder, delUpkeepOrder, addUpkeepOrder, updateUpkeepOrder } from "@/api/device/upkeepOrder";
|
|
|
|
|
import {
|
|
|
|
|
listUpkeepOrder,
|
|
|
|
|
getUpkeepOrder,
|
|
|
|
|
delUpkeepOrder,
|
|
|
|
|
addUpkeepOrder,
|
|
|
|
|
updateUpkeepOrder
|
|
|
|
|
} from "@/api/device/upkeepOrder";
|
|
|
|
|
import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan";
|
|
|
|
|
import {getEquList} from "@/api/device/plan";
|
|
|
|
|
import {getDeviceOrder} from "@/api/device/deviceOrder";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: "UpkeepOrder",
|
|
|
|
|
dicts: ['device_order_status', 'device_loop_type'],
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 选中的备件
|
|
|
|
|
selOnSpare: [],
|
|
|
|
|
// 申领数量
|
|
|
|
|
applyNum: null,
|
|
|
|
|
// 申领数量弹出层
|
|
|
|
|
applyNumDialog: false,
|
|
|
|
|
// 已经选择的备件数
|
|
|
|
|
chooseSpareList: [],
|
|
|
|
|
// 备件总条数
|
|
|
|
|
spareTotal: 0,
|
|
|
|
|
// 备件table加载
|
|
|
|
|
spareLoading: false,
|
|
|
|
|
// 选择备件弹窗
|
|
|
|
|
spareDialog: false,
|
|
|
|
|
// 备件list
|
|
|
|
|
spareList: [],
|
|
|
|
|
// 保养人员选择穿梭框
|
|
|
|
|
personList: [],
|
|
|
|
|
selectPersonList: [],
|
|
|
|
|
// 工作中心list
|
|
|
|
|
workCenterList: [],
|
|
|
|
|
// 编辑检查标准list
|
|
|
|
|
itemDetailList: [],
|
|
|
|
|
// 编辑检查标准loading
|
|
|
|
|
detailLoading: false,
|
|
|
|
|
// 选中的设备信息
|
|
|
|
|
selectEquList: [],
|
|
|
|
|
// 设备信息loading
|
|
|
|
|
equLoading: false,
|
|
|
|
|
// 搜索到的设备总数
|
|
|
|
|
equTotal: 0,
|
|
|
|
|
// 搜索到的设备list
|
|
|
|
|
queryEquipment: [],
|
|
|
|
|
// 备件弹窗搜索条件
|
|
|
|
|
spareQuery: {
|
|
|
|
|
materialCode: null,
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
// 设备弹窗搜索条件
|
|
|
|
|
equipmentQuery: {
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
equipmentName: null,
|
|
|
|
|
workshopCode: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
},
|
|
|
|
|
// 选择设备弹窗
|
|
|
|
|
selectEqu: false,
|
|
|
|
|
// 编辑检查项弹窗
|
|
|
|
|
editorItem: false,
|
|
|
|
|
// 快速工单弹出层
|
|
|
|
|
orderDialog: false,
|
|
|
|
|
// 遮罩层
|
|
|
|
|
loading: true,
|
|
|
|
|
// 选中数组
|
|
|
|
@ -474,19 +842,305 @@ export default {
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null
|
|
|
|
|
updateTime: null,
|
|
|
|
|
equ: {equipmentName: null},
|
|
|
|
|
},
|
|
|
|
|
// 表单参数
|
|
|
|
|
form: {},
|
|
|
|
|
form: {
|
|
|
|
|
equ: {equipmentName: null},
|
|
|
|
|
selectSpareList: [],
|
|
|
|
|
equipmentItem: [],
|
|
|
|
|
shutDown: '0',
|
|
|
|
|
calculationRule: '0',
|
|
|
|
|
planLoopType: 'day',
|
|
|
|
|
planLoop: null,
|
|
|
|
|
upkeep: '1',
|
|
|
|
|
planName: null,
|
|
|
|
|
planWorkshop: null,
|
|
|
|
|
personList:[],
|
|
|
|
|
planTimeArray:[],
|
|
|
|
|
},
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
}
|
|
|
|
|
rules: {}
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 编辑标准确认按钮
|
|
|
|
|
standardBtn() {
|
|
|
|
|
this.editorItem = false;
|
|
|
|
|
},
|
|
|
|
|
// 删除标准
|
|
|
|
|
delStandard(e) {
|
|
|
|
|
e.showFlag = false;
|
|
|
|
|
for (let i = 0; i < this.itemDetailList.length; i++) {
|
|
|
|
|
if (this.itemDetailList[i].detailCode == e.detailCode) {
|
|
|
|
|
this.itemDetailList[i].showFlag = false;
|
|
|
|
|
this.itemDetailList.splice(i, 1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 点击编辑设备-巡检项目
|
|
|
|
|
editorTheItem(e) {
|
|
|
|
|
|
|
|
|
|
// 清除缓存
|
|
|
|
|
this.itemDetailList = [];
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < this.form.equipmentItem.length; i++) {
|
|
|
|
|
if (e.code == this.form.equipmentItem[i].code) {
|
|
|
|
|
for (let j = 0; j < this.form.equipmentItem[i].equPlanDetailList.length; j++) {
|
|
|
|
|
var itemName = this.form.equipmentItem[i].equPlanDetailList[j].itemName;
|
|
|
|
|
for (let k = 0; k < this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList.length; k++){
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].itemName = itemName;
|
|
|
|
|
if (this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardType == "qualitative") {
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定性";
|
|
|
|
|
}else {
|
|
|
|
|
this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k].standardTypeName = "定量";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(this.form.equipmentItem[i].equPlanDetailList[j].equPlanStandardList[k]);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.editorItem = true;
|
|
|
|
|
},
|
|
|
|
|
// 删除设备-巡检项
|
|
|
|
|
delTheEquItem(e) {
|
|
|
|
|
this.form.equipmentItem.splice(e.equipmentCode, 1)
|
|
|
|
|
},
|
|
|
|
|
// 选择设备确认按钮
|
|
|
|
|
confirmSelectEquBtn() {
|
|
|
|
|
|
|
|
|
|
if (this.selectEquList.length > 1) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: "只能选择一个设备!",
|
|
|
|
|
type: "warning"
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
|
formatEquItem(this.selectEquList).then(response => {
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
|
|
|
this.form.equipmentItem.push(response.data[i]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.selectEqu = false;
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 选择设备多选操作
|
|
|
|
|
selectChangeEqu(e) {
|
|
|
|
|
this.selectEquList = e;
|
|
|
|
|
},
|
|
|
|
|
// 获取设备信息
|
|
|
|
|
getEquList() {
|
|
|
|
|
this.equLoading = true;
|
|
|
|
|
this.equipmentQuery.workshopCode = this.form.planWorkshop;
|
|
|
|
|
getEquList(this.equipmentQuery).then(response => {
|
|
|
|
|
this.equTotal = response.total;
|
|
|
|
|
this.queryEquipment = response.rows;
|
|
|
|
|
this.equLoading = false;
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 点击选择设备按钮
|
|
|
|
|
selectEquBtn() {
|
|
|
|
|
this.getEquList();
|
|
|
|
|
this.selectEqu = true;
|
|
|
|
|
},
|
|
|
|
|
// 备件选择完成按钮
|
|
|
|
|
spareChangeCom() {
|
|
|
|
|
console.log("点击了完成按钮")
|
|
|
|
|
console.log(this.chooseSpareList)
|
|
|
|
|
console.log("form")
|
|
|
|
|
console.log(this.form)
|
|
|
|
|
this.spareDialog = false;
|
|
|
|
|
},
|
|
|
|
|
// 备件数量改变
|
|
|
|
|
changeApplySpareNum(e) {
|
|
|
|
|
for (let i = 0; i < this.selOnSpare.length; i++) {
|
|
|
|
|
this.selOnSpare[i].applyNum = e;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 删除备件-备件数量
|
|
|
|
|
delSpareList(e) {
|
|
|
|
|
console.log("删除备件")
|
|
|
|
|
console.log(e)
|
|
|
|
|
for (let i = 0; i < this.chooseSpareList.length; i++){
|
|
|
|
|
if (this.chooseSpareList[i].materialCode == e.materialCode) {
|
|
|
|
|
this.chooseSpareList.splice(i,1);
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '删除成功!',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
// 选择备件-添加备件
|
|
|
|
|
addSpareList(e) {
|
|
|
|
|
console.log("选择备件")
|
|
|
|
|
console.log(e)
|
|
|
|
|
for (let i = 0; i < this.chooseSpareList.length; i++){
|
|
|
|
|
if (this.chooseSpareList[i].materialCode == e.materialCode) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '不可重复添加!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.chooseSpareList.push(e);
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '添加成功!',
|
|
|
|
|
type: 'success'
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 改变巡检周期事件
|
|
|
|
|
changeArray(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
console.log(this.form.planTimeArray)
|
|
|
|
|
if (this.form.planLoop == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请输入循环周期!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (this.form.planLoopType == null) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '请选择循环类型!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 检验
|
|
|
|
|
if (this.form.planLoopType == 'day') {
|
|
|
|
|
// 计算日期差值(以毫秒为单位)
|
|
|
|
|
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
|
|
|
|
|
// 转换为天数
|
|
|
|
|
let days = Math.floor(diff / (1000 * 60 * 60 * 24));
|
|
|
|
|
|
|
|
|
|
if (days > this.form.planLoop) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '可执行时间范围为' + days + '天,循环周期为' + days + '天,超过循环周期' + (days - this.form.planLoop) + '天,请重新选择执行时间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.form.planLoopType == 'week') {
|
|
|
|
|
// 计算日期差值(以毫秒为单位)
|
|
|
|
|
let diff = this.form.planTimeArray[1].getTime() - this.form.planTimeArray[0].getTime();
|
|
|
|
|
// 转换为周数
|
|
|
|
|
let weeks = Math.floor(diff / (1000 * 60 * 60 * 24 * 7));
|
|
|
|
|
|
|
|
|
|
if (weeks > (this.form.planLoop / 7)) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '可执行时间范围为' + weeks + '周,循环周期为' + weeks + '周,超过循环周期' + (weeks * 7 - this.form.planLoop) + '天,请重新选择执行时间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.form.planLoopType == 'month') {
|
|
|
|
|
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
|
|
|
|
|
|
|
|
|
|
if (monthsDiff > this.form.planLoop) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '可执行时间范围为' + monthsDiff + '月,循环周期为' + monthsDiff + '月,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.form.planLoopType == 'season') {
|
|
|
|
|
let monthsDiff = (this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear()) * 12 + this.form.planTimeArray[1].getMonth() - this.form.planTimeArray[0].getMonth();
|
|
|
|
|
|
|
|
|
|
if (monthsDiff * 3 > this.form.planLoop) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '可执行时间范围为' + monthsDiff * 3 + '季度,循环周期为' + monthsDiff * 3 + '季度,超过循环周期' + (monthsDiff - this.form.planLoop) + '月,请重新选择执行时间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.form.planLoopType == 'year') {
|
|
|
|
|
// 计算年份差值
|
|
|
|
|
let yearsDiff = this.form.planTimeArray[1].getFullYear() - this.form.planTimeArray[0].getFullYear();
|
|
|
|
|
|
|
|
|
|
if (yearsDiff > this.form.planLoop) {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: '可执行时间范围为' + yearsDiff + '年,循环周期为' + yearsDiff + '年,超过循环周期' + (yearsDiff - this.form.planLoop) + '年,请重新选择执行时间!',
|
|
|
|
|
type: 'warning'
|
|
|
|
|
})
|
|
|
|
|
this.form.planTimeArray = [];
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// 选择备件确定按钮
|
|
|
|
|
confirmSelectSpareBtn() {
|
|
|
|
|
console.log("点击了选择备件确定按钮")
|
|
|
|
|
},
|
|
|
|
|
// 多选备件按钮
|
|
|
|
|
selectChangeSpare(e) {
|
|
|
|
|
console.log("多选改变")
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.selOnSpare = e;
|
|
|
|
|
},
|
|
|
|
|
// 备件搜索重置按钮
|
|
|
|
|
resetSpare() {
|
|
|
|
|
this.spareQuery = {
|
|
|
|
|
materialCode: null,
|
|
|
|
|
materialDesc: null,
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
};
|
|
|
|
|
this.setSpareList();
|
|
|
|
|
console.log("点击了搜索重置按钮")
|
|
|
|
|
},
|
|
|
|
|
// 获取备件信息
|
|
|
|
|
setSpareList() {
|
|
|
|
|
querySpareList(this.spareQuery).then(response => {
|
|
|
|
|
this.spareTotal = response.total;
|
|
|
|
|
this.spareList = response.rows;
|
|
|
|
|
this.spareLoading = false;
|
|
|
|
|
console.log(response)
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 搜索备件按钮
|
|
|
|
|
getSpareList() {
|
|
|
|
|
this.setSpareList()
|
|
|
|
|
console.log("点击了搜索备件按钮")
|
|
|
|
|
},
|
|
|
|
|
// 选择备件按钮操作
|
|
|
|
|
selectSpareBtn(e) {
|
|
|
|
|
console.log("点击了选择备件按钮!")
|
|
|
|
|
console.log(e)
|
|
|
|
|
this.setSpareList();
|
|
|
|
|
if (e.spareList == null) {
|
|
|
|
|
e.spareList = [];
|
|
|
|
|
}
|
|
|
|
|
this.chooseSpareList = e.spareList;
|
|
|
|
|
this.spareDialog = true;
|
|
|
|
|
},
|
|
|
|
|
/** 查询保养工单列表 */
|
|
|
|
|
getList() {
|
|
|
|
|
this.loading = true;
|
|
|
|
@ -531,7 +1185,8 @@ export default {
|
|
|
|
|
createBy: null,
|
|
|
|
|
createTime: null,
|
|
|
|
|
updateBy: null,
|
|
|
|
|
updateTime: null
|
|
|
|
|
updateTime: null,
|
|
|
|
|
equ: {equipmentName: null},
|
|
|
|
|
};
|
|
|
|
|
this.resetForm("form");
|
|
|
|
|
},
|
|
|
|
@ -555,16 +1210,18 @@ export default {
|
|
|
|
|
handleAdd() {
|
|
|
|
|
this.reset();
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "添加保养工单";
|
|
|
|
|
this.title = "快速工单";
|
|
|
|
|
},
|
|
|
|
|
/** 修改按钮操作 */
|
|
|
|
|
handleUpdate(row) {
|
|
|
|
|
this.reset();
|
|
|
|
|
const orderId = row.orderId || this.ids
|
|
|
|
|
getUpkeepOrder(orderId).then(response => {
|
|
|
|
|
const orderCode = row.orderCode || this.ids
|
|
|
|
|
getDeviceOrder(orderCode).then(response => {
|
|
|
|
|
this.form = response.data;
|
|
|
|
|
console.log("这里是回显信息")
|
|
|
|
|
console.log(response.data)
|
|
|
|
|
this.open = true;
|
|
|
|
|
this.title = "修改保养工单";
|
|
|
|
|
this.title = "填写记录";
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
@ -595,7 +1252,8 @@ export default {
|
|
|
|
|
}).then(() => {
|
|
|
|
|
this.getList();
|
|
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
|
|
}).catch(() => {});
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
/** 导出按钮操作 */
|
|
|
|
|
handleExport() {
|
|
|
|
|