From 5ec150affc0fc777b2a645a888d377f65501e08b Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 05 九月 2025 10:06:25 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue | 173 +++++++++++++++++++++++++-------------------------------- 1 files changed, 75 insertions(+), 98 deletions(-) diff --git a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue index e5a267a..f96349d 100644 --- a/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue +++ b/src/views/eam/maintenance/EamSecondMaintenanceOrderList.vue @@ -41,21 +41,20 @@ <a-button v-has="'secondMaintenanceOrder:add'" @click="handleAdd" type="primary" icon="plus">鏂板</a-button> <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchAdd" type="primary" icon="plus">鎵归噺鏂板 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchAbolish'" @click="handlerBatchAbolish" type="primary" - icon="delete" :disabled="selectedRowKeys.length===0"> - 鎵归噺浣滃簾 - </a-button> + <a-button v-has="'secondMaintenanceOrder:batchCollect'" @click="handlerBatchCollect" type="primary" icon="form" :disabled="selectedRowKeys.length===0"> 鎵归噺棰嗗彇 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchRestore'" @click="handlerBatchRestore" type="primary" - :disabled="selectedRowKeys.length===0" - icon="reload"> - 鎵归噺杩樺師 + <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">鎵归噺棰勮 </a-button> - <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchPrint" type="primary" icon="monitor" - :disabled="selectedRowKeys.length===0">鎵归噺棰勮 + <a-button v-has="'secondMaintenanceOrder:batchAbolish'" @click="handlerBatchAbolish" type="danger" + icon="delete" :disabled="selectedRowKeys.length===0"> + 鎵归噺浣滃簾 + </a-button> + <a-button v-has="'secondMaintenanceOrder:batchRestore'" @click="handlerBatchRestore" + :disabled="selectedRowKeys.length===0" icon="reload"> + 鎵归噺杩樺師 </a-button> <!-- <a-dropdown v-if="selectedRowKeys.length > 0"> <a-menu slot="overlay"> @@ -94,6 +93,12 @@ <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource" :pagination="ipagination" :loading="loading" class="j-table-force-nowrap" :scroll="{x:'max-content'}" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> + + <!--浣跨敤閮ㄩ棬--> + <template slot="factoryOrgCode" slot-scope="text,record"> + {{[record.zxfactoryOrgCode_dictText].filter(item=>item).join('/')}} + </template> + <span slot="action" slot-scope="text, record"> <template v-if="record.maintenanceStatus === 'WAIT_MAINTENANCE'"> <a v-has="'secondMaintenanceOrder:edit'" @click="handleEdit(record)">缂栬緫</a> @@ -218,6 +223,12 @@ title: '璁惧鍨嬪彿', align: 'center', dataIndex: 'equipmentModel', + fixed: 'left' + }, + { + title: '浣跨敤閮ㄩ棬', + align: 'center', + scopedSlots: { customRender: 'factoryOrgCode' }, fixed: 'left' }, { @@ -446,102 +457,68 @@ //鎵归噺杩樺師 handlerBatchRestore() { - if (!this.url.restoreBatch) { - this.$message.error('璇疯缃畊rl.restoreBatch灞炴��!') - return + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - return - } else { - 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.restoreBatch, { ids: 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 + }) } - var that = this - this.$confirm({ - title: '纭杩樺師', - content: '鏄惁杩樺師閫変腑鏁版嵁锛屽彧鏈変綔搴熺姸鎬佺殑鏁版嵁鎵嶅彲杩樺師鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.restoreBatch, { ids: ids }).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } + }) }, //鎵归噺棰嗗彇 handlerBatchCollect() { - if (!this.url.collectBatch) { - this.$message.error('璇疯缃畊rl.abolishBatch灞炴��!') - return + var ids = '' + for (var a = 0; a < this.selectedRowKeys.length; a++) { + ids += this.selectedRowKeys[a] + ',' } - if (this.selectedRowKeys.length <= 0) { - // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); - this.$notification.warning({ - message: '娑堟伅', - description: '璇烽�夋嫨涓�鏉¤褰�' - }) - return - } else { - 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: 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 + }) } - var that = this - this.$confirm({ - title: '纭棰嗗彇', - content: '鏄惁棰嗗彇閫変腑鏁版嵁锛屽彧鏈夊緟淇濆吇鐘舵�佺殑鏁版嵁鎵嶅彲棰嗗彇鎴愬姛?', - onOk: function() { - that.loading = true - deleteAction(that.url.collectBatch, { ids: ids }).then((res) => { - if (res.success) { - //閲嶆柊璁$畻鍒嗛〉闂 - that.reCalculatePage(that.selectedRowKeys.length) - // that.$message.success(res.message); - that.$notification.success({ - message: '娑堟伅', - description: res.message - }) - that.loadData() - that.onClearSelected() - } else { - // that.$message.warning(res.message); - that.$notification.warning({ - message: '娑堟伅', - description: res.message - }) - } - }).finally(() => { - that.loading = false - }) - } - }) - } + }) }, // 鎵归噺鎵撳嵃 -- Gitblit v1.9.3