2024-5-13 设备前端优化

yangwl
A0010407 6 months ago
parent d2b2a3d462
commit d4c191bb82

@ -46,10 +46,10 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="车间编码" prop="planWorkshop"> <el-form-item label="工作中心编码" prop="planWorkshop">
<el-select <el-select
v-model="queryParams.planWorkshop" v-model="queryParams.planWorkshop"
placeholder="请选择车间" placeholder="请选择工作中心"
clearable clearable
> >
<el-option <el-option
@ -455,10 +455,10 @@
align="center" align="center"
prop="planType" prop="planType"
/> />
<el-table-column label="车间编码" align="center" prop="planWorkshop" /> <el-table-column width="120" label="工作中心编码" align="center" prop="planWorkshop" />
<el-table-column <el-table-column
width="150" width="150"
label="车间" label="工作中心名称"
align="center" align="center"
prop="workCenterName" prop="workCenterName"
/> />
@ -673,7 +673,7 @@
<el-descriptions-item label="工单编码">{{ <el-descriptions-item label="工单编码">{{
this.form.orderCode this.form.orderCode
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ <el-descriptions-item label="工作中心编码">{{
this.form.planWorkshop this.form.planWorkshop
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="工作中心">{{ <el-descriptions-item label="工作中心">{{
@ -771,7 +771,7 @@
<el-dialog title="巡检详情" :visible.sync="workDetail" width="1000px"> <el-dialog title="巡检详情" :visible.sync="workDetail" width="1000px">
<el-tabs type="border-card"> <el-tabs type="border-card">
<el-tab-pane label="巡检信息"> <el-tab-pane label="巡检信息">
<el-descriptions title="" border :column="2"> <el-descriptions title="" border :column="2" :contentStyle="WCS" :label-style="WLS">
<el-descriptions-item label="计划编码">{{ <el-descriptions-item label="计划编码">{{
workVO.order.planCode workVO.order.planCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -784,9 +784,9 @@
<el-descriptions-item label="工单编码">{{ <el-descriptions-item label="工单编码">{{
workVO.order.orderCode workVO.order.orderCode
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="车间编码">{{ <!-- <el-descriptions-item label="工作中心编码">{{
workVO.order.planWorkshop workVO.order.planWorkshop
}}</el-descriptions-item> }}</el-descriptions-item> -->
<el-descriptions-item label="循环开始时间">{{ <el-descriptions-item label="循环开始时间">{{
workVO.order.planLoopStart workVO.order.planLoopStart
}}</el-descriptions-item> }}</el-descriptions-item>
@ -808,16 +808,13 @@
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设备信息"> <el-tab-pane label="设备信息">
<el-descriptions class="my-margin-top" title="" :column="2" border> <el-descriptions class="my-margin-top" title="" :column="2" border :contentStyle="WCS" :label-style="WLS">
<el-descriptions-item label="设备编码">{{ <el-descriptions-item label="设备编码">{{
workVO.equ.equipmentCode workVO.equ.equipmentCode
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="设备名称">{{ <el-descriptions-item label="设备名称">{{
workVO.equ.equipmentName workVO.equ.equipmentName
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="设备位置">{{
workVO.equ.equipmentLocation
}}</el-descriptions-item>
<el-descriptions-item label="设备类型编码">{{ <el-descriptions-item label="设备类型编码">{{
workVO.equ.equipmentTypeCode workVO.equ.equipmentTypeCode
}}</el-descriptions-item> }}</el-descriptions-item>
@ -830,6 +827,9 @@
<el-descriptions-item label="所属工作中心名称">{{ <el-descriptions-item label="所属工作中心名称">{{
workVO.equ.workshopName workVO.equ.workshopName
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="设备位置">{{
workVO.equ.equipmentLocation
}}</el-descriptions-item>
</el-descriptions> </el-descriptions>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="检查项信息"> <el-tab-pane label="检查项信息">
@ -903,6 +903,12 @@ export default {
dicts: ["device_order_status", "device_loop_type", "device_reach_standard"], dicts: ["device_order_status", "device_loop_type", "device_reach_standard"],
data() { data() {
return { return {
WCS: {
"text-align": "left",
},
WLS: {
width: "225px",
},
standardListVo: [], standardListVo: [],
// VO // VO
workVO: { workVO: {

@ -200,6 +200,10 @@
label="处理状态" label="处理状态"
align="center" align="center"
prop="orderStatus" /> prop="orderStatus" />
<el-table-column
label="报修来源"
align="center"
prop="orderSource" />
<el-table-column <el-table-column
label="报修去向" label="报修去向"
align="center" align="center"
@ -229,10 +233,6 @@
<span>{{ parseTime(scope.row.orderBreakdownTime) }}</span> <span>{{ parseTime(scope.row.orderBreakdownTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="报修来源"
align="center"
prop="orderSource" />
<el-table-column <el-table-column
label="报修时间" label="报修时间"
align="center" align="center"
@ -244,7 +244,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="报修人号" label="报修人号"
align="center" align="center"
prop="orderRepairmanCode" prop="orderRepairmanCode"
width="150" width="150"
@ -652,7 +652,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitCheckForm"> </el-button> <el-button type="primary" @click="submitCheckForm"> </el-button>
<el-button @click="cancelCheckForm"> </el-button> <el-button @click="cancelOpenCheckForm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -882,7 +882,7 @@
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancelCheckForm"> </el-button> <el-button @click="cancelViewCheckForm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
@ -1413,15 +1413,17 @@ export default {
this.openView = false; this.openView = false;
}, },
// //
cancelCheckForm() { cancelViewCheckForm() {
this.viewCheck = false; this.viewCheck = false;
}, },
cancelOpenCheckForm() {
this.openCheck = false;
},
// //
reset() { reset() {
this.form = { this.form = {
// //
fileList: null, fileList: null,
//
orderId: null, orderId: null,
orderCode: null, orderCode: null,
equipmentCode: null, equipmentCode: null,

@ -101,6 +101,7 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="维修人" prop="repairPerson"> <el-form-item label="维修人" prop="repairPerson">
<el-input <el-input
v-model="queryParams.repairPerson" v-model="queryParams.repairPerson"
placeholder="请输入维修人" placeholder="请输入维修人"
@ -351,18 +352,31 @@
align="left" align="left"
prop="handlingMethod" prop="handlingMethod"
/> />
<el-table-column
width="200"
label="更换备件"
align="left"
prop="replaceSpare"
/>
<el-table-column <el-table-column
width="100" width="100"
label="维修人" label="维修人"
align="left" align="left"
prop="repairPerson" prop="repairPerson"
/> />
<!-- <el-table-column
width="200"
label="更换备件"
align="left"
prop="replaceSpare"
/> -->
<el-table-column
label="更换备件"
align="center"
prop="replaceSpare"
width="150"
>
<template slot-scope="scope">
<el-button type="text" @click="handleViewSpareParts(scope.row)">
查看更换备件
</el-button>
</template>
</el-table-column>
<el-table-column <el-table-column
v-if="false" v-if="false"
label="备用字段1" label="备用字段1"
@ -519,6 +533,100 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 查看更换备件 -->
<el-dialog :title="title" :visible.sync="openSpareParts" width="1000px" append-to-body>
<el-table
v-loading="loading"
:data="sparePartsApplicationRecordList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- 序号 -->
<el-table-column
type="index"
width="90"
align="center"
:index="indexMethod"
label="序号"
fixed
/>
<el-table-column
label="维修单号"
align="center"
prop="workCode"
width="250"
/>
<el-table-column
label="使用设备"
align="center"
prop="spareUseEquipment"
width="150"
/>
<el-table-column
label="备品备件编码"
align="center"
prop="spareCode"
width="120"
/>
<el-table-column
label="备品备件名称"
align="center"
prop="spareName"
width="120"
/>
<el-table-column
label="规格型号"
align="center"
prop="spareModel"
width="150"
/>
<el-table-column label="数量" align="center" prop="spareQuantity" />
<el-table-column
label="领用时间"
align="center"
prop="applyTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.applyTime) }}</span>
</template>
</el-table-column>
<el-table-column
label="申领人"
align="center"
prop="applyPeople"
width="80"
/>
<el-table-column
label="单价"
align="center"
prop="unitPrice"
width="100"
/>
<el-table-column
label="总价"
align="center"
prop="totalPrice"
width="100"
/>
<el-table-column
label="批准人"
align="center"
prop="applyApprovePeople"
width="80"
/>
</el-table>
<pagination
v-show="sparePartsTotal > 0"
:total="sparePartsTotal"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
</div> </div>
</template> </template>
@ -530,6 +638,10 @@ import {
addOperation, addOperation,
updateOperation, updateOperation,
} from "@/api/device/operation"; } from "@/api/device/operation";
import {
listRepairSparePartsRecord,
} from "@/api/device/sparePartsApplicationRecord";
import { parseTime } from "../../../utils/ruoyi"; import { parseTime } from "../../../utils/ruoyi";
export default { export default {
@ -580,12 +692,16 @@ export default {
showSearch: true, showSearch: true,
// //
total: 0, total: 0,
//
sparePartsTotal: 0,
// //
operationList: [], operationList: [],
// //
title: "", title: "",
// //
open: false, open: false,
//
openSpareParts: false,
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -594,6 +710,7 @@ export default {
groupLine: null, groupLine: null,
equipmentName: null, equipmentName: null,
equipmentCode: null, equipmentCode: null,
spareUseEquipment: null,
faultTime: null, faultTime: null,
actualOperationTime: null, actualOperationTime: null,
operationTime: null, operationTime: null,
@ -610,6 +727,12 @@ export default {
attr3: null, attr3: null,
createTimeArray: [], createTimeArray: [],
}, },
//
querySparePartsParams: {
pageNum: 1,
pageSize: 10,
equipmentCode: null,
},
// //
form: {}, form: {},
// //
@ -625,11 +748,16 @@ export default {
}, },
methods: { methods: {
parseTime, parseTime,
//
indexMethod(index) {
return index + 1;
},
/** 查询设备运行记录列表 */ /** 查询设备运行记录列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listOperation(this.queryParams).then((response) => { listOperation(this.queryParams).then((response) => {
this.operationList = response.rows; this.operationList = response.rows;
// this.operationList.failureDescription.replace(/;/g, '<br>')
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
}); });
@ -703,6 +831,22 @@ export default {
this.title = "修改设备运行记录"; this.title = "修改设备运行记录";
}); });
}, },
/** 查看更换备件 */
handleViewSpareParts(row) {
this.querySparePartsParams.equipmentCode = row.equipmentCode;
this.querySparePartsParams.createTime = row.createTime;
listRepairSparePartsRecord(this.querySparePartsParams).then((response) => {
this.sparePartsApplicationRecordList = response.rows;
this.sparePartsTotal = response.total;
this.openSpareParts = true;
this.title = "查看更换备件";
});
},
/** 查看更换备件取消按钮 */
cancelSpareParts() {
this.openSpareParts = false;
this.reset();
},
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {

@ -1881,6 +1881,11 @@ export default {
_data.minutes / 60 + _data.minutes / 60 +
_data.seconds / 3600 _data.seconds / 3600
).toFixed(1) + "小时"; ).toFixed(1) + "小时";
//
if(this.form.workDownMachine == '0'){
this.form.faultDownTime = "0.0小时";
}
} }
// //
@ -2310,6 +2315,7 @@ export default {
item.picturePath = this.listToString(item.picturePath); item.picturePath = this.listToString(item.picturePath);
} }
}); });
writeRepairOrder(this.form).then((response) => { writeRepairOrder(this.form).then((response) => {
this.openWrite = false; this.openWrite = false;
this.$modal.msgSuccess("填写维修记录成功!"); this.$modal.msgSuccess("填写维修记录成功!");

@ -62,6 +62,7 @@
<el-table-column <el-table-column
label="使用设备" label="使用设备"
align="center" align="center"
width="120"
prop="spareUseEquipment" prop="spareUseEquipment"
/> />
<el-table-column <el-table-column

@ -179,7 +179,7 @@
label="关联工单号" label="关联工单号"
align="center" align="center"
prop="workCode" prop="workCode"
width="200" width="250"
/> />
<el-table-column <el-table-column
label="备品备件编码" label="备品备件编码"
@ -196,6 +196,7 @@
<el-table-column <el-table-column
label="使用设备" label="使用设备"
align="center" align="center"
width="150"
prop="spareUseEquipment" prop="spareUseEquipment"
/> />
<el-table-column <el-table-column

@ -128,7 +128,6 @@
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="sparePartsLedgerList" :data="sparePartsLedgerList"
border
> >
<!-- 序号 --> <!-- 序号 -->
<el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/> <el-table-column type="index" width="90" align="center" :index="indexMethod" label="序号"/>

@ -33,8 +33,8 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="车间编码" prop="planWorkshop"> <el-form-item label="工作中心" prop="planWorkshop">
<el-select v-model="queryParams.planWorkshop" placeholder="请选择车间" clearable> <el-select v-model="queryParams.planWorkshop" placeholder="请选择工作中心" clearable>
<el-option <el-option
v-for="work in workCenterList" v-for="work in workCenterList"
:key="work.factoryCode" :key="work.factoryCode"
@ -338,8 +338,8 @@
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="车间编码" align="center" prop="planWorkshop" /> <el-table-column width="120" label="工作中心编码" align="center" prop="planWorkshop" />
<el-table-column width="150" label="车间" align="center" prop="workCenterName"/> <el-table-column width="150" label="工作中心名称" align="center" prop="workCenterName"/>
<el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" /> <el-table-column width="100" label="设备编码" align="center" prop="equipmentCode" />
<el-table-column width="200" label="设备名称" align="center" prop="equipmentName" /> <el-table-column width="200" label="设备名称" align="center" prop="equipmentName" />
<el-table-column width="150" label="点检时间" align="center" prop="orderStart"/> <el-table-column width="150" label="点检时间" align="center" prop="orderStart"/>

@ -957,9 +957,15 @@
:value="form.equipmentCategory" :value="form.equipmentCategory"
/> />
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="工厂车间">{{ <el-descriptions-item label="工厂车间编码">{{
form.factoryWorkshop form.factoryWorkshop
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="工厂车间">
<dict-tag
:options="dict.type.factory_workshop"
:value="form.factoryWorkshop"
/>
</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider content-position="center">设备使用状况</el-divider> <el-divider content-position="center">设备使用状况</el-divider>

Loading…
Cancel
Save