| | |
| | | <a @click="handleDetail(record)">详情</a> |
| | | </a-menu-item> |
| | | <a-menu-item v-if="record.inspectionStatus === '1'" > |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handleDelete(record.id)"> |
| | | <a-popconfirm title="确定作废吗?" @confirm="() => handleOrReceive(record.id)"> |
| | | <a>作废</a> |
| | | </a-popconfirm> |
| | | </a-menu-item> |
| | |
| | | |
| | | <script> |
| | | |
| | | import '@/assets/less/TableExpand.less' |
| | | 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 '@/assets/less/TableExpand.less' |
| | | 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' |
| | | |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | EamInspectionOrderModal, |
| | | EamInspectionOrderModalXq |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'eam_inspection_order管理页面', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | }, |
| | | { |
| | | title:'工单号', |
| | | align:"center", |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title:'设备编号', |
| | | align:"center", |
| | | dataIndex: 'equipmentId_dictText' |
| | | }, |
| | | { |
| | | title:'标准编码', |
| | | align:"center", |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title:'点检日期', |
| | | align:"center", |
| | | dataIndex: 'inspectionDate', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'点检过期时间', |
| | | align:"center", |
| | | dataIndex: 'expirationTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'创建方式', |
| | | align:"center", |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title:'点检状态', |
| | | align:"center", |
| | | 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: 'confirmUser' |
| | | }, |
| | | { |
| | | title:'确认时间', |
| | | align:"center", |
| | | dataIndex: 'confirmTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | export default { |
| | | name: 'EamInspectionOrderList', |
| | | mixins:[JeecgListMixin, mixinDevice], |
| | | components: { |
| | | EamInspectionOrderModal, |
| | | EamInspectionOrderModalXq |
| | | }, |
| | | data () { |
| | | return { |
| | | description: 'eam_inspection_order管理页面', |
| | | // 表头 |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key:'rowIndex', |
| | | width:60, |
| | | align:"center", |
| | | customRender:function (t,r,index) { |
| | | return parseInt(index)+1; |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamInspectionOrder/list", |
| | | delete: "/eam/eamInspectionOrder/cancelInspectionOrder", |
| | | deleteBatch: "/eam/eamInspectionOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/eamInspectionOrder/exportXls", |
| | | importExcelUrl: "eam/eamInspectionOrder/importExcel", |
| | | receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder", |
| | | cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive" |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | { |
| | | title:'工单号', |
| | | align:"center", |
| | | dataIndex: 'orderNum' |
| | | }, |
| | | { |
| | | title:'设备编号', |
| | | align:"center", |
| | | dataIndex: 'equipmentId_dictText' |
| | | }, |
| | | { |
| | | title:'标准编码', |
| | | align:"center", |
| | | dataIndex: 'standardId_dictText' |
| | | }, |
| | | { |
| | | title:'点检日期', |
| | | align:"center", |
| | | dataIndex: 'inspectionDate', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'点检过期时间', |
| | | align:"center", |
| | | dataIndex: 'expirationTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title:'创建方式', |
| | | align:"center", |
| | | dataIndex: 'creationMethod_dictText' |
| | | }, |
| | | { |
| | | title:'点检状态', |
| | | align:"center", |
| | | 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: 'confirmUser' |
| | | }, |
| | | { |
| | | title:'确认时间', |
| | | align:"center", |
| | | dataIndex: 'confirmTime', |
| | | customRender:function (text) { |
| | | return !text?"":(text.length>10?text.substr(0,10):text) |
| | | } |
| | | }, |
| | | { |
| | | title: '操作', |
| | | dataIndex: 'action', |
| | | align:"center", |
| | | fixed:"right", |
| | | width:147, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/eam/eamInspectionOrder/list", |
| | | cancelInspectionOrder: "/eam/eamInspectionOrder/cancelInspectionOrder", |
| | | deleteBatch: "/eam/eamInspectionOrder/deleteBatch", |
| | | exportXlsUrl: "/eam/eamInspectionOrder/exportXls", |
| | | importExcelUrl: "eam/eamInspectionOrder/importExcel", |
| | | receiveInspectionOrder : "eam/eamInspectionOrder/receiveInspectionOrder", |
| | | cancelOrReceive: "eam/eamInspectionOrder/cancelOrReceive" |
| | | }, |
| | | dictOptions:{}, |
| | | superFieldList:[], |
| | | } |
| | | }, |
| | | created() { |
| | | this.getSuperFieldList(); |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | computed: { |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | methods: { |
| | | initDictConfig(){ |
| | | }, |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'orderNum',text:'工单号',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentId',text:'设备ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'standardId',text:'标准ID',dictCode:''}) |
| | | fieldList.push({type:'date',value:'inspectionDate',text:'点检日期'}) |
| | | fieldList.push({type:'date',value:'operateTime',text:'点检时间'}) |
| | | fieldList.push({type:'string',value:'operator',text:'点检人',dictCode:''}) |
| | | fieldList.push({type:'date',value:'expirationTime',text:'点检过期时间'}) |
| | | fieldList.push({type:'string',value:'creationMethod',text:'创建方式',dictCode:''}) |
| | | fieldList.push({type:'string',value:'inspectionStatus',text:'点检状态',dictCode:''}) |
| | | fieldList.push({type:'string',value:'confirmUser',text:'设备管理员确认',dictCode:''}) |
| | | fieldList.push({type:'date',value:'confirmTime',text:'确认时间'}) |
| | | fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''}) |
| | | fieldList.push({type:'string',value:'imageFiles',text:'照片文件ids;id以逗号分隔',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | }, |
| | | //详情 |
| | | handleDetail: function(record) { |
| | | this.$refs.modalFormXq.edit(record); |
| | | this.$refs.modalFormXq.title = "详情"; |
| | | this.$refs.modalFormXq.disableSubmit = true; |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | | this.$message.error("请设置url.receiveInspectionOrder!") |
| | | return |
| | | getSuperFieldList(){ |
| | | let fieldList=[]; |
| | | fieldList.push({type:'string',value:'orderNum',text:'工单号',dictCode:''}) |
| | | fieldList.push({type:'string',value:'equipmentId',text:'设备ID',dictCode:''}) |
| | | fieldList.push({type:'string',value:'standardId',text:'标准ID',dictCode:''}) |
| | | fieldList.push({type:'date',value:'inspectionDate',text:'点检日期'}) |
| | | fieldList.push({type:'date',value:'operateTime',text:'点检时间'}) |
| | | fieldList.push({type:'string',value:'operator',text:'点检人',dictCode:''}) |
| | | fieldList.push({type:'date',value:'expirationTime',text:'点检过期时间'}) |
| | | fieldList.push({type:'string',value:'creationMethod',text:'创建方式',dictCode:''}) |
| | | fieldList.push({type:'string',value:'inspectionStatus',text:'点检状态',dictCode:''}) |
| | | fieldList.push({type:'string',value:'confirmUser',text:'设备管理员确认',dictCode:''}) |
| | | fieldList.push({type:'date',value:'confirmTime',text:'确认时间'}) |
| | | fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''}) |
| | | fieldList.push({type:'string',value:'imageFiles',text:'照片文件ids;id以逗号分隔',dictCode:''}) |
| | | this.superFieldList = fieldList |
| | | }, |
| | | //详情 |
| | | handleDetail: function(record) { |
| | | this.$refs.modalFormXq.edit(record); |
| | | this.$refs.modalFormXq.title = "详情"; |
| | | this.$refs.modalFormXq.disableSubmit = true; |
| | | }, |
| | | handleInspection(id) { |
| | | if (!this.url.receiveInspectionOrder) { |
| | | this.$message.error("请设置url.receiveInspectionOrder!") |
| | | return |
| | | } |
| | | var that = this; |
| | | getAction(that.url.receiveInspectionOrder, { 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 |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | handleOrReceive(id){ |
| | | if (!this.url.cancelInspectionOrder) { |
| | | this.$message.error("请设置url.cancelInspectionOrder!") |
| | | return |
| | | } |
| | | 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 |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | 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; |
| | | getAction(that.url.receiveInspectionOrder, { 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.$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; |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | 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] + ","; |
| | | } |
| | | }, |
| | | 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) => { |
| | | 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; |
| | | }); |
| | | } |
| | | 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; |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | @import '~@assets/less/common.less'; |
| | | @import '~@assets/less/common.less'; |
| | | </style> |
| | |
| | | }, |
| | | maintenanceCategory: 'POINT_INSPECTION', |
| | | standardId:"", |
| | | standardType:false, |
| | | detail: { |
| | | loading: false, |
| | | dataSource: [], |
| | |
| | | this.detail.dataSource = []; |
| | | this.visible = true |
| | | this.editable = false |
| | | this.standardType=false; |
| | | }, |
| | | edit(record) { |
| | | console.log(record) |
| | | this.model = Object.assign({}, record) |
| | | this.standardId=record.standardId |
| | | this.standardType=true; |
| | | this.visible = true |
| | | this.editable = true |
| | | this.detail.dataSource = [] |
| | |
| | | this.model.standardName = selectObj.standardName |
| | | this.model.maintenancePeriod=selectObj.maintenancePeriod |
| | | this.model.standardCode=selectObj.standardCode |
| | | if (this.standardId===undefined || this.standardId==="") { |
| | | if (!this.standardType) { |
| | | this.standardId=selectObj.id |
| | | this.loadDetail(selectObj.id) |
| | | } |
| | |
| | | getAction(this.url.detail, { standardId: standardId }).then(res => { |
| | | if (res.success) { |
| | | this.detail.dataSource = [...res.result] |
| | | this.standardId=undefined; |
| | | this.standardType=false; |
| | | } |
| | | }) |
| | | } |