| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <!-- 查询区域 --> |
| | | <div |
| | | class="table-page-search-wrapper" |
| | | v-if="isDisplayOperation" |
| | | > |
| | | <a-form |
| | | layout="inline" |
| | | @keyup.enter.native="searchQuery" |
| | | > |
| | | <div class="table-page-search-wrapper" v-if="isDisplayOperation"> |
| | | <a-form layout="inline" @keyup.enter.native="searchQuery"> |
| | | <a-row :gutter="24"> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="工单号"> |
| | | <a-input |
| | | placeholder="请输入工单号" |
| | | v-model="queryParam.orderNum" |
| | | ></a-input> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="5" :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="6" :lg="7" :md="8" :sm="24"> |
| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button v-has="'eam:inspection:add'" @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button v-if="selectedRowKeys.length == 1" @click="handlePrint" type="primary">查看</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchZf('ABOLISH')"> |
| | | <a-menu-item key="1" @click="batchZf('ABOLISH')" v-has="'eam:inspection:abolish'"> |
| | | <a-icon type="snippets"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')"> |
| | | <a-menu-item key="2" @click="batchLq('UNDER_INSPECTION')" v-has="'eam:inspection:collect'"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | |
| | | <a-menu-item> |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handleAbolish(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | | |
| | | <a v-else @click="handleDetail(record)">详情</a> |
| | | <template v-else> |
| | | <template v-if="record.inspectionStatus=='COMPLETE'"> |
| | | <a @click="handlePrint(record)">预览</a> |
| | | <a-divider type="vertical"/> |
| | | </template> |
| | | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | import LxSearchEquipmentSelect from '../equipment/modules/LxSearchEquipmentSelect' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | LxSearchEquipmentSelect, |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | LxSearchEquipmentSelect |
| | | EamInspectionOrderModal |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | description: 'eam_inspection_order管理页面', |
| | | description: '点检工单页面', |
| | | disableMixinCreated: true, |
| | | // 表头 |
| | | columns: [ |
| | |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '统一编码', |
| | | align: 'center', |
| | | dataIndex: 'equipmentCode' |
| | | dataIndex: 'equipmentCode', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | dataIndex: 'equipmentName', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '设备型号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentModel' |
| | | dataIndex: 'equipmentModel', |
| | | fixed: 'left' |
| | | }, |
| | | { |
| | | title: '工单号', |
| | |
| | | dataIndex: 'inspectionDate', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '点检过期日期', |
| | |
| | | dataIndex: 'expirationTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '创建方式', |
| | |
| | | { |
| | | title: '点检时间', |
| | | align: 'center', |
| | | dataIndex: 'operateTime' |
| | | dataIndex: 'operateTime', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '维修工', |
| | |
| | | { |
| | | title: '确认时间', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime' |
| | | dataIndex: 'confirmTime', |
| | | width: 150 |
| | | }, |
| | | { |
| | | title: '确认意见', |
| | | title: 'HF编码', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment' |
| | | dataIndex: 'hfCode', |
| | | width: 250 |
| | | } |
| | | ], |
| | | url: { |
| | |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | scopedSlots: { customRender: 'action' }, |
| | | fixed: 'right' |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | | this.loadData(1) |
| | |
| | | this.$refs.modalFormXq.visible = true |
| | | this.$refs.modalFormXq.title = '详情' |
| | | this.$refs.modalFormXq.disableSubmit = true |
| | | this.$refs.modalFormXq.getAllApproveData(record) |
| | | this.$refs.modalFormXq.getBasicInformation({ ...record, dataId: record.id }) |
| | | this.$refs.modalFormXq.handleDetail(record) |
| | | }, |
| | | |
| | | handleInspection(id) { |
| | |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | |
| | | |
| | | handleAbolish(id) { |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | this.loading = true |
| | | getAction(that.url.cancelInspectionOrder, { id }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }) |
| | | this.loading = false |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | batchZf(type) { |
| | | 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 |
| | | getAction(that.url.cancelOrReceive, { ids, type }).then((res) => { |
| | | if (res.success) { |
| | | 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 |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择一条记录' |
| | | }) |
| | | } 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 |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | if (res.success) { |
| | | 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 |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | batchLq(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | | this.$notification.warning({ |
| | | message: '消息', |
| | | description: '请选择一条记录' |
| | | }) |
| | | } 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 |
| | | getAction(that.url.cancelOrReceive, { ids: ids, type: type }).then((res) => { |
| | | 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 |
| | | getAction(that.url.cancelOrReceive, { ids, type }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | |
| | | description: res.message |
| | | }) |
| | | } |
| | | }).finally(() => { |
| | | }) |
| | | .finally(() => { |
| | | that.loading = false |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | handlePrint(record) { |
| | | let href = `${window._CONFIG['domianURL']}/jmreport/view/1105664887569121280?equipmentCode=` + record.equipmentCode |
| | | window.open(href, '_blank') |
| | | }, |
| | | |
| | | onInspectionDateChange: function(value, dateString) { |
| | | this.queryParam.inspectionDateBegin = dateString[0] |
| | | this.queryParam.inspectionDateEnd = dateString[1] |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | | </script> |