点检巡检保养优化

yangwl
wws 10 months ago
parent cd5386d56e
commit 6a65efc265

@ -176,7 +176,11 @@
<el-table-column width="60" align="center" label="序号" type="index"></el-table-column> <el-table-column width="60" align="center" label="序号" type="index"></el-table-column>
<el-table-column v-if="false" label="主键" align="center" prop="faultId" /> <el-table-column v-if="false" label="主键" align="center" prop="faultId" />
<el-table-column width="150" label="故障类型编码" align="center" prop="faultCode" /> <el-table-column width="150" label="故障类型编码" align="center" prop="faultCode" />
<el-table-column width="150" label="故障类型" align="center" prop="faultType" /> <el-table-column width="150" label="故障类型" align="center" prop="faultType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.device_fault_type" :value="scope.row.faultType"/>
</template>
</el-table-column>
<el-table-column width="150" label="故障子类" align="center" prop="faultSubclass" /> <el-table-column width="150" label="故障子类" align="center" prop="faultSubclass" />
<el-table-column width="180" label="备注" align="center" prop="faultRemark" /> <el-table-column width="180" label="备注" align="center" prop="faultRemark" />
<el-table-column v-if="false" label="工厂编码" align="center" prop="factoryCode" /> <el-table-column v-if="false" label="工厂编码" align="center" prop="factoryCode" />
@ -414,10 +418,16 @@ export default {
this.open = true; this.open = true;
this.title = "添加故障类型维护"; this.title = "添加故障类型维护";
}, },
/** 委外计划操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
console.log("点击了委外计划") this.reset();
}, const faultId = row.faultId || this.ids
getFaultType(faultId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改故障类型维护";
});
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {

@ -83,7 +83,7 @@
placeholder="请选择实际结束时间"> placeholder="请选择实际结束时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item v-if="false" label="设备编码" prop="equipmentCode"> <el-form-item label="设备编码" prop="equipmentCode">
<el-input <el-input
v-model="queryParams.equipmentCode" v-model="queryParams.equipmentCode"
placeholder="请输入设备编码" placeholder="请输入设备编码"
@ -91,6 +91,14 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="设备名称" prop="equipmentCode">
<el-input
v-model="queryParams.equipmentName"
placeholder="请输入设备名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item v-if="false" label="工单费用" prop="orderCost"> <el-form-item v-if="false" label="工单费用" prop="orderCost">
<el-input <el-input
v-model="queryParams.orderCost" v-model="queryParams.orderCost"
@ -283,6 +291,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="设备编码" align="center" prop="equipmentCode" /> <el-table-column label="设备编码" align="center" prop="equipmentCode" />
<el-table-column label="设备名称" align="center" prop="equipmentName" />
<el-table-column label="工单状态" align="center" prop="orderStatus" > <el-table-column label="工单状态" align="center" prop="orderStatus" >
<template slot-scope="scope"> <template slot-scope="scope">
<dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/> <dict-tag :options="dict.type.device_order_status" :value="scope.row.orderStatus"/>
@ -460,7 +469,7 @@
<script> <script>
import { listSpotInspectionOrder, getSpotInspectionOrder, delSpotInspectionOrder, addSpotInspectionOrder, updateSpotInspectionOrder } from "@/api/device/spotInspectionOrder"; import { listSpotInspectionOrder, getSpotInspectionOrder, delSpotInspectionOrder, addSpotInspectionOrder, updateSpotInspectionOrder } from "@/api/device/spotInspectionOrder";
import {getDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder"; import {getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {getWorkCenter} from "@/api/device/plan"; import {getWorkCenter} from "@/api/device/plan";
export default { export default {
@ -545,11 +554,11 @@ export default {
/** 查询点检工单列表 */ /** 查询点检工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listSpotInspectionOrder(this.queryParams).then(response => { listDeviceOrder(this.queryParams).then(response => {
this.spotInspectionOrderList = response.rows; this.spotInspectionOrderList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
}, },
// //
cancel() { cancel() {

@ -892,7 +892,7 @@ import {
} 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";
import {getDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder"; import {getDeviceOrder, listDeviceOrder, updateDeviceOrder} from "@/api/device/deviceOrder";
import {updateInspectionWork} from "@/api/device/inspectionWork"; import {updateInspectionWork} from "@/api/device/inspectionWork";
export default { export default {
@ -1289,7 +1289,7 @@ export default {
/** 查询保养工单列表 */ /** 查询保养工单列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listUpkeepOrder(this.queryParams).then(response => { listDeviceOrder(this.queryParams).then(response => {
this.upkeepOrderList = response.rows; this.upkeepOrderList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;

@ -1006,6 +1006,14 @@ export default {
// //
changeApplySpareNum(e) { changeApplySpareNum(e) {
for (let i = 0; i < this.selOnSpare.length; i++) { for (let i = 0; i < this.selOnSpare.length; i++) {
console.log("备件数量改变")
if (this.selOnSpare[i].amount < e) {
this.$message({
message: '超过库存数量!',
type: 'warning'
})
return;
}
this.selOnSpare[i].applyNum = e; this.selOnSpare[i].applyNum = e;
} }
}, },
@ -1163,6 +1171,10 @@ export default {
querySpareList(this.spareQuery).then(response => { querySpareList(this.spareQuery).then(response => {
this.spareTotal = response.total; this.spareTotal = response.total;
this.spareList = response.rows; this.spareList = response.rows;
// -
for (let i = 0; i < this.spareList.length; i++) {
this.spareList[i].amount = Number(this.spareList[i].amount) - Number(this.spareList[i].storageAmount)
}
this.spareLoading = false; this.spareLoading = false;
console.log(response) console.log(response)
}) })

Loading…
Cancel
Save