保养工单-检验+填写记录

master
wws 1 year ago
parent b0cfdead84
commit b8793f0248

@ -1,5 +1,14 @@
import request from '@/utils/request' import request from '@/utils/request'
// 保养工单检验
export function subInspect(data) {
return request({
url: '/device/upkeepOrder/subInspect',
method: 'post',
data: data
});
}
// 查询保养工单列表 // 查询保养工单列表
export function listUpkeepOrder(query) { export function listUpkeepOrder(query) {
return request({ return request({

@ -217,7 +217,7 @@
plain plain
icon="el-icon-edit" icon="el-icon-edit"
size="mini" size="mini"
@click="handleUpdate" @click="clickInspect"
v-hasPermi="['device:upkeepOrder:edit']" v-hasPermi="['device:upkeepOrder:edit']"
>结果检验 >结果检验
</el-button> </el-button>
@ -253,7 +253,7 @@
<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 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"/>
@ -281,6 +281,7 @@
</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"/>
<el-table-column label="审核状态" align="center" prop="orderInspect"/>
<el-table-column label="工单费用" align="center" prop="orderCost"/> <el-table-column label="工单费用" align="center" prop="orderCost"/>
<el-table-column label="保养人" align="center" prop="planPerson"/> <el-table-column label="保养人" align="center" prop="planPerson"/>
<el-table-column label="工单用时" align="center" prop="orderCostTime"/> <el-table-column label="工单用时" align="center" prop="orderCostTime"/>
@ -332,6 +333,20 @@
@pagination="getList" @pagination="getList"
/> />
<!-- 结果检验 -->
<el-dialog
title="保养结果检验"
:visible.sync="inspectDialog"
width="30%">
<el-radio v-model="inspect" label="0"></el-radio>
<el-radio v-model="inspect" label="1"></el-radio>
<el-radio v-model="inspect" label="2"></el-radio>
<span slot="footer" class="dialog-footer">
<el-button @click="inspectDialog = false"> </el-button>
<el-button type="primary" @click="subInspect"> </el-button>
</span>
</el-dialog>
<!-- 快速工单弹出框 --> <!-- 快速工单弹出框 -->
<el-dialog <el-dialog
title="快速工单" title="快速工单"
@ -341,19 +356,6 @@
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="工单基本信息"> <el-tab-pane label="工单基本信息">
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="8">
<el-form-item label="保养名称:">
<el-input v-model="form.planName" placeholder="请输入保养名称"/>
</el-form-item>
</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-col>
</el-row>
<el-row> <el-row>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="工作中心:"> <el-form-item label="工作中心:">
@ -380,9 +382,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span=12>
<el-form-item label-width="110px" 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-col>
</el-row>
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="选择设备、保养项"> <el-tab-pane label="设备、保养项、备件">
<el-row> <el-row>
<el-col class="my-step-mar" :span="1.5"> <el-col class="my-step-mar" :span="1.5">
<el-button <el-button
@ -697,7 +707,7 @@
</el-dialog> </el-dialog>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="选择保养人员"> <el-tab-pane label="保养人员">
<el-row> <el-row>
<el-col :span="24" :offset="1"> <el-col :span="24" :offset="1">
<el-transfer <el-transfer
@ -734,10 +744,133 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="记录"> <el-tab-pane label="记录">
记录 <!-- 设备 -->
<el-row>
<el-col :offset="9" :span="6">
<el-form-item label="设备名称:">
{{ this.form.equ.equipmentName }}
</el-form-item>
</el-col>
</el-row>
<div v-for="(detail,detailIndex) in form.equ.detailList" :key="detailIndex">
<!-- 检查项 -->
<el-row>
<el-col :span="6">
<el-form-item label="检查项:">
{{ detail.itemName }}
</el-form-item>
</el-col>
</el-row>
<div v-for="(standard,standardIndex) in detail.standardList" :key="standardIndex">
<div v-if="standard.standardType == 'qualitative' ">
<!-- 标准 -->
<el-row>
<el-col :span="6">
<el-form-item label="标准:">
{{ standard.standardName }}
</el-form-item>
</el-col>
<el-col :span="9">
<el-form-item label="是否达标:">
<el-radio v-model="standard.detailReach" label="0"></el-radio>
<el-radio v-model="standard.detailReach" label="1"></el-radio>
</el-form-item>
</el-col>
</el-row>
</div>
<div v-else>
<!-- 标准 -->
<el-row>
<el-col :span="5">
<el-form-item label="标准:">
{{ standard.standardName }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="上限:">
{{ standard.detailUpLimit }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="下限:">
{{ standard.detailDownLimit }}
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="单位:">
{{ standard.detailUnit }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="实际值:">
<el-input v-model="standard.actualValue" placeholder="请输入实际值"></el-input>
</el-form-item>
</el-col>
</el-row>
</div>
</div>
<el-divider></el-divider>
</div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="备件"> <el-tab-pane label="备件">
备件 <el-table
:data="form.equ.spareList"
stripe
style="width: 100%">
<el-table-column width="60" align="center" label="序号" type="index"/>
<el-table-column
prop="materialCode"
label="备件号"
width="180">
</el-table-column>
<el-table-column
prop="materialDesc"
label="备件名称"
width="180">
</el-table-column>
<el-table-column
prop="spareType"
label="备件类型">
</el-table-column>
<el-table-column
prop="applyNum"
label="领用数量">
</el-table-column>
</el-table>
</el-tab-pane>
<el-tab-pane label="工单信息">
<el-row>
<el-col :span="16">
<el-form-item label="保养时间">
<el-date-picker
v-model="form.timeArray"
type="datetimerange"
range-separator="至"
start-placeholder="开始时间"
end-placeholder="结束时间">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工单状态">
<el-select v-model="form.orderStatus" placeholder="计划状态" clearable>
<el-option
v-for="dict in dict.type.device_order_status"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col span="8">
<el-form-item label="保养费用">
<el-input v-model="form.orderCost" placeholder="请输入费用"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
@ -755,7 +888,7 @@ import {
getUpkeepOrder, getUpkeepOrder,
delUpkeepOrder, delUpkeepOrder,
addUpkeepOrder, addUpkeepOrder,
updateUpkeepOrder updateUpkeepOrder, subInspect
} from "@/api/device/upkeepOrder"; } from "@/api/device/upkeepOrder";
import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan"; import {formatEquItem, querySpareList} from "@/api/device/upkeepPlan";
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan"; import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
@ -766,6 +899,10 @@ export default {
dicts: ['device_order_status', 'device_loop_type'], dicts: ['device_order_status', 'device_loop_type'],
data() { data() {
return { return {
//
inspect: '0',
//
inspectDialog: false,
// //
selOnSpare: [], selOnSpare: [],
// //
@ -885,6 +1022,7 @@ export default {
planWorkshop: null, planWorkshop: null,
personList:[], personList:[],
planTimeArray:[], planTimeArray:[],
timeArray:[],
}, },
// //
rules: {} rules: {}
@ -894,6 +1032,36 @@ export default {
this.getList(); this.getList();
}, },
methods: { methods: {
//
clickInspect() {
if (this.ids.length == 0 || this.ids == null) {
this.$message({
message: '请勾选工单!',
type: 'warning'
})
return;
}
this.inspect = "0";
this.inspectDialog = true;
},
//
subInspect() {
console.log("点击了提交检验确定按钮")
console.log(this.ids)
const data = {
ids : this.ids,
inspect : this.inspect,
}
subInspect(data).then(response => {
this.getList();
this.inspectDialog = false;
this.$message({
message: '提交成功!',
type: 'success'
})
})
},
// //
setWorkCenter() { setWorkCenter() {
getWorkCenter().then(response => { getWorkCenter().then(response => {
@ -1163,6 +1331,7 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
equ: {equipmentName: null}, equ: {equipmentName: null},
timeArray:[],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -1196,6 +1365,9 @@ export default {
this.form = response.data; this.form = response.data;
console.log("这里是回显信息") console.log("这里是回显信息")
console.log(response.data) console.log(response.data)
if (response.data.timeArray[0] == null) {
response.data.timeArray = []
}
this.open = true; this.open = true;
this.title = "填写记录"; this.title = "填写记录";
}); });
@ -1207,8 +1379,10 @@ export default {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.orderId != null) { if (this.form.orderId != null) {
console.log("点击了提交")
console.log(this.form)
updateUpkeepOrder(this.form).then(response => { updateUpkeepOrder(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("提交成功");
this.open = false; this.open = false;
this.getList(); this.getList();
}); });

Loading…
Cancel
Save