| | |
| | | <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-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="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设备ID"> |
| | | <a-input placeholder="请输入设备ID" v-model="queryParam.equipmentId"></a-input> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="设备编号"> |
| | | <lx-search-equipment-select placeholder="请输入设备编号或名称搜索" v-model="queryParam.equipmentId"></lx-search-equipment-select> |
| | | </a-form-item> |
| | | </a-col> |
| | | <template v-if="toggleSearchStatus"> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="点检日期"> |
| | | <j-date placeholder="请选择点检日期" v-model="queryParam.inspectionDate"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="点检时间"> |
| | | <j-date placeholder="请选择点检时间" v-model="queryParam.operateTime"></j-date> |
| | | </a-form-item> |
| | | </a-col> |
| | | </template> |
| | | <a-col :xl="6" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="计划点检日期"> |
| | | <a-range-picker v-model="queryParam.inspectionDateRange" @change="onInspectionDateChange" format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <a-form-item label="点检状态"> |
| | | <j-dict-select-tag placeholder="请选择点检状态" dict-code="inspection_status" v-model="queryParam.inspectionStatus" /> |
| | | </a-form-item> |
| | | </a-col> |
| | | <a-col :xl="4" :lg="7" :md="8" :sm="24"> |
| | | <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> |
| | | <a-button type="primary" @click="searchQuery" icon="search">查询</a-button> |
| | | <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | <a @click="handleToggleSearch" style="margin-left: 8px"> |
| | | {{ toggleSearchStatus ? '收起' : '展开' }} |
| | | <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> |
| | | </a> |
| | | <a-button type="info" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> |
| | | </span> |
| | | </a-col> |
| | | </a-row> |
| | |
| | | |
| | | <!-- 操作按钮区域 --> |
| | | <div class="table-operator" v-if="isDisplayOperation"> |
| | | <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> |
| | | <a-button @click="handleAdd" type="primary" icon="plus" v-if="isShowAuth('eam:inspection:add')">新增</a-button> |
| | | <a-dropdown v-if="selectedRowKeys.length > 0"> |
| | | <a-menu slot="overlay"> |
| | | <a-menu-item key="1" @click="batchZf(5)"> |
| | | <a-menu-item key="1" v-if="isShowAuth('eam:inspection:abolish')" @click="batchZf('ABOLISH')"> |
| | | <a-icon type="snippets"/> |
| | | 作废 |
| | | </a-menu-item> |
| | | <a-menu-item key="2" @click="batchLq(2)"> |
| | | <a-menu-item key="2" v-if="isShowAuth('eam:inspection:collect')" @click="batchLq('UNDER_INSPECTION')"> |
| | | <a-icon type="form"/> |
| | | 领取 |
| | | </a-menu-item> |
| | |
| | | class="j-table-force-nowrap" |
| | | @change="handleTableChange"> |
| | | |
| | | <template slot="htmlSlot" slot-scope="text"> |
| | | <div v-html="text"></div> |
| | | </template> |
| | | <template slot="imgSlot" slot-scope="text,record"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> |
| | | <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" |
| | | style="max-width:80px;font-size: 12px;font-style: italic;"/> |
| | | </template> |
| | | <template slot="fileSlot" slot-scope="text"> |
| | | <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> |
| | | <a-button |
| | | v-else |
| | | :ghost="true" |
| | | type="primary" |
| | | icon="download" |
| | | size="small" |
| | | @click="downloadFile(text)"> |
| | | 下载 |
| | | </a-button> |
| | | </template> |
| | | |
| | | <span slot="action" slot-scope="text, record"> |
| | | <template v-if="record.inspectionStatus === '1'"> |
| | | <a @click="handleEdit(record)">编辑</a> |
| | | <a @click="handleEdit(record)" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" >编辑</a> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:inspection:edit') && record.inspectionStatus === 'WAIT_INSPECTION'" /> |
| | | |
| | | <a-popconfirm title="确定领取吗?" |
| | | <a-popconfirm title="确定领取吗?" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" |
| | | @confirm="() => handleInspection(record.id)"> |
| | | <a>领取</a> |
| | | </a-popconfirm> |
| | | |
| | | <a-divider type="vertical"/> |
| | | <a-divider type="vertical" v-if="isShowAuth('eam:inspection:collect') && record.inspectionStatus === 'WAIT_INSPECTION'" /> |
| | | |
| | | <a-dropdown> |
| | | <a class="ant-dropdown-link">更多 <a-icon type="down"/></a> |
| | |
| | | <a-menu-item> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item> |
| | | <a-menu-item v-if="isShowAuth('eam:inspection:abolish') && record.inspectionStatus === 'WAIT_INSPECTION'"> |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handleOrReceive(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | | </a-menu> |
| | | </a-dropdown> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </template> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | |
| | | <eam-inspection-order-modal ref="modalForm" @ok="modalFormOk"></eam-inspection-order-modal> |
| | | <EamInspectionOrderModalXq ref="modalFormXq" @ok="modalFormOk"></EamInspectionOrderModalXq> |
| | | |
| | | <inspection-order-handle ref="modalFormXq" :selectShenpiData="selectInspectionOrderXqData"/> |
| | | </a-card> |
| | | </template> |
| | | |
| | |
| | | import { mixinDevice } from '@/utils/mixin' |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import EamInspectionOrderModal from './modules/EamInspectionOrderModal' |
| | | import EamInspectionOrderModalXq from './modules/EamInspectionOrderModalXq.vue' |
| | | import { deleteAction, getAction } from '@api/manage' |
| | | import InspectionOrderHandle from '../../flowable/workflow/InspectionOrder/InspectionOrderHandle' |
| | | import LxSearchEquipmentSelect from '@views/eam/equipment/modules/LxSearchEquipmentSelect.vue' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins: [JeecgListMixin, mixinDevice], |
| | | components: { |
| | | InspectionOrderHandle, |
| | | EamInspectionOrderModal, |
| | | EamInspectionOrderModalXq |
| | | LxSearchEquipmentSelect, |
| | | }, |
| | | props: { |
| | | isDisplayOperation: { |
| | |
| | | { |
| | | title: '设备编号', |
| | | align: 'center', |
| | | dataIndex: 'equipmentId_dictText' |
| | | dataIndex: 'equipmentCode' |
| | | }, |
| | | { |
| | | title: '标准编码', |
| | | title: '设备名称', |
| | | align: 'center', |
| | | dataIndex: 'equipmentName' |
| | | }, |
| | | { |
| | | title: '安装位置', |
| | | align: 'center', |
| | | dataIndex: 'installationPosition' |
| | | }, |
| | | { |
| | | title: '标准名称', |
| | | align: 'center', |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | |
| | | } |
| | | }, |
| | | { |
| | | title: '点检过期时间', |
| | | title: '点检过期日期', |
| | | align: 'center', |
| | | dataIndex: 'expirationTime', |
| | | customRender: function(text) { |
| | |
| | | dataIndex: 'inspectionStatus_dictText' |
| | | }, |
| | | { |
| | | title: '点检时间', |
| | | align: 'center', |
| | | dataIndex: 'operateTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: '点检人', |
| | | align: 'center', |
| | | dataIndex: 'operator_dictText' |
| | | }, |
| | | { |
| | | title: '点检时间', |
| | | align: 'center', |
| | | dataIndex: 'operateTime', |
| | | }, |
| | | { |
| | | title: '班组长确认', |
| | | align: 'center', |
| | | dataIndex: 'confirmUser' |
| | | dataIndex: 'confirmUser_dictText' |
| | | }, |
| | | { |
| | | title: '确认时间', |
| | | align: 'center', |
| | | dataIndex: 'confirmTime', |
| | | customRender: function(text) { |
| | | return !text ? '' : (text.length > 10 ? text.substr(0, 10) : text) |
| | | } |
| | | }, |
| | | { |
| | | title: '确认意见', |
| | | align: 'center', |
| | | dataIndex: 'confirmComment', |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/eam/eamInspectionOrder/list', |
| | | cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", |
| | | cancelInspectionOrder: '/eam/eamInspectionOrder/cancelInspectionOrder', |
| | | deleteBatch: '/eam/eamInspectionOrder/deleteBatch', |
| | | exportXlsUrl: '/eam/eamInspectionOrder/exportXls', |
| | | importExcelUrl: 'eam/eamInspectionOrder/importExcel', |
| | |
| | | cancelOrReceive: 'eam/eamInspectionOrder/cancelOrReceive' |
| | | }, |
| | | dictOptions: {}, |
| | | superFieldList: [] |
| | | superFieldList: [], |
| | | selectInspectionOrderXqData: {} |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 147, |
| | | width: 200, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | this.columns = [...this.columns, operationColumn] |
| | |
| | | }, |
| | | //详情 |
| | | handleDetail: function(record) { |
| | | this.$refs.modalFormXq.edit(record) |
| | | this.selectInspectionOrderXqData = Object.assign({}, record) |
| | | 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 }) |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleOrReceive(id){ |
| | | handleOrReceive(id) { |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error("请设置url.cancelInspectionOrder!") |
| | | this.$message.error('请设置url.cancelInspectionOrder!') |
| | | return |
| | | } |
| | | var that = this; |
| | | var that = this |
| | | getAction(that.url.cancelInspectionOrder, { id: id }).then((res) => { |
| | | if (res.success) { |
| | | that.$notification.success({ |
| | | message: '消息', |
| | | description: res.message |
| | | }); |
| | | that.loadData(); |
| | | }) |
| | | that.loadData() |
| | | } else { |
| | | // that.$message.warning(res.message); |
| | | that.$notification.warning({ |
| | | message: '消息', |
| | | description: res.message |
| | | }); |
| | | }) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | batchZf(type) { |
| | | if (this.selectedRowKeys.length <= 0) { |
| | |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | onInspectionDateChange: function(value, dateString) { |
| | | this.queryParam.inspectionDateBegin = dateString[0] |
| | | this.queryParam.inspectionDateEnd = dateString[1] |
| | | }, |
| | | } |
| | | } |
| | | </script> |