From 6670fda2939518181d60c6254f2bcb37917f0e2f Mon Sep 17 00:00:00 2001
From: Houjie <714924425@qq.com>
Date: 星期二, 10 六月 2025 14:42:53 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/eam/RepairOrderList.vue | 368 ++++++++++++++++++++++++++++++++++++----------------
1 files changed, 253 insertions(+), 115 deletions(-)
diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue
index 088cc10..ffcae34 100644
--- a/src/views/eam/RepairOrderList.vue
+++ b/src/views/eam/RepairOrderList.vue
@@ -1,6 +1,6 @@
<template>
<a-card
- title="缁翠慨"
+ title=""
:bordered="false"
>
<div class="table-page-search-wrapper">
@@ -8,16 +8,19 @@
layout="inline"
@keyup.enter.native="searchQuery"
>
- <a-row :gutter="24" style="margin-bottom: 1%;">
+ <a-row
+ :gutter="24"
+ style="margin-bottom: 1%;"
+ >
<a-col
:xl="24"
:lg="7"
:md="8"
:sm="24"
>
- <a-form-item label="缁熶竴缂栧彿缇�">
+ <a-form-item label="缁熶竴缂栧彿缇�">
<a-textarea
- placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤鈥�,鈥濋殧寮�,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
+ placeholder="璇疯緭鍏ユ墍鏈夌粺涓�缂栫爜,椤荤敤绌烘牸闅斿紑,鍚﹀垯鍙兘鏌ヨ鍑洪敊璇俊鎭�"
v-model="queryParam.nums"
:auto-size="{ minRows: 2, maxRows:2 }"
></a-textarea>
@@ -82,28 +85,27 @@
</span>
</a-col> -->
<a-col
- :xl="6"
- :lg="7"
- :md="8"
- :sm="24"
- >
- <a-form-item label="璁惧鍚嶇О">
- <a-input
- placeholder="璇疯緭鍏ヨ澶囧悕绉�"
- v-model="queryParam.equipmentName"
- ></a-input>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col
:xl="6"
- :lg="7"
- :md="8"
- :sm="24">
- <a-form-item
- label="璁惧鎵�灞炲垎绫�"
- >
+ :lg="7"
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="璁惧鍚嶇О">
+ <a-input
+ placeholder="璇疯緭鍏ヨ澶囧悕绉�"
+ v-model="queryParam.equipmentName"
+ ></a-input>
+ </a-form-item>
+ </a-col>
+ </a-row>
+ <a-row :gutter="24">
+ <a-col
+ :xl="6"
+ :lg="7"
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="璁惧鎵�灞炲垎绫�">
<j-dict-select-tag
dictCode="mom_eam_equipment_category,name,id"
placeholder="璇疯緭鍏ユ悳绱㈡潯浠跺苟閫夋嫨"
@@ -111,15 +113,13 @@
/>
</a-form-item>
</a-col>
- <a-col
- :xl="6"
+ <a-col
+ :xl="6"
:lg="7"
- :md="8"
- :sm="24"
+ :md="8"
+ :sm="24"
>
- <a-form-item
- label="宸ュ尯"
- >
+ <a-form-item label="宸ュ尯">
<j-dict-select-tag
allow-clear
placeholder="璇烽�夋嫨璧勫伐鍖�"
@@ -130,14 +130,12 @@
</a-form-item>
</a-col>
<a-col
- :xl="6"
+ :xl="6"
:lg="7"
- :md="8"
- :sm="24"
+ :md="8"
+ :sm="24"
>
- <a-form-item
- label="鏄惁鍏抽敭璁惧"
- >
+ <a-form-item label="鏄惁鍏抽敭璁惧">
<j-dict-select-tag
allow-clear
placeholder="璇烽�夋嫨鏄惁鍏抽敭璁惧"
@@ -163,40 +161,85 @@
/>
</a-form-item>
</a-col>
- </a-row>
- <!-- <a-row :gutter="24">
- <a-col
+ </a-row>
+ <a-row :gutter="24">
+ <a-col
:xl="6"
:lg="7"
- :md="8"
- :sm="24">
- <a-form-item
- label="宸ュ尯"
- >
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="ABC鏍囪瘑">
<j-dict-select-tag
allow-clear
- placeholder="璇烽�夋嫨宸ュ尯"
+ placeholder="璇烽�夋嫨ABC鏍囪瘑"
:triggerChange="true"
- dictCode="mom_base_area,name,id,del_flag!='1'"
- v-model="queryParam.factoryModelId"
+ dictCode="ABC-standard-result"
+ v-model="queryParam.equipmentImportanceId"
/>
</a-form-item>
</a-col>
- </a-row> -->
+ <a-col
+ :xl="6"
+ :lg="7"
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="鏁呴殰鍘熷洜">
+ <j-dict-select-tag
+ allow-clear
+ placeholder="璇烽�夋嫨鏁呴殰鍘熷洜"
+ :triggerChange="true"
+ dictCode="repair_order_fault_cause"
+ v-model="queryParam.faultCause"
+ />
+ </a-form-item>
+ </a-col>
+ <a-col
+ :xl="6"
+ :lg="7"
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="鎶ヤ慨鏃堕棿">
+ <a-range-picker
+ style="width: 100%;"
+ format="YYYY-MM-DD HH:mm:ss"
+ v-model="faultTime"
+ @change="timeChange"
+ />
+ </a-form-item>
+ </a-col>
+ <a-col
+ :xl="6"
+ :lg="7"
+ :md="8"
+ :sm="24"
+ >
+ <a-form-item label="鍒涘缓鏃堕棿">
+ <a-range-picker
+ style="width: 100%;"
+ format="YYYY-MM-DD HH:mm:ss"
+ v-model="createTimes"
+ @change="timeChangeCreate"
+ />
+ </a-form-item>
+ </a-col>
+ </a-row>
</a-form>
</div>
<!-- 鎿嶄綔鎸夐挳鍖哄煙 -->
<div class="table-operator">
- <a-dropdown>
+ <!-- <a-dropdown>
<a-menu slot="overlay">
<a-menu-item
key="1"
@click="handleAddPre(1)"
><a-icon type="smile" />鑷缓</a-menu-item>
- <!-- <a-menu-item
+ <a-menu-item
key="2"
@click="handleAddPre(2)"
- ><a-icon type="copy" />鍙傜収鏁呴殰鎶ヤ慨鍗�</a-menu-item> -->
+ ><a-icon type="copy" />鍙傜収鏁呴殰鎶ヤ慨鍗�</a-menu-item>
<a-menu-item
key="2"
@click="handleAddPre(3)"
@@ -206,7 +249,7 @@
type="primary"
icon="plus"
>鏂板</a-button>
- </a-dropdown>
+ </a-dropdown> -->
<a-button
type="primary"
@@ -219,6 +262,11 @@
icon="reload"
>閲嶇疆</a-button>
<a-button
+ type="primary"
+ icon="download"
+ @click="handleExportXls('缁翠慨灞ュ巻')"
+ >瀵煎嚭</a-button>
+ <a-button
hidden
type="primary"
icon="plus"
@@ -226,9 +274,10 @@
:disabled="selectionRows.length==0"
>娲惧伐</a-button>
<a-button
- type="primary"
- icon="plus"
- @click="getReports"
+ type="primary"
+ icon="plus"
+ @click="getReports"
+ v-has="'repair:accept'"
>棰嗗彇</a-button>
<!-- <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
@@ -257,7 +306,6 @@
bordered
rowKey="id"
class="j-table-force-nowrap"
- :scroll="{ x: 'calc(2700px + 50%)', y: 900 }"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
@@ -265,17 +313,32 @@
@change="handleTableChange"
:customRow="clickThenSelect"
:rowClassName="tableRowClass"
+ :scroll="{ x: 'calc(1700px + 50%)', y: 900 }"
>
- <span slot="jell" slot-scope="text">
- <j-ellipsis :value="text" :length="8" />
+ <span
+ slot="jell"
+ slot-scope="text"
+ >
+ <j-ellipsis
+ :value="text"
+ :length="8"
+ />
</span>
<span
slot="specificEquipment"
slot-scope="text"
>
- <a-icon type="check" style="color: chartreuse;" v-if="text==='0'" />
- <a-icon type="close" v-else style="color:red;"/>
- </span>
+ <a-icon
+ type="check"
+ style="color: chartreuse;"
+ v-if="text==='0'"
+ />
+ <a-icon
+ type="close"
+ v-else
+ style="color:red;"
+ />
+ </span>
<span
slot="num"
slot-scope="text, record"
@@ -284,8 +347,14 @@
v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
class="lot"
@click="handleOrderExe(record)"
- ><j-ellipsis :value="text" :length="15"/></a>
- <span v-else> <j-ellipsis :value="text" :length="15"/></span>
+ ><j-ellipsis
+ :value="text"
+ :length="15"
+ /></a>
+ <span v-else> <j-ellipsis
+ :value="text"
+ :length="15"
+ /></span>
</span>
<span
slot="action"
@@ -332,6 +401,7 @@
<a
v-if="record.status === '2' || record.status === '3' "
@click="handleOrderExe(record)"
+ v-has="'repair:excute'"
>鎵ц</a>
<a-divider
v-if="record.status === '2' || record.status === '3' "
@@ -363,6 +433,44 @@
</a-dropdown>
</span>
+ <template
+ slot="equipmentNum"
+ slot-scope="text, record"
+ >
+ <a-popover title="鏁呴殰鍘熷洜缁熻">
+ <template slot="content">
+ <p
+ v-for="(faultCauseMap, index) in record.equipmentFaultCause"
+ :key="index"
+ >
+ <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span>
+ </p>
+ </template>
+ <span>
+ {{ record.equipmentNum }}
+ </span>
+ </a-popover>
+ </template>
+
+ <template
+ slot="faultCauseCount"
+ slot-scope="text, record"
+ >
+ <a-popover title="鏁呴殰鍘熷洜缁熻">
+ <template slot="content">
+ <p
+ v-for="(faultCauseMap, index) in record.allFaultCause"
+ :key="index"
+ >
+ <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span>
+ </p>
+ </template>
+ <span>
+ {{ record.faultCauseCount }}
+ </span>
+ </a-popover>
+ </template>
+
</a-table>
</div>
@@ -379,6 +487,7 @@
<a-tab-pane
tab="缁翠慨瑕佹眰"
key="2"
+ v-if="false"
>
<RepairOrderDetailList
:mainId="repairOrderDetailMainId"
@@ -389,6 +498,7 @@
tab="璁″垝鐢ㄦ枡"
key="3"
forceRender
+ v-if="false"
>
<RepairOrderPlanMaterialList
:addStatus="sonsAddStatus"
@@ -399,6 +509,7 @@
tab="鍗遍櫓闃叉帶"
key="4"
forceRender
+ v-if="false"
>
<RepairOrderRiskPreventionList
:addStatus="sonsAddStatus"
@@ -409,6 +520,7 @@
tab="浣滀笟鎸囧涔�"
key="5"
forceRender
+ v-if="false"
>
<EquipmentDocumentList
:addStatus="sonsAddStatus"
@@ -419,8 +531,9 @@
tab="瀹為檯鐢ㄦ枡"
key="6"
forceRender
- v-if="!sonsAddStatus&&selectedRowKeys.length!=0"
+ v-if="false"
>
+ <!-- v-if="!sonsAddStatus&&selectedRowKeys.length!=0" -->
<RepairOrderActualMaterialList :mainId="repairOrderActualMaterialMainId" />
</a-tab-pane>
<a-tab-pane
@@ -483,6 +596,7 @@
import FaultReportRepair from './modules/repairorder/moudles/select/FaultReportRepair.vue'
import store from '@/store'
import dayjs from 'dayjs'
+import moment from 'moment'
export default {
name: "RepairOrderList",
mixins: [JeecgListMixin],
@@ -502,18 +616,17 @@
FaultReportRepair,
store
},
- mounted(){
+ mounted() {
let intervalId = setInterval(() => {
- this.loadData();
- }, 600*1000); // 1000姣锛屽嵆1绉�
- onUnmounted(() => {
- clearInterval(intervalId);
- });
+ this.loadData();
+ }, 600 * 1000); // 1000姣锛屽嵆1绉�
},
data() {
return {
description: '缁翠慨宸ュ崟绠$悊椤甸潰',
// 琛ㄥご
+ faultTime: [],
+ createTimes: [],
columns: [
{
title: '#',
@@ -526,10 +639,16 @@
}
},
{
- title: '鍏抽敭璁惧?',
+ title: '鍏抽敭璁惧',
align: "center",
dataIndex: 'specificEquipment',
+ width: 90,
scopedSlots: { customRender: 'specificEquipment' }
+ },
+ {
+ title: 'ABC鏍囪瘑',
+ align: "center",
+ dataIndex: 'equipmentImportanceId',
},
{
title: '鐘舵��',
@@ -540,8 +659,8 @@
title: '缁翠慨鐘舵��',
align: "center",
dataIndex: 'repairOrderUda1_dictText',
- customRender:function (t,r,index) {
- return t===null||r.repairOrderUda1===null?'/':t;
+ customRender: function (t, r, index) {
+ return t === null || r.repairOrderUda1 === null ? '/' : t;
}
},
{
@@ -558,7 +677,8 @@
{
title: '缁熶竴缂栫爜',
align: "center",
- dataIndex: 'equipmentNum'
+ dataIndex: 'equipmentNum',
+ scopedSlots: { customRender: 'equipmentNum' }
},
{
title: '璁惧鍚嶇О',
@@ -594,8 +714,8 @@
title: '缁翠慨鐝粍',
align: "center",
dataIndex: 'teamId_dictText',
- scopedSlots: {
- customRender: 'jell'
+ scopedSlots: {
+ customRender: 'jell'
}
},
{
@@ -618,39 +738,40 @@
align: "center",
dataIndex: 'faultTime'
},
- {
- title: '鎶ヤ慨浜�',
- align: "center",
- dataIndex: 'errUda2'
- },
+ // {
+ // title: '鎶ヤ慨浜�',
+ // align: "center",
+ // dataIndex: 'errUda2',
+ // },
{
title: '鏁呴殰鎻忚堪',
align: "center",
dataIndex: 'faultDescription',
- scopedSlots: {
- customRender: 'jell'
+ scopedSlots: {
+ customRender: 'jell'
}
},
{
title: '鏁呴殰鍘熷洜',
align: "center",
- dataIndex: 'faultReason'
+ dataIndex: 'faultCauseCount',
+ scopedSlots: { customRender: 'faultCauseCount' }
},
- {
- title: '鏁呴殰鐜拌薄',
- align: "center",
- dataIndex: 'faultPhenomenon'
- },
- {
- title: '鏁呴殰鎺掗櫎',
- align: "center",
- dataIndex: 'faultRemove'
- },
- {
- title: '棰勯槻鎺柦',
- align: "center",
- dataIndex: 'preventiveMeasure'
- },
+ // {
+ // title: '鏁呴殰鐜拌薄',
+ // align: "center",
+ // dataIndex: 'faultPhenomenon'
+ // },
+ // {
+ // title: '鏁呴殰鎺掗櫎',
+ // align: "center",
+ // dataIndex: 'faultRemove'
+ // },
+ // {
+ // title: '棰勯槻鎺柦',
+ // align: "center",
+ // dataIndex: 'preventiveMeasure'
+ // },
// {
// title: '鏁呴殰鐓х墖',
// align: "center",
@@ -707,9 +828,10 @@
dataIndex: 'action',
align: "center",
fixed: "right",
- width: 230,
+ width: 130,
scopedSlots: { customRender: 'action' },
}
+
],
url: {
list: "/eam/repairOrder/list",
@@ -726,8 +848,8 @@
/* 鍒嗛〉鍙傛暟 */
ipagination: {
current: 1,
- pageSize: 5,
- pageSizeOptions: ['5', '10', '50'],
+ pageSize: 20,
+ pageSizeOptions: ['5', '10', '20', '50'],
showTotal: (total, range) => {
return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�"
},
@@ -776,8 +898,14 @@
},
methods: {
-
-
+ timeChange() {
+ this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss")
+ this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss")
+ },
+ timeChangeCreate() {
+ this.queryParam.createStartTime = moment(this.createTimes[0]).format("YYYY-MM-DD HH:mm:ss")
+ this.queryParam.createEndTime = moment(this.createTimes[1]).format("YYYY-MM-DD HH:mm:ss")
+ },
clickThenSelect(record) {
return {
on: {
@@ -928,6 +1056,12 @@
this.$refs.repairOrderExcuteDrawer.visible = true
this.$refs.repairOrderExcuteDrawer.title = '缁翠慨宸ュ崟鎵ц'
},
+ handleDetail(record) {
+ this.excuteRepairOrder = record;
+ this.excuteRepairOrder.status = '4';
+ this.$refs.repairOrderExcuteDrawer.visible = true
+ this.$refs.repairOrderExcuteDrawer.title = '缁翠慨璇︽儏'
+ },
searchQuery() {
this.loadData(1)
@@ -942,17 +1076,19 @@
this.loadData(1)
this.onClearSelected()
this.$refs.FaultDescriptionList.faultId = '-1'
+ this.faultTime = []
+ this.createTimes = []
},
- getReports(){
- this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�';
- this.$refs.FaultReportRepair.loadData();
- this.$refs.FaultReportRepair.visible = true;
+ getReports() {
+ this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�';
+ this.$refs.FaultReportRepair.loadData();
+ this.$refs.FaultReportRepair.visible = true;
},
tableRowClass(record, index) {
if ("2" === record.status) {
- if (record.specificEquipment==='0'&&dayjs(record.faultTime).add(12,'hour')<dayjs()) {
+ if (record.specificEquipment === '0' && dayjs(record.faultTime).add(12, 'hour') < dayjs()) {
return 'error'
- } else if(dayjs(record.faultTime).add(7,'day')<dayjs()){
+ } else if (dayjs(record.faultTime).add(7, 'day') < dayjs()) {
return 'primary'
}
}
@@ -961,13 +1097,15 @@
},
}
</script>
-<style scoped>
+<style lang="less" scoped>
@import '~@assets/less/common.less';
-.error {
+
+/deep/.error {
color: red;
font-weight: bold;
}
-.primary {
+
+/deep/.primary {
color: rgb(255, 0, 251);
font-weight: bold;
}
--
Gitblit v1.9.3