From 19aff1ac87030b21d2b01cdca5d5604c840ba7c0 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期一, 21 七月 2025 21:36:31 +0800 Subject: [PATCH] 维修工单 --- src/views/eam/repair/EamRepairOrderList.vue | 233 ++++++++++++++++++++++++++-------------------------------- 1 files changed, 104 insertions(+), 129 deletions(-) diff --git a/src/views/eam/repair/EamRepairOrderList.vue b/src/views/eam/repair/EamRepairOrderList.vue index 3869ba3..4bdd93d 100644 --- a/src/views/eam/repair/EamRepairOrderList.vue +++ b/src/views/eam/repair/EamRepairOrderList.vue @@ -6,35 +6,26 @@ <a-form layout="inline" @keyup.enter.native="searchQuery"> <a-row :gutter="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24"> - <a-form-item label="宸ュ崟缂栧彿"> - <a-input placeholder="璇疯緭鍏ュ伐鍗曠紪鍙�" v-model="queryParam.repairCode"></a-input> + <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.equipmentId"/>--> - <lx-search-equipment-select placeholder="璇疯緭鍏ヨ澶囩紪鍙锋垨鍚嶇О鎼滅储" v-model="queryParam.equipmentId"/> + <a-form-item label="宸ュ崟鍙�"> + <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-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 label="缁翠慨鐘舵��"> + <j-dict-select-tag placeholder="璇烽�夋嫨缁翠慨鐘舵��" v-model="queryParam.repairStatus" + dict-code="repair_status"/> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - </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>--> </span> </a-col> @@ -44,8 +35,6 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleOpenReceiveFaultModal" type="primary" icon="plus" v-if="isShowAuth('eam:repair:collect')">棰嗗彇</a-button> - <!--<a-button type="primary" icon="download" @click="handleExportXls('缁翠慨宸ュ崟')">瀵煎嚭</a-button>--> <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> <a-menu-item key="1" @click="batchDel"> @@ -67,48 +56,45 @@ <a style="margin-left: 24px" @click="onClearSelected">娓呯┖</a> </div> - <a-table - ref="table" - size="middle" - bordered - rowKey="id" - :columns="columns" - :dataSource="dataSource" - :pagination="ipagination" - :loading="loading" - class="j-table-force-nowrap" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" - @change="handleTableChange" - :scroll="{x:'max-content'}" - > + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange" + :scroll="{x:'max-content'}"> <span slot="action" slot-scope="text, record"> + <a @click="handleFillIn(record)">濉姤</a> + <a-divider type="vertical"/> + <a-popconfirm title="纭畾鎻愪氦鍚�?" @confirm="() => handleSubmit(record.id)"> + <a>鎻愪氦</a> + </a-popconfirm> + <a-divider type="vertical"/> <a @click="handleDetail(record)">璇︽儏</a> </span> </a-table> </div> <!-- table鍖哄煙-end --> - <receive-fault-modal ref="receiveFaultModalRef" @ok="loadData"/> + <!--缁翠慨宸ュ崟濉姤绐楀彛--> + <eam-repair-order-modal ref="modalForm" @ok="modalFormOk"/> + <!--缁翠慨宸ュ崟瀹℃壒绐楀彛--> <repair-order-approval-modal ref="repairOrderApprovalModal" :selectShenpiData="selectRepairOrderData"/> </a-card> </template> <script> - 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' import RepairOrderApprovalModal from '../../flowable/workflow/repairOrder/RepairOrderApprovalModal' + import EamRepairOrderModal from './modules/EamRepairOrderList/EamRepairOrderModal' + import { getAction } from '@/api/manage' export default { name: 'EamRepairOrderList', mixins: [JeecgListMixin], components: { + EamRepairOrderModal, RepairOrderApprovalModal, - LxSearchEquipmentSelect, - ReceiveFaultModal + LxSearchEquipmentSelect }, props: { isDisplayOperation: { @@ -131,41 +117,36 @@ customRender: function(t, r, index) { return parseInt(index) + 1 }, - fixed: 'left', - }, - { - title: '宸ュ崟缂栧彿', - align: 'center', - dataIndex: 'repairCode', - width: 120, fixed: 'left' }, { - title: '璁惧缂栧彿', + title: '缁熶竴缂栫爜', align: 'center', dataIndex: 'equipmentCode', - width: 120, fixed: 'left' }, { title: '璁惧鍚嶇О', align: 'center', dataIndex: 'equipmentName', - width: 200, fixed: 'left' }, { - title: '鐘舵��', + title: '璁惧鍨嬪彿', align: 'center', - dataIndex: 'repairStatus_dictText', - fixed: 'left', - width: 100 + dataIndex: 'equipmentModel', + fixed: 'left' }, { - title: '缁翠慨璐熻矗浜�', + title: '缁翠慨鐘舵��', align: 'center', - dataIndex: 'repairer', - width: 100 + dataIndex: 'repairStatus_dictText', + fixed: 'left' + }, + { + title: '宸ュ崟鍙�', + align: 'center', + dataIndex: 'repairCode' }, { title: '缁翠慨寮�濮嬫椂闂�', @@ -180,106 +161,104 @@ width: 200 }, { + title: '缁翠慨纭', + align: 'center', + dataIndex: 'repairConfirm_dictText' + }, + { + title: '缁翠慨纭鏃堕棿', + align: 'center', + dataIndex: 'repairConfirmTime', + width: 200 + }, + { title: '鏁呴殰鍘熷洜', align: 'center', dataIndex: 'faultReason' }, { - title: '缁翠慨缁撴灉鎻忚堪', + title: '鏁呴殰鍒嗘瀽', align: 'center', - dataIndex: 'repairDescription' - // width: 300 + dataIndex: 'faultAnalysis' + }, + { + title: '鎺掓晠杩囩▼', + align: 'center', + dataIndex: 'faultProcess' + }, + { + title: '棰勯槻鎺柦', + align: 'center', + dataIndex: 'faultPrevent' + }, + { + title: '鎿嶄綔宸�', + align: 'center', + dataIndex: 'confirmer_dictText' + }, + { + title: '鎿嶄綔宸ョ‘璁ゆ椂闂�', + align: 'center', + dataIndex: 'confirmTime', + width: 200 } - // { - // title: '缁翠慨鍥剧墖', - // align: 'center', - // dataIndex: 'imageFiles', - // 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 - // }, ], - report_repair_status_list: [], selectRepairOrderData: {}, url: { list: '/eam/eamRepairOrder/list', + submit: '/eam/eamRepairOrder/submit', delete: '/eam/eamRepairOrder/delete', - deleteBatch: '/eam/eamRepairOrder/deleteBatch', - exportXlsUrl: 'eam/eamRepairOrder/exportXls' + deleteBatch: '/eam/eamRepairOrder/deleteBatch' } - } - }, - 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', - width: 100, - scopedSlots: { customRender: 'action' } + width: 200, + scopedSlots: { customRender: 'action' }, + fixed: 'right' } this.columns = [...this.columns, operationColumn] this.loadData(1) }, methods: { /** - * 鑾峰彇鏁版嵁瀛楀吀鍊� - * @param dictCode 鏁版嵁瀛楀吀瀵瑰簲璁板綍缂栫爜 + * 鐐瑰嚮濉姤鏃惰Е鍙� + * @param record */ - 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 - } - }) + handleFillIn(record) { + this.$refs.modalForm.title = '濉姤' + this.$refs.modalForm.handleFillIn(record) }, - // 寮�鍚鍙栨晠闅滀繚淇崟寮圭獥 - handleOpenReceiveFaultModal() { - this.$refs.receiveFaultModalRef.visible = true + /** + * 鐐瑰嚮鎻愪氦鏃惰Е鍙� + * @param id + */ + handleSubmit(id) { + this.loading = true + getAction(this.url.submit, { id }) + .then(res => { + if (res.success) { + this.$notification.success({ + message: '娑堟伅', + description: res.message + }) + this.loadData() + } else { + this.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + this.loading = false + } + }) }, /** @@ -291,12 +270,8 @@ this.$refs.repairOrderApprovalModal.visible = true this.$refs.repairOrderApprovalModal.title = '璇︽儏' this.$refs.repairOrderApprovalModal.disableSubmit = true - this.$refs.repairOrderApprovalModal.getAllApproveData(record) - this.$refs.repairOrderApprovalModal.getBasicInformation({ ...record, dataId: record.id }) + this.$refs.repairOrderApprovalModal.recordDetail(record) } } } -</script> -<style scoped> - @import '~@assets/less/common.less'; -</style> \ No newline at end of file +</script> \ No newline at end of file -- Gitblit v1.9.3