From 9d38529c9ecdde9270652a8fa2bb12d5cca7559e Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 10 四月 2025 10:46:05 +0800 Subject: [PATCH] 沃克项目: 1、维修工单页面布局及样式完成100%并实现领取报修故障单功能 2、设备台账页面实现查询设备对应维修工单功能 --- src/views/eam/repair/EamRepairOrderList.vue | 390 ++++++++++++++++++++++++++++++++----------------------- 1 files changed, 228 insertions(+), 162 deletions(-) diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 18482bc..d905fc3 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -2,7 +2,7 @@ <a-card :bordered="false"> <!-- 鏌ヨ鍖哄煙 --> - <div class="table-page-search-wrapper"> + <div class="table-page-search-wrapper" v-if="isDisplayOperation"> <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> @@ -10,26 +10,31 @@ <a-input placeholder="璇疯緭鍏ュ伐鍗曠紪鍙�" v-model="queryParam.repairCode"></a-input> </a-form-item> </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="璁惧缂栧彿"> + <!--<a-input placeholder="璇疯緭鍏ヨ澶囩紪鍙�" v-model="queryParam.equipmentId"/>--> + <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"/> + </a-form-item> + </a-col> + <a-col :xl="6" :lg="7" :md="8" :sm="24"> + <a-form-item label="鍗曟嵁鐘舵��"> + <a-select placeholder="璇烽�夋嫨鍗曟嵁鐘舵��" v-model="queryParam.repairStatus" allow-clear> + <a-select-option v-for="item in report_repair_status_list" :key="item.value">{{ item.label }} + </a-select-option> + </a-select> + </a-form-item> + </a-col> <template v-if="toggleSearchStatus"> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="璁惧缂栧彿"> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"/> - </a-form-item> - </a-col> - <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="缁翠慨鐘舵��"> - <a-input placeholder="璇疯緭鍏ョ淮淇姸鎬�" v-model="queryParam.repairStatus"></a-input> - </a-form-item> - </a-col> + </template> <a-col :xl="6" :lg="7" :md="8" :sm="24"> <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> <a-button type="primary" @click="searchQuery" icon="search">鏌ヨ</a-button> <a-button @click="searchReset" icon="reload" style="margin-left: 8px">閲嶇疆</a-button> - <a @click="handleToggleSearch" style="margin-left: 8px"> - {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} - <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> - </a> + <!--<a @click="handleToggleSearch" style="margin-left: 8px">--> + <!--{{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }}--> + <!--<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>--> + <!--</a>--> </span> </a-col> @@ -38,8 +43,8 @@ </div> <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> - <div class="table-operator"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> + <div class="table-operator" v-if="isDisplayOperation"> + <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus">棰嗗彇</a-button> <a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> @@ -56,7 +61,7 @@ <!-- table鍖哄煙-begin --> <div> - <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> + <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;" v-if="isDisplayOperation"> <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> @@ -78,166 +83,227 @@ > <span slot="action" slot-scope="text, record"> - <a @click="handleEdit(record)">缂栬緫</a> + <a @click="handleOpenApplySparePartsModal(record)">鐢宠澶囦欢</a> <a-divider type="vertical"/> - <a-dropdown> - <a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a> - <a-menu slot="overlay"> - <a-menu-item> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)"> - <a>鍒犻櫎</a> - </a-popconfirm> - </a-menu-item> - </a-menu> - </a-dropdown> + + <a @click="handleOpenRepairCompletedModal(record)">瀹屾垚缁翠慨</a> + + <!--<a @click="handleEdit(record)">缂栬緫</a>--> + + <!--<a-divider type="vertical"/>--> + <!--<a-dropdown>--> + <!--<a class="ant-dropdown-link">鏇村 <a-icon type="down"/></a>--> + <!--<a-menu slot="overlay">--> + <!--<a-menu-item>--> + <!--<a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() => handleDelete(record.id)">--> + <!--<a>鍒犻櫎</a>--> + <!--</a-popconfirm>--> + <!--</a-menu-item>--> + <!--</a-menu>--> + <!--</a-dropdown>--> </span> </a-table> </div> <!-- table鍖哄煙-end --> - <!-- 琛ㄥ崟鍖哄煙 --> - <eamRepairOrder-modal ref="modalForm" @ok="modalFormOk"></eamRepairOrder-modal> + <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/> </a-card> </template> <script> -import '@/assets/less/TableExpand.less' -import EamRepairOrderModal from './modules/EamRepairOrderModal' -import { JeecgListMixin } from '@/mixins/JeecgListMixin' -import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' + import '@/assets/less/TableExpand.less' + import { JeecgListMixin } from '@/mixins/JeecgListMixin' + import ReceiveFaultModal from './modules/EamRepairOrderList/ReceiveFaultModal' + import { ajaxGetDictItems, getDictItemsFromCache } from '@/api/api' + import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' -export default { - name: 'EamRepairOrderList', - mixins: [JeecgListMixin], - components: { - LxSearchEquipmentSelect, - EamRepairOrderModal - }, - data() { - return { - description: '缁翠慨宸ュ崟绠$悊椤甸潰', - // 琛ㄥご - columns: [ - { - title: '宸ュ崟缂栧彿', - align: 'center', - dataIndex: 'repairCode', - width: 200, - fixed: 'left' - }, - // { - // title: '鎶ヤ慨缂栧彿', - // align: 'center', - // dataIndex: 'reportId', - // width: 200, - // fixed: 'left' - // }, - { - title: '璁惧缂栧彿', - align: 'center', - dataIndex: 'equipmentId_dictText', - width: 200, - fixed: 'left' - }, - { - title: '鐘舵��', - align: 'center', - dataIndex: 'repairStatus_dictText', - fixed: 'left', - width: 100 - }, - { - title: '缁翠慨寮�濮嬫椂闂�', - align: 'center', - dataIndex: 'actualStartTime', - width: 200 - }, - { - title: '缁翠慨缁撴潫鏃堕棿', - align: 'center', - dataIndex: 'actualEndTime', - width: 200 - }, - { - title: '鏁呴殰鍘熷洜', - align: 'center', - dataIndex: 'faultReason' - }, - { - title: '缁翠慨缁撴灉鎻忚堪', - align: 'center', - dataIndex: 'repairDescription', - width: 300 - }, - { - title: '缁翠慨璐熻矗浜�', - align: 'center', - dataIndex: 'repairer', - width: 100 - }, - // { - // title: '鏄惁濮斿', - // align: 'center', - // dataIndex: 'outsourcedFlag', - // width: 100 - // }, - // { - // title: '濮斿缁翠慨鎻忚堪', - // align: 'center', - // dataIndex: 'outsourcedRepairDecription', - // width: 300 - // }, - // { - // title: '濮斿缁翠慨寮�濮嬫椂闂�', - // align: 'center', - // dataIndex: 'outsourcedStartTime', - // width: 200 - // }, - // { - // title: '濮斿缁翠慨缁撴潫鏃堕棿', - // align: 'center', - // dataIndex: 'outsourcedEndTime', - // width: 200 - // }, - // { - // title: '濮斿璐熻矗浜�', - // align: 'center', - // dataIndex: 'outsourcedPerson', - // width: 100 - // }, - { - title: '缁翠慨鍥剧墖', - align: 'center', - dataIndex: 'imageFiles', - width: 100 - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: 'center', - scopedSlots: { customRender: 'action' }, - fixed: 'right', - width: 150 + export default { + name: 'EamRepairOrderList', + mixins: [JeecgListMixin], + components: { + LxSearchEquipmentSelect, + ReceiveFaultModal + }, + props:{ + isDisplayOperation:{ + type:Boolean, + default:true + } + }, + data() { + return { + description: '缁翠慨宸ュ崟绠$悊椤甸潰', + disableMixinCreated: true, + // 琛ㄥご + columns: [ + { + title: '宸ュ崟缂栧彿', + align: 'center', + dataIndex: 'repairCode', + width: 200, + fixed: 'left' + }, + // { + // title: '鎶ヤ慨缂栧彿', + // align: 'center', + // dataIndex: 'reportId', + // width: 200, + // fixed: 'left' + // }, + { + title: '璁惧缂栧彿', + align: 'center', + dataIndex: 'equipmentId_dictText', + width: 200, + fixed: 'left' + }, + { + title: '鐘舵��', + align: 'center', + dataIndex: 'repairStatus_dictText', + fixed: 'left', + width: 100 + }, + { + title: '缁翠慨寮�濮嬫椂闂�', + align: 'center', + dataIndex: 'actualStartTime', + width: 200 + }, + { + title: '缁翠慨缁撴潫鏃堕棿', + align: 'center', + dataIndex: 'actualEndTime', + width: 200 + }, + { + title: '鏁呴殰鍘熷洜', + align: 'center', + dataIndex: 'faultReason', + width: 150 + }, + { + title: '缁翠慨缁撴灉鎻忚堪', + align: 'center', + dataIndex: 'repairDescription', + width: 300 + }, + { + title: '缁翠慨鍥剧墖', + align: 'center', + dataIndex: 'imageFiles', + width: 100 + }, + { + title: '缁翠慨璐熻矗浜�', + align: 'center', + dataIndex: 'repairer' + }, + // { + // title: '鏄惁濮斿', + // align: 'center', + // dataIndex: 'outsourcedFlag', + // width: 100 + // }, + // { + // title: '濮斿缁翠慨鎻忚堪', + // align: 'center', + // dataIndex: 'outsourcedRepairDecription', + // width: 300 + // }, + // { + // title: '濮斿缁翠慨寮�濮嬫椂闂�', + // align: 'center', + // dataIndex: 'outsourcedStartTime', + // width: 200 + // }, + // { + // title: '濮斿缁翠慨缁撴潫鏃堕棿', + // align: 'center', + // dataIndex: 'outsourcedEndTime', + // width: 200 + // }, + // { + // title: '濮斿璐熻矗浜�', + // align: 'center', + // dataIndex: 'outsourcedPerson', + // width: 100 + // }, + ], + report_repair_status_list: [], + url: { + list: '/eam/eamRepairOrder/list', + delete: '/eam/eamRepairOrder/delete', + deleteBatch: '/eam/eamRepairOrder/deleteBatch', + exportXlsUrl: 'eam/eamRepairOrder/exportXls' } - ], - url: { - list: '/eam/eamRepairOrder/list', - delete: '/eam/eamRepairOrder/delete', - deleteBatch: '/eam/eamRepairOrder/deleteBatch', - exportXlsUrl: 'eam/eamRepairOrder/exportXls', + } + }, + computed: { + importExcelUrl: function() { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` + } + }, + created() { + if (!this.isDisplayOperation) { + return + } + this.initDictData('report_repair_status') + const operationColumn = { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + scopedSlots: { customRender: 'action' } + } + this.columns = [...this.columns, operationColumn] + this.loadData(1) + }, + methods: { + /** + * 鑾峰彇鏁版嵁瀛楀吀鍊� + * @param dictCode 鏁版嵁瀛楀吀瀵瑰簲璁板綍缂栫爜 + */ + initDictData(dictCode) { + // //浼樺厛浠庣紦瀛樹腑璇诲彇瀛楀吀閰嶇疆 + if (getDictItemsFromCache(dictCode)) { + this[dictCode + '_list'] = getDictItemsFromCache(dictCode) + return + } + //鏍规嵁瀛楀吀Code, 鍒濆鍖栧瓧鍏告暟缁� + ajaxGetDictItems(dictCode, null).then((res) => { + if (res.success) { + this[dictCode + '_list'] = res.result + return + } + }) + }, + + // 寮�鍚鍙栨晠闅滀繚淇崟寮圭獥 + handleOpenReceiveFaultModal() { + this.$refs.receiveFaultModalRef.visible = true + this.$refs.receiveFaultModalRef.loadData() + }, + + /** + * 寮�鍚敵璇峰浠跺脊绐� + * @param record 琛ㄦ牸琛屼俊鎭� + */ + handleOpenApplySparePartsModal(record) { + + }, + + /** + * 寮�鍚畬鎴愮淮淇脊绐� + * @param record 琛ㄦ牸琛屼俊鎭� + */ + handleOpenRepairCompletedModal(record) { + } } - }, - computed: { - importExcelUrl: function() { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}` - } - }, - methods: {} -} + } </script> <style scoped> -@import '~@assets/less/common.less'; + @import '~@assets/less/common.less'; </style> \ No newline at end of file -- Gitblit v1.9.3