| | |
| | | <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"> |
| | |
| | | </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> |
| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <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 --> |
| | | |
| | | <!-- 表单区域 --> |
| | |
| | | dataIndex: 'actualEndTime' |
| | | }, |
| | | { |
| | | title: '保养人', |
| | | title: '维修人', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验人', |
| | | align: 'center', |
| | | dataIndex: 'precisionChecker_dictText' |
| | | }, |
| | | { |
| | | title: '精度检验时间', |
| | | align: 'center', |
| | | dataIndex: 'precisionCheckTime' |
| | | dataIndex: 'repairman_dictText' |
| | | }, |
| | | { |
| | | title: '保养状态', |
| | |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title: '机动办确认', |
| | | title: '设备功能是否齐备', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser_dictText' |
| | | dataIndex: 'fullyFunctional_dictText' |
| | | }, |
| | | { |
| | | title: '机动办确认时间', |
| | | title: '设备能否正常运转', |
| | | 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: '移交单HF编码', |
| | | align: 'center', |
| | | dataIndex: 'hfCodeA' |
| | | }, |
| | | { |
| | | title: '验收单HF编码', |
| | | 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' |
| | | } |
| | | } |
| | | }, |
| | |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | |
| | | }, |
| | | 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') |
| | | } |
| | | } |