From a9f005e2af294c47d7cd1e4b6ed401bf65f5b080 Mon Sep 17 00:00:00 2001 From: zhangherong <571457620@qq.com> Date: 星期二, 04 三月 2025 16:44:09 +0800 Subject: [PATCH] art: 所有设备 台账 二保工单 根据设备id查询二保工单,并过滤掉已完成和已取消的二保工单 --- src/views/eam/DailyMaintenanceOrderList.vue | 4 src/views/eam/EquipmentListOfAll.vue | 9 + src/views/eam/modules/equipmentNew/DailyInspectionOrderListComponent.vue | 6 src/views/eam/modules/equipmentNew/DailyMaintenanceOrderListComponent.vue | 515 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 526 insertions(+), 8 deletions(-) diff --git a/src/views/eam/DailyMaintenanceOrderList.vue b/src/views/eam/DailyMaintenanceOrderList.vue index f808790..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"> @@ -100,7 +100,7 @@ style="margin-left: 8px" >鏌ヨ</a-button> <a-button - type="primary" + type="info" @click="searchReset" icon="reload" style="margin-left: 8px" diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue index 9239a35..14f6c32 100644 --- a/src/views/eam/EquipmentListOfAll.vue +++ b/src/views/eam/EquipmentListOfAll.vue @@ -760,6 +760,13 @@ > <daily-inspection-order-list-component :mainId="selectedMainId"></daily-inspection-order-list-component> </a-tab-pane> + <a-tab-pane + tab="浜屼繚宸ュ崟" + key="11" + forceRender + > + <daily-maintenance-order-list-component :mainId="selectedMainId"></daily-maintenance-order-list-component> + </a-tab-pane> </a-tabs> <equipment-modal ref="modalForm" @@ -817,6 +824,7 @@ import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' import KeyEquipmentUpdateModel from './modules/equipmentNew/edit/KeyEquipmentUpdateModel.vue' import DailyInspectionOrderListComponent from './modules/equipmentNew/DailyInspectionOrderListComponent.vue' +import DailyMaintenanceOrderListComponent from './modules/equipmentNew/DailyMaintenanceOrderListComponent.vue' export default { name: "EquipmentList", @@ -844,6 +852,7 @@ KeyEquipmentUpdateModel, JEllipsis, DailyInspectionOrderListComponent, + DailyMaintenanceOrderListComponent, }, data() { return { diff --git a/src/views/eam/modules/equipmentNew/DailyInspectionOrderListComponent.vue b/src/views/eam/modules/equipmentNew/DailyInspectionOrderListComponent.vue index 2e18fb5..a0d3a35 100644 --- a/src/views/eam/modules/equipmentNew/DailyInspectionOrderListComponent.vue +++ b/src/views/eam/modules/equipmentNew/DailyInspectionOrderListComponent.vue @@ -206,7 +206,6 @@ import InspectionOrderExeModal from '@/views/eam/modules/dailyInspectionOrder/InspectionOrderExeModal' import DailyInspectionOrderExeDrawer from '@/views/eam/modules/dailyInspectionOrder/DailyInspectionOrderExeDrawer' import { getAction, postAction, requestPut } from '@/api/manage' -import moment from 'moment' export default { name: 'DailyInspectionOrderListComponent', @@ -537,11 +536,6 @@ } } }, - clearList(){ - this.dataSource=[] - this.selectedRowKeys=[] - this.ipagination.current = 1 - } } } diff --git a/src/views/eam/modules/equipmentNew/DailyMaintenanceOrderListComponent.vue b/src/views/eam/modules/equipmentNew/DailyMaintenanceOrderListComponent.vue new file mode 100644 index 0000000..edb006c --- /dev/null +++ b/src/views/eam/modules/equipmentNew/DailyMaintenanceOrderListComponent.vue @@ -0,0 +1,515 @@ +<template> + <a-card + :bordered="false" + title="" + > + <!-- table鍖哄煙-begin --> + <div> + <!-- <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + > + <i class="anticon anticon-info-circle ant-alert-icon"></i> 宸查�夋嫨 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>椤� + <a + style="margin-left: 24px" + @click="onClearSelected" + >娓呯┖</a> + </div> --> + + <a-table + ref="table" + size="middle" + :scroll="{ x: 'calc(2800px + 50%)', y: 900 }" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + @change="handleTableChange" + :rowSelection="rowSelection" + :rowClassName="tableRowClass" + > + + <span + slot="action" + slot-scope="text, record" + > + <a-popconfirm + title="纭畾鎺ユ敹宸ュ崟鍚�?" + @confirm="() => handleOrderIssue(record)" + v-has="'dailyMaintenanceOrder:issue'" + > + <a v-show="record.status == '1'">鎺ユ敹</a> + </a-popconfirm> + <a-divider + v-show="record.status == '1'" + type="vertical" + /> + <a-popconfirm + title="纭畾鎾ゅ洖宸ュ崟鍚�?" + @confirm="() => handleOrderReset(record)" + v-has="'dailyMaintenanceOrder:issue'" + > + <a v-show="record.status == '2'">鎾ゅ洖</a> + </a-popconfirm> + <a-divider + v-show="record.status == '2'" + type="vertical" + /> + <a-divider + v-show="record.status == '2'" + type="vertical" + /> + <a-popconfirm + title="纭畾棰嗗彇宸ュ崟鍚�?" + @confirm="() => handleOrderGet(record)" + v-has="'dailyMaintenanceOrder:get'" + > + <a v-show="record.status == '2' && record.assignMode == '1'">棰嗗彇</a> + </a-popconfirm> + <!-- <a + v-show="record.status == '2' && record.assignMode == '2' " + @click="handleAssignOrder(record)" + v-has="'dailyMaintenanceOrder:assign'" + >娲惧伐</a> + + <a-divider + v-show="record.status == '2'" + type="vertical" + /> --> + <a-divider + v-show="record.status === '3'&& record.assignMode == '2' && record.maintenanceUserName != null " + type="vertical" + /> + <a + v-show="record.status === '3' || record.status === '4' " + @click="handleOrderExe(record)" + v-has="'dailyMaintenanceOrder:exe'" + >鎵ц</a> + <a-divider + v-show="record.status === '3' || record.status === '4' " + type="vertical" + /> + <a + v-show="record.status === '1'" + @click="handleEdit(record)" + v-has="'dailyMaintenanceOrder:edit'" + >缂栬緫</a> + <a-divider + 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> + <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)" + v-has="'dailyMaintenanceOrder:delete'" + > + <a v-show="record.status === '1'">鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + </a-menu> + </a-dropdown> + </span> + + <span + slot="num" + slot-scope="text, record" + > + <a + 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> + <span v-else>{{record.num}}</span> + </span> + + </a-table> + </div> + + <maintenance-order-modal + 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" + ></maintenance-order-assign-modal> + <daily-maintenance-order-exe-drawer + ref="DailyMaintenanceOrderExeDrawer" + @ok="modalFormOk" + ></daily-maintenance-order-exe-drawer> + </a-card> +</template> + +<script> + +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import MaintenanceOrderModal from '@/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderModal' +import FinishDevolutionModal from '@/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal' +import MaintenanceOrderAssignModal from '@/views/eam/modules/dailyMaintenanceOrder/MaintenanceOrderAssignModal' +import DailyMaintenanceOrderExeDrawer from '@/views/eam/modules/dailyMaintenanceOrder/DailyMaintenanceOrderExeDrawer' +import { getAction, postAction, requestPut } from '@/api/manage' + +export default { + name: 'DailyMaintenanceOrderList', + mixins: [JeecgListMixin, mixinDevice], + components: { + MaintenanceOrderModal, + FinishDevolutionModal, + MaintenanceOrderAssignModal, + DailyMaintenanceOrderExeDrawer + }, + props:{ + mainId:{ + type:String, + default:'', + required:false + } + }, + watch:{ + mainId:{ + immediate: true, + handler(val) { + if(!this.mainId){ + this.queryParam['equipmentId'] = 'NAN' + this.loadData(1); + }else{ + this.queryParam['equipmentId'] = val + this.queryParam['statusEnums'] = '6,7,8,9' + this.loadData(1); + } + } + } + }, + data() { + return { + description: '浜岀骇淇濆吇宸ュ崟', + queryParam: { maintenanceType: '2' }, + finishTime: [], + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '淇濆吇宸ュ崟鍙�', + align: "center", + dataIndex: 'num', + scopedSlots: { customRender: 'num' } + }, + { + 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", + dataIndex: 'equipmentName', + }, + { + title: '鍨嬪彿', + align: "center", + dataIndex: 'equipmentModel', + }, + // { + // title: '淇濆吇鏍囧噯缂栫爜', + // align: "center", + // dataIndex: 'maintenanceStandardNum', + // }, + + { + title: '浣跨敤閮ㄩ棬', + align: "center", + dataIndex: 'departName' + }, + { + title: '璐d换鐝粍', + 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: 'actualStartTime', + //width: '120px', + }, + { + title: '瀹屽伐鏃堕棿', + align: "center", + dataIndex: 'actualEndTime', + //width: '120px', + }, + // { + // title: '瀹為檯鐢ㄦ椂', + // align: "center", + // dataIndex: 'actualWorkingHourQuota', + // }, + // { + // title: '鎶ュ伐浜�', + // align: "center", + // dataIndex: 'maintenanceUserId' + // }, + { + title: '闂鍙婄浉搴斿鐞嗘帾鏂芥弿杩�', + align: "center", + dataIndex: 'description' + }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy' + }, + { + title: '鍒涘缓鏃ユ湡', + align: "center", + dataIndex: 'createTime', + //width: '120px', + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + fixed: "right", + width: 300, + scopedSlots: { customRender: 'action' } + } + ], + url: { + list: "/eam/dailyMaintenanceOrder/getDailyMaintenanceOrderList", + delete: "/eam/dailyMaintenanceOrder/delete", + deleteBatch: "/eam/dailyMaintenanceOrder/deleteBatch", + exportXlsUrl: "/eam/dailyMaintenanceOrder/exportXls", + importExcelUrl: "eam/dailyMaintenanceOrder/importExcel", + edit: "/eam/dailyMaintenanceOrder/editStatus", + orderGet: "/eam/dailyMaintenanceOrder/orderGet", + }, + } + }, + + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + }, + rowSelection() { + return { + type: 'checkbox', + onChange: (selectedRowKeys, selectedRows) => { + this.selectedRowKeys = selectedRowKeys; + this.onSelectChange(selectedRows); + }, + getCheckboxProps: record => ({ + props: { + disabled: record.distable + }, + }), + selectedRowKeys: this.selectedRowKeys, + }; + }, + }, + + methods: { + + onSelectChange(selectionRows) { + this.selectionRows = selectionRows; + }, + + handleOrderExe(record) { + this.$refs.DailyMaintenanceOrderExeDrawer.visible = true + this.$refs.DailyMaintenanceOrderExeDrawer.title = '浜岀骇淇濆吇宸ュ崟鎵ц' + this.$refs.DailyMaintenanceOrderExeDrawer.handleShow(record) + if (record.status === '3') { + this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true//淇濆瓨銆佹殏瀛樸�佹姤宸� + this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true//鎾ら攢鎸夐挳 + this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = false//寮�宸ユ寜閽� + } else if (record.status === '4') { + this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = false + this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = true + this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true + } else if (record.status === '5') { + this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true + this.$refs.DailyMaintenanceOrderExeDrawer.revocationDistable = false + this.$refs.DailyMaintenanceOrderExeDrawer.SWbuttonDistable = true + } else if (record.status === '7') { + this.$refs.DailyMaintenanceOrderExeDrawer.buttonDistable = true + 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) { + const that = this; + requestPut(that.url.edit, { id: record.id, status: '2' }).then((res) => { + if (res.success) { + that.$message.success("宸ュ崟涓嬪彂鎴愬姛锛�") + that.loadData() + } else { + that.$message.warning("宸ュ崟涓嬪彂澶辫触锛�") + } + }) + }, + //鎾ゅ洖 + handleOrderReset(record) { + const that = this; + requestPut(that.url.edit, { id: record.id, status: '1' }).then((res) => { + if (res.success) { + that.$message.success("宸ュ崟鎾ゅ洖鎴愬姛锛�") + that.loadData() + } else { + that.$message.warning("宸ュ崟鎾ゅ洖澶辫触锛�") + } + }) + }, + handleOrderGet(record) { + const that = this; + requestPut(that.url.orderGet, { id: record.id, status: '1' }).then((res) => { + if (res.success) { + that.$message.success("宸ュ崟棰嗗彇鎴愬姛锛�") + that.loadData() + } else { + that.$message.warning("宸ュ崟棰嗗彇澶辫触锛�") + } + }) + }, + + //棰勮棰滆壊 + 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 > +@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