| | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <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-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchAbolish'" key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchCollect'" key="2" @click="handlerBatchCollect"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchRestore'" key="3" @click="handlerBatchRestore"> |
| | | <a-icon type="reload"/> |
| | | 还原 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown> |
| | | <a-button v-has="'secondMaintenanceOrder:batchAdd'" @click="handleBatchAdd" type="primary" icon="plus">批量新增 |
| | | </a-button> |
| | | |
| | | <a-button v-has="'secondMaintenanceOrder:batchCollect'" @click="handlerBatchCollect" type="primary" icon="form" |
| | | :disabled="selectedRowKeys.length===0"> |
| | | 批量领取 |
| | | </a-button> |
| | | <a-button @click="handleBatchPrint" type="primary" icon="monitor" :disabled="selectedRowKeys.length===0">批量预览 |
| | | </a-button> |
| | | <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"> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchAbolish'" key="1" @click="handlerBatchAbolish"> |
| | | <a-icon type="delete"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchCollect'" key="2" @click="handlerBatchCollect"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | | <a-menu-item v-has="'secondMaintenanceOrder:batchRestore'" key="3" @click="handlerBatchRestore"> |
| | | <a-icon type="reload"/> |
| | | 还原 |
| | | </a-menu-item> |
| | | <a-menu-item key="4" @click="handleBatchPrint"> |
| | | <a-icon type="monitor"/> |
| | | 预览 |
| | | </a-menu-item> |
| | | </a-menu> |
| | | <a-button style="margin-left: 8px"> 批量操作 |
| | | <a-icon type="down"/> |
| | | </a-button> |
| | | </a-dropdown>--> |
| | | </div> |
| | | |
| | | |
| | |
| | | |
| | | <a-divider v-has="'secondMaintenanceOrder:edit'" type="vertical"/> |
| | | |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:collect'" title="确定领取吗?" @confirm="() => handlerCollect(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:collect'" title="确定领取吗?" |
| | | @confirm="() => handlerCollect(record.id)"> |
| | | <a>领取</a> |
| | | </a-popconfirm> |
| | | |
| | |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:abolish'" title="确定作废吗?" @confirm="() => handlerAbolish(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:abolish'" title="确定作废吗?" |
| | | @confirm="() => handlerAbolish(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | |
| | | |
| | | <a-divider v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" type="vertical"/> |
| | | <a-divider v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" |
| | | type="vertical"/> |
| | | |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" title="确定还原吗?" @confirm="() => handlerRestore(record.id)"> |
| | | <a-popconfirm v-has="'secondMaintenanceOrder:restore'" v-if="record.maintenanceStatus === 'ABOLISH'" |
| | | title="确定还原吗?" @confirm="() => handlerRestore(record.id)"> |
| | | <a>还原</a> |
| | | </a-popconfirm> |
| | | |
| | | <!-- <a-divider v-has="'secondMaintenanceOrder:print'" type="vertical" v-if="record.maintenanceStatus === 'COMPLETE'"/>--> |
| | | <!-- <a v-has="'secondMaintenanceOrder:print'" v-if="record.maintenanceStatus === 'COMPLETE'" @click="handlePrint(record)">打印</a>--> |
| | | <a-divider type="vertical"/> |
| | | <a @click="handlePrint(record)">预览</a> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | |
| | | <!-- 表单区域 --> |
| | | <eamSecondMaintenanceOrder-modal ref="modalForm" @ok="modalFormOk"/> |
| | | |
| | | <!--批量新增--> |
| | | <eam-second-maintenance-batch-order-modal ref="batchModalForm" @ok="modalFormOk"/> |
| | | |
| | | <!--审批弹窗--> |
| | | <second-maintenance-approval-modal ref="secondMaintenanceApprovalModal" |
| | | :selectShenpiData="selectSecondMaintenanceData"/> |
| | | |
| | | <!--批量打印弹窗--> |
| | | <eam-second-maintenance-order-batch-print-modal ref="batchPrintModal"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | from '@views/flowable/workflow/secondMaintenance/SecondMaintenanceApprovalModal.vue' |
| | | import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' |
| | | import EamSecondMaintenanceBatchOrderModal from './modules/EamSecondMaintenanceBatchOrderModal' |
| | | import EamSecondMaintenanceOrderBatchPrintModal from './modules/EamSecondMaintenanceOrderBatchPrintModal' |
| | | |
| | | export default { |
| | | name: 'EamSecondMaintenanceOrderList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | EamSecondMaintenanceOrderBatchPrintModal, |
| | | EamSecondMaintenanceBatchOrderModal, |
| | | LxSearchEquipmentSelect, |
| | | EamSecondMaintenanceOrderModal, |
| | |
| | | methods: { |
| | | handleBatchAdd() { |
| | | this.$refs.batchModalForm.title = '批量新增' |
| | | this.$refs.batchModalForm.visible = true |
| | | this.$refs.batchModalForm.add() |
| | | }, |
| | | |
| | | /** |
| | |
| | | * @param record 列表行记录 |
| | | */ |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1094834721929232384?id=` + record.id //网站链接 |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1110733537193545728?id=` + record.id //网站链接 |
| | | window.open(href, '_blank') |
| | | }, |
| | | |
| | | handlerAbolish(id) { |
| | | var that = this |
| | | deleteAction(that.url.abolish, { id }) |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //还原 |
| | | handlerRestore(id) { |
| | | let that = this |
| | |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | //批量还原 |
| | | handlerBatchRestore() { |
| | | if (!this.url.restoreBatch) { |
| | | this.$message.error('请设置url.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('请设置url.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 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 批量打印 |
| | | handleBatchPrint() { |
| | | this.$refs.batchPrintModal.handlePreview(this.selectedRowKeys.join()) |
| | | }, |
| | | |
| | | onMaintenanceDateChange: function(dataArray) { |