From 9f4934c8fa28eab31231f56d6237ffca7b01016f Mon Sep 17 00:00:00 2001
From: zhangherong <571457620@qq.com>
Date: 星期三, 05 三月 2025 10:39:10 +0800
Subject: [PATCH] art: 所有设备 台账 技术状态鉴定 根据设备id查询技术状态鉴定,并过滤掉已完成的技术状态鉴定
---
src/views/eam/DailyMaintenanceOrderList.vue | 486 ++++++++++++++++++++++++++++++-----------------------
1 files changed, 272 insertions(+), 214 deletions(-)
diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue
index 60ac8a4..a28acb3 100644
--- a/src/views/eam/DailyMaintenanceOrderList.vue
+++ b/src/views/eam/DailyMaintenanceOrderList.vue
@@ -1,7 +1,7 @@
<template>
<a-card
:bordered="false"
- title="鏃ュ父淇濆吇宸ュ崟"
+ title=""
>
<!-- 鏌ヨ鍖哄煙 -->
<div class="table-page-search-wrapper">
@@ -14,6 +14,17 @@
:md="6"
:sm="8"
>
+ <a-form-item label="缁熶竴缂栧彿">
+ <a-input
+ placeholder="璇疯緭鍏ョ粺涓�缂栧彿"
+ v-model="queryParam.equipmentNum"
+ ></a-input>
+ </a-form-item>
+ </a-col>
+ <a-col
+ :md="6"
+ :sm="8"
+ >
<a-form-item label="淇濆吇宸ュ崟缂栫爜">
<a-input
placeholder="璇疯緭鍏ヤ繚鍏诲伐鍗曠紪鐮�"
@@ -21,37 +32,53 @@
></a-input>
</a-form-item>
</a-col>
- <!-- <a-col
- :md="6"
- :sm="8"
- >
- <a-form-item label="鐐规鏂规硶鍚嶇О">
- <j-input
- placeholder="璇疯緭鍏ョ偣妫�鏂规硶鍚嶇О"
- v-model="queryParam.name"
- ></j-input>
+ <a-col :span="6">
+ <a-form-item label="浣跨敤閮ㄩ棬">
+ <j-dict-select-tag
+ dictCode="sys_depart,depart_name,id"
+ placeholder="璇疯緭鍏ヤ娇鐢ㄩ儴闂�"
+ v-model="queryParam.useDepartId"
+ />
</a-form-item>
- </a-col> -->
- <a-col
- :md="6"
- :sm="8"
- >
- <span
- style="float: left;overflow: hidden;"
- class="table-page-search-submitButtons"
- >
- <a-button
- type="primary"
- @click="searchQuery"
- icon="search"
- >鏌ヨ</a-button>
- <a-button
- type="primary"
- @click="searchReset"
- icon="reload"
- style="margin-left: 8px"
- >閲嶇疆</a-button>
- </span>
+ </a-col>
+ <a-col :span="6">
+ <a-form-item label="鐘舵��">
+ <j-dict-select-tag
+ dictCode="daily_maintenance_order_status"
+ placeholder="璇烽�夋嫨鐘舵��"
+ v-model="queryParam.status"
+ />
+ </a-form-item>
+ </a-col>
+ </a-row>
+ <a-row :gutter="24">
+ <a-col :span="6">
+ <a-form-item label="璐d换鐝粍">
+ <j-dict-select-tag
+ dictCode="mom_base_team,name,id,status='1' and del_flag='0'"
+ placeholder="璇烽�夋嫨璐d换鐝粍"
+ v-model="queryParam.teamId"
+ />
+ </a-form-item>
+ </a-col>
+ <a-col :span="6">
+ <a-form-item label="绉讳氦鍗曠姸鎬�">
+ <j-dict-select-tag
+ dictCode="two_maintenance_devolution_status"
+ placeholder="璇烽�夋嫨绉讳氦鍗曠姸鎬�"
+ v-model="queryParam.confirmStatus"
+ />
+ </a-form-item>
+ </a-col>
+ <a-col :span="7">
+ <a-form-item label="瀹屽伐鏃堕棿">
+ <a-range-picker
+ style="width: 100%;"
+ format="YYYY-MM-DD HH:mm:ss"
+ v-model="finishTime"
+ @change="timeChange"
+ />
+ </a-form-item>
</a-col>
</a-row>
</a-form>
@@ -64,9 +91,30 @@
@click="handleAdd"
type="primary"
icon="plus"
+ v-has="'dailyMaintenanceOrder:add'"
>鏂板</a-button>
+ <a-button
+ type="primary"
+ @click="searchQuery"
+ icon="search"
+ style="margin-left: 8px"
+ >鏌ヨ</a-button>
+ <a-button
+ type="info"
+ @click="searchReset"
+ icon="reload"
+ style="margin-left: 8px"
+ >閲嶇疆</a-button>
+ <a-button
+ v-show="selectedRowKeys.length == 1 && (selectionRows[0].status === '5' || selectionRows[0].status === '8')"
+ @click="handlePrintInfo(selectionRows[0])"
+ type="primary"
+ style="margin-left: 8px"
+ >绉讳氦鍗曟墦鍗�
+ </a-button>
+ <!-- v-show="selectedRowKeys.length == 1 && selectionRows[0].status == '8'" -->
<!-- <a-button
- v-if="selectedRowKeys.length > 0"
+ v-show="selectedRowKeys.length > 0"
type="primary"
@click="batchAssign"
style="margin-left: 8px"
@@ -89,7 +137,7 @@
icon="import"
>瀵煎叆</a-button>
</a-upload> -->
- <!-- <a-dropdown v-if="selectedRowKeys.length > 0">
+ <!-- <a-dropdown v-show="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item
key="1"
@@ -116,7 +164,7 @@
<a-table
ref="table"
size="middle"
- :scroll="{ x: 'calc(2500px + 50%)', y: 900 }"
+ :scroll="{ x: 'calc(2800px + 50%)', y: 900 }"
bordered
rowKey="id"
:columns="columns"
@@ -126,180 +174,104 @@
class="j-table-force-nowrap"
@change="handleTableChange"
:rowSelection="rowSelection"
+ :rowClassName="tableRowClass"
>
- <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
- <!-- <span
- slot="action"
- slot-scope="text, record"
- >
- <a-popconfirm
- title="纭畾涓嬪彂宸ュ崟鍚�?"
- @confirm="() => handleOrderIssue(record)"
- >
- <a v-if="record.status === '1'">涓嬪彂</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎾ゅ洖宸ュ崟鍚�?"
- @confirm="() => handleOrderReset(record)"
- >
- <a v-if="record.status === '2'">鎾ゅ洖</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾鎭㈠宸ュ崟鍚�?"
- @confirm="() => handleOrderRecover(record)"
- >
- <a v-if="record.status === '7'">鎭㈠</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '7'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾浣滃簾宸ュ崟鍚�?"
- @confirm="() => handleOrderCancel(record)"
- >
- <a v-if="record.status === '2'">浣滃簾</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾棰嗗彇宸ュ崟鍚�?"
- @confirm="() => handleOrderGet(record)"
- >
- <a v-if="record.status === '2'">棰嗗彇</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status === '2'"
- type="vertical"
- />
- <a
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- @click="handleOrderExe(record)"
- >鎵ц</a>
- <a-divider
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
- type="vertical"
- />
- <a
- v-if="record.status === '1'"
- @click="handleEdit(record)"
- >缂栬緫</a>
- <a-divider
- v-if="record.status === '1'"
- type="vertical"
- />
- <a-dropdown>
- <a class="ant-dropdown-link">鏇村 <a-icon type="down" /></a>
- <a-menu slot="overlay">
- <a-menu-item>
- <a @click="handleDetail(record)">璇︽儏</a>
- </a-menu-item>
- <a-menu-item>
- <a-popconfirm
- title="纭畾鍒犻櫎鍚�?"
- @confirm="() => handleDelete(record.id)"
- >
- <a v-if="record.status === '1'">鍒犻櫎</a>
- </a-popconfirm>
- </a-menu-item>
- </a-menu>
- </a-dropdown>
- </span> -->
<span
slot="action"
slot-scope="text, record"
>
<a-popconfirm
- title="纭畾涓嬪彂宸ュ崟鍚�?"
+ title="纭畾鎺ユ敹宸ュ崟鍚�?"
@confirm="() => handleOrderIssue(record)"
+ v-has="'dailyMaintenanceOrder:issue'"
>
- <a v-if="record.status == '1'">涓嬪彂</a>
+ <a v-show="record.status == '1'">鎺ユ敹</a>
</a-popconfirm>
<a-divider
- v-if="record.status == '1'"
+ v-show="record.status == '1'"
type="vertical"
/>
<a-popconfirm
title="纭畾鎾ゅ洖宸ュ崟鍚�?"
@confirm="() => handleOrderReset(record)"
+ v-has="'dailyMaintenanceOrder:issue'"
>
- <a v-if="record.status == '2'">鎾ゅ洖</a>
+ <a v-show="record.status == '2'">鎾ゅ洖</a>
</a-popconfirm>
<a-divider
- v-if="record.status == '2'"
+ v-show="record.status == '2'"
type="vertical"
/>
- <a-popconfirm
- title="纭畾鎭㈠宸ュ崟鍚�?"
- @confirm="() => handleOrderRecover(record)"
- >
- <a v-if="record.status == '7'">鎭㈠</a>
- </a-popconfirm>
<a-divider
- v-if="record.status == '7'"
- type="vertical"
- />
- <a-popconfirm
- title="纭畾浣滃簾宸ュ崟鍚�?"
- @confirm="() => handleOrderCancel(record)"
- >
- <a v-if="record.status == '2'">浣滃簾</a>
- </a-popconfirm>
- <a-divider
- v-if="record.status == '2'"
+ v-show="record.status == '2'"
type="vertical"
/>
<a-popconfirm
title="纭畾棰嗗彇宸ュ崟鍚�?"
@confirm="() => handleOrderGet(record)"
+ v-has="'dailyMaintenanceOrder:get'"
>
- <a v-if="record.status == '2' && record.assignMode == '1'">棰嗗彇</a>
+ <a v-show="record.status == '2' && record.assignMode == '1'">棰嗗彇</a>
</a-popconfirm>
- <a
- v-if="record.status == '2' && record.assignMode == '2' "
- @click="handleAssignOrder(record)"
- >娲惧伐</a>
- <a
- v-if="record.status == '3'&& record.assignMode == '2' && record.maintenanceUserName != null "
- @click="handleAssignOrder(record)"
- >鏀规淳</a>
<!-- <a
- v-if="record.status == '3'"
+ v-show="record.status == '2' && record.assignMode == '2' "
@click="handleAssignOrder(record)"
- >鏀规淳</a> -->
+ v-has="'dailyMaintenanceOrder:assign'"
+ >娲惧伐</a>
+
<a-divider
- v-if="record.status == '2'"
+ v-show="record.status == '2'"
type="vertical"
- />
+ /> -->
<a-divider
- v-if="record.status === '3'&& record.assignMode == '2' && record.maintenanceUserName != null "
+ v-show="record.status === '3'&& record.assignMode == '2' && record.maintenanceUserName != null "
type="vertical"
/>
<a
- v-if="record.status === '3' || record.status === '4' "
+ v-show="record.status === '3' || record.status === '4' "
@click="handleOrderExe(record)"
+ v-has="'dailyMaintenanceOrder:exe'"
>鎵ц</a>
<a-divider
- v-if="record.status === '3' || record.status === '4' "
+ v-show="record.status === '3' || record.status === '4' "
type="vertical"
/>
<a
- v-if="record.status === '1'"
+ v-show="record.status === '1'"
@click="handleEdit(record)"
+ v-has="'dailyMaintenanceOrder:edit'"
>缂栬緫</a>
<a-divider
- v-if="record.status === '1'"
+ v-show="record.status === '1'"
+ type="vertical"
+ />
+ <a
+ v-show="(record.status === '5' || record.status === '8') && (record.confirmStatus === '0' || record.confirmStatus === '2')"
+ @click="handleFinish(record)"
+ v-has="'dailyMaintenanceOrder:operateUser'"
+ >瀹屽伐绉讳氦鍗�</a>
+ <a
+ v-show="(record.status === '5' || record.status === '8') && (record.confirmStatus === '1' || record.confirmStatus === '4')"
+ @click="handleFinish(record)"
+ v-has="'dailyMaintenanceOrder:repairUser'"
+ >瀹屽伐绉讳氦鍗�</a>
+ <a
+ v-show="(record.status === '5' || record.status === '8') && (record.confirmStatus === '3' || record.confirmStatus === '6')"
+ @click="handleFinish(record)"
+ v-has="'dailyMaintenanceOrder:repairDirectorUser'"
+ >瀹屽伐绉讳氦鍗�</a>
+ <a
+ v-show="(record.status === '5' || record.status === '8') && (record.confirmStatus === '5')"
+ @click="handleFinish(record)"
+ v-has="'dailyMaintenanceOrder:equipmentInspectorUser'"
+ >瀹屽伐绉讳氦鍗�</a>
+ <a
+ v-show="(record.status === '5' || record.status === '8') && (record.confirmStatus === '7')"
+ @click="handleFinish(record)"
+ >瀹屽伐绉讳氦鍗�</a>
+ <a-divider
+ v-show="record.status === '5' || record.status === '8'"
type="vertical"
/>
<a-dropdown>
@@ -312,8 +284,9 @@
<a-popconfirm
title="纭畾鍒犻櫎鍚�?"
@confirm="() => handleDelete(record.id)"
+ v-has="'dailyMaintenanceOrder:delete'"
>
- <a v-if="record.status === '1'">鍒犻櫎</a>
+ <a v-show="record.status === '1'">鍒犻櫎</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
@@ -325,7 +298,7 @@
slot-scope="text, record"
>
<a
- v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' "
+ v-if="record.status === '3' || record.status === '4' ||record.status === '5' ||record.status === '7' ||record.status === '8'"
class="lot"
@click="handleOrderExe(record)"
>{{record.num}}</a>
@@ -339,6 +312,10 @@
ref="modalForm"
@ok="modalFormOk"
></maintenance-order-modal>
+ <finish-devolution-modal
+ ref="FinishDevolutionModal"
+ @ok="modalFormOk"
+ ></finish-devolution-modal>
<maintenance-order-assign-modal
ref="MaintenanceOrderAssignModal"
@ok="modalFormOk"
@@ -356,21 +333,26 @@
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import MaintenanceOrderModal from './modules/dailyMaintenanceOrder/MaintenanceOrderModal'
+import FinishDevolutionModal from './modules/dailyMaintenanceOrder/FinishDevolutionModal'
import MaintenanceOrderAssignModal from './modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal'
import DailyMaintenanceOrderExeDrawer from './modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer'
import { getAction, postAction, requestPut } from '@/api/manage'
+import moment from 'moment'
export default {
name: 'DailyMaintenanceOrderList',
mixins: [JeecgListMixin, mixinDevice],
components: {
MaintenanceOrderModal,
+ FinishDevolutionModal,
MaintenanceOrderAssignModal,
DailyMaintenanceOrderExeDrawer
},
data() {
return {
- description: '鏃ュ父淇濆吇宸ュ崟',
+ description: '浜岀骇淇濆吇宸ュ崟',
+ queryParam: { maintenanceType: '2' },
+ finishTime: [],
// 琛ㄥご
columns: [
{
@@ -384,31 +366,44 @@
}
},
{
- title: '鐘舵��',
- align: "center",
- dataIndex: 'statusName'
- },
- {
title: '淇濆吇宸ュ崟鍙�',
align: "center",
dataIndex: 'num',
scopedSlots: { customRender: 'num' }
},
{
- title: '淇濆吇鍛ㄦ湡',
- align: "center",
- dataIndex: 'maintenanceCycleName',
- },
- {
- title: '娲惧伐鏂瑰紡',
- align: "center",
- dataIndex: 'assignModeName'
- },
- {
- title: '璁惧缂栫爜',
+ title: '缁熶竴缂栫爜',
align: "center",
dataIndex: 'equipmentNum',
},
+ {
+ title: '鐘舵��',
+ align: "center",
+ width: 100,
+ dataIndex: 'statusName'
+ },
+ // {
+ // title: '淇濆吇绫诲瀷',
+ // align: "center",
+ // dataIndex: 'maintenanceTypeName',
+ // },
+ // {
+ // title: '淇濆吇鍛ㄦ湡',
+ // align: "center",
+ // dataIndex: 'maintenanceCycleName',
+ // },
+ // {
+ // title: '娲惧伐鏂瑰紡',
+ // align: "center",
+ // dataIndex: 'assignModeName',
+ // width: 100,
+ // },
+ {
+ title: '绉讳氦鍗曠‘璁ょ姸鎬�',
+ align: "center",
+ dataIndex: 'confirmStatusName'
+ },
+
{
title: '璁惧鍚嶇О',
align: "center",
@@ -419,11 +414,11 @@
align: "center",
dataIndex: 'equipmentModel',
},
- {
- title: '淇濆吇鏍囧噯缂栫爜',
- align: "center",
- dataIndex: 'maintenanceStandardNum',
- },
+ // {
+ // title: '淇濆吇鏍囧噯缂栫爜',
+ // align: "center",
+ // dataIndex: 'maintenanceStandardNum',
+ // },
{
title: '浣跨敤閮ㄩ棬',
@@ -435,44 +430,49 @@
align: "center",
dataIndex: 'teamName'
},
+ // {
+ // title: '宸ユ椂瀹氶',
+ // align: "center",
+ // dataIndex: 'workingHourQuota'
+ // },
+ // {
+ // title: '璁″垝寮�濮嬫椂闂�',
+ // align: "center",
+ // dataIndex: 'planStartTime',
+ // //width: '120px',
+ // },
+ // {
+ // title: '璁″垝缁撴潫鏃堕棿',
+ // align: "center",
+ // dataIndex: 'planEndTime',
+ // //width: '120px',
+ // },
{
- title: '宸ユ椂瀹氶',
- align: "center",
- dataIndex: 'workingHourQuota'
- },
- {
- title: '璁″垝寮�濮嬫椂闂�',
- align: "center",
- dataIndex: 'planStartTime',
- //width: '120px',
- },
- {
- title: '璁″垝缁撴潫鏃堕棿',
- align: "center",
- dataIndex: 'planEndTime',
- //width: '120px',
- },
- {
- title: '瀹為檯寮�濮嬫椂闂�',
+ title: '鎵ц鏃堕棿',
align: "center",
dataIndex: 'actualStartTime',
//width: '120px',
},
{
- title: '瀹為檯缁撴潫鏃堕棿',
+ title: '瀹屽伐鏃堕棿',
align: "center",
dataIndex: 'actualEndTime',
//width: '120px',
},
+ // {
+ // title: '瀹為檯鐢ㄦ椂',
+ // align: "center",
+ // dataIndex: 'actualWorkingHourQuota',
+ // },
+ // {
+ // title: '鎶ュ伐浜�',
+ // align: "center",
+ // dataIndex: 'maintenanceUserId'
+ // },
{
- title: '瀹為檯鐢ㄦ椂',
+ title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�',
align: "center",
- dataIndex: 'actualWorkingHourQuota',
- },
- {
- title: '鎵ц浜�',
- align: "center",
- dataIndex: 'maintenanceUserName'
+ dataIndex: 'description'
},
{
title: '鍒涘缓浜�',
@@ -540,9 +540,14 @@
this.selectionRows = selectionRows;
},
+ handlePrintInfo(record) {
+ let href = `${window._CONFIG['domianURL']}/jmreport/view/934663658030161920?id=` + record.id; //缃戠珯閾炬帴
+ window.open(href, "_blank");
+ },
+
handleOrderExe(record) {
this.$refs.DailyMaintenanceOrderExeDrawer.visible = true
- this.$refs.DailyMaintenanceOrderExeDrawer.title = '鏃ュ父淇濆吇宸ュ崟鎵ц'
+ this.$refs.DailyMaintenanceOrderExeDrawer.title = '浜岀骇淇濆吇宸ュ崟鎵ц'
this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record)
if (record.status === '3') {
this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸�
@@ -561,6 +566,12 @@
this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true
this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true
}
+ },
+
+ handleFinish: function (record) {
+ this.$refs.FinishDevolutionModal.edit(record);
+ this.$refs.FinishDevolutionModal.title = "鐢熶骇璁惧浜岀骇淇濆吇瀹屽伐绉讳氦鍗�";
+ this.$refs.FinishDevolutionModal.disableSubmit = false;
},
handleOrderIssue(record) {
@@ -629,6 +640,13 @@
this.$refs.MaintenanceOrderAssignModal.title = '宸ュ崟鏀规淳'
this.$refs.MaintenanceOrderAssignModal.disableSubmit = false
},
+
+ searchReset() {
+ this.onClearSelected();
+ this.queryParam = { maintenanceType: '2' }
+ this.loadData(1);
+ this.finishTime = []
+ },
// modalFormOk() {
// alert(0)
// // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃
@@ -636,9 +654,49 @@
// //娓呯┖鍒楄〃閫変腑
// this.onClearSelected()
// },
+
+ timeChange() {
+ this.queryParam.finishStartTime = moment(this.finishTime[0]).format("YYYY-MM-DD HH:mm:ss")
+ this.queryParam.finishEndTime = moment(this.finishTime[1]).format("YYYY-MM-DD HH:mm:ss")
+ },
+
+ //棰勮棰滆壊
+ tableRowClass(record, index) {
+ if ("1" == record.status || "2" == record.status) {
+ if (record.yellowWarningTime < record.currentDateTime && record.currentDateTime < record.redWarningTime) {
+ return 'yellow'
+ } else if (record.redWarningTime < record.currentDateTime && record.currentDateTime < record.planStartTime) {
+ return 'error'
+ } else if (record.planStartTime < record.currentDateTime) {
+ return 'frozenRowClass'
+ }
+ }
+ },
}
}
</script>
-<style scoped>
+<style >
@import '~@assets/less/common.less';
+.frozenRowClass {
+ color: #c9c9c9;
+ font-weight: bold;
+}
+.success {
+ color: green;
+}
+.error {
+ color: red;
+ font-weight: bold;
+}
+.yellow {
+ color: rgba(255, 255, 0, 0.443);
+ font-weight: bold;
+}
+.fontweight {
+ font-weight: bold;
+}
+
+.ant-table-tbody .red {
+ background-color: red !important;
+}
</style>
\ No newline at end of file
--
Gitblit v1.9.3