| | |
| | | <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"> |
| | |
| | | <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> |
| | | |
| | |
| | | </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"> |
| | |
| | | |
| | | <!-- 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> |
| | |
| | | > |
| | | |
| | | <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> |