From 257ef0490f66229f983429f01872fac33eef13d0 Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期四, 17 七月 2025 15:52:34 +0800 Subject: [PATCH] 三保工单审批流程 --- src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue | 355 ++++++++++++++++++++++++---------------------------------- 1 files changed, 149 insertions(+), 206 deletions(-) diff --git a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue index cc77b6c..215c2a4 100644 --- a/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamThirdMaintenanceOrderList.vue @@ -1,18 +1,17 @@ <template> <a-card :bordered="false"> - <!-- 鏌ヨ鍖哄煙 --> <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-form-item label="缁熶竴缂栫爜"> - <lx-search-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="queryParam.equipmentId"/> - </a-form-item> - </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> <a-form-item label="宸ュ崟鍙�"> <a-input placeholder="璇疯緭鍏ュ伐鍗曞彿" v-model="queryParam.orderNum"/> + </a-form-item> + </a-col> + <a-col :xl="5" :lg="6" :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"> @@ -23,7 +22,7 @@ </a-col> <a-col :xl="4" :lg="7" :md="8" :sm="24"> <a-form-item label="淇濆吇鐘舵��"> - <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="second_maintenance_status" + <j-dict-select-tag placeholder="璇烽�夋嫨淇濆吇鐘舵��" dict-code="third_maintenance_status" v-model="queryParam.maintenanceStatus"/> </a-form-item> </a-col> @@ -39,74 +38,35 @@ <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> <div class="table-operator" v-if="isDisplayOperation"> - <a-button @click="handleAdd" type="primary" icon="plus">鏂板 - </a-button> - <a-dropdown v-if="selectedRowKeys.length > 0"> - <a-menu slot="overlay"> - <a-menu-item key="1" @click="handlerBatchAbolish"> - <a-icon type="delete"/> - 浣滃簾 - </a-menu-item> - <a-menu-item key="2" @click="handlerBatchCollect"> - <a-icon type="form"/> - 棰嗗彇 - </a-menu-item> - </a-menu> - <a-button style="margin-left: 8px"> 鎵归噺鎿嶄綔 - <a-icon type="down"/> - </a-button> - </a-dropdown> + <a-button @click="handleAdd" type="primary" icon="plus">鏂板</a-button> </div> <!-- table鍖哄煙-begin --> - <div> - <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> - </div> - - <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" - :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" - :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> - + <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" + :pagination="ipagination" :loading="loading" :scroll="{x:'max-content'}" + @change="handleTableChange"> <span slot="action" slot-scope="text, record"> <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> - <a @click="handleEdit(record)">缂栬緫</a> - - <a-divider type="vertical"/> - <a-popconfirm title="纭畾棰嗗彇鍚�?" @confirm="() => handlerCollect(record.id)"> <a>棰嗗彇</a> </a-popconfirm> <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="() => handlerAbolish(record.id)"> - <a>浣滃簾</a> - </a-popconfirm> - </a-menu-item> - <a-menu-item> - <a @click="handleDetail(record)">璇︽儏</a> - </a-menu-item> - </a-menu> - </a-dropdown> + <a @click="handlerAbolish(record.id)">浣滃簾</a> + + <a-divider type="vertical"/> </template> - <template v-else> - <a @click="handleDetail(record)">璇︽儏</a> - </template> + <a @click="handleDetail(record)">璇︽儏</a> - <a-divider v-if="record.maintenanceStatus === 'COMPLETE'" type="vertical"/> - <a v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">鎵撳嵃</a> + <template v-if="record.maintenanceStatus === 'COMPLETE'"> + <a-divider type="vertical"/> + + <a @click="handlePrint(record)">鎵撳嵃</a> + </template> </span> - - </a-table> - </div> + </a-table> <!-- table鍖哄煙-end --> <!-- 琛ㄥ崟鍖哄煙 --> @@ -201,19 +161,9 @@ dataIndex: 'actualEndTime' }, { - title: '淇濆吇浜�', + title: '缁翠慨浜�', align: 'center', - dataIndex: 'operator_dictText' - }, - { - title: '绮惧害妫�楠屼汉', - align: 'center', - dataIndex: 'precisionChecker_dictText' - }, - { - title: '绮惧害妫�楠屾椂闂�', - align: 'center', - dataIndex: 'precisionCheckTime' + dataIndex: 'repairman_dictText' }, { title: '淇濆吇鐘舵��', @@ -226,42 +176,90 @@ dataIndex: 'creationMethod_dictText' }, { - title: '鏈哄姩鍔炵‘璁�', + title: '璁惧鍔熻兘鏄惁榻愬', align: 'center', - dataIndex: 'confirmUser_dictText' + dataIndex: 'fullyFunctional_dictText' }, { - title: '鏈哄姩鍔炵‘璁ゆ椂闂�', + title: '璁惧鑳藉惁姝e父杩愯浆', align: 'center', - dataIndex: 'confirmTime' + dataIndex: 'runningNormally_dictText' }, { - title: '鏈哄姩鍔炴剰瑙�', + title: '妫�鏌ヤ汉', align: 'center', - dataIndex: 'confirmComment' + dataIndex: 'inspector_dictText' }, { - title: '纭棰嗗', + title: '妫�鏌ユ椂闂�', align: 'center', - dataIndex: 'confirmLeader_dictText' + dataIndex: 'inspectTime' }, { - title: '棰嗗纭鏃堕棿', + title: '鎿嶄綔浜虹瀛�', align: 'center', - dataIndex: 'leaderConfirmTime' + dataIndex: 'operatorSignature_dictText' }, { - title: '棰嗗鎰忚', + title: '鍗忓姪鎿嶄綔浜�', align: 'center', - dataIndex: 'leaderConfirmComment' + dataIndex: 'assistantOperator' + }, + { + title: '鎿嶄綔浜虹瀛楁椂闂�', + align: 'center', + dataIndex: 'operatorSignatureTime' + }, + { + title: '缁翠慨浜虹瀛�', + align: 'center', + dataIndex: 'repairmanSignature_dictText' + }, + { + title: '鍗忓姪缁翠慨浜�', + align: 'center', + dataIndex: 'assistantRepairman' + }, + { + title: '缁翠慨浜虹瀛楁椂闂�', + align: 'center', + dataIndex: 'repairmanSignatureTime' + }, + { + title: '缁翠慨瀹や富浠荤瀛�', + align: 'center', + dataIndex: 'repairManagerSignature_dictText' + }, + { + title: '缁翠慨瀹や富浠荤瀛楁椂闂�', + align: 'center', + dataIndex: 'repairManagerSignatureTime' + }, + { + title: '璁惧妫�鏌ヤ汉绛惧瓧', + align: 'center', + dataIndex: 'inspectorSignature_dictText' + }, + { + title: '璁惧妫�鏌ヤ汉绛惧瓧鏃堕棿', + align: 'center', + dataIndex: 'inspectorSignatureTime' + }, + { + title: '绉讳氦鍗旽F缂栫爜', + align: 'center', + dataIndex: 'hfCodeA' + }, + { + title: '楠屾敹鍗旽F缂栫爜', + align: 'center', + dataIndex: 'hfCodeB' } ], url: { list: '/eam/thirdMaintenanceOrder/list', abolish: '/eam/thirdMaintenanceOrder/abolish', - abolishBatch: '/eam/thirdMaintenanceOrder/abolishBatch', - collect: '/eam/thirdMaintenanceOrder/collect', - collectBatch: '/eam/thirdMaintenanceOrder/collectBatch' + collect: '/eam/thirdMaintenanceOrder/collect' } } }, @@ -274,7 +272,6 @@ dataIndex: 'action', align: 'center', fixed: 'right', - width: 200, scopedSlots: { customRender: 'action' } } this.columns = [...this.columns, operationColumn] @@ -282,130 +279,76 @@ }, computed: {}, methods: { - onMaintenanceDateChange: function(dateString) { + /** + * 鐐瑰嚮浣滃簾鏃惰Е鍙� + * @param id + */ + handlerAbolish(id) { + var that = this + this.loading = true + deleteAction(that.url.abolish, { id }) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 鐐瑰嚮棰嗗彇鏃惰Е鍙� + * @param id + */ + handlerCollect(id) { + let that = this + this.loading = true + getAction(that.url.collect, { id }) + .then((res) => { + if (res.success) { + that.$notification.success({ + message: '娑堟伅', + description: res.message + }) + that.loadData() + } else { + that.$notification.warning({ + message: '娑堟伅', + description: res.message + }) + that.loading = false + } + }) + }, + + /** + * 鐐瑰嚮璇︽儏鏃惰Е鍙� + * @param record + */ + handleDetail(record) { + this.selectThirdMaintenanceData = Object.assign({}, record) + this.$refs.thirdMaintenanceApprovalModal.title = '璇︽儏' + this.$refs.thirdMaintenanceApprovalModal.visible = true + this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true + this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) + }, + + onMaintenanceDateChange(dateString) { this.queryParam.maintenanceDateBegin = dateString[0] this.queryParam.maintenanceDateEnd = dateString[1] }, - handlerAbolish(id) { - var that = this - deleteAction(that.url.abolish, { id }) - .then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - }, - - handlerBatchAbolish() { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' - } - var that = this - this.$confirm({ - title: '纭浣滃簾', - content: '鏄惁浣滃簾閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲浣滃簾鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.abolishBatch, { ids }) - .then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .finally(() => { - that.loading = false - }) - } - }) - }, - - //鍗曚釜棰嗗彇 - handlerCollect(id) { - let that = this - getAction(that.url.collect, { id }) - .then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - }, - - //鎵归噺棰嗗彇 - handlerBatchCollect() { - var ids = '' - for (var a = 0; a < this.selectedRowKeys.length; a++) { - ids += this.selectedRowKeys[a] + ',' - } - var that = this - this.$confirm({ - title: '纭棰嗗彇', - content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.collectBatch, { ids }) - .then((res) => { - if (res.success) { - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }) - .finally(() => { - that.loading = false - }) - } - }) - }, - - handleDetail(record) { - this.selectThirdMaintenanceData = Object.assign({}, record) - this.$refs.thirdMaintenanceApprovalModal.recordDetail(record) - this.$refs.thirdMaintenanceApprovalModal.title = '璇︽儏' - this.$refs.thirdMaintenanceApprovalModal.disableSubmit = true - }, - handlePrint(record) { let href = `${window._CONFIG['domianURL']}/jmreport/view/1094880052100399104?id=` + record.id + // + `&orderId=` + record.id; //缃戠珯閾炬帴 window.open(href, '_blank') } } -- Gitblit v1.9.3