From 336dcb70c156c947530eab0f0a96ee17de477929 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 12 七月 2024 18:04:33 +0800 Subject: [PATCH] 设备管理修改 --- src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue | 511 ++++ src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue | 18 src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue | 178 + src/views/eam/EquipmentListOfTester.vue | 85 src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue | 14 src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue | 449 ++++ src/views/eam/EquipmentListOfProduct.vue | 81 src/views/eam/EquipmentListOfTruck.vue | 70 src/views/eam/EquipmentListOfEnvProEquipment.vue | 75 src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue | 242 + src/views/eam/EquipmentListOfCrane.vue | 87 src/views/eam/EquipmentListOfAll.vue | 131 src/views/eam/FaultCauseChart.vue | 188 + src/views/eam/MTBF.vue | 163 + src/views/eam/modules/malfunctionRepair/EquipmentList.vue | 5 src/views/eam/modules/equipmentNew/EquipmentModal.vue | 7 src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue | 5 src/views/eam/RepairStandardList.vue | 46 src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue | 4 src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue | 4 src/views/eam/MalfunctionRepair.vue | 36 src/views/system/DictList.vue | 358 +- src/views/eam/EquipmentListOfFilesCarousel.vue | 75 src/views/eam/EquipmentListOfPressureVessel.vue | 81 src/views/eam/OperationCertificateList.vue | 47 src/views/eam/modules/operationCertificate/OperationCertificateModal.vue | 12 src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue | 316 ++ src/views/eam/RepairOrderList.vue | 116 src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue | 2 src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue | 103 src/views/spare/SpartPartRequirement.vue | 505 ++++ src/views/eam/OperationCertificateApplyList.vue | 132 src/views/eam/modules/operationCertificate/OperationCertificateForm.vue | 172 + src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue | 15 src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue | 18 src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue | 218 ++ src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue | 5 src/views/spare/modules/spartPartRequirement/EquipmentList.vue | 314 ++ src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue | 2 src/views/eam/EquipmentListOfRide.vue | 85 src/views/eam/EquipmentListOfWeldingMachine.vue | 81 src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue | 100 src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue | 183 + src/views/eam/EquipmentListOfMetrological.vue | 65 src/views/eam/modules/repairStandard/RepairStandardRight.vue | 388 +++ src/views/eam/modules/repairStandard/RepairStandardModel.vue | 322 +++ src/views/eam/modules/equipment/EquipmentModel.vue | 4 src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue | 264 + 48 files changed, 5,432 insertions(+), 950 deletions(-) diff --git a/src/views/eam/EquipmentListOfAll.vue b/src/views/eam/EquipmentListOfAll.vue index be76304..a434b3e 100644 --- a/src/views/eam/EquipmentListOfAll.vue +++ b/src/views/eam/EquipmentListOfAll.vue @@ -115,12 +115,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -131,12 +136,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -326,6 +336,11 @@ icon="calendar" v-has="'equipmentAccount:add&delete&import&Edit'" >璁剧疆鍏抽敭璁惧鏍囪瘑</a-button> + <a-button + type="primary" + @click="handleDownload" + icon="download" + >妯$増涓嬭浇</a-button> </div> <!-- table鍖哄煙-begin --> <div> @@ -354,14 +369,15 @@ :customRow="clickThenSelect" @change="handleTableChange" > -<!-- 鐐瑰嚮鎶�鏈姸鎬佸垪锛岃烦杞埌鎶�鏈姸鎬侀壌瀹氶〉闈� --> + <!-- 鐐瑰嚮鎶�鏈姸鎬佸垪锛岃烦杞埌鎶�鏈姸鎬侀壌瀹氶〉闈� --> <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -491,6 +507,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -655,8 +691,9 @@ import { JeecgListMixin } from '@/mixins/JeecgListMixin' import { mixinDevice } from '@/utils/mixin' +import JEllipsis from '@/components/jeecg/JEllipsis' import EquipmentModal from './modules/equipmentNew/EquipmentModal' -import { getAction } from '@/api/manage' +import { getAction, downFile } from '@/api/manage' import EquipmentProcessParametersList from './modules/equipmentNew/EquipmentProcessParametersList' import EquipmentDocumentList from './modules/equipmentNew/EquipmentDocumentList' import EquipmentPrecisionParametersList from './modules/equipmentNew/EquipmentPrecisionParametersList' @@ -702,6 +739,7 @@ SecondMaintenanceList, ThirdMaintenanceList, KeyEquipmentUpdateModel, + JEllipsis, }, data() { return { @@ -730,14 +768,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -759,26 +804,22 @@ align: "center", dataIndex: 'useId_dictText', }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, - { - title: '缁翠慨鐝粍', - align: "center", - dataIndex: 'teamId_dictText', - }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, + // { + // title: '缁翠慨鐝粍', + // align: "center", + // dataIndex: 'teamId_dictText', + // }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + { title: '鎶�鏈姸鎬�', align: "center", @@ -790,7 +831,11 @@ align: "center", dataIndex: 'technologyStatusVerificationType_dictText', }, - + { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, { title: '鐢熶骇绾跨紪鍙�', align: "center", @@ -817,11 +862,7 @@ // dataIndex: 'fireExtinguisher', // }, - // { - // title: '鐏伀鍣ㄦ湁鏁堟湡', - // align: "center", - // dataIndex: 'fireExtinguisherValidityPeriod', - // }, + // { // title: '鎿嶄綔绯荤粺', // align: "center", @@ -948,6 +989,8 @@ exportXlsUrl: '/eam/equipment/exportXls', importExcelUrl: "/eam/equipment/importExcel", loadOptions: '/sys/sysDepart/loadDepartTreeOptions', + uploadList: '/sys/upload/list', + download: '/sys/upload/downloadFile', }, dictOptions: { }, @@ -1149,6 +1192,40 @@ } }) }, + + handleDownload() { + var params = {}//鏌ヨ鏉′欢 + params.type = "equipment" + params.pageNo = 1 + params.pageSize = 10 + getAction(this.url.uploadList, params).then((res2) => { + if (res2.success) { + if (res2.result.records.length > 0) { + downFile(this.url.download, { id: res2.result.records[0].id }).then((res) => { + if (!res) { + this.$message.warning('鏂囦欢涓嬭浇澶辫触') + return + } else { + let fileName = res2.result.records[0].name + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([res]), fileName) + } else { + let url = window.URL.createObjectURL(new Blob([res])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) //涓嬭浇瀹屾垚绉婚櫎鍏冪礌 + window.URL.revokeObjectURL(url) //閲婃斁鎺塨lob瀵硅薄 + } + } + }) + } + } + }) + }, } } </script> diff --git a/src/views/eam/EquipmentListOfCrane.vue b/src/views/eam/EquipmentListOfCrane.vue index 5b871ca..0cca084 100644 --- a/src/views/eam/EquipmentListOfCrane.vue +++ b/src/views/eam/EquipmentListOfCrane.vue @@ -82,12 +82,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -98,12 +103,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -314,14 +324,15 @@ :customRow="clickThenSelect" @change="handleTableChange" > -<!-- 鐐瑰嚮鎶�鏈姸鎬佸垪锛岃烦杞埌鎶�鏈姸鎬侀壌瀹氶〉闈� --> -<template + <!-- 鐐瑰嚮鎶�鏈姸鎬佸垪锛岃烦杞埌鎶�鏈姸鎬侀壌瀹氶〉闈� --> + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -451,6 +462,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -631,6 +662,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -654,6 +686,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -682,14 +715,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -706,16 +746,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -726,11 +766,11 @@ align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + // { + // title: '鍏抽敭璁惧鏍囪瘑', + // align: "center", + // dataIndex: 'specificEquipment_dictText', + // }, { title: '鎶�鏈姸鎬�', align: "center", @@ -743,6 +783,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfEnvProEquipment.vue b/src/views/eam/EquipmentListOfEnvProEquipment.vue index 9362a3d..ad64edd 100644 --- a/src/views/eam/EquipmentListOfEnvProEquipment.vue +++ b/src/views/eam/EquipmentListOfEnvProEquipment.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -652,6 +683,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -675,6 +707,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -703,14 +736,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -727,16 +767,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -764,6 +804,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfFilesCarousel.vue b/src/views/eam/EquipmentListOfFilesCarousel.vue index 8cb434e..409f7c6 100644 --- a/src/views/eam/EquipmentListOfFilesCarousel.vue +++ b/src/views/eam/EquipmentListOfFilesCarousel.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -720,16 +760,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -757,6 +797,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfMetrological.vue b/src/views/eam/EquipmentListOfMetrological.vue index 1910c51..ecaa697 100644 --- a/src/views/eam/EquipmentListOfMetrological.vue +++ b/src/views/eam/EquipmentListOfMetrological.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -740,11 +780,11 @@ align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + // { + // title: '鍏抽敭璁惧鏍囪瘑', + // align: "center", + // dataIndex: 'specificEquipment_dictText', + // }, { title: '鎶�鏈姸鎬�', align: "center", @@ -757,6 +797,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfPressureVessel.vue b/src/views/eam/EquipmentListOfPressureVessel.vue index 0ce1f4d..89561b1 100644 --- a/src/views/eam/EquipmentListOfPressureVessel.vue +++ b/src/views/eam/EquipmentListOfPressureVessel.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -720,16 +760,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -740,11 +780,7 @@ align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + { title: '鎶�鏈姸鎬�', align: "center", @@ -757,6 +793,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfProduct.vue b/src/views/eam/EquipmentListOfProduct.vue index 97148f8..0fd8e62 100644 --- a/src/views/eam/EquipmentListOfProduct.vue +++ b/src/views/eam/EquipmentListOfProduct.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis, }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -725,26 +765,22 @@ align: "center", dataIndex: 'useId_dictText', }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, - { - title: '缁翠慨鐝粍', - align: "center", - dataIndex: 'teamId_dictText', - }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, + // { + // title: '缁翠慨鐝粍', + // align: "center", + // dataIndex: 'teamId_dictText', + // }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + { title: '鎶�鏈姸鎬�', align: "center", @@ -757,6 +793,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfRide.vue b/src/views/eam/EquipmentListOfRide.vue index 85cae32..bd5de4b 100644 --- a/src/views/eam/EquipmentListOfRide.vue +++ b/src/views/eam/EquipmentListOfRide.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template @@ -466,6 +477,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -646,6 +677,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -669,6 +701,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -697,14 +730,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -721,16 +761,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -741,11 +781,11 @@ align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + // { + // title: '鍏抽敭璁惧鏍囪瘑', + // align: "center", + // dataIndex: 'specificEquipment_dictText', + // }, { title: '鎶�鏈姸鎬�', align: "center", @@ -758,6 +798,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfTester.vue b/src/views/eam/EquipmentListOfTester.vue index b4069a9..6589641 100644 --- a/src/views/eam/EquipmentListOfTester.vue +++ b/src/views/eam/EquipmentListOfTester.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -725,26 +765,26 @@ align: "center", dataIndex: 'useId_dictText', }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, - { - title: '缁翠慨鐝粍', - align: "center", - dataIndex: 'teamId_dictText', - }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, + // { + // title: '缁翠慨鐝粍', + // align: "center", + // dataIndex: 'teamId_dictText', + // }, { title: 'ABC鏍囪瘑', align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + // { + // title: '鍏抽敭璁惧鏍囪瘑', + // align: "center", + // dataIndex: 'specificEquipment_dictText', + // }, { title: '鎶�鏈姸鎬�', align: "center", @@ -757,6 +797,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/EquipmentListOfTruck.vue b/src/views/eam/EquipmentListOfTruck.vue index 4c33ffe..8270b7c 100644 --- a/src/views/eam/EquipmentListOfTruck.vue +++ b/src/views/eam/EquipmentListOfTruck.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -720,16 +760,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", diff --git a/src/views/eam/EquipmentListOfWeldingMachine.vue b/src/views/eam/EquipmentListOfWeldingMachine.vue index 1d5b3bf..9d146a5 100644 --- a/src/views/eam/EquipmentListOfWeldingMachine.vue +++ b/src/views/eam/EquipmentListOfWeldingMachine.vue @@ -97,12 +97,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" tree-default-expand-all + v-model="queryParam.manageId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" v-model="queryParam.manageId" /> </a-form-item> @@ -113,12 +118,17 @@ :labelCol="labelCol" :wrapperCol="wrapperCol" > - <a-tree-select + <!-- <a-tree-select style="width: 100%" :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :tree-data="treeData" placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" tree-default-expand-all + v-model="queryParam.useId" + /> --> + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" v-model="queryParam.useId" /> </a-form-item> @@ -329,13 +339,14 @@ :customRow="clickThenSelect" @change="handleTableChange" > - <template + <template slot="technologyStatus" slot-scope="text,record" - > + > <a href="javascript:eam/EquipmentCalibrationOrder;" - @click="handleTechnologyStatus(record)">{{record.technologyStatus_dictText}}</a> + @click="handleTechnologyStatus(record)" + >{{record.technologyStatus_dictText}}</a> </template> <template slot="htmlSlot" @@ -465,6 +476,26 @@ class="error" >鍚�</span> </span> + + <span + slot="name" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="8" + /> + </span> + + <template + slot="num" + slot-scope="text,record" + > + <a + href="javascript:;" + @click="handleDetail(record)" + >{{record.num}}</a> + </template> <span slot="action" @@ -645,6 +676,7 @@ import DailyMaintenanceList from './modules/equipmentNew/DailyMaintenanceList.vue' import SecondMaintenanceList from './modules/equipmentNew/SecondMaintenanceList.vue' import ThirdMaintenanceList from './modules/equipmentNew/ThirdMaintenanceList.vue' +import JEllipsis from '@/components/jeecg/JEllipsis' export default { name: "EquipmentList", mixins: [JeecgListMixin, mixinDevice], @@ -668,6 +700,7 @@ DailyMaintenanceList, SecondMaintenanceList, ThirdMaintenanceList, + JEllipsis }, data() { return { @@ -696,14 +729,21 @@ dataIndex: 'isLineEquip_dictText', }, { + title: '鍏抽敭璁惧鏍囪瘑', + align: "center", + dataIndex: 'specificEquipment_dictText', + }, + { title: '缁熶竴缂栫爜', align: "center", dataIndex: 'num', + scopedSlots: { customRender: 'num' }, }, { title: '璁惧鍚嶇О', align: "center", dataIndex: 'name', + scopedSlots: { customRender: 'name' }, }, { title: '鍨嬪彿', @@ -720,16 +760,16 @@ align: "center", dataIndex: 'gpo', }, - { - title: '浣跨敤閮ㄩ棬', - align: "center", - dataIndex: 'useId_dictText', - }, - { - title: '缁存姢閮ㄩ棬', - align: "center", - dataIndex: 'manageId_dictText', - }, + // { + // title: '浣跨敤閮ㄩ棬', + // align: "center", + // dataIndex: 'useId_dictText', + // }, + // { + // title: '缁存姢閮ㄩ棬', + // align: "center", + // dataIndex: 'manageId_dictText', + // }, { title: '缁翠慨鐝粍', align: "center", @@ -740,11 +780,7 @@ align: "center", dataIndex: 'equipmentImportanceId', }, - { - title: '鍏抽敭璁惧鏍囪瘑', - align: "center", - dataIndex: 'specificEquipment_dictText', - }, + { title: '鎶�鏈姸鎬�', align: "center", @@ -757,6 +793,11 @@ dataIndex: 'technologyStatusVerificationType_dictText', }, { + title: '涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�', + align: "center", + dataIndex: 'nextTechnologyStatusQualificationTime', + }, + { title: '鐢熶骇绾跨紪鍙�', align: "center", dataIndex: 'lineId_dictText', diff --git a/src/views/eam/FaultCauseChart.vue b/src/views/eam/FaultCauseChart.vue new file mode 100644 index 0000000..4236dd1 --- /dev/null +++ b/src/views/eam/FaultCauseChart.vue @@ -0,0 +1,188 @@ +<template> + <a-card + title="璁惧鏁呴殰鍘熷洜" + :bordered="true" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁熶竴缂栫爜"> + <a-input + placeholder="璇疯緭鍏ョ粺涓�缂栫爜" + v-model="queryParam.equipmentNum" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁翠慨鏃堕棿"> + <a-range-picker + style="width: 100%;" + format="YYYY-MM-DD HH:mm:ss" + v-model="faultTime" + @change="timeChange" + /> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <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> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <a-row> + <a-col + :sm="24" + :md="24" + :xl="12" + :style="{ marginBottom: '15px' }" + > + <a-card + :loading="loading" + :bordered="true" + title="" + > + <pie :dataSource="defectInfo"></pie> + </a-card> + + </a-col> + <a-col + :sm="24" + :md="24" + :xl="12" + :style="{ marginBottom: '15px' }" + > + <a-card + :loading="loading" + :bordered="true" + title="" + > + <bar + title="" + :dataSource="barData" + /> + </a-card> + </a-col> + </a-row> + + </a-card> +</template> + +<script> + +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, deleteAction, postAction } from '@/api/manage' +import Pie from '@/components/chart/Pie' +import Bar from '@/components/chart/Bar' +import moment from 'moment' + +export default { + name: 'TeamList', + mixins: [JeecgListMixin, mixinDevice], + components: { + Pie, + Bar + }, + data() { + return { + description: 'FaultCauseChart', + // barData: [{ x: '璁惧鏁呴殰', y: 5 }, { x: '鍏朵粬', y: 8 }], + barData: [], + defectInfo: [], + url: { + list: "/eam/repairOrder/getFaultCausePie", + list2: "/eam/repairOrder/getFaultCauseBar", + }, + // 琛ㄥご + faultTime: [], + dictOptions: {}, + superFieldList: [], + queryParam: {} + } + }, + created() { + this.loadData2(1); + }, + methods: { + + timeChange() { + this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss") + this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss") + }, + + searchQuery() { + this.loadData(1); + this.loadData2(1); + }, + + searchReset() { + this.faultTime = [] + this.queryParam = {} + this.loadData(1); + this.loadData2(1); + }, + + loadData(arg) { + this.loading = true; + getAction(this.url.list, this.queryParam).then((res) => { + if (res.success) { + this.barData = res.result.records || res.result; + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + + loadData2(arg) { + this.loading = true; + getAction(this.url.list2, this.queryParam).then((res) => { + if (res.success) { + this.defectInfo = res.result.records || res.result; + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/MTBF.vue b/src/views/eam/MTBF.vue new file mode 100644 index 0000000..4091499 --- /dev/null +++ b/src/views/eam/MTBF.vue @@ -0,0 +1,163 @@ +<template> + <a-card + :bordered="false" + title="MTBF" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁熶竴鏍囩爜"> + <a-input + placeholder="璇疯緭鍏ョ粺涓�鏍囩爜" + v-model="queryParam.equipmentNum" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁翠慨鏃堕棿"> + <a-range-picker + style="width: 100%;" + format="YYYY-MM-DD HH:mm:ss" + v-model="faultTime" + @change="timeChange" + /> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <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> + </span> + </a-col> + </a-row> + </a-form> + </div> + <!-- 鏌ヨ鍖哄煙-END --> + + <div> + <div + class="ant-alert ant-alert-info" + style="margin-bottom: 16px;" + > + <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" + :scroll="{x:true}" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + class="j-table-force-nowrap" + @change="handleTableChange" + > + <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" --> + + </a-table> + </div> + + </a-card> +</template> + +<script> + +import '@/assets/less/TableExpand.less' +import { mixinDevice } from '@/utils/mixin' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import moment from 'moment' + +export default { + name: 'MTBF', + mixins: [JeecgListMixin, mixinDevice], + components: {}, + data() { + return { + description: 'MTBF', + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鏁呴殰鍘熷洜', + align: "center", + dataIndex: 'item' + }, + { + title: '鍙戠敓娆℃暟', + align: "center", + dataIndex: 'count' + }, + ], + url: { + list: "/eam/repairOrder/getMTPF", + }, + // 琛ㄥご + faultTime: [], + queryParam: {} + } + }, + created() { }, + methods: { + timeChange() { + this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss") + this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss") + }, + + searchQuery() { + this.loadData(1); + }, + + searchReset() { + this.faultTime = [] + this.queryParam = {} + this.loadData(1); + }, + + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/MalfunctionRepair.vue b/src/views/eam/MalfunctionRepair.vue index ebd2bbc..bac4ed4 100644 --- a/src/views/eam/MalfunctionRepair.vue +++ b/src/views/eam/MalfunctionRepair.vue @@ -234,23 +234,27 @@ @change="handleTableChange" :customRow="clickThenSelect" > - <!-- 鐐瑰嚮鍒楄烦杞埌浜嬫晠鐧昏椤� --> + <!-- 鐐瑰嚮鍒楄烦杞埌浜嬫晠鐧昏椤� --> <template slot="accidentRegistrationProgress" - slot-scope="text, record"> + slot-scope="text, record" + > <a v-if="text!==''&&text!==null" - @click="handleAccidentRegistration(record)"> + @click="handleAccidentRegistration(record)" + > {{text=='yes'? '宸茬‘璁�':'鏈‘璁�'}} </a> </template> <!-- 鐐瑰嚮鍒楄烦杞埌璐ㄩ噺闅愭偅椤� --> <template slot="qualityHiddenDangerProgress" - slot-scope="text, record"> + slot-scope="text, record" + > <a v-if="text!==''&&text!==null" - @click="handleQualityHiddenDanger(record)"> + @click="handleQualityHiddenDanger(record)" + > {{text=='yes'? '宸茬‘璁�':'鏈‘璁�'}} </a> </template> @@ -431,7 +435,13 @@ { title: '鍗曟嵁鍙�', align: "center", - dataIndex: 'num' + dataIndex: 'num', + width: 150 + }, + { + title: '缁熶竴缂栧彿', + align: "center", + dataIndex: 'equipmentNum' }, { title: '鐘舵��', @@ -446,7 +456,7 @@ if (text == '1') { return "琚姩鎶ヤ慨"; } else if (text == '2') { - return "涓诲姩鎶ヤ慨"; + return "杞﹂棿鎶ヤ慨"; } else if (text == '3') { return "涓诲姩缁翠慨"; } @@ -470,11 +480,7 @@ dataIndex: 'specificEquipment', scopedSlots: { customRender: 'specificEquipment' } }, - { - title: '缁熶竴缂栧彿', - align: "center", - dataIndex: 'equipmentNum' - }, + { title: '璁惧鍚嶇О', align: "center", @@ -554,8 +560,8 @@ align: "center", dataIndex: 'remark' }, - //璐ㄩ噺闅愭偅纭杩涘害 - { + //璐ㄩ噺闅愭偅纭杩涘害 + { title: '璐ㄩ噺闅愭偅', align: "center", dataIndex: 'isConfirm1', @@ -576,7 +582,7 @@ width: 100, scopedSlots: { customRender: 'action' } }, - + ], url: { list: "/eam/equipmentReportRepair/getReportRepairList", diff --git a/src/views/eam/OperationCertificateApplyList.vue b/src/views/eam/OperationCertificateApplyList.vue index 19720e2..2cd226f 100644 --- a/src/views/eam/OperationCertificateApplyList.vue +++ b/src/views/eam/OperationCertificateApplyList.vue @@ -37,22 +37,22 @@ /> </a-form-item> </a-col> - <template v-if="toggleSearchStatus"> - <a-col - :xl="6" - :lg="7" - :md="8" - :sm="24" - > - <a-form-item label="瀹℃牳鐘舵��"> - <j-dict-select-tag - placeholder="璇烽�夋嫨瀹℃牳鐘舵��" - v-model="queryParam.auditStatus" - dictCode="certificate_apply_status" - /> - </a-form-item> - </a-col> - </template> + <!-- <template v-if="toggleSearchStatus"> --> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="瀹℃牳鐘舵��"> + <j-dict-select-tag + placeholder="璇烽�夋嫨瀹℃牳鐘舵��" + v-model="queryParam.auditStatus" + dictCode="certificate_apply_status" + /> + </a-form-item> + </a-col> + <!-- </template> --> <a-col :xl="6" :lg="7" @@ -74,13 +74,13 @@ icon="reload" style="margin-left: 8px" >閲嶇疆</a-button> - <a + <!-- <a @click="handleToggleSearch" style="margin-left: 8px" > {{ toggleSearchStatus ? '鏀惰捣' : '灞曞紑' }} <a-icon :type="toggleSearchStatus ? 'up' : 'down'" /> - </a> + </a> --> </span> </a-col> </a-row> @@ -100,7 +100,7 @@ icon="download" @click="handleExportXls('鎿嶄綔璇佺敵璇疯〃')" >瀵煎嚭</a-button> - <a-upload + <!-- <a-upload name="file" :showUploadList="false" :multiple="false" @@ -112,7 +112,7 @@ type="primary" icon="import" >瀵煎叆</a-button> - </a-upload> + </a-upload> --> <a-button @click="handleAchievement" type="primary" @@ -159,50 +159,6 @@ :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @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" @@ -251,20 +207,6 @@ @click="handleFinish(record)" v-has="'OperationCertificateApply:equipmentAdmin'" >瀹℃牳</a> - <!-- <a-popconfirm - v-if="record.auditStatus == 'submitted'" - title="纭閫氳繃瀹℃壒鍚�?" - @confirm="() =>handleCommit(record, 'approved')" - > - <a>瀹℃壒</a> - </a-popconfirm> - <a-popconfirm - v-if="record.auditStatus == 'approved'" - title="纭閫氳繃瀹℃牳鍚�?" - @confirm="() =>handleCommit(record, 'audited')" - > - <a>瀹℃牳</a> - </a-popconfirm> --> <a-divider type="vertical" v-if="record.auditStatus == 'created' || record.auditStatus == 'submitted' || record.auditStatus == 'approved'" @@ -387,9 +329,9 @@ dataIndex: 'handlePerson_dictText' }, { - title: '澶囨敞', + title: '鍔炵悊鏃堕棿', align: "center", - dataIndex: 'remark' + dataIndex: 'createTime' }, { title: '鎿嶄綔', @@ -409,11 +351,11 @@ approve: "/eam/operationCertificateApply/approve" }, dictOptions: {}, - superFieldList: [], + // superFieldList: [], } }, created() { - this.getSuperFieldList(); + // this.getSuperFieldList(); }, computed: { importExcelUrl: function () { @@ -421,19 +363,19 @@ } }, methods: { - initDictConfig() { - }, - getSuperFieldList() { - let fieldList = []; - fieldList.push({ type: 'string', value: 'num', text: '鐢宠鍗曠紪鍙�', dictCode: '' }) - fieldList.push({ type: 'string', value: 'type', text: '绫诲瀷', dictCode: 'apply_type' }) - fieldList.push({ type: 'sel_depart', value: 'departId', text: '鎵�鍦ㄥ崟浣�' }) - fieldList.push({ type: 'string', value: 'contactNumber', text: '鐢宠鍗曚綅鑱旂郴鐢佃瘽', dictCode: '' }) - fieldList.push({ type: 'string', value: 'applicant', text: '鐢宠浜�', dictCode: "sys_user,realname,id" }) - fieldList.push({ type: 'string', value: 'auditStatus', text: '瀹℃牳鐘舵��', dictCode: 'certificate_apply_status' }) - fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) - this.superFieldList = fieldList - }, + // initDictConfig() { + // }, + // getSuperFieldList() { + // let fieldList = []; + // fieldList.push({ type: 'string', value: 'num', text: '鐢宠鍗曠紪鍙�', dictCode: '' }) + // fieldList.push({ type: 'string', value: 'type', text: '绫诲瀷', dictCode: 'apply_type' }) + // fieldList.push({ type: 'sel_depart', value: 'departId', text: '鎵�鍦ㄥ崟浣�' }) + // fieldList.push({ type: 'string', value: 'contactNumber', text: '鐢宠鍗曚綅鑱旂郴鐢佃瘽', dictCode: '' }) + // fieldList.push({ type: 'string', value: 'applicant', text: '鐢宠浜�', dictCode: "sys_user,realname,id" }) + // fieldList.push({ type: 'string', value: 'auditStatus', text: '瀹℃牳鐘舵��', dictCode: 'certificate_apply_status' }) + // fieldList.push({ type: 'string', value: 'remark', text: '澶囨敞', dictCode: '' }) + // this.superFieldList = fieldList + // }, handleCommit(record, type) { if (type == 'commit') { record.auditStatus = 'submitted' diff --git a/src/views/eam/OperationCertificateList.vue b/src/views/eam/OperationCertificateList.vue index 9cb2195..09f931c 100644 --- a/src/views/eam/OperationCertificateList.vue +++ b/src/views/eam/OperationCertificateList.vue @@ -113,7 +113,7 @@ icon='download' @click="handleExportXls('鎿嶄綔璇佷功绠$悊')" >瀵煎嚭</a-button> - <a-upload + <!-- <a-upload name='file' :showUploadList='false' :multiple='false' @@ -125,7 +125,7 @@ type='primary' icon='import' >瀵煎叆</a-button> - </a-upload> + </a-upload> --> <!-- 楂樼骇鏌ヨ鍖哄煙 --> <!-- <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>--> <!-- <a-dropdown v-if="selectedRowKeys.length > 0">--> @@ -165,49 +165,6 @@ @change='handleTableChange' :rowClassName="tableRowClass" > - - <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> </a-table> </div> diff --git a/src/views/eam/RepairOrderList.vue b/src/views/eam/RepairOrderList.vue index 4e45b89..d2b0e41 100644 --- a/src/views/eam/RepairOrderList.vue +++ b/src/views/eam/RepairOrderList.vue @@ -163,15 +163,13 @@ </a-col> </a-row> <a-row :gutter="24"> - <a-col - :xl="6" - :lg="7" - :md="8" - :sm="24" - > - <a-form-item - label="ABC鏍囪瘑" - > + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="ABC鏍囪瘑"> <j-dict-select-tag allow-clear placeholder="璇烽�夋嫨ABC鏍囪瘑" @@ -182,10 +180,26 @@ </a-form-item> </a-col> <a-col - :xl="6" - :lg="7" - :md="8" - :sm="24" + :xl="6" + :lg="7" + :md="8" + :sm="24" + > + <a-form-item label="鏁呴殰鍘熷洜"> + <j-dict-select-tag + allow-clear + placeholder="璇烽�夋嫨鏁呴殰鍘熷洜" + :triggerChange="true" + dictCode="repair_order_fault_cause" + v-model="queryParam.faultCause" + /> + </a-form-item> + </a-col> + <a-col + :xl="6" + :lg="7" + :md="8" + :sm="24" > <a-form-item label="鎶ヤ慨鏃堕棿"> <a-range-picker @@ -197,10 +211,10 @@ </a-form-item> </a-col> <a-col - :xl="6" - :lg="7" - :md="8" - :sm="24" + :xl="6" + :lg="7" + :md="8" + :sm="24" > <a-form-item label="鍒涘缓鏃堕棿"> <a-range-picker @@ -419,6 +433,44 @@ </a-dropdown> </span> + <template + slot="equipmentNum" + slot-scope="text, record" + > + <a-popover title="鏁呴殰鍘熷洜缁熻"> + <template slot="content"> + <p + v-for="(faultCauseMap, index) in record.equipmentFaultCause" + :key="index" + > + <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span> + </p> + </template> + <span> + {{ record.equipmentNum }} + </span> + </a-popover> + </template> + + <template + slot="faultCauseCount" + slot-scope="text, record" + > + <a-popover title="鏁呴殰鍘熷洜缁熻"> + <template slot="content"> + <p + v-for="(faultCauseMap, index) in record.allFaultCause" + :key="index" + > + <span class="fontweight">{{ faultCauseMap.faultCause }}锛歿{ faultCauseMap.total }}</span> + </p> + </template> + <span> + {{ record.faultCauseCount }} + </span> + </a-popover> + </template> + </a-table> </div> @@ -574,7 +626,7 @@ description: '缁翠慨宸ュ崟绠$悊椤甸潰', // 琛ㄥご faultTime: [], - createTimes:[], + createTimes: [], columns: [ { title: '#', @@ -625,7 +677,8 @@ { title: '缁熶竴缂栫爜', align: "center", - dataIndex: 'equipmentNum' + dataIndex: 'equipmentNum', + scopedSlots: { customRender: 'equipmentNum' } }, { title: '璁惧鍚嶇О', @@ -685,11 +738,11 @@ align: "center", dataIndex: 'faultTime' }, - { - title: '鎶ヤ慨浜�', - align: "center", - dataIndex: 'errUda2' - }, + // { + // title: '鎶ヤ慨浜�', + // align: "center", + // dataIndex: 'errUda2', + // }, { title: '鏁呴殰鎻忚堪', align: "center", @@ -698,11 +751,12 @@ customRender: 'jell' } }, - // { - // title: '鏁呴殰鍘熷洜', - // align: "center", - // dataIndex: 'faultReason' - // }, + { + title: '鏁呴殰鍘熷洜', + align: "center", + dataIndex: 'faultCauseCount', + scopedSlots: { customRender: 'faultCauseCount' } + }, // { // title: '鏁呴殰鐜拌薄', // align: "center", @@ -848,7 +902,7 @@ this.queryParam.faultStartTime = moment(this.faultTime[0]).format("YYYY-MM-DD HH:mm:ss") this.queryParam.faultEndTime = moment(this.faultTime[1]).format("YYYY-MM-DD HH:mm:ss") }, - timeChangeCreate(){ + timeChangeCreate() { this.queryParam.createStartTime = moment(this.createTimes[0]).format("YYYY-MM-DD HH:mm:ss") this.queryParam.createEndTime = moment(this.createTimes[1]).format("YYYY-MM-DD HH:mm:ss") }, @@ -1017,7 +1071,7 @@ this.onClearSelected() this.$refs.FaultDescriptionList.faultId = '-1' this.faultTime = [] - this.createTimes=[] + this.createTimes = [] }, getReports() { this.$refs.FaultReportRepair.title = '鏁呴殰鎶ヤ慨鍗�'; diff --git a/src/views/eam/RepairStandardList.vue b/src/views/eam/RepairStandardList.vue new file mode 100644 index 0000000..0a94d46 --- /dev/null +++ b/src/views/eam/RepairStandardList.vue @@ -0,0 +1,46 @@ +<template> + <a-row + type="flex" + :gutter="16" + > + <a-col + :md="4" + :sm="24" + > + <repair-standard-category-left @clickTreeNode="getSelectNode" /> + </a-col> + <a-col + :md="24-4" + :sm="24" + > + <repair-standard-right :recordSelect="currentNodeSelect" /> + </a-col> + </a-row> +</template> + +<script> +import RepairStandardCategoryLeft from './modules/repairStandard/RepairStandardCategoryLeft' +import RepairStandardRight from './modules/repairStandard/RepairStandardRight' +export default { + name: 'RepairStandardList', + components: { + RepairStandardCategoryLeft, + RepairStandardRight, + }, + data() { + return { + description: '缁翠慨鏍囧噯鍒嗙被', + currentNodeSelect: '', + } + }, + methods: { + getSelectNode(val) { + this.currentNodeSelect = val; + }, + } +} +</script> + +<style scoped> +@import '~@assets/less/common.less'; +</style> \ No newline at end of file diff --git a/src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue b/src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue index 9abab04..a876e96 100644 --- a/src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/AuditApprovalModal.vue @@ -157,7 +157,9 @@ this.model = Object.assign({}, record); this.visible = true; this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'num', 'auditFeedback', 'approvalFeedback')); + this.form.setFieldsValue(pick(this.model, 'num')); + this.form.setFieldsValue({ auditFeedback: "" }); + this.form.setFieldsValue({ approvalFeedback: "" }); }, 200); }, diff --git a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue index cca34ff..46abbea 100644 --- a/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/DailylnspectionStandardModal.vue @@ -442,13 +442,13 @@ this.$bus.$on('selectionRows', (data) => { for (let i = 0; i < data.length; i++) { this.dataSource.push({ - id: data[i].id, - inspectionProjectId: data[i].id, - name: data[i].name, - detectionStandard: data[i].detectionStandard, - acceptabilityLimit: data[i].acceptabilityLimit, - inspectionMethodName: data[i].inspectionMethod_dictText, - inspectionTool: data[i].inspectionTool, + id: data[i][0].id, + inspectionProjectId: data[i][0].id, + name: data[i][0].name, + detectionStandard: data[i][0].detectionStandard, + acceptabilityLimit: data[i][0].acceptabilityLimit, + inspectionMethodName: data[i][0].inspectionMethod_dictText, + inspectionTool: data[i][0].inspectionTool, inspectionCycles: this.inspectionCycles, }) } diff --git a/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue b/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue index c5f352f..3aa9642 100644 --- a/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue +++ b/src/views/eam/modules/dailyInspectionStandard/JSelectDailylnspectionStandardModal.vue @@ -57,9 +57,9 @@ :columns='columns' :dataSource='dataSource' :pagination='ipagination' - :rowSelection='rowSelection' :loading='loading' @change='handleTableChange' + :rowSelection='rowSelection' > </a-table> @@ -129,6 +129,7 @@ ], selectedRowKeys: [], + selectionRowsNotClear: [], oldSelectRows: [], scrollTrigger: {}, dataSource: [], @@ -162,14 +163,16 @@ type: 'checkbox', onChange: (selectedRowKeys, selectedRows) => { this.selectedRowKeys = selectedRowKeys - this.onSelectChange(selectedRows) + this.selectionRows = selectedRows + this.selectionRowsNotClear.push(selectedRows) }, getCheckboxProps: record => ({ props: { disabled: record.distable } }), - selectedRowKeys: this.selectedRowKeys + selectedRowKeys: this.selectedRowKeys, + selectedRows: this.selectionRows } } }, @@ -204,6 +207,8 @@ showModals(oldSelectRows) { this.selectionRows = [] + this.selectedRowKeys = [] + this.selectionRowsNotClear = [] this.oldSelectRows = oldSelectRows this.visible = true this.loadData(1) @@ -238,16 +243,16 @@ }, handleTableChange(pagination, filters, sorter) { //TODO 绛涢�� - if (Object.keys(sorter).length > 0) { this.isorter.column = sorter.field this.isorter.order = 'ascend' === sorter.order ? 'asc' : 'desc' } this.ipagination = pagination + this.loadData() }, handleSubmit() { - this.$bus.$emit('selectionRows', this.selectionRows) + this.$bus.$emit('selectionRows', this.selectionRowsNotClear) this.searchReset(0) this.close() }, diff --git a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue index 7ba8ef5..635e8e5 100644 --- a/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue +++ b/src/views/eam/modules/dailyMaintenanceOrder/FinishDevolutionModal.vue @@ -78,7 +78,7 @@ :wrapperCol="wrapperCol" > <j-date - v-model="model.maintenanceDate" + v-model="model.actualEndTime" placeholder="璇烽�夋嫨淇濆吇鏃ユ湡" :showTime="true" dateFormat="YYYY-MM-DD" diff --git a/src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue b/src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue index 5945034..42cc283 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/AuditApprovalModal.vue @@ -151,7 +151,9 @@ this.model = Object.assign({}, record); this.visible = true; this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model, 'num', 'auditFeedback', 'approvalFeedback')); + this.form.setFieldsValue(pick(this.model, 'num')); + this.form.setFieldsValue({ auditFeedback: "" }); + this.form.setFieldsValue({ approvalFeedback: "" }); }, 200); }, diff --git a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue index 4fad2ac..fbb3fe4 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/DailyMaintenanceStandardModal.vue @@ -595,15 +595,15 @@ let id = this.getUuiD(15); this.dataSource.push({ id: id, - maintenanceProjectId: data[i].id, - name: data[i].name, - standard: data[i].standard, - maintenanceMethodName: data[i].maintenanceMethod_dictText, - maintenanceTool: data[i].maintenanceTool, - location: data[i].location, - maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText, - maintenanceRequire: data[i].maintenanceRequire, - workingHourQuota: data[i].workingHourQuota, + maintenanceProjectId: data[i][0].id, + name: data[i][0].name, + standard: data[i][0].standard, + maintenanceMethodName: data[i][0].maintenanceMethod_dictText, + maintenanceTool: data[i][0].maintenanceTool, + location: data[i][0].location, + maintenanceSpecialtyName: data[i][0].maintenanceSpecialtyId_dictText, + maintenanceRequire: data[i][0].maintenanceRequire, + workingHourQuota: data[i][0].workingHourQuota, // upload: this.upload, // maintenanceCycles: this.maintenanceCycles, }) diff --git a/src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue index 0852dbe..2cbd122 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard/JSelectMaintenanceStandardModal.vue @@ -138,6 +138,7 @@ scrollTrigger: {}, dataSource: [], selectionRows: [], + selectionRowsNotClear: [], title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨淇濆吇椤圭洰', ipagination: { current: 1, @@ -167,6 +168,7 @@ type: 'checkbox', onChange: (selectedRowKeys, selectedRows) => { this.selectedRowKeys = selectedRowKeys + this.selectionRowsNotClear.push(selectedRows) this.onSelectChange(selectedRows) }, getCheckboxProps: record => ({ @@ -209,6 +211,7 @@ showModals(oldSelectRows) { this.selectionRows = [] + this.selectionRowsNotClear = [] this.oldSelectRows = oldSelectRows this.visible = true this.loadData(1) @@ -252,7 +255,7 @@ this.loadData() }, handleSubmit() { - this.$bus.$emit('selectionRows', this.selectionRows) + this.$bus.$emit('selectionRows', this.selectionRowsNotClear) // this.searchReset(0) this.close() }, diff --git a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue index 7fb8eae..62042ea 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard3/DailyMaintenanceStandardModal.vue @@ -595,15 +595,15 @@ let id = this.getUuiD(15); this.dataSource.push({ id: id, - maintenanceProjectId: data[i].id, - name: data[i].name, - standard: data[i].standard, - maintenanceMethodName: data[i].maintenanceMethod_dictText, - maintenanceTool: data[i].maintenanceTool, - location: data[i].location, - maintenanceSpecialtyName: data[i].maintenanceSpecialtyId_dictText, - maintenanceRequire: data[i].maintenanceRequire, - workingHourQuota: data[i].workingHourQuota, + maintenanceProjectId: data[i][0].id, + name: data[i][0].name, + standard: data[i][0].standard, + maintenanceMethodName: data[i][0].maintenanceMethod_dictText, + maintenanceTool: data[i][0].maintenanceTool, + location: data[i][0].location, + maintenanceSpecialtyName: data[i][0].maintenanceSpecialtyId_dictText, + maintenanceRequire: data[i][0].maintenanceRequire, + workingHourQuota: data[i][0].workingHourQuota, // upload: this.upload, // maintenanceCycles: this.maintenanceCycles, }) diff --git a/src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue b/src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue index 0852dbe..2cbd122 100644 --- a/src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue +++ b/src/views/eam/modules/dailyMaintenanceStandard3/JSelectMaintenanceStandardModal.vue @@ -138,6 +138,7 @@ scrollTrigger: {}, dataSource: [], selectionRows: [], + selectionRowsNotClear: [], title: '鏍规嵁鏌ヨ缁撴灉閫夋嫨淇濆吇椤圭洰', ipagination: { current: 1, @@ -167,6 +168,7 @@ type: 'checkbox', onChange: (selectedRowKeys, selectedRows) => { this.selectedRowKeys = selectedRowKeys + this.selectionRowsNotClear.push(selectedRows) this.onSelectChange(selectedRows) }, getCheckboxProps: record => ({ @@ -209,6 +211,7 @@ showModals(oldSelectRows) { this.selectionRows = [] + this.selectionRowsNotClear = [] this.oldSelectRows = oldSelectRows this.visible = true this.loadData(1) @@ -252,7 +255,7 @@ this.loadData() }, handleSubmit() { - this.$bus.$emit('selectionRows', this.selectionRows) + this.$bus.$emit('selectionRows', this.selectionRowsNotClear) // this.searchReset(0) this.close() }, diff --git a/src/views/eam/modules/equipment/EquipmentModel.vue b/src/views/eam/modules/equipment/EquipmentModel.vue index cdf2ad2..5aa3c60 100644 --- a/src/views/eam/modules/equipment/EquipmentModel.vue +++ b/src/views/eam/modules/equipment/EquipmentModel.vue @@ -642,14 +642,14 @@ rules: [ { required: true, message: '璇疯緭鍏ヨ澶囧垎绫荤紪鍙�!' }, { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, - { validator: this.validateNum }, + // { validator: this.validateNum }, ] }, name: { rules: [ { required: true, message: '璇疯緭鍏ヨ澶囧垎绫诲悕绉�!' }, { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, - { validator: this.validateName }, + // { validator: this.validateName }, ] }, teamId: { diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue index a64d587..6714376 100644 --- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue +++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue @@ -150,7 +150,10 @@ /> </a-form-model-item> </a-col> - <a-col :span='6' v-show='isLineEquipShow'> + <a-col + :span='6' + v-show='isLineEquipShow' + > <a-form-model-item label='鏄惁鐢熶骇绾夸富璁惧' :labelCol='labelCol' @@ -1028,7 +1031,7 @@ num: [ { required: true, message: '璇疯緭鍏ヨ澶囩紪鍙�!' }, // { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, - { validator: this.validateNum } + // { validator: this.validateNum } ], name: [ { required: true, message: '璇疯緭鍏ヨ澶囧悕绉�!' } diff --git a/src/views/eam/modules/malfunctionRepair/EquipmentList.vue b/src/views/eam/modules/malfunctionRepair/EquipmentList.vue index e488ada..45f18fa 100644 --- a/src/views/eam/modules/malfunctionRepair/EquipmentList.vue +++ b/src/views/eam/modules/malfunctionRepair/EquipmentList.vue @@ -190,6 +190,7 @@ onSelectChange(selectedRowKeys, selectedRows) { this.selectedRowKeys = selectedRowKeys; this.selectedRowRecord = selectedRows[0]; + this.handleOk() }, close() { this.queryParam = {}; @@ -291,7 +292,7 @@ height: 90% !important; overflow-y: hidden; } - .notshow { +.notshow { display: none; } @@ -310,7 +311,7 @@ .dataUnKnow { color: #1890ff; } - .frozenRowClass { +.frozenRowClass { color: #c9c9c9; } </style> \ No newline at end of file diff --git a/src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue b/src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue index a68b504..2688a8a 100644 --- a/src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue +++ b/src/views/eam/modules/operationCertificate/OperationCertificateDetailList.vue @@ -140,7 +140,7 @@ props: { mainId: { type: String, - default: '', + default: '-1', required: false } }, diff --git a/src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue b/src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue index ebb3c10..d817f12 100644 --- a/src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue +++ b/src/views/eam/modules/operationCertificate/OperationCertificateDetailModal.vue @@ -7,38 +7,92 @@ switchFullscreen @ok="handleOk" @cancel="handleCancel" - cancelText="鍏抽棴"> + cancelText="鍏抽棴" + > <a-spin :spinning="confirmLoading"> - <a-form-model ref="form" :model="model" :rules="validatorRules"> + <a-form-model + ref="form" + :model="model" + :rules="validatorRules" + > <a-row> <a-col :span="24"> - <a-form-model-item label="璇佷功ID" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="operationCertificateId"> - <a-input v-model="model.operationCertificateId"placeholder="璇疯緭鍏ヨ瘉涔D" ></a-input> + <a-form-model-item + label="璇佷功ID" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="operationCertificateId" + > + <a-input + v-model="model.operationCertificateId" + placeholder="璇疯緭鍏ヨ瘉涔D" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="鍙戠敓鏃堕棿" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="happenDate"> - <j-date placeholder="璇烽�夋嫨鍙戠敓鏃堕棿" v-model="model.happenDate" style="width: 100%" /> + <a-form-model-item + label="鍙戠敓鏃堕棿" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="happenDate" + > + <j-date + placeholder="璇烽�夋嫨鍙戠敓鏃堕棿" + v-model="model.happenDate" + style="width: 100%" + /> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="绫诲瀷" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="type"> - <a-input v-model="model.type"placeholder="璇疯緭鍏ョ被鍨�" ></a-input> + <a-form-model-item + label="绫诲瀷" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="type" + > + <a-input + v-model="model.type" + placeholder="璇疯緭鍏ョ被鍨�" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="璁惧id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentId"> - <a-input v-model="model.equipmentId"placeholder="璇疯緭鍏ヨ澶噄d" ></a-input> + <a-form-model-item + label="璁惧id" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="equipmentId" + > + <a-input + v-model="model.equipmentId" + placeholder="璇疯緭鍏ヨ澶噄d" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="鎵e垎椤�" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="deductionItem"> - <a-input v-model="model.deductionItem"placeholder="璇疯緭鍏ユ墸鍒嗛」" ></a-input> + <a-form-model-item + label="鎵e垎椤�" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="deductionItem" + > + <a-input + v-model="model.deductionItem" + placeholder="璇疯緭鍏ユ墸鍒嗛」" + ></a-input> </a-form-model-item> </a-col> <a-col :span="24"> - <a-form-model-item label="鎵e垎鍛ㄦ湡" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="period"> - <a-input v-model="model.period"placeholder="璇疯緭鍏ユ墸鍒嗗懆鏈�" ></a-input> + <a-form-model-item + label="鎵e垎鍛ㄦ湡" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + prop="period" + > + <a-input + v-model="model.period" + placeholder="璇疯緭鍏ユ墸鍒嗗懆鏈�" + ></a-input> </a-form-model-item> </a-col> </a-row> @@ -49,100 +103,100 @@ <script> - import { httpAction } from '@/api/manage' - import { validateDuplicateValue } from '@/utils/util' +import { httpAction } from '@/api/manage' +import { validateDuplicateValue } from '@/utils/util' - export default { - name: "OperationCertificateDetailModal", - components: { - }, - props:{ - mainId:{ - type:String, - required:false, - default:'' +export default { + name: "OperationCertificateDetailModal", + components: { + }, + props: { + mainId: { + type: String, + required: false, + default: '' + } + }, + data() { + return { + title: "鎿嶄綔", + width: 800, + visible: false, + model: { + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 }, + }, + + confirmLoading: false, + validatorRules: { + }, + url: { + add: "/eam/operationCertificate/addOperationCertificateDetail", + edit: "/eam/operationCertificate/editOperationCertificateDetail", } - }, - data () { - return { - title:"鎿嶄綔", - width:800, - visible: false, - model:{ - }, - labelCol: { - xs: { span: 24 }, - sm: { span: 5 }, - }, - wrapperCol: { - xs: { span: 24 }, - sm: { span: 16 }, - }, - - confirmLoading: false, - validatorRules: { - }, - url: { - add: "/eam/operationCertificate/addOperationCertificateDetail", - edit: "/eam/operationCertificate/editOperationCertificateDetail", - } - - } - }, - created () { - //澶囦唤model鍘熷鍊� - this.modelDefault = JSON.parse(JSON.stringify(this.model)); - }, - methods: { - add () { - this.edit(this.modelDefault); - }, - edit (record) { - this.model = Object.assign({}, record); - this.visible = true; - }, - close () { - this.$emit('close'); - this.visible = false; - this.$refs.form.clearValidate(); - }, - handleOk () { - const that = this; - // 瑙﹀彂琛ㄥ崟楠岃瘉 - this.$refs.form.validate(valid => { - if (valid) { - that.confirmLoading = true; - let httpurl = ''; - let method = ''; - if(!this.model.id){ - httpurl+=this.url.add; - method = 'post'; - }else{ - httpurl+=this.url.edit; - method = 'put'; - } - this.model['operationCertificateId'] = this.mainId - httpAction(httpurl,this.model,method).then((res)=>{ - if(res.success){ - that.$message.success(res.message); - that.$emit('ok'); - }else{ - that.$message.warning(res.message); - } - }).finally(() => { - that.confirmLoading = false; - that.close(); - }) - }else{ - return false - } - }) - }, - handleCancel () { - this.close() - }, - } + }, + created() { + //澶囦唤model鍘熷鍊� + this.modelDefault = JSON.parse(JSON.stringify(this.model)); + }, + methods: { + add() { + this.edit(this.modelDefault); + }, + edit(record) { + this.model = Object.assign({}, record); + this.visible = true; + }, + close() { + this.$emit('close'); + this.visible = false; + this.$refs.form.clearValidate(); + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.$refs.form.validate(valid => { + if (valid) { + that.confirmLoading = true; + let httpurl = ''; + let method = ''; + if (!this.model.id) { + httpurl += this.url.add; + method = 'post'; + } else { + httpurl += this.url.edit; + method = 'put'; + } + this.model['operationCertificateId'] = this.mainId + httpAction(httpurl, this.model, method).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } else { + return false + } + }) + }, + handleCancel() { + this.close() + }, + + } +} </script> diff --git a/src/views/eam/modules/operationCertificate/OperationCertificateForm.vue b/src/views/eam/modules/operationCertificate/OperationCertificateForm.vue index 99f1be4..4765370 100644 --- a/src/views/eam/modules/operationCertificate/OperationCertificateForm.vue +++ b/src/views/eam/modules/operationCertificate/OperationCertificateForm.vue @@ -2,63 +2,167 @@ <a-spin :spinning='confirmLoading'> <j-form-container :disabled='formDisabled'> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> + <a-form-model + ref='form' + :model='model' + :rules='validatorRules' + slot='detail' + > <a-row> <a-col :span='12'> - <a-form-model-item label='鎿嶄綔璇佺紪鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder='璇疯緭鍏ユ搷浣滆瘉缂栧彿' disabled></a-input> + <a-form-model-item + label='鎿嶄綔璇佺紪鍙�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='num' + > + <a-input + v-model='model.num' + placeholder='璇疯緭鍏ユ搷浣滆瘉缂栧彿' + disabled + ></a-input> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='濮撳悕' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='userId'> - <j-select-user-by-dep v-model='model.userId' :multi='false' /> + <a-form-model-item + label='濮撳悕' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='userId' + > + <!-- <j-select-user-by-dep + v-model='model.userId' + :multi='false' + /> --> + <j-dict-select-tag + type='list' + v-model='model.userId' + dictCode='sys_user,realname,id' + placeholder='璇烽�夋嫨鐢宠浜�' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鍙戣瘉鏃ユ湡' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='issueDate'> - <j-date placeholder='璇烽�夋嫨鍙戣瘉鏃ユ湡' v-model='model.issueDate' style='width: 100%' /> + <a-form-model-item + label='鍙戣瘉鏃ユ湡' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='issueDate' + > + <j-date + placeholder='璇烽�夋嫨鍙戣瘉鏃ユ湡' + v-model='model.issueDate' + style='width: 100%' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='寮�濮嬫椂闂�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='startTime'> - <j-date placeholder='璇烽�夋嫨寮�濮嬫椂闂�' v-model='model.startTime' style='width: 100%' /> + <a-form-model-item + label='寮�濮嬫椂闂�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='startTime' + > + <j-date + placeholder='璇烽�夋嫨寮�濮嬫椂闂�' + v-model='model.startTime' + style='width: 100%' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='缁撴潫鏃堕棿' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='endTime'> - <j-date placeholder='璇烽�夋嫨缁撴潫鏃堕棿' v-model='model.endTime' style='width: 100%' /> + <a-form-model-item + label='缁撴潫鏃堕棿' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='endTime' + > + <j-date + placeholder='璇烽�夋嫨缁撴潫鏃堕棿' + v-model='model.endTime' + style='width: 100%' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='褰撳墠鍛ㄦ湡鍒嗘暟' :labelCol='labelCol' :wrapperCol='wrapperCol' - prop='currentCycleScore'> - <a-input-number v-model='model.currentCycleScore' placeholder='璇疯緭鍏ュ綋鍓嶅懆鏈熷垎鏁�' style='width: 100%' /> + <a-form-model-item + label='褰撳墠鍛ㄦ湡鍒嗘暟' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='currentCycleScore' + > + <a-input-number + v-model='model.currentCycleScore' + placeholder='璇疯緭鍏ュ綋鍓嶅懆鏈熷垎鏁�' + style='width: 100%' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='璁惧缁熶竴缂栫爜' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='equipmentIds'> - <j-multi-select-tag type='list_multi' v-model='model.equipmentIds' dictCode='mom_eam_equipment,num,id' - placeholder='璇烽�夋嫨璁惧缁熶竴缂栫爜' /> + <a-form-model-item + label='璁惧缁熶竴缂栫爜' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='equipmentIds' + > + <j-multi-select-tag + type='list_multi' + v-model='model.equipmentIds' + dictCode='mom_eam_equipment,num,id' + placeholder='璇烽�夋嫨璁惧缁熶竴缂栫爜' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鐘舵��' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='status'> - <j-dict-select-tag type='list' v-model='model.status' dictCode='certificate_status' - placeholder='璇烽�夋嫨鐘舵��' disabled /> + <a-form-model-item + label='鐘舵��' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='status' + > + <j-dict-select-tag + type='list' + v-model='model.status' + dictCode='certificate_status' + placeholder='璇烽�夋嫨鐘舵��' + disabled + /> </a-form-model-item> </a-col> - <a-col :span='24'> - <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-textarea v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-textarea> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-model-item + label='澶囨敞' + :labelCol="{span:3}" + :wrapperCol="{span:21}" + prop='remark' + > + <a-textarea + v-model='model.remark' + placeholder='璇疯緭鍏ュ娉�' + ></a-textarea> </a-form-model-item> </a-col> - </a-row> </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model='activeKey' @change='handleChangeTabs'> - <a-tab-pane tab='鎿嶄綔璇佺鐞嗘槑缁�' :key='refKeys[0]' :forceRender='true'> + <a-tabs + v-model='activeKey' + @change='handleChangeTabs' + > + <a-tab-pane + tab='鎿嶄綔璇佺鐞嗘槑缁�' + :key='refKeys[0]' + :forceRender='true' + > <j-vxe-table keep-source :ref='refKeys[0]' @@ -70,6 +174,8 @@ :rowNumber='true' :rowSelection='true' :toolbar='true' + :bordered='true' + :alwaysEdit='true' /> </a-tab-pane> </a-tabs> @@ -95,11 +201,11 @@ return { labelCol: { xs: { span: 24 }, - sm: { span: 5 } + sm: { span: 6 }, }, wrapperCol: { xs: { span: 24 }, - sm: { span: 16 } + sm: { span: 18 }, }, model: {}, // 鏂板鏃跺瓙琛ㄩ粯璁ゆ坊鍔犲嚑琛岀┖鏁版嵁 @@ -126,7 +232,6 @@ title: '璇佷功ID', key: 'operationCertificateId', type: JVXETypes.hidden, - width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '' }, @@ -134,8 +239,8 @@ title: '鏃ユ湡', key: 'happenDate', type: JVXETypes.date, - width: '120px', placeholder: '璇疯緭鍏�${title}', + width: '300px', defaultValue: '' }, { @@ -143,16 +248,17 @@ key: 'type', type: JVXETypes.select, dictCode: 'certificate_change_type', - width: '100px', placeholder: '璇疯緭鍏�${title}', + width: '200px', defaultValue: '' + }, { title: '璁惧缁熶竴缂栫爜', key: 'equipmentId', type: JVXETypes.selectSearch, dictCode: 'mom_eam_equipment,num,id ', - width: '200px', + width: '250px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] @@ -222,7 +328,7 @@ editAfter() { this.$nextTick(() => { }) - console.log( "this.loadSubTableDataMode:"+this.loadSubTableDataMode) + console.log("this.loadSubTableDataMode:" + this.loadSubTableDataMode) // 鍔犺浇瀛愯〃鏁版嵁 if (this.model.id && this.loadSubTableDataMode) { let params = { id: this.model.id } diff --git a/src/views/eam/modules/operationCertificate/OperationCertificateModal.vue b/src/views/eam/modules/operationCertificate/OperationCertificateModal.vue index ca4cea7..6c1f4c1 100644 --- a/src/views/eam/modules/operationCertificate/OperationCertificateModal.vue +++ b/src/views/eam/modules/operationCertificate/OperationCertificateModal.vue @@ -1,14 +1,20 @@ <template> <j-modal :title='title' - :width='1200' + :width='1400' :visible='visible' :maskClosable='false' switchFullscreen @ok='handleOk' :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" - @cancel='handleCancel'> - <operation-certificate-form ref='realForm' @ok='submitCallback' :disabled='disableSubmit' :loadSubTableData='loadSubTableDataFlag' /> + @cancel='handleCancel' + > + <operation-certificate-form + ref='realForm' + @ok='submitCallback' + :disabled='disableSubmit' + :loadSubTableData='loadSubTableDataFlag' + /> </j-modal> </template> diff --git a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue index fa9fee4..3d8ca2d 100644 --- a/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue +++ b/src/views/eam/modules/operationCertificateApply/OperationCertificateApplyForm.vue @@ -2,69 +2,162 @@ <a-spin :spinning='confirmLoading'> <j-form-container :disabled='formDisabled'> <!-- 涓昏〃鍗曞尯鍩� --> - <a-form-model ref='form' :model='model' :rules='validatorRules' slot='detail'> + <a-form-model + ref='form' + :model='model' + :rules='validatorRules' + slot='detail' + > <a-row> <a-col :span='12'> - <a-form-model-item label='鐢宠鍗曠紪鍙�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='num'> - <a-input v-model='model.num' placeholder="灏嗙敱绯荤粺鐢熸垚" disabled></a-input> + <a-form-model-item + label='鐢宠鍗曠紪鍙�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='num' + > + <a-input + v-model='model.num' + placeholder="灏嗙敱绯荤粺鐢熸垚" + disabled + ></a-input> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='绫诲瀷' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='type'> - <j-dict-select-tag type='radio' v-model='model.type' dictCode='apply_type' placeholder='璇烽�夋嫨绫诲瀷' /> + <a-form-model-item + label='绫诲瀷' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='type' + > + <j-dict-select-tag + type='radio' + v-model='model.type' + dictCode='apply_type' + placeholder='璇烽�夋嫨绫诲瀷' + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鎵�鍦ㄥ崟浣�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='departId'> - <j-select-depart v-model='model.departId' :multi='true' /> + <a-form-model-item + label='鎵�鍦ㄥ崟浣�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='departId' + > + <!-- <j-select-depart + v-model='model.departId' + :multi='true' + /> --> + <j-dict-select-tag + type='list' + v-model='model.departId' + dictCode="sys_depart,depart_name,id" + placeholder='璇烽�夋嫨鎵�鍦ㄥ崟浣�' + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鑱旂郴鐢佃瘽' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='contactNumber'> - <a-input v-model='model.contactNumber' placeholder='璇疯緭鍏ヨ仈绯荤數璇�'></a-input> + <a-form-model-item + label='鑱旂郴鐢佃瘽' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='contactNumber' + > + <a-input + v-model='model.contactNumber' + placeholder='璇疯緭鍏ヨ仈绯荤數璇�' + ></a-input> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鐢宠浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='applicant'> - <j-dict-select-tag type='list' v-model='model.applicant' dictCode='sys_user,realname,id' - placeholder='璇烽�夋嫨鐢宠浜�' disabled /> + <a-form-model-item + label='鐢宠浜�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='applicant' + > + <j-dict-select-tag + type='list' + v-model='model.applicant' + dictCode='sys_user,realname,id' + placeholder='璇烽�夋嫨鐢宠浜�' + disabled + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='鍔炵悊浜�' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='handlePerson'> - <j-dict-select-tag type='list' v-model='model.handlePerson' dictCode='sys_user,realname,id' - placeholder='璇烽�夋嫨鍔炵悊浜�' /> + <a-form-model-item + label='鍔炵悊浜�' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='handlePerson' + > + <j-dict-select-tag + type='list' + v-model='model.handlePerson' + dictCode="sys_user,realname,id , del_flag!='1'" + placeholder='璇烽�夋嫨鍔炵悊浜�' + /> </a-form-model-item> </a-col> <a-col :span='12'> - <a-form-model-item label='瀹℃牳鐘舵��' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='auditStatus'> - <j-dict-select-tag type='list' v-model='model.auditStatus' dictCode='certificate_apply_status' - placeholder='璇烽�夋嫨瀹℃牳鐘舵��' disabled /> + <a-form-model-item + label='瀹℃牳鐘舵��' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='auditStatus' + > + <j-dict-select-tag + type='list' + v-model='model.auditStatus' + dictCode='certificate_apply_status' + placeholder='璇烽�夋嫨瀹℃牳鐘舵��' + disabled + /> </a-form-model-item> </a-col> - <a-col :span='24'> - <a-form-model-item label='澶囨敞' :labelCol='labelCol' :wrapperCol='wrapperCol' prop='remark'> - <a-input v-model='model.remark' placeholder='璇疯緭鍏ュ娉�'></a-input> + <!-- <a-col :span='24'> + <a-form-model-item + label='澶囨敞' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + prop='remark' + > + <a-input + v-model='model.remark' + placeholder='璇疯緭鍏ュ娉�' + ></a-input> </a-form-model-item> - </a-col> + </a-col> --> </a-row> </a-form-model> </j-form-container> <!-- 瀛愯〃鍗曞尯鍩� --> - <a-tabs v-model='activeKey' @change='handleChangeTabs'> - <a-tab-pane tab='鎿嶄綔璇佺敵璇锋槑缁嗚〃' :key='refKeys[0]' :forceRender='true'> + <a-tabs + v-model='activeKey' + @change='handleChangeTabs' + > + <a-tab-pane + tab='鎿嶄綔璇佺敵璇锋槑缁嗚〃' + :key='refKeys[0]' + :forceRender='true' + > <j-vxe-table keep-source :ref='refKeys[0]' + :bordered='true' + :alwaysEdit='true' :loading='operationCertificateApplyDetailTable.loading' :columns='operationCertificateApplyDetailTable.columns' :dataSource='operationCertificateApplyDetailTable.dataSource' - :maxHeight='300' + :maxHeight='600' :disabled='formDisabled' - :rowNumber='true' + rowNumber='2' :rowSelection='true' :toolbar='true' /> + <!-- :toolbarConfig='toolbarConfig' --> </a-tab-pane> </a-tabs> </a-spin> @@ -72,7 +165,7 @@ <script> -import { getAction,httpAction } from '@/api/manage' +import { getAction, httpAction } from '@/api/manage' import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js' import { JVXETypes } from '@/components/jeecg/JVxeTable' import { getRefPromise, VALIDATE_FAILED } from '@/components/jeecg/JVxeTable/utils/vxeUtils.js' @@ -117,6 +210,7 @@ // 鎿嶄綔璇佺敵璇锋槑缁嗚〃 operationCertificateApplyDetailTable: { loading: false, + bordered: true, dataSource: [], columns: [ { @@ -143,12 +237,13 @@ title: '璁惧缁熶竴缂栫爜', key: 'equipmentIds', type: JVXETypes.selectMultiple, - dictCode: 'mom_eam_equipment,num,id ', - width: '200px', + width: '270px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', + dictCode: 'mom_eam_equipment,num,id, del_flag!=\'1\'', validateRules: [{ required: true, message: '${title}涓嶈兘涓虹┖' }] }, + // dictCode: 'mom_eam_equipment,num,id', { title: '涓婂矖璇佸彿', key: 'appointmentCardNum', @@ -181,7 +276,7 @@ width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:'achievementDisabled' + disabled: 'achievementDisabled' }, { title: '瀹炴搷鎴愮哗', @@ -190,17 +285,17 @@ width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:'achievementDisabled' + disabled: 'achievementDisabled' }, { title: '鑰冭瘯缁撹', key: 'examinationConclusion', type: JVXETypes.select, - dictCode:'examination_conclusion', + dictCode: 'examination_conclusion', width: '200px', placeholder: '璇疯緭鍏�${title}', defaultValue: '', - disabled:'achievementDisabled' + disabled: 'achievementDisabled' }, // { // title: '鐘舵��', @@ -215,7 +310,7 @@ url: { add: '/eam/operationCertificateApply/add', edit: '/eam/operationCertificateApply/edit', - addOperationCertificate:'/eam/operationCertificate/addOperationCertificate', + addOperationCertificate: '/eam/operationCertificate/addOperationCertificate', queryById: '/eam/operationCertificateApply/queryById', operationCertificateApplyDetail: { list: '/eam/operationCertificateApply/queryOperationCertificateApplyDetailByMainId' @@ -264,12 +359,12 @@ if (this.model.id) { let params = { id: this.model.id } this.requestSubTableData(this.url.operationCertificateApplyDetail.list, params, this.operationCertificateApplyDetailTable) - }else{ + } else { getAction(this.url.getNum, { type: 'OperationCertificateApply', length: '4' }).then((res) => { - if (res.success) { - this.model.num = res.message - } - }) + if (res.success) { + this.model.num = res.message + } + }) } }, //鏍¢獙鎵�鏈変竴瀵逛竴瀛愯〃琛ㄥ崟 @@ -305,19 +400,19 @@ method = 'put' } this.confirmLoading = true - console.log("formData===>",formData); + console.log("formData===>", formData); httpAction(url, formData, method).then((res) => { if (res.success) { - if(this.achievementDisabled){ + if (this.achievementDisabled) { httpAction(this.url.addOperationCertificate, formData.operationCertificateApplyDetailList, 'post').then((res) => { if (res.success) { - this.$message.success(res.message) - }else { + // this.$message.success(res.message) + } else { this.$message.warning(res.message) } }) } - this.$message.success(res.message) + // this.$message.success(res.message) this.$emit('ok') this.close() } else { diff --git a/src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue b/src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue new file mode 100644 index 0000000..a492375 --- /dev/null +++ b/src/views/eam/modules/repairStandard/RepairStandardCategoryLeft.vue @@ -0,0 +1,449 @@ +<template> + <a-card + :loading="cardLoading" + :bordered="false" + title="缁翠慨鏍囧噯鍒嗙被" + style="height: 100%;" + > + <a-spin :spinning="loading"> + <a-alert + type="info" + :showIcon="true" + style="margin-right: 54px;" + > + <div slot="message"> + 褰撳墠锛�<span v-if="this.currSelected.title">{{ getCurrSelectedTitle() }}</span> + <a + v-if="this.currSelected.title" + style="margin-left: 10px" + @click="onClearSelected" + >鍙栨秷</a> + </div> + </a-alert> + <div class="drawer-bootom-button"> + <a-dropdown + :trigger="['click']" + placement="bottomCenter" + > + <a-menu slot="overlay"> + <a-menu-item + key="1" + @click="expandAll" + >灞曞紑鎵�鏈�</a-menu-item> + <a-menu-item + key="2" + @click="closeAll" + >鍚堝苟鎵�鏈�</a-menu-item> + <a-menu-item + key="3" + @click="refreshTree" + >鍒锋柊</a-menu-item> + </a-menu> + <a-button> + <a-icon type="bars" /> + </a-button> + </a-dropdown> + </div> + <a-input-search + @search="handleSearch" + style="width:100%;margin-top: 10px" + placeholder="妫�绱� 缁翠慨鏍囧噯缂栧彿/鍚嶇О" + allowClear + v-model="searchInput" + @change="handleChange" + /> + <!-- showLine --> + <a-tree + showLine + ref="tree" + :checkStrictly="checkStrictly" + :expandedKeys.sync="expandedKeys" + :selectedKeys="selectedKeys" + :dropdownStyle="{maxHeight:'200px',overflow:'auto'}" + :treeData="treeDataSource" + :autoExpandParent="autoExpandParent" + @select="onSelect" + @expand="onExpand" + slots="{}" + > + <template + slot="title" + slot-scope="{ title, parentId, entity, key}" + > + <span v-if="title.indexOf(searchValue) > -1"> + {{ title.substr(0, title.indexOf(searchValue)) }} + <span class="replaceSearch">{{ searchValue }}</span> + {{ title.substr(title.indexOf(searchValue) + searchValue.length) }} + </span> + <span v-else>{{ title }}</span> + <a-dropdown + v-if="entity" + :trigger="['click']" + placement="bottomCenter" + > + <a-menu slot="overlay"> + <a-menu-item v-if="key!=-1"> + <a + href="javascript:;" + @click="handleEdit(entity)" + >缂栬緫</a> + </a-menu-item> + <a-menu-item> + <a + href="javascript:;" + @click="handleAdd(entity)" + > + 娣诲姞 + <span v-if="key!=-1"> + 瀛� + </span> + 绫诲埆 + </a> + </a-menu-item> + <a-menu-item v-if="key!=-1"> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(entity.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + <!-- <a-menu-item v-if="entity.status==1 && key!=-1"> + <a-popconfirm + title="纭畾绂佺敤鍚�?" + @confirm="() => handleActive(entity.id)" + > + <a>绂佺敤</a> + </a-popconfirm> + </a-menu-item> + + <a-menu-item v-if="entity.status==0"> + <a-popconfirm + title="纭畾鍚敤鍚�?" + @confirm="() => handleActive(entity.id)" + > + <a>鍚敤</a> + </a-popconfirm> + </a-menu-item> --> + </a-menu> + <span :style="{position: 'absolute',right: 0}"> + <a-icon type="down" /> + </span> + </a-dropdown> + </template> + </a-tree> + </a-spin> + <repair-standard-category-model + ref="modalForm" + @ok="modalFormOk" + :nodeSelected="currSelected" + ></repair-standard-category-model> + </a-card> +</template> + +<script> +import { getAction, postAction, deleteAction, requestPut } from '@/api/manage' +import RepairStandardCategoryModel from './RepairStandardCategoryModel' +import Tooltip from 'ant-design-vue/es/tooltip' + +export default { + name: 'RepairStandardCategoryLeft', + props: ['value'], + components: { + RepairStandardCategoryModel, + Tooltip, + }, + data() { + return { + searchInput: '', + cardLoading: false, + loading: false, + treeDataSource: [], + selectedKeys: [], + expandedKeys: [], + url: { + loadRepairStandardCategoryTree: '/eam/repairStandardCategory/loadTree', + delete: '/eam/repairStandardCategory/delete', + list: '/eam/repairStandardCategory/list' + }, + searchValue: '', + dataList: [], + autoExpandParent: true, + checkStrictly: true, + allTreeKeys: [], + currSelected: {}, + hiding: false, + } + }, + created() { + this.queryTreeData(); + this.closeAll(); + }, + methods: { + + getCurrSelectedTitle() { + return !this.currSelected.title ? '' : this.currSelected.title; + }, + + onClearSelected() { + this.hiding = true; + this.currSelected = {}; + this.selectedKeys = []; + }, + + onSelect(selectedKeys, e) { + this.hiding = false; + let record = e.node.dataRef; + this.currSelected = Object.assign({}, record); + this.selectedKeys = [record.key]; + this.$emit('clickTreeNode', this.currSelected); + }, + + onExpand(expandedKeys) { + this.expandedKeys = expandedKeys; + this.autoExpandParent = false; + }, + + queryTreeData() { + this.loading = true; + this.cardLoading = true; + getAction(this.url.loadRepairStandardCategoryTree).then((res) => { + if (res.success) { + this.dataList = []; + this.allTreeKeys = []; + this.currSelected = {}; + this.treeDataSource = res.result; + this.generateList(res.result); + } else { + this.$message.warn(res.message); + } + }).finally(() => { + this.loading = false; + this.cardLoading = false; + }) + }, + + handleChange() { + let search = this.searchInput; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + + handleSearch(value) { + let search = value; + let expandedKeys = this.dataList + .map(item => { + if (item.title.indexOf(search) > -1) { + return this.getParentKey(item.key, this.treeDataSource); + } + return null; + }) + .filter((item, i, self) => item && self.indexOf(item) === i); + Object.assign(this, { + expandedKeys, + searchValue: search, + autoExpandParent: true, + }); + }, + + getParentKey(key, tree) { + let parentKey; + for (let i = 0; i < tree.length; i++) { + const node = tree[i]; + if (node.children) { + if (node.children.some(item => item.key === key)) { + parentKey = node.key; + } else if ( + this.getParentKey(key, node.children)) { + parentKey = this.getParentKey(key, node.children); + } + } + } + return parentKey; + }, + + generateList(data) { + for (let i = 0; i < data.length; i++) { + const node = data[i]; + const key = node.key; + const title = node.title; + this.dataList.push({ key, title: title }); + this.allTreeKeys.push(key); + if (node.children) { + this.generateList(node.children); + } + } + }, + + expandAll() { + this.expandedKeys = this.allTreeKeys; + }, + + closeAll() { + this.expandedKeys = ['-1']; + }, + + refreshTree() { + this.queryTreeData(); + }, + + handleAdd(entity) { + if (entity.id) { + this.$refs.modalForm.add(entity.id); + } else { + this.$refs.modalForm.add('-1'); + } + this.$refs.modalForm.title = "鏂板缁翠慨鏍囧噯鍒嗙被"; + this.$refs.modalForm.disableSubmit = false; + }, + + handleEdit(entity) { + this.$refs.modalForm.edit(entity); + this.$refs.modalForm.title = "缂栬緫缁翠慨鏍囧噯鍒嗙被"; + this.$refs.modalForm.disableSubmit = false; + }, + handleDelete(id) { + let that = this; + getAction(that.url.list, { parentId: id }).then((res) => { + if (res.success) { + + if (res.result.records.length == 0) { + deleteAction(that.url.delete, { id: id }).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.currSelected.title = ''; + that.queryTreeData(); + } else { + that.$message.warning("褰撳墠缁翠慨鏍囧噯鍒嗙被琚�" + res.message + "鏉$淮淇爣鍑嗗紩鐢紝鏃犳硶鎵ц鍒犻櫎鎿嶄綔锛�"); + } + }); + } else { + that.$message.warning("褰撳墠缁翠慨鏍囧噯鍒嗙被鏈�" + res.result.records.length + "鏉″瓙绫诲埆淇℃伅锛屾棤娉曟墽琛屽垹闄ゆ搷浣滐紒"); + } + } else { + that.$message.warning("绯荤粺閿欒锛�"); + } + }) + }, + + handleActive(id) { + if (!this.url.active) { + this.$message.error('璇疯缃畊rl.active灞炴��!') + return; + } + let that = this; + requestPut(that.url.active, {}, { id: id }).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.queryTreeData(); + } else { + that.$message.warning(res.message); + } + }) + }, + + modalFormOk(val) { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.queryTreeData(); + }, + + }, + //鐩戝惉 + watch: { + // currSelected(val) {//鐩戝惉currSelected 鍙樺寲锛屽皢鍙樺寲鍚庣殑鏁板�间紶閫掔粰 getCurrSelected 浜嬩欢 + // this.$bus.$emit('getCurrSelected', val) + // }, + }, + mounted() { + } +} +</script> + +<style> +.replaceSearch { + color: #00090f; + font-weight: bold; + background-color: rgb(204, 204, 204); +} +/* .ant-select-disabled { + color: rgba(241, 16, 16, 0.25); +} +.ant-select-disabled .ant-select-selection { + background: #a76b6b; +} */ +/*闅愯棌鏍戠殑榛樿icon*/ +.ant-tree-switcher-noop { + display: none !important; +} +/*闅愯棌鏍戠殑榛樿绔栫嚎*/ +.ant-tree.ant-tree-show-line li:not(:last-child):before { + border-left: 0px; +} + +.ant-card-body .table-operator { + margin: 15px; +} + +.anty-form-btn { + width: 100%; + text-align: center; +} + +.anty-form-btn button { + margin: 0 5px; +} + +.anty-node-layout .ant-layout-header { + padding-right: 0; +} + +.header { + padding: 0 8px; +} + +.header button { + margin: 0 3px; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/** Button鎸夐挳闂磋窛 */ +.ant-btn { + margin-left: 3px; +} +.ant-alert { + padding: 5px 15px 5px 37px; +} +.drawer-bootom-button { + position: absolute; + top: 1px; + /* padding: 10px 16px; */ + text-align: left; + right: 0; + background: #fff; + border-radius: 0 0 2px 2px; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue b/src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue new file mode 100644 index 0000000..00160c1 --- /dev/null +++ b/src/views/eam/modules/repairStandard/RepairStandardCategoryModel.vue @@ -0,0 +1,316 @@ +<template> + <a-modal + :title="title" + :width="950" + :visible="visible" + :maskClosable="false" + :confirmLoading="confirmLoading" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="涓婄骇绫诲埆:" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-tree-select + tree-default-expand-all + :disabled="true" + show-search + allow-clear + :dropdown-style="{ maxHeight: '500px', overflow: 'auto' }" + :tree-data="repairStandardCategoryTree" + placeholder="璇烽�夋嫨涓婄骇绫诲埆" + treeNodeFilterProp="title" + v-decorator="[ 'parentId', validatorRules.parentId]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :lg="12"> + <a-form-item + label="缁翠慨鏍囧噯缂栧彿:" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + placeholder="璇疯緭鍏ョ淮淇爣鍑嗙紪鍙�" + v-decorator="['num', validatorRules.num ]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item + label="缁翠慨鏍囧噯鍚嶇О:" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + placeholder="璇疯緭鍏ョ淮淇爣鍑嗗悕绉�" + v-decorator="['name', validatorRules.name ]" + /> + </a-form-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-item + :labelCol="{span:3}" + :wrapperCol="{span:21}" + label="澶囨敞:" + > + <a-textarea + placeholder="璇疯緭鍏ュ娉�" + allow-clear + v-decorator="['remark', validatorRules.remark]" + /> + </a-form-item> + </a-col> + </a-row> + + </a-form> + </a-spin> + + <template slot="footer"> + <a-button + :style="{marginRight: '8px'}" + @click="handleCancel" + > + 鍏抽棴 + </a-button> + <a-button + :disabled="confirmLoading" + :loading="confirmLoading" + @click="handleOk" + type="primary" + >纭畾</a-button> + </template> + + </a-modal> +</template> + +<script> +import pick from 'lodash.pick' +import { getAction, postAction, requestPut } from '@/api/manage' +import { duplicateCheck } from '@/api/api' + +export default { + name: 'ProcessParametersCategoryModel', + props: { + nodeSelected: { + type: Object, + default: {} + } + }, + data() { + return { + title: "鎿嶄綔", + visible: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + parentId: { + rules: [ + { required: true, message: '璇疯緭鍏ヤ笂绾х被鍒�!' }, + ] + }, + num: { + rules: [ + { required: true, message: '璇疯緭鍏ュ垎绫荤紪鍙�!' }, + { min: 0, max: 30, message: '闀垮害涓嶈秴杩� 30 涓瓧绗�', trigger: 'blur' }, + // { validator: this.validateNum }, + ] + }, + name: { + rules: [ + { required: true, message: '璇疯緭鍏ュ垎绫诲悕绉�!' }, + { min: 0, max: 30, message: '闀垮害涓嶈秴杩� 30 涓瓧绗�', trigger: 'blur' }, + // { validator: this.validateName }, + ] + }, + description: { + rules: [ + { min: 0, max: 100, message: '闀垮害涓嶈秴杩� 100 涓瓧绗�', trigger: 'blur' } + ] + } + }, + url: { + add: "/eam/repairStandardCategory/add", + edit: "/eam/repairStandardCategory/edit", + loadRepairStandardCategoryTree: '/eam/repairStandardCategory/loadTree', + getNum: '/eam/sysIdentity/getNumNew', + }, + repairStandardCategoryTree: [], + } + }, + created() { + }, + methods: { + + loadRepairStandardCategoryTree() { + this.loading = true; + this.cardLoading = true; + getAction(this.url.loadRepairStandardCategoryTree, {}).then((res) => { + if (res.success) { + let array = res.result; + this.repairStandardCategoryTree = array; + } else { + this.$message.warn(res.message); + } + }).finally(() => { + this.loading = false; + this.cardLoading = false; + }) + }, + + add(parentId) { + this.edit({ 'parentId': parentId }); + }, + + edit(record) { + console.log("record==", record) + this.loadRepairStandardCategoryTree(); + this.form.resetFields(); + this.model = Object.assign({}, record); + this.visible = true; + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model, 'parentId', 'num', 'name', 'remark')); + }); + // if (!record.id) { + // this.$nextTick(() => { + // getAction(this.url.getNum, { type: 'ProcessParametersCategory', length: '4' }).then((res) => { + // if (res.success) { + // this.form.setFieldsValue({ num: res.message }); + // } + // }) + // }); + // } + }, + + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + that.form.validateFields((err, values) => { + if (!err) { + let formData = Object.assign(this.model, values); + if (formData.parentId == formData.id) { + that.$message.warning("璇蜂笉瑕侀�夋嫨褰撳墠鎿嶄綔鏁版嵁涓轰笂绾х被鍒紒"); + } else { + that.confirmLoading = true; + let obj; + if (!that.model.id) { + obj = postAction(that.url.add, formData); + } else { + obj = requestPut(that.url.edit, formData, { id: that.model.id }); + } + obj.then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok', new Date()); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + } + }) + }, + + handleCancel() { + this.close(); + }, + + close() { + this.$emit('close'); + this.visible = false; + }, + + //楠岃瘉 缂栧彿 + validateNum(rule, value, callback) { + var params = { + tableName: 'mom_eam_process_parameters_category', + fieldName: 'num', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: '0', + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback(); + } else { + callback("宸ヨ壓鍙傛暟鍒嗙被缂栧彿宸插瓨鍦�!"); + } + }) + }, + + //楠岃瘉 鍚嶇О + validateName(rule, value, callback) { + var params = { + tableName: 'mom_eam_process_parameters_category', + fieldName: 'name', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: '0', + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback(); + } else { + callback("宸ヨ壓鍙傛暟鍒嗙被鍚嶇О宸插瓨鍦�!"); + } + }) + }, + + } + +} +</script> + +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/repairStandard/RepairStandardModel.vue b/src/views/eam/modules/repairStandard/RepairStandardModel.vue new file mode 100644 index 0000000..d56adcd --- /dev/null +++ b/src/views/eam/modules/repairStandard/RepairStandardModel.vue @@ -0,0 +1,322 @@ +<template> + <a-modal + :title="title" + :width="1050" + :visible="visible" + :maskClosable="false" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="缁翠慨鏍囧噯鍒嗙被" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ヤ笂绾х淮淇爣鍑嗙紪鍙�'" + v-decorator="['repairStandardCategoryNumName', validatorRules.repairStandardCategoryNumName ]" + /> + </a-form-item> + </a-col> + <!-- <a-col :span="12"> + <a-form-item + label="璁¢噺鍗曚綅" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <j-dict-select-tag + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇烽�夋嫨璁¢噺鍗曚綅'" + :triggerChange="true" + dictCode="mom_base_unit,name,id,status!='0' and del_flag!='1'" + v-decorator="['unitId', validatorRules.unitId]" + /> + </a-form-item> + </a-col> --> + </a-row> + + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="缁翠慨鏍囧噯缂栧彿" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ淮淇爣鍑嗙紪鐮侊紒'" + v-decorator="['num', validatorRules.num ]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item + label="缁翠慨鏍囧噯鍚嶇О" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ淮淇爣鍑嗗悕绉�'" + v-decorator="['name', validatorRules.name ]" + /> + </a-form-item> + </a-col> + </a-row> + + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-item + :labelCol="{span:3}" + :wrapperCol="{span:21}" + label="澶囨敞" + > + <a-textarea + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" + v-decorator="['remark', validatorRules.remark]" + /> + </a-form-item> + </a-col> + </a-row> + + </a-form> + </a-spin> + + <template slot="footer"> + <a-button + :style="{marginRight: '8px'}" + @click="handleCancel" + > + 鍏抽棴 + </a-button> + <!-- <a-button + v-if="!this.model.id" + :disabled="disableSubmit || confirmLoading" + :loading="confirmLoading" + @click="handleOk" + type="primary" + >淇濆瓨骞剁户缁柊澧�</a-button>--> + <a-button + :disabled="disableSubmit || confirmLoading" + :loading="confirmLoading" + @click="handleOk" + type="primary" + >纭畾</a-button> + <!-- icon="save" --> + </template> + + </a-modal> +</template> + +<script> +import pick from 'lodash.pick' +import { getAction, postAction, requestPut } from '@/api/manage' +import { duplicateCheck } from '@/api/api' + +export default { + name: 'RepairStandardModel', + data() { + return { + title: "鎿嶄綔", + visible: false, + codeDisable: true, + disableSubmit: false, + repairStandardCategoryId: '', + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + num: { + rules: [ + { required: true, message: '璇疯緭鍏ョ淮淇爣鍑嗙紪鍙�!' }, + // { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, + // { validator: this.validateNum }, + ] + }, + name: { + rules: [ + { required: true, message: '璇疯緭鍏ョ淮淇爣鍑嗗悕绉�!' }, + // { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' }, + // { validator: this.validateName }, + ] + }, + // unitId: { + // rules: [ + // { required: true, message: '璇烽�夋嫨璁¢噺鍗曚綅!' }, + // ] + // }, + remark: { + rules: [ + { min: 0, max: 100, message: '闀垮害涓嶈秴杩� 100 涓瓧绗�', trigger: 'blur' }, + ] + } + }, + url: { + add: "/eam/repairStandard/add", + edit: "/eam/repairStandard/edit", + getNum: '/eam/sysIdentity/getNumNew', + }, + //鏂板銆佺紪杈戙�佸垹闄ゃ�佹壒閲忓垹闄ゆ搷浣滄敼鍙樻暟鎹悗鍒锋柊鍏宠仈鐨勭粍浠剁殑鐩戝惉灞炴�� + alterFlag: "" + } + }, + created() { + }, + methods: { + + add(record) { + this.edit(record); + }, + + edit(record) { + this.form.resetFields(); + this.model = Object.assign({}, record); + this.visible = true; + this.disableSubmit = false; + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model, 'repairStandardCategoryNumName', 'num', 'name', 'remark')) + }); + if (record.id) { + this.codeDisable = true; + } else { + this.codeDisable = false; + this.$nextTick(() => { + // getAction(this.url.getNum, { type: 'ProcessParameters', length: '4' }).then((res) => { + // if (res.success) { + // this.form.setFieldsValue({ num: res.message }); + // } + // }) + }); + } + }, + + close() { + this.$emit('close'); + this.visible = false; + }, + + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let formData = Object.assign(this.model, values); + let obj; + if (!this.model.id) { + formData.repairStandardCategoryId = this.repairStandardCategoryId + obj = postAction(this.url.add, formData); + } else { + obj = requestPut(this.url.edit, formData, { id: this.model.id }); + } + obj.then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + that.alterFlag = new Date(); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + }) + }, + + handleCancel() { + this.close() + }, + + //楠岃瘉 缂栧彿 + validateNum(rule, value, callback) { + var params = { + tableName: 'mom_eam_process_parameters', + fieldName: 'num', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: '0', + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback(); + } else { + callback("缂栧彿宸插瓨鍦�!"); + } + }) + }, + + //楠岃瘉 鍚嶇О + validateName(rule, value, callback) { + var params = { + tableName: 'mom_eam_process_parameters', + fieldName: 'name', + fieldVal: value, + dataId: this.model.id, + //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true + delFlag: '0', + }; + duplicateCheck(params).then((res) => { + if (res.success) { + callback(); + } else { + callback("鍚嶇О宸插瓨鍦�!"); + } + }) + }, + + }, + watch: { + alterFlag() { + this.$bus.$emit('queryTreeData'); + }, + } +} +</script> + +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/repairStandard/RepairStandardRight.vue b/src/views/eam/modules/repairStandard/RepairStandardRight.vue new file mode 100644 index 0000000..4a17f82 --- /dev/null +++ b/src/views/eam/modules/repairStandard/RepairStandardRight.vue @@ -0,0 +1,388 @@ +<template> + <a-card + :bordered="false" + title="缁翠慨鏍囧噯" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="8" + :sm="8" + > + <a-form-item label="缁翠慨鏍囧噯缂栫爜"> + <j-input + placeholder="璇疯緭鍏ョ淮淇爣鍑嗙紪鐮�" + v-model="queryParam.num" + ></j-input> + </a-form-item> + </a-col> + <a-col + :md="8" + :sm="8" + > + <a-form-item label="缁翠慨鏍囧噯鍚嶇О"> + <j-input + placeholder="璇疯緭鍏ョ淮淇爣鍑嗗悕绉�" + v-model="queryParam.name" + ></j-input> + </a-form-item> + </a-col> + </a-row> + </a-form> + </div> + + <!-- 鎿嶄綔鎸夐挳鍖哄煙 --> + <div + class="table-operator" + style="margin-top: 5px" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + >閲嶇疆</a-button> + <a-button + @click="handleAdd" + type="primary" + icon="plus" + :hidden="disabled" + >鏂板</a-button> + <a-button + type="primary" + icon="download" + @click="handleExportXls('鍘熷洜')" + >瀵煎嚭</a-button> + <a-dropdown v-if="selectedRowKeys.length > 0"> + <a-button style="margin-left: 8px"> + 鎵归噺鎿嶄綔 + <a-icon type="down" /> + </a-button> + <a-menu slot="overlay"> + <a-menu-item @click="batchDel"> + <a-icon type="delete" />鍒犻櫎 + </a-menu-item> + </a-menu> + </a-dropdown> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <a-table + ref="table" + bordered + size="middle" + rowKey="id" + :columns="columns" + :rowClassName="tableRowClass" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" + @change="handleTableChange" + :scroll="{ x: true}" + > + <!--瀛楃涓茶秴闀挎埅鍙栫渷鐣ュ彿鏄剧ず--> + <span + slot="num" + slot-scope="text" + style="font-weight: bold" + > + <j-ellipsis + :value="text" + :length="15" + /> + </span> + <span + slot="name" + slot-scope="text" + style="font-weight: bold" + > + <j-ellipsis + :value="text" + :length="15" + /> + </span> + <span + slot="model" + slot-scope="text" + > + <j-ellipsis + :value="text" + :length="15" + /> + </span> + <!-- <span + slot="status" + slot-scope="text,record" + > + <a-badge + v-if="record.status==1" + status="success" + /> + <span + v-if="record.status==1" + class="success" + >鍚敤</span> + <a-badge + v-if="record.status==0" + status="error" + /> + <span + v-if="record.status==0" + class="error" + >绂佺敤</span> + </span> --> + + <span + slot="action" + slot-scope="text, record" + > + <a @click="handleEdit(record)">缂栬緫</a> + <a-divider type="vertical" /> + <a-dropdown> + <a class="ant-dropdown-link"> + 鏇村 + <a-icon type="down" /> + </a> + <a-menu slot="overlay"> + <a-menu-item> + <a + href="javascript:;" + @click="handleDetail(record)" + >璇︽儏</a> + </a-menu-item> + + <a-menu-item> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> + <!-- <a-menu-item v-else> + <a-popconfirm title="褰撳墠淇℃伅宸茶寮曠敤锛岃鍏堝垹闄ゅ叧鑱斾俊鎭悗鍐嶆墽琛屽垹闄ゆ搷浣�"> + <a class="frozenRowClass">鍒犻櫎</a> + </a-popconfirm> + </a-menu-item> --> + + <!-- <a-menu-item v-if="record.status==1"> + <a-popconfirm + title="纭畾绂佺敤鍚�?" + @confirm="() => handleActive(record.id)" + > + <a>绂佺敤</a> + </a-popconfirm> + </a-menu-item> --> + <!-- <a-menu-item v-if="record.status==0"> + <a-popconfirm + title="纭畾鍚敤鍚�?" + @confirm="() => handleActive(record.id)" + > + <a>鍚敤</a> + </a-popconfirm> + </a-menu-item> --> + </a-menu> + </a-dropdown> + </span> + + </a-table> + </div> + <!-- table鍖哄煙-end --> + + <repair-standard-model + ref="modalForm" + @ok="modalFormOk" + :nodeSelected="nodeSelected" + ></repair-standard-model> + </a-card> +</template> + +<script> + +import JDictSelectTag from '@/components/dict/JDictSelectTag' +import { requestPut } from '@/api/manage' +import RepairStandardModel from './RepairStandardModel' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JInput from '@/components/jeecg/JInput' +import JEllipsis from "@/components/jeecg/JEllipsis"; +import Tooltip from 'ant-design-vue/es/tooltip' +export default { + name: 'ProcessParametersRight', + mixins: [JeecgListMixin], + components: { + Tooltip, + RepairStandardModel, + JDictSelectTag, + JInput, + JEllipsis, + }, + props: { + recordSelect: {}, + }, + data() { + return { + disabled: true, + nodeSelected: {}, + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + }, + width: 50, + }, + { + title: '缁翠慨鏍囧噯缂栫爜', + align: 'center', + dataIndex: 'num', + scopedSlots: { + customRender: 'num' + }, + // sorter: true, + }, + { + title: '缁翠慨鏍囧噯鍚嶇О', + align: 'center', + dataIndex: 'name', + scopedSlots: { + customRender: 'name' + }, + // sorter: true, + }, + { + title: '缁翠慨鏍囧噯鍒嗙被', + align: 'center', + dataIndex: 'repairStandardCategoryNumName', + scopedSlots: { + customRender: 'repairStandardCategoryNumName' + }, + // sorter: true, + }, + // { + // title: '璁¢噺鍗曚綅', + // align: 'center', + // dataIndex: 'unitId_dictText', + // scopedSlots: { + // customRender: 'unitId_dictText' + // }, + // // sorter: true, + // }, + { + title: '鍒涘缓浜�', + align: "center", + dataIndex: 'createBy', + }, + { + title: '鍒涘缓鏃堕棿', + align: "center", + dataIndex: 'createTime', + }, + // { + // title: '淇敼浜�', + // align: "center", + // dataIndex: 'updateBy', + // }, + // { + // title: '淇敼鏃堕棿', + // align: "center", + // dataIndex: 'updateTime', + // }, + { + + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + scopedSlots: { + customRender: 'action' + }, + width: 150, + fixed: 'right', + }, + ], + url: { + list: '/eam/repairStandard/list', + delete: "/eam/repairStandard/delete", + deleteBatch: "/eam/repairStandard/deleteBatch", + exportXlsUrl: "/eam/repairStandard/exportXls", + importExcelUrl: "eam/repairStandard/importExcel", + }, + } + }, + + + methods: { + handleAdd: function () { + this.$refs.modalForm.add({ repairStandardCategoryNumName: this.repairStandardCategoryNumName }); + this.$refs.modalForm.title = "鏂板"; + this.$refs.modalForm.disableSubmit = false; + this.$refs.modalForm.repairStandardCategoryId = this.nodeSelected.key; + }, + //绂佺敤鐘舵�佹牱寮� + tableRowClass(record, index) { + // if (record.status != "1") { + // return "frozenRowClass"; + // } + return ""; + }, + searchReset() { + if ('-1' != this.nodeSelected.key) { + this.disabled = false; + this.queryParam = []; + this.queryParam.repairStandardCategoryId = this.nodeSelected.key; + } else { + this.disabled = true; + this.queryParam = []; + } + this.loadData(1); + }, + }, + watch: { + recordSelect(val) { + this.nodeSelected = val; + this.repairStandardCategoryNumName = this.nodeSelected.rfield1 + "/" + this.nodeSelected.rfield2; + if ('-1' != this.nodeSelected.key) { + this.disabled = false; + this.queryParam = []; + this.queryParam.repairStandardCategoryId = this.nodeSelected.key; + } else { + this.disabled = true; + this.queryParam = []; + } + this.loadData(1); + } + }, + +} +</script> + +<style lang="less" scoped> +@import '~@assets/less/common.less'; +/deep/ .frozenRowClass { + color: #c9c9c9; +} +/deep/ .success { + color: green; +} +/deep/ .error { + color: red; +} +/deep/ .notShow { + display: none; +} +.fontweight { + font-weight: bold; +} +</style> \ No newline at end of file diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue index c530e59..6cf24f4 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderActualHoursReport.vue @@ -35,15 +35,25 @@ <!-- <a-switch @change='(e)=>onChange(e, record.key, col, index)' :value='text' :disabled="repairOrderStatus=='4'"--> <!-- v-if="col.dataIndex == 'principalContractor'" />--> - <a-select default-value='0' :value='text' :disabled="repairOrderStatus=='4'" - v-if="col.dataIndex == 'principalContractor'" - style="width: 100%;" - @change='(e)=>handleChange(e, record.key, col, index)'> + <a-select + default-value='0' + :value='text' + :disabled="repairOrderStatus=='4'" + v-if="col.dataIndex == 'principalContractor'" + style="width: 100%;" + @change='(e)=>handleChange(e, record.key, col, index)' + > <a-select-opt-group> - <a-select-option value='1' style="width: 100%;"> + <a-select-option + value='1' + style="width: 100%;" + > 鏄� </a-select-option> - <a-select-option value='0' style="width: 100%;"> + <a-select-option + value='0' + style="width: 100%;" + > 鍚� </a-select-option> </a-select-opt-group> @@ -61,14 +71,16 @@ :value='text' format='YYYY-MM-DD HH:mm' :show-time="{ defaultValue: moment('00:00', 'HH:mm') }" - v-if="col.dataIndex == 'startTime'" @change='(e)=>handleChange(e, record.key, col, index)' + v-if="col.dataIndex == 'startTime'" + @change='(e)=>handleChange(e, record.key, col, index)' /> <!-- :disabled="repairOrderStatus=='4'"--> <a-date-picker :value='text' format='YYYY-MM-DD HH:mm' :show-time="{ defaultValue: moment('00:00', 'HH:mm') }" - v-if="col.dataIndex == 'endTime'" @change='(e)=>handleChange(e, record.key, col, index)' + v-if="col.dataIndex == 'endTime'" + @change='(e)=>handleChange(e, record.key, col, index)' /> <!-- <a-input-number--> @@ -225,7 +237,7 @@ key: 'rowIndex', width: 60, align: 'center', - customRender: function(t, r, index) { + customRender: function (t, r, index) { return parseInt(index) + 1 } }, @@ -297,7 +309,7 @@ repairOrderId: { immediate: true, handler(val) { - if(this.repairOrderId){ + if (this.repairOrderId) { this.clearList() this.queryParam['repairOrderId'] = val this.loadData(1) @@ -310,7 +322,7 @@ onChange(checked) { console.log(`a-switch to ${checked}`) }, -//鏃堕棿閫夋嫨淇敼 + //鏃堕棿閫夋嫨淇敼 onStartTimeChange() { console.log() @@ -395,26 +407,26 @@ } if ('principalContractor' == column.dataIndex) { target['principalContractor'] = value - if(value==='1'){ - for(var i = 0;i<temp.length;i++){ - if(i!==index){ - temp[i]['principalContractor']='0'; - } + if (value === '1') { + for (var i = 0; i < temp.length; i++) { + if (i !== index) { + temp[i]['principalContractor'] = '0'; + } } } } if ('actualHour' == column.dataIndex) { - if(target['theoreticalTime']!==null&&target['theoreticalTime']<value){ + if (target['theoreticalTime'] !== null && target['theoreticalTime'] < value) { that.$message.error('璇锋鏌ョ' + (index + 1) + '琛屽疄闄呭伐鏃朵笉鑳藉皬浜庣悊璁哄伐鏃�,璇烽噸鏂板~鍐�') - target['actualHour']=null; - }else if(target['theoreticalTime']===null||target['theoreticalTime']===undefined){ + target['actualHour'] = null; + } else if (target['theoreticalTime'] === null || target['theoreticalTime'] === undefined) { that.$message.error('璇锋鏌ョ' + (index + 1) + '璇峰厛濉啓寮�濮嬫椂闂翠笌缁撴潫鏃堕棿') - target['actualHour']=null; - }else{ + target['actualHour'] = null; + } else { target['actualHour'] = value } - + } // if ('theoreticalTime' == column.dataIndex) { // target['theoreticalTime'] = value @@ -423,28 +435,28 @@ if (target['endTime'] == null) { target['startTime'] = value - } else { + } else { const diffInHours = this.getTimeDiff(value, target['endTime']) if (diffInHours < 0) { target['startTime'] = '' target['theoreticalTime'] = '' that.$message.error('寮�濮嬫椂闂翠笉鑳藉皬浜庣粨鏉熸椂闂�,璇烽噸鏂伴�夋嫨') } else { - if(target['actualHour']!==null){ - if(diffInHours<target['actualHour']){ - target['startTime'] = '' - target['theoreticalTime'] = '' - that.$message.error('瀹為檯宸ユ椂涓嶈兘灏忎簬鐞嗚宸ユ椂,璇烽噸鏂板~鍐�') - }else{ - target['startTime'] = value - target['theoreticalTime'] = diffInHours - } - }else{ + if (target['actualHour'] !== null) { + if (diffInHours < target['actualHour']) { + target['startTime'] = '' + target['theoreticalTime'] = '' + that.$message.error('瀹為檯宸ユ椂涓嶈兘灏忎簬鐞嗚宸ユ椂,璇烽噸鏂板~鍐�') + } else { + target['startTime'] = value + target['theoreticalTime'] = diffInHours + } + } else { target['startTime'] = value target['theoreticalTime'] = diffInHours } } - } + } } if ('endTime' == column.dataIndex) { @@ -457,16 +469,16 @@ target['theoreticalTime'] = '' that.$message.error('寮�濮嬫椂闂翠笉鑳藉皬浜庣粨鏉熸椂闂�,璇烽噸鏂伴�夋嫨') } else { - if(target['actualHour']!==null){ - if(diffInHours<target['actualHour']){ - target['endTime'] = '' - target['theoreticalTime'] = '' - that.$message.error('瀹為檯宸ユ椂涓嶈兘灏忎簬鐞嗚宸ユ椂,璇烽噸鏂板~鍐�') - }else{ - target['endTime'] = value - target['theoreticalTime'] = diffInHours - } - }else{ + if (target['actualHour'] !== null) { + if (diffInHours < target['actualHour']) { + target['endTime'] = '' + target['theoreticalTime'] = '' + that.$message.error('瀹為檯宸ユ椂涓嶈兘灏忎簬鐞嗚宸ユ椂,璇烽噸鏂板~鍐�') + } else { + target['endTime'] = value + target['theoreticalTime'] = diffInHours + } + } else { target['endTime'] = value target['theoreticalTime'] = diffInHours } diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue index dc2e7d1..7a0f2fe 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderActualMaterialReport.vue @@ -20,28 +20,29 @@ > <div :key="col.dataIndex"> <a-input - :value="text" - v-if="col.dataIndex == 'sparePartId'" - auto-size - placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" - @change="(e)=>handleChange(e, record.key, col, index)" - :disabled="record.disabled" + :value="text" + v-if="col.dataIndex == 'sparePartId'" + auto-size + placeholder="璇疯緭鍏ョ墿鏂欏悕绉�" + @change="(e)=>handleChange(e, record.key, col, index)" + :disabled="record.disabled" /> <a-input - :value="text" - v-if="col.dataIndex == 'repairOrderAmUda1'" - auto-size - placeholder="璇疯緭鍏ュ崟浣�" - @change="(e)=>handleChange(e, record.key, col, index)" - :disabled="record.disabled" + :value="text" + v-if="col.dataIndex == 'repairOrderAmUda1'" + auto-size + placeholder="璇疯緭鍏ュ崟浣�" + @change="(e)=>handleChange(e, record.key, col, index)" + :disabled="record.disabled" /> - <j-dict-select-tag - :value='text' - v-if="col.dataIndex == 'outboundOrderId'" - dictCode="material_type" - :disabled="true" - style="width: 100%;" - @change='(e)=>handleChange(e, record.key, col, index)'/> + <j-dict-select-tag + :value='text' + v-if="col.dataIndex == 'outboundOrderId'" + dictCode="material_type" + :disabled="false" + style="width: 100%;" + @change='(e)=>handleChange(e, record.key, col, index)' + /> <a-input-number :value="text" v-if="col.dataIndex == 'actualQuantity'" @@ -95,8 +96,9 @@ type="dashed" icon="plus" @click="addMaterial" - :disabled="mainId.status!='3'||( mainId.repairOrderUda1!='needPart'&&mainId.repairOrderUda1!='needSpare')" + :disabled="mainId.status!='3'" >娣诲姞瀹為檯鐢ㄦ枡</a-button> + <!-- :disabled="mainId.status!='3'||( mainId.repairOrderUda1!='needPart'&&mainId.repairOrderUda1!='needSpare')" --> <div :style="{width: '100%',border: '1px solid #e9e9e9',padding: '10px 16px',background: '#fff',}"> <a-row :style="{textAlign:'right'}"> <a-button @@ -201,74 +203,39 @@ return parseInt(index) + 1; } }, - // { - // title: '棰嗘枡鍑哄簱鍗�', - // dataIndex: 'num', - // align: "center", - // width: 150, - // }, - // { - // title: '澶囦欢缂栫爜', - // dataIndex: 'sparePartNum', - // align: "center", - - // }, { title: '鐗╂枡鍚嶇О', dataIndex: 'sparePartId', scopedSlots: { customRender: 'sparePartId' }, align: "center", - className: 'red', - width: 250, + className: 'red', + // width: 250, }, { title: '鐗╂枡绉嶇被', dataIndex: 'outboundOrderId', scopedSlots: { customRender: 'outboundOrderId' }, align: "center", - width: 250, + // width: 250, }, - // { - // title: '鍨嬪彿', - // dataIndex: 'sparePartModel', - // align: "center", - // }, - // { - // title: '鍒堕�犲晢', - // dataIndex: 'constructorName', - // align: "center", - // }, { title: '鍗曚綅', dataIndex: 'repairOrderAmUda1', scopedSlots: { customRender: 'repairOrderAmUda1' }, align: "center", className: 'red', - width: 250, }, - // { - // title: '涓绘暟閲�', - // align: 'center', - // dataIndex: 'mainQuantity' - // }, - // { - // title: '鍙敤鏁伴噺', - // align: 'center', - // dataIndex: 'availableQuantity' - // }, { title: '浣跨敤鏁伴噺', dataIndex: 'actualQuantity', align: "center", scopedSlots: { customRender: 'actualQuantity' }, className: 'red', - width: 250, }, { title: '鎿嶄綔', dataIndex: 'action', align: 'center', - width: 250, scopedSlots: { customRender: 'action' } } ], @@ -286,7 +253,7 @@ watch: { mainId: { immediate: true, - deep:true, + deep: true, handler(val) { console.log(val) if (!this.mainId.id) { @@ -314,7 +281,8 @@ // this.$refs.JSelectSparePartModal.showModals(ids); // this.$refs.JSelectSparePartModal.title = '閫夋嫨澶囦欢淇℃伅' // this.$refs.JSelectSparePartModal.disableSubmit = false - this.dataSource.push({ sparePartId: '', outboundOrderId: this.mainId.repairOrderUda1,repairOrderAmUda1: '', actualQuantity:'',repairOrderId:this.mainId.id }) + // this.dataSource.push({ sparePartId: '', outboundOrderId: this.mainId.repairOrderUda1, repairOrderAmUda1: '', actualQuantity: '', repairOrderId: this.mainId.id }) + this.dataSource.push({ sparePartId: '', outboundOrderId: '', repairOrderAmUda1: '', actualQuantity: '', repairOrderId: this.mainId.id }) }, handleCancel() { this.$bus.$emit('closeDrawer') @@ -342,14 +310,17 @@ // this.dataSource = temp // } if ('sparePartId' == column.dataIndex) { - target['sparePartId'] = value.target.value + target['sparePartId'] = value.target.value } if ('repairOrderAmUda1' == column.dataIndex) { - target['repairOrderAmUda1'] = value.target.value - } + target['repairOrderAmUda1'] = value.target.value + } if ('actualQuantity' == column.dataIndex) { target['actualQuantity'] = value - } + } + if ('outboundOrderId' == column.dataIndex) { + target['outboundOrderId'] = value + } }, clearList() { this.dataSource = []; @@ -448,6 +419,10 @@ that.$message.warning('璇峰~鍐欑' + (i + 1) + '琛屼娇鐢ㄦ暟閲忥紒') return false } + if (workHoursDataSource[i].outboundOrderId == undefined || workHoursDataSource[i].outboundOrderId == null || workHoursDataSource[i].outboundOrderId == '') { + that.$message.warning('璇峰~鍐欑' + (i + 1) + '琛岀墿鏂欑绫伙紒') + return false + } } } if (that.dataSource.length === 0) { diff --git a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue index 07aec8f..6ca85b0 100644 --- a/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue +++ b/src/views/eam/modules/repairorder/moudles/RepairOrderFaultAnalysisReport.vue @@ -1,15 +1,9 @@ <template> - <a-card - :bordered=true - > - <a-spin :spinning='confirmLoading'> - <a-form - :form="form" - > + <a-card :bordered=true> + <a-spin :spinning='confirmLoading'> + <a-form :form="form"> <a-row> - <a-col - :span='12' - > + <a-col :span='12'> <a-form-item label='鏁呴殰鐜拌薄' :labelCol='labelCol' @@ -65,24 +59,97 @@ </a-form-item> </a-col> </a-row> - <a-button - :style="{marginRight: '8px'}" - @click='handleEdit2()' - :disabled="disabledButton||!disabledEdit" - :loading='confirmLoading' - > - 缂栬緫 - </a-button> + <a-row> + <a-col :span='12'> + <a-form-item + label='鏁呴殰鍘熷洜' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <!-- <a-textarea + placeholder='璇疯緭鍏ユ晠闅滃師鍥�' + v-decorator="['repairOrderFaultAnalysisUda2', validatorRules.repairOrderFaultAnalysisUda2]" + :disabled="disabledEdit" + ></a-textarea> --> + <j-dict-select-tag + allow-clear + :disabled="disabledEdit" + :placeholder="'璇烽�夋嫨鏁呴殰鍘熷洜'" + :triggerChange="true" + dictCode="repair_order_fault_cause" + v-decorator="['repairOrderFaultAnalysisUda2',validatorRules.repairOrderFaultAnalysisUda2]" + /> + </a-form-item> + </a-col> + <a-col :span='12'> + <a-form-item + label='瀹夊叏鎺柦' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-textarea + allow-clear + placeholder='璇疯緭鍏ュ畨鍏ㄦ帾鏂�' + v-decorator="['repairOrderFaultAnalysisUda3', validatorRules.repairOrderFaultAnalysisUda3]" + :disabled="disabledEdit" + ></a-textarea> + </a-form-item> + </a-col> - <a-button - @click='handleOk()' - type='primary' - :loading='confirmLoading' - :disabled="disabledButton||disabledEdit" - >淇濆瓨 - </a-button> + </a-row> + <a-row> + <a-col + v-if=" '99' == this.form.getFieldsValue(['repairOrderFaultAnalysisUda2']).repairOrderFaultAnalysisUda2" + :span='12' + > + <a-form-item + label='鏁呴殰鍘熷洜鎻忚堪' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-textarea + allow-clear + placeholder='璇疯緭鍏ユ晠闅滃師鍥犳弿杩�' + v-decorator="['repairOrderFaultAnalysisUda4', validatorRules.repairOrderFaultAnalysisUda4]" + :disabled="disabledEdit" + ></a-textarea> + </a-form-item> + </a-col> + <a-col :span='12'> + <a-form-item + label='缁翠慨鏍囧噯' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <j-dict-select-tag + allow-clear + :disabled="disabledEdit" + :placeholder="'璇烽�夋嫨缁翠慨鏍囧噯'" + :triggerChange="true" + dictCode="mom_eam_repair_standard,name,id, del_flag!='1'" + v-decorator="['repairOrderFaultAnalysisUda5',validatorRules.repairOrderFaultAnalysisUda5]" + /> + </a-form-item> + </a-col> + </a-row> + <a-button + :style="{marginRight: '8px'}" + @click='handleEdit2()' + :disabled="disabledButton||!disabledEdit" + :loading='confirmLoading' + > + 缂栬緫 + </a-button> + + <a-button + @click='handleOk()' + type='primary' + :loading='confirmLoading' + :disabled="disabledButton||disabledEdit" + >淇濆瓨 + </a-button> </a-form> - </a-spin> + </a-spin> </a-card> </template> <script> @@ -92,53 +159,53 @@ import { getAction } from '../../../../../api/manage' export default { name: 'RepairOrderFaultAnalysisList', - components: { }, + components: {}, props: { - repairOrder:{ + repairOrder: { type: Object, - default:{}, + default: {}, } }, - watch:{ - 'repairOrder.id':{ - immediate: true, - handler(val) { - this.loadData(val); - if(this.repairOrder.id!==undefined&&this.repairOrder.id!==null&&this.repairOrder.id!==''){ - if(this.repairOrder.status!=='3'){ - this.disabledButton = true; - }else{ - this.disabledButton = false; - } - }else{ + watch: { + 'repairOrder.id': { + immediate: true, + handler(val) { + this.loadData(val); + if (this.repairOrder.id !== undefined && this.repairOrder.id !== null && this.repairOrder.id !== '') { + if (this.repairOrder.status !== '3') { this.disabledButton = true; + } else { + this.disabledButton = false; } - } - }, - 'repairOrder.status':{ - immediate: true, - handler(val) { - if(val!=='3'){ - this.disabledButton = true; - }else{ - this.disabledButton = false; - } + } else { + this.disabledButton = true; } } + }, + 'repairOrder.status': { + immediate: true, + handler(val) { + if (val !== '3') { + this.disabledButton = true; + } else { + this.disabledButton = false; + } + } + } }, data() { return { description: '缁翠慨宸ュ崟绠$悊椤甸潰', - confirmLoading:false, - model:{}, + confirmLoading: false, + model: {}, form: this.$form.createForm(this), url: { - add:'/eam/repairOrderFaultAnalysis/add', + add: '/eam/repairOrderFaultAnalysis/add', edit: '/eam/repairOrderFaultAnalysis/edit', - getInfo:'/eam/repairOrderFaultAnalysis/list', + getInfo: '/eam/repairOrderFaultAnalysis/list', }, dictOptions: {}, - disabledEdit:false, + disabledEdit: false, validatorRules: { faultCause: { rules: [ @@ -151,13 +218,28 @@ { required: true, message: '璇疯緭鍏ユ晠闅滅幇璞�!' }, ] }, - suggestion:{ + repairOrderFaultAnalysisUda2: { + rules: [ + { required: true, message: '璇烽�夋嫨鏁呴殰鍘熷洜锛�' }, + ] + }, + repairOrderFaultAnalysisUda3: { + rules: [ + { required: true, message: '璇疯緭鍏ュ畨鍏ㄦ帾鏂�!' }, + ] + }, + repairOrderFaultAnalysisUda4: { + rules: [ + { required: true, message: '璇疯緭鍏ユ晠闅滃師鍥犳弿杩�!' }, + ] + }, + suggestion: { rules: [ { required: true, message: '璇疯緭鍏ユ晠闅滈闃�!' }, { min: 2, max: 1000, message: '闀垮害鍦� 2 鍒� 1000 涓瓧绗�', trigger: 'blur' }, ] }, - maintenanceMeasures:{ + maintenanceMeasures: { rules: [ { required: true, message: '璇疯緭鍏ユ晠闅滅淮淇�!' }, { min: 2, max: 1000, message: '闀垮害鍦� 2 鍒� 1000 涓瓧绗�', trigger: 'blur' }, @@ -172,7 +254,7 @@ xs: { span: 24 }, sm: { span: 16 } }, - disabledButton:false + disabledButton: false } }, methods: { @@ -197,31 +279,35 @@ that.$message.warning(res.message); } }).finally(() => { - that.loadData(that.repairOrder.id); - that.confirmLoading = false; + that.loadData(that.repairOrder.id); + that.confirmLoading = false; }) } }) }, - loadData(repairOrderId){ - let that = this; - getAction(that.url.getInfo,{repairOrderId:repairOrderId}).then(res=>{ - if(res.success&&res.result.records.length!==0){ - that.disabledEdit=true; - that.form.setFieldsValue(pick(res.result.records[0], 'faultCause','repairOrderFaultAnalysisUda1', 'faultTypeId', 'suggestion', 'maintenanceMeasures','id')) - that.model = Object.assign({}, res.result.records[0]); - }else{ - if(that.repairOrder.status==='3'){ - that.disabledEdit=false; - }else{ - that.disabledEdit=true; - } - that.form.resetFields(); - } + loadData(repairOrderId) { + let that = this; + getAction(that.url.getInfo, { repairOrderId: repairOrderId }).then(res => { + if (res.success && res.result.records.length !== 0) { + that.disabledEdit = true; + that.form.setFieldsValue(pick(res.result.records[0], 'faultCause', 'repairOrderFaultAnalysisUda1', 'repairOrderFaultAnalysisUda2', 'repairOrderFaultAnalysisUda3', 'repairOrderFaultAnalysisUda5', 'faultTypeId', 'suggestion', 'maintenanceMeasures', 'id')) + that.$nextTick(() => { + that.form.setFieldsValue({ "repairOrderFaultAnalysisUda4": res.result.records[0].repairOrderFaultAnalysisUda4 }); + }, 300); + + that.model = Object.assign({}, res.result.records[0]); + } else { + if (that.repairOrder.status === '3') { + that.disabledEdit = false; + } else { + that.disabledEdit = true; + } + that.form.resetFields(); + } }) }, - handleEdit2(){ - this.disabledEdit=false; + handleEdit2() { + this.disabledEdit = false; } }, diff --git a/src/views/spare/SpartPartRequirement.vue b/src/views/spare/SpartPartRequirement.vue new file mode 100644 index 0000000..34a85d5 --- /dev/null +++ b/src/views/spare/SpartPartRequirement.vue @@ -0,0 +1,505 @@ +<template> + <a-card + title="澶囦欢璇疯喘" + :bordered='false' + > + <div class='table-page-search-wrapper'> + <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='璇疯喘缂栫爜'> + <j-input + placeholder='璇疯緭鍏ヨ璐紪鐮�' + v-model='queryParam.num' + ></j-input> + </a-form-item> + </a-col> + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > + <a-form-item + label="閮ㄩ棬" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <j-dict-select-tag + dictCode="sys_depart,depart_name,id" + placeholder="璇烽�夋嫨缁存姢閮ㄩ棬" + v-model="queryParam.departId" + /> + </a-form-item> + </a-col> + + <a-col + :xl='6' + :lg='7' + :md='8' + :sm='24' + > + <a-form-item label='璁惧鍚嶇О'> + <!-- <a-input + placeholder='璇疯緭鍏ヨ澶囧悕绉�' + v-model='queryParam.name' + ></a-input> --> + <j-dict-select-tag + :dictCode="'mom_eam_equipment,num,id ,del_flag!=\'1\' and use_id = ' +'\''+ queryParam.departId+'\''" + placeholder="璇烽�夋嫨璁惧" + v-model="queryParam.equipmentId" + /> + </a-form-item> + </a-col> + </a-row> + </a-form> + </div> + + <div class="table-operator"> + <a-button + @click='handleAdd' + type='primary' + icon='plus' + v-has="'spartPartRequirement:add'" + >鏂板</a-button> + <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-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleOK" + icon="reload" + style="margin-left: 8px" + >鎵归噺閫氳繃</a-button> + <a-button + v-show="this.selectedRowKeys.length > 0 && this.queryParam.versionStatus == '1'" + type="primary" + @click="batchHandleReject" + icon="reload" + style="margin-left: 8px" + >鎵归噺椹冲洖</a-button> + </div> + + <!-- table鍖哄煙-begin --> + <div> + <div + class='ant-alert ant-alert-info' + style='margin-bottom: 16px;' + > + <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' + :scroll="{ x: 'calc(1300px + 50%)', y: 700 }" + :columns='columns' + :dataSource='dataSource' + :pagination='ipagination' + :loading='loading' + :rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}' + :customRow='clickThenSelect' + @change='handleTableChange' + > + <span + slot="action" + slot-scope="text, record" + > + + <a + @click="handleAuditApproval(record)" + v-show="record.auditStatus == '1' " + v-has="'spartPartRequirement:audit'" + >瀹℃牳</a> + <a-divider type="vertical" /> + <a-popconfirm + v-show="record.auditStatus == '0' || record.auditStatus == '3'" + title="纭畾鎻愪氦鍚�?" + @confirm="() => handleSubmit(record)" + v-has="'spartPartRequirement:subit'" + > + <a>鎻愪氦</a> + </a-popconfirm> + <a-divider type="vertical" /> + <a + v-show="record.auditStatus == '0' || record.auditStatus == '3'" + @click="handleEdit(record)" + v-has="'spartPartRequirement:edit'" + >缂栬緫</a> + <a-divider type="vertical" /> + <a-popconfirm + v-show="record.auditStatus == '0' || record.auditStatus == '3'" + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(record.id)" + v-has="'spartPartRequirement:delete'" + > + <a>鍒犻櫎</a> + </a-popconfirm> + + </span> + + </a-table> + <a-tabs defaultActiveKey="1"> + <a-tab-pane + tab='澶囦欢璇疯喘鏄庣粏' + key="1" + > + <div + class="table-operator" + style="margin:-16px" + > + <spart-part-requirement-detail :sparePartRequirementId='sparePartRequirementId' /> + </div> + </a-tab-pane> + + </a-tabs> + </div> + + <spart-part-requirement-modal + ref='modalForm' + @ok='modalFormOk' + ></spart-part-requirement-modal> + + <audit-approval-modal + ref='auditApprovalModal' + @ok='modalFormOk' + ></audit-approval-modal> + </a-card> +</template> + +<script> + +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, requestPut, downFile, postAction } from '@/api/manage' +import SpartPartRequirementDetail from './modules/spartPartRequirement/SpartPartRequirementDetail' +import SpartPartRequirementModal from './modules/spartPartRequirement/SpartPartRequirementModal' +import AuditApprovalModal from './modules/spartPartRequirement/AuditApprovalModal' +import '@/assets/less/TableExpand.less' +import JEllipsis from "@/components/jeecg/JEllipsis"; + +export default { + name: 'SpartPartRequirement', + mixins: [JeecgListMixin], + components: { + JEllipsis, + SpartPartRequirementDetail, + SpartPartRequirementModal, + AuditApprovalModal + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + + { + title: '璇疯喘鍗曞彿', + align: 'center', + dataIndex: 'num', + }, + { + title: '鐘舵��', + align: 'center', + dataIndex: 'auditStatus_dictText', + }, + + { + title: '璁惧淇℃伅', + align: 'center', + dataIndex: 'equipmentNumNameModel', + }, + { + title: '閮ㄩ棬', + align: 'center', + dataIndex: 'departId_dictText', + }, + { + title: '璇疯喘浜�', + align: 'center', + dataIndex: 'person', + }, + { + title: '璇疯喘鏃堕棿', + align: 'center', + dataIndex: 'createBy', + }, + { + title: '瀹℃牳浜�', + align: 'center', + dataIndex: 'auditPerson', + }, + { + title: '瀹℃牳鎰忚', + align: 'center', + dataIndex: 'approvalOpinions', + }, + { + title: '瀹℃牳鏃堕棿', + align: 'center', + dataIndex: 'auditTime', + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: 'center', + fixed: 'right', + scopedSlots: { customRender: 'action' }, + width: 180, + } + ], + url: { + list: '/spare/sparePartRequirement/list', + delete: '/spare/sparePartRequirement/deleteNew', + deleteBatch: '/eam/inspectionStandard/deleteBatch', + importExcelUrl: "/eam/inspectionStandard/importExcel", + passBatch: '/eam/inspectionStandard/auditApprovalBatch', + submit: '/spare/sparePartRequirement/submit', + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + sparePartRequirementId: '-1' + } + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + clickThenSelect(record) { + return { + on: { + click: () => { + this.onSelectChange(record.id.split(','), [record]) + } + } + } + }, + onClearSelected() { + this.selectedRowKeys = [] + this.selectionRows = [] + this.sparePartRequirementId = '-1' + }, + onSelectChange(selectedRowKeys, selectionRows) { + if (selectedRowKeys.length == 1) { + this.sparePartRequirementId = selectionRows[0]['id'] + } else { + this.sparePartRequirementId = '-1' + } + this.selectedRowKeys = selectedRowKeys + this.selectionRows = selectionRows + }, + + handleEdit: function (record) { + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = '缂栬緫' + this.$refs.modalForm.disableSubmit = false + }, + handleAdd: function () { + this.$refs.modalForm.add() + this.$refs.modalForm.title = '鏂板' + this.$refs.modalForm.disableSubmit = false + }, + + //瀹℃牳瀹℃壒 + handleAuditApproval: function (record) { + this.$refs.auditApprovalModal.showModals(record); + this.$refs.auditApprovalModal.title = "瀹℃牳"; + }, + + + loadData(arg) { + if (!this.url.list) { + this.$message.error('璇疯缃畊rl.list灞炴��!') + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1 + } + this.onClearSelected() + var params = this.getQueryParams()//鏌ヨ鏉′欢 + this.loading = true + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records + this.ipagination.total = res.result.total + } + if (res.code === 510) { + this.$message.warning(res.message) + } + this.loading = false + }) + }, + searchReset() { + this.queryParam = {} + this.sparePartRequirementId = '-1' + this.loadData(1); + }, + + handleSubmit(record) { + const that = this; + that.confirmLoading = true; + postAction(that.url.submit, record).then((res) => { + if (res.success) { + that.$message.success("鎻愪氦鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎻愪氦澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + }) + + }, + + modalFormOk() { + // 鏂板/淇敼 鎴愬姛鏃讹紝閲嶈浇鍒楄〃 + this.loadData(); + //娓呯┖鍒楄〃閫変腑 + // this.onClearSelected() + }, + batchHandleReject: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺椹冲洖", + content: "鏄惁鎵归噺椹冲洖閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '2' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '4' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '2' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺椹冲洖鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, + + batchHandleOK: function () { + if (this.selectedRowKeys.length <= 0) { + // this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒'); + this.$notification.warning({ + message: '娑堟伅', + description: "璇烽�夋嫨涓�鏉¤褰�" + }); + return; + } else { + + var that = this; + this.$confirm({ + title: "纭鎵归噺閫氳繃", + content: "鏄惁鎵归噺閫氳繃閫変腑鏁版嵁?", + onOk: function () { + that.loading = true; + that.confirmLoading = true; + let formData = {}; + let dailyInspectionStandardlist = that.selectionRows + for (var i = 0; i < dailyInspectionStandardlist.length; i++) { + let record = dailyInspectionStandardlist[i] + if (record.approvalStatus == '1') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '2') { + record.approvalStatus = '3' + } else if (record.approvalStatus == '3') { + record.approvalStatus = '5' + } else if (record.approvalStatus == '4') { + record.approvalStatus = '3' + } + } + formData.dailyInspectionStandardlist = dailyInspectionStandardlist + requestPut(that.url.passBatch, formData).then((res) => { + if (res.success) { + that.$message.success("鎵归噺閫氳繃鎴愬姛锛�") + that.loadData(1) + } else { + that.$message.warning("鎵归噺閫氳繃澶辫触锛�") + } + }).finally(() => { + that.confirmLoading = false; + that.loading = false; + }) + } + }); + } + }, + + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +.table-operator .ant-btn { + margin: 10px 8px 8px 10px; +} +</style> \ No newline at end of file diff --git a/src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue b/src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue new file mode 100644 index 0000000..f3b5987 --- /dev/null +++ b/src/views/spare/modules/spartPartRequirement/AuditApprovalModal.vue @@ -0,0 +1,218 @@ +<template> + <a-modal + :title='title' + :width="650" + :visible='visible' + :maskClosable='false' + cancelText='鍏抽棴' + @cancel='handleCancel' + :confirmLoading='confirmLoading' + > + <!-- @ok='handleOk' --> + <a-spin :spinning='confirmLoading'> + <a-form :form="form"> + <a-row> + <a-col :span='24'> + <a-form-item + label='璇疯喘鍗曞彿' + :labelCol='labelCol' + :wrapperCol='wrapperCol' + > + <a-input + allow-clear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ヨ璐崟鍙�'" + v-decorator="['num', validatorRules.num ]" + /> + </a-form-item> + </a-col> + <a-col :span='24'> + <a-form-item + label="瀹℃牳鎰忚" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-textarea + rows='3' + placeholder='璇疯緭鍏ュ鏍告剰瑙�' + v-decorator="['approvalOpinions', validatorRules.approvalOpinions ]" + ></a-textarea> + </a-form-item> + </a-col> + + </a-row> + </a-form> + </a-spin> + <template slot='footer'> + <a-popconfirm + @confirm="() => handleReject()" + title="纭灏嗗綋鍓嶅浠惰璐崟椹冲洖锛�" + > + <a-button + :loading='confirmLoading' + :style="{marginRight: '8px'}" + > + 椹冲洖 + </a-button> + </a-popconfirm> + <a-popconfirm + @confirm="() => handleOk()" + title="纭灏嗗綋鍓嶅浠惰璐崟瀹℃牳閫氳繃锛�" + > + <a-button + type='primary' + :loading='confirmLoading' + :style="{marginRight: '8px'}" + > + 閫氳繃 + </a-button> + </a-popconfirm> + </template> + </a-modal> + +</template> + +<script> +import { httpAction, requestPut, postAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +import pick from 'lodash.pick' + +export default { + name: 'AuditApprovalModal', + components: { + Tooltip + }, + data() { + return { + title: '鎿嶄綔', + visible: false, + disableSubmit: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 5 } + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 16 } + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + approvalOpinions: { + rules: [ + { required: true, message: '璇疯緭鍏ュ鏍告剰瑙�!' }, + ] + }, + }, + url: { + auditApproval: "/spare/sparePartRequirement/auditApproval", + }, + } + }, + + + methods: { + close() { + this.$emit('close') + this.visible = false + }, + + handleCancel() { + this.close() + }, + showModals(record) { + this.form.resetFields(); + this.model = Object.assign({}, record); + this.visible = true; + this.$nextTick(() => { + this.form.setFieldsValue(pick(this.model, 'num')); + this.form.setFieldsValue({ approvalOpinions: "" }); + }, 200); + }, + + handleReject() { + const that = this; + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let formData = Object.assign(this.model, values); + if (this.model.auditStatus == '1') { + formData.auditStatus = '3' + } + requestPut(this.url.auditApproval, formData, { id: this.model.id }).then((res) => { + if (res.success) { + that.$message.success("椹冲洖鎴愬姛锛�"); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + }) + }, + + + handleOk() { + const that = this; + that.form.validateFields((err, values) => { + if (!err) { + this.confirmLoading = true; + let formData = Object.assign(this.model, values); + if (this.model.auditStatus == '1') { + formData.auditStatus = '4' + } + requestPut(this.url.auditApproval, formData, { id: this.model.id }).then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + }) + }, + } + +} +</script> + +<style lang='less' scoped> +/deep/ .frozenRowClass { + color: #c9c9c9; +} + +.fontweight { + font-weight: bold; +} + +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} + +/deep/ .ant-modal-title { + text-align: center; +} +</style> \ No newline at end of file diff --git a/src/views/spare/modules/spartPartRequirement/EquipmentList.vue b/src/views/spare/modules/spartPartRequirement/EquipmentList.vue new file mode 100644 index 0000000..c81de2c --- /dev/null +++ b/src/views/spare/modules/spartPartRequirement/EquipmentList.vue @@ -0,0 +1,314 @@ +<template> + <a-modal + :title="title" + :width="1250" + :visible="visible" + :confirmLoading="confirmLoading" + :okButtonProps="{ props: {disabled: disableSubmit} }" + @ok="handleOk" + @cancel="handleCancel" + cancelText="鍏抽棴" + > + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + <a-col + :md="6" + :sm="8" + > + <a-form-item label="缁熶竴缂栫爜"> + <a-input + placeholder="璇疯緭鍏ョ粺涓�缂栫爜妫�绱�" + v-model="queryParam.num" + ></a-input> + </a-form-item> + </a-col> + + <a-col + :md="6" + :sm="8" + > + <a-form-item label="璁惧鍚嶇О"> + <a-input + placeholder="璇疯緭鍏ヨ澶囧悕绉版绱�" + v-model="queryParam.name" + ></a-input> + </a-form-item> + </a-col> + <a-col + :md="6" + :sm="8" + > + <a-button + type="primary" + @click="searchQuery" + icon="search" + >鏌ヨ</a-button> + <a-button + @click="searchReset" + icon="reload" + style="margin-left:8px;" + >閲嶇疆</a-button> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="24"> + + </a-col> + </a-row> + </a-form> + </div> + <div style="margin-top:8px;"> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + :customRow="clickThenCheck" + :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}" + > + + </a-table> + </div> + </a-form> + </a-spin> + + </a-modal> +</template> + +<script> + +import { postAction, getAction } from '@/api/manage' +import JDate from '@/components/jeecg/JDate' +import Tooltip from 'ant-design-vue/es/tooltip' +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import JEllipsis from '@/components/jeecg/JEllipsis'//寮曞叆杩囬暱瑁佸壀 +import store from '@/store' + +export default { + name: "EquipmentList", + mixins: [JeecgListMixin], + components: { + JDate, + Tooltip, + JEllipsis, + }, + data() { + return { + title: "璁惧淇℃伅", + visible: false, + model: {}, + dataSource: [], + disableSubmit: false, + type: "radio", + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + } + }, + { + title: '缁熶竴缂栫爜', + align: 'center', + dataIndex: 'num', + }, + { + title: '璁惧鍚嶇О', + align: 'center', + dataIndex: 'name', + }, + { + title: '璁惧鍨嬪彿', + align: "center", + dataIndex: 'model' + }, + { + title: '璁惧瑙勬牸', + align: "center", + dataIndex: 'specification' + }, + { + title: '璁惧鐘舵��', + align: "center", + dataIndex: 'equipmentStatus_dictText' + }, + ], + url: { + list: "/eam/equipment/queryEquipmentList", + }, + } + }, + + + methods: { + + searchQuery() { + this.loadData(1); + }, + searchReset() { + // this.queryParam = { equipmentStatus: '1' }; + this.loadData(1) + }, + list(params) { + this.selectedRowKeys = []; + this.selectedRowRecord = []; + this.visible = true; + if (params == null || params == "") { + this.queryParam.useId = "" + } else { + this.queryParam.useId = params + } + // this.queryParam.equipmentStatus = '1' + this.loadData(1); + }, + clickThenCheck(record) { + return { + on: { + click: (e) => { + this.selectedRowRecord = record; + this.onSelectChange(record.id.split(","), [record]); + } + } + }; + }, + onSelectChange(selectedRowKeys, selectedRows) { + this.selectedRowKeys = selectedRowKeys; + this.selectedRowRecord = selectedRows[0]; + }, + close() { + this.queryParam = {}; + this.$emit('close'); + this.visible = false; + }, + handleOk() { + const that = this; + // 瑙﹀彂琛ㄥ崟楠岃瘉 + if (that.selectedRowKeys.length > 0) { + if (that.selectedRowRecord.id != null && that.selectedRowRecord.id != "") { + that.$emit('sendEquipmentRecord', { record: that.selectedRowRecord }); + that.close(); + } else { + that.$message.error("璇烽�夋嫨璁惧淇℃伅锛�") + } + } else { + that.$message.error("璇烽�夋嫨璁惧淇℃伅锛�") + } + }, + + handleCancel() { + this.close(); + }, + + }, +} +</script> +<style scoped> +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +.fontweight { + font-weight: bold; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +.ant-table-tbody .ant-table-row td { + padding-top: 10px; + padding-bottom: 10px; +} + +.anty-row-operator button { + margin: 0 5px; +} + +.ant-btn-danger { + background-color: #ffffff; +} + +.ant-modal-cust-warp { + height: 100%; +} + +.ant-modal-cust-warp .ant-modal-body { + height: calc(100% - 110px) !important; + overflow-y: auto; +} + +.ant-modal-cust-warp .ant-modal-content { + height: 90% !important; + overflow-y: hidden; +} + +/deep/ .notshow { + display: none; +} + +.frozenRowClass { + color: #c9c9c9; +} +.hight { + color: #f5222d; +} +.middle { + color: #fa8c16; +} +.low { + color: #52c41a; +} +.dataUnKnow { + color: #1890ff; +} + +/deep/ .frozenRowClass { + color: #c9c9c9; +} +</style> \ No newline at end of file diff --git a/src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue b/src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue new file mode 100644 index 0000000..f8ec244 --- /dev/null +++ b/src/views/spare/modules/spartPartRequirement/SpartPartRequirementDetail.vue @@ -0,0 +1,178 @@ +<template> + <a-card + :bordered="false" + :class="'cust-erp-sub-tab'" + > + <!-- 鏌ヨ鍖哄煙 --> + <div class="table-page-search-wrapper"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > + <a-row :gutter="24"> + </a-row> + </a-form> + </div> + <div> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :scroll="{x:true}" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + </a-table> + </div> + + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction } from '@/api/manage' +import Tooltip from 'ant-design-vue/es/tooltip' +import { ACCESS_TOKEN } from '@/store/mutation-types' +import Vue from 'vue' +import { getFileAccessHttpUrl } from '@/api/manage'; + +export default { + name: "SpartPartRequirementDetail", + mixins: [JeecgListMixin], + components: { + Tooltip, + }, + props: { + sparePartRequirementId: { + type: String, + default: '-1', + required: false + } + }, + watch: { + sparePartRequirementId: { + immediate: true, + handler(val) { + if (!this.sparePartRequirementId) { + this.clearList() + } else { + this.queryParam['sparePartRequirementId'] = val; + this.queryParam['delFlag'] = 0; + this.loadData(1); + } + } + } + }, + data() { + return { + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 100, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '澶囦欢缂栧彿', + align: 'center', + dataIndex: 'spartPartNum', + scopedSlots: { customRender: 'spartPartNum' }, + }, + { + title: '澶囦欢鍚嶇О', + align: 'center', + dataIndex: 'spartPartName', + scopedSlots: { customRender: 'spartPartName' }, + }, + { + title: '鍨嬪彿', + align: 'center', + dataIndex: 'spartPartModel', + }, + { + title: '鏁伴噺', + align: 'center', + dataIndex: 'quantity', + }, + { + title: '鍗曚綅', + align: 'center', + dataIndex: 'unitName', + }, + + ], + url: { + list: "/spare/sparePartRequirement/getSparePartRequirementDetails", + }, + /* 鍒嗛〉鍙傛暟 */ + ipagination: { + current: 1, + pageSize: 20, + pageSizeOptions: ['5', '10', '20', '50'], + showTotal: (total, range) => { + return range[0] + '-' + range[1] + ' 鍏�' + total + '鏉�' + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + } + }, + created() { + }, + computed: { + }, + methods: { + clearList() { + this.dataSource = [] + this.selectedRowKeys = [] + this.ipagination.current = 1 + }, + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + //鍔犺浇鏁版嵁 鑻ヤ紶鍏ュ弬鏁�1鍒欏姞杞界涓�椤电殑鍐呭 + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + this.loading = true; + // this.originTargetKeys = []; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + //update-end---author:zhangyafei Date:20201118 for锛氶�傞厤涓嶅垎椤电殑鏁版嵁鍒楄〃------------ + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + + + view(record) { + this.$refs.pdfview.showPdf(record.src); + }, + } +} +</script> +<style scoped> +@import '~@assets/less/common.less'; +</style> diff --git a/src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue b/src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue new file mode 100644 index 0000000..9efb3e8 --- /dev/null +++ b/src/views/spare/modules/spartPartRequirement/SpartPartRequirementModal.vue @@ -0,0 +1,511 @@ +<template> + <a-modal + :title="title" + :width="1250" + :visible="visible" + :maskClosable="false" + @ok="handleOk" + cancelText="鍏抽棴" + @cancel="handleCancel" + :confirmLoading="confirmLoading" + > + + <a-spin :spinning="confirmLoading"> + <a-form :form="form"> + + <!-- title="宸ヨ壓璺緞鍩烘湰淇℃伅" --> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="璇疯喘鍗曞彿" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="codeDisable" + :placeholder="disableSubmit?'':'璇疯緭鍏ヨ璐崟鍙�'" + v-decorator="['num', validatorRules.num ]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item + label="浣跨敤閮ㄩ棬" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + + <j-dict-select-tag + allow-clear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇烽�夋嫨浣跨敤閮ㄩ棬'" + :triggerChange="true" + dictCode="sys_depart,depart_name,id,del_flag!='1'" + v-decorator="['departId',validatorRules.departId]" + /> + </a-form-item> + </a-col> + </a-row> + <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="璁惧鍚嶇О" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input-search + :disabled="disableSubmit" + placeholder="璇烽�夋嫨璁惧" + enter-button + @search="onEquipmentList()" + :read-only="true" + v-decorator="['equipmentNumNameModel', validatorRules.equipmentNumNameModel]" + /> + </a-form-item> + </a-col> + </a-row> + <a-row + hidden + :gutter="24" + > + <a-col :span="12"> + <a-form-item + label="璁惧Id" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ粺涓�缂栫爜/鍚嶇О/鍨嬪彿'" + v-decorator="['equipmentId', validatorRules.equipmentId ]" + /> + </a-form-item> + </a-col> + <!-- <a-col :span="12"> + <a-form-item + label="浣跨敤閮ㄩ棬Id" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ヤ娇鐢ㄩ儴闂╥d'" + v-decorator="['useId', validatorRules.useId ]" + /> + </a-form-item> + </a-col> --> + </a-row> + <!-- <a-row :gutter="24"> + <a-col :span="12"> + <a-form-item + label="绠$悊鍒跺害" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allow-clear + :disabled="false" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ鐞嗗埗搴�'" + v-decorator="['disUda1', validatorRules.disUda1 ]" + /> + </a-form-item> + </a-col> + <a-col :span="12"> + <a-form-item + label="鐗堟湰" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allowClear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ョ増鏈彿'" + v-decorator="[ 'version', validatorRules.version]" + /> + </a-form-item> + </a-col> + </a-row> --> + <!-- <a-row :gutter="24"> + <a-col + v-if="this.isRevise == true" + :span="12" + > + <a-form-item + label="鍘嗗彶鐗堟湰" + :labelCol="labelCol" + :wrapperCol="wrapperCol" + > + <a-input + allowClear + :disabled="true" + :placeholder="disableSubmit?'':'璇疯緭鍏ュ巻鍙茬増鏈彿'" + v-decorator="[ 'historyVersion', validatorRules.historyVersion]" + /> + </a-form-item> + </a-col> + </a-row> --> + <a-row :gutter="24"> + <a-col :span="24"> + <a-form-item + label="澶囨敞" + :labelCol="{span:3}" + :wrapperCol="{span:21}" + > + <a-textarea + allowClear + :disabled="disableSubmit" + :placeholder="disableSubmit?'':'璇疯緭鍏ュ娉�'" + v-decorator="[ 'remark', validatorRules.remark]" + /> + </a-form-item> + </a-col> + </a-row> + </a-form> + </a-spin> + <!-- <a-button + type="primary" + :style="{ marginRight: '8px',marginBottom:'8px' }" + :loading="confirmLoading" + @click="selectInspectionProjects()" + >鐐规椤圭洰</a-button> --> + <a-table + ref="table" + bordered + size="middle" + rowKey='id' + :columns="columns" + :dataSource="dataSource" + :pagination="false" + > + <template + v-for='col in columns' + :slot='col.dataIndex' + slot-scope='text, record, index' + > + <div :key='col.dataIndex'> + <a-input + v-if="col.dataIndex == 'spartPartNum'" + :value='text' + @change='(e) => handleChange(e, record.key, col, index)' + /> + <a-input + v-if="col.dataIndex == 'spartPartName'" + :value='text' + @change='(e) => handleChange(e, record.key, col, index)' + /> + <a-input + v-if="col.dataIndex == 'spartPartModel'" + :value='text' + @change='(e) => handleChange(e, record.key, col, index)' + /> + <a-input-number + :value='text' + v-if="col.dataIndex == 'quantity'" + :min='0' + :max='99999' + @change='(e)=>handleChange(e, record.key, col, index)' + /> + <a-input + v-if="col.dataIndex == 'unitName'" + :value='text' + @change='(e) => handleChange(e, record.key, col, index)' + /> + </div> + </template> + <span + slot="action" + slot-scope="text, record, index" + > + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() => handleDelete(text,record, index)" + > + <a>鍒犻櫎</a> + </a-popconfirm> + </span> + </a-table> + <a-button + style='width: 100%; margin-top: 16px; margin-bottom: 8px' + type='dashed' + icon='plus' + @click='addSpart' + >澧炲姞澶囦欢 + </a-button> + <template slot="footer"> + <a-button + :style="{marginRight: '8px'}" + @click="handleCancel()" + > + 鍏抽棴 + </a-button> + + <a-button + @click="handleOk()" + type="primary" + :loading="confirmLoading" + >纭畾</a-button> + </template> + + <equipment-list + ref="EquipmentList" + @sendEquipmentRecord='sendEquipmentRecord' + ></equipment-list> + + </a-modal> + +</template> + +<script> +import { getAction, postAction, requestPut } from '@/api/manage' +import pick from 'lodash.pick' +import JMultiSelectTag from '@/components/dict/JMultiSelectTag' +import { duplicateCheck } from '@/api/api' +import Tooltip from 'ant-design-vue/es/tooltip' +import EquipmentList from './EquipmentList' + +export default { + name: "SpartPartRequirementModal", + components: { + JMultiSelectTag, + Tooltip, + EquipmentList, + }, + data() { + return { + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + align: 'center', + customRender: function (t, r, index) { + return parseInt(index) + 1 + }, + width: 50, + }, + { + title: '澶囦欢缂栧彿', + align: 'center', + dataIndex: 'spartPartNum', + scopedSlots: { customRender: 'spartPartNum' }, + }, + { + title: '澶囦欢鍚嶇О', + align: 'center', + dataIndex: 'spartPartName', + scopedSlots: { customRender: 'spartPartName' }, + }, + { + title: '鍨嬪彿', + align: 'center', + dataIndex: 'spartPartModel', + scopedSlots: { customRender: 'spartPartModel' }, + }, + { + title: '鏁伴噺', + align: 'center', + dataIndex: 'quantity', + scopedSlots: { customRender: 'quantity' }, + }, + { + title: '鍗曚綅', + align: 'center', + dataIndex: 'unitName', + scopedSlots: { customRender: 'unitName' }, + }, + { + title: '鎿嶄綔', + align: 'center', + dataIndex: 'action', + scopedSlots: { + customRender: 'action' + }, + } + ], + title: "鎿嶄綔", + visible: false, + disableSubmit: false, + codeDisable: true, + // isRevise: false, + model: {}, + labelCol: { + xs: { span: 24 }, + sm: { span: 6 }, + }, + wrapperCol: { + xs: { span: 24 }, + sm: { span: 18 }, + }, + confirmLoading: false, + form: this.$form.createForm(this), + validatorRules: { + num: { + rules: [ + { required: true, message: '璇疯緭鍏ヨ璐崟鍙�!' }, + ] + }, + equipmentNumNameModel: { + rules: [ + { required: true, message: '璇烽�夋嫨璁惧!' }, + ] + }, + departId: { + rules: [ + { required: true, message: '璇烽�夋嫨閮ㄩ棬!' }, + ] + }, + }, + url: { + add: "/spare/sparePartRequirement/addNew", + edit: "/spare/sparePartRequirement/editNew", + getNum: '/eam/sysIdentity/getNumNew' + }, + dataSource: [], + } + }, + + + methods: { + add() { + this.edit({ sparePartRequirementDeatilList: [] }) + this.getSeq() + }, + + edit(record) { + let that = this; + that.dataSource = []; + that.form.resetFields(); + that.model = Object.assign({}, record); + that.visible = true; + if (record.sparePartRequirementDeatilList != undefined) { + const temp = [...record.sparePartRequirementDeatilList]; + that.dataSource = temp; + } + that.$nextTick(() => { + that.form.setFieldsValue(pick(that.model, 'num', 'equipmentId', 'equipmentNumNameModel', 'departId', 'remark')); + }); + }, + + getSeq() { + getAction(this.url.getNum, { type: 'SpartPartRequirement', length: 4 }).then(res => { + if (res.success) { + this.form.setFieldsValue({ "num": res.result }) + } + }) + }, + + onEquipmentList() { + let data = this.form.getFieldsValue(['departId']); + this.$refs.EquipmentList.list(data.departId); + this.$refs.EquipmentList.title = "閫夋嫨璁惧淇℃伅"; + }, + sendEquipmentRecord(data) { + this.dataSource = []; + let record = data.record; + this.form.setFieldsValue({ equipmentId: record.id, equipmentNumNameModel: record.num + "/" + record.name + "/" + record.model }); + }, + + close() { + this.$emit('close'); + this.visible = false; + }, + + handleCancel() { + this.close(); + }, + + handleOk() { + const that = this; + this.form.validateFields((err, values) => { + if (!err) { + that.confirmLoading = true; + let formData = Object.assign(this.model, values); + formData.sparePartRequirementDeatilList = that.dataSource; + let obj; + if (!this.model.id) { + formData.auditStatus = '0' + obj = postAction(this.url.add, formData); + } else { + obj = requestPut(this.url.edit, formData, { id: this.model.id }); + } + obj.then((res) => { + if (res.success) { + that.$message.success(res.message); + that.$emit('ok'); + } else { + that.$message.warning(res.message); + } + }).finally(() => { + that.confirmLoading = false; + that.close(); + }) + } + }) + }, + + handleDelete(text, record, index) { + this.dataSource.splice(index, 1); + }, + + addSpart() { + this.dataSource.push({}) + }, + + handleChange(value, key, column, index) { + let that = this; + const temp = [...that.dataSource]; + const target = temp.filter(item => key === item.key)[index]; + if (target) { + if (column.dataIndex == 'spartPartNum') { + target[column.dataIndex] = value.target.value; + } + if ('spartPartName' == column.dataIndex) { + target['spartPartName'] = value.target.value; + } + if ('spartPartModel' == column.dataIndex) { + target['spartPartModel'] = value.target.value; + } + if ('quantity' == column.dataIndex) { + target['quantity'] = value; + } + if ('unitName' == column.dataIndex) { + target['unitName'] = value.target.value; + } + //鏄剧ず甯﹁繃鏉ョ殑鏁版嵁 + that.dataSource = temp; + } + }, + + }, +} +</script> + +<style lang="less" scoped> +/deep/ .frozenRowClass { + color: #c9c9c9; +} +.fontweight { + font-weight: bold; +} +.ant-btn { + padding: 0 10px; + margin-left: 3px; +} + +.ant-form-item-control { + line-height: 0px; +} + +/** 涓昏〃鍗曡闂磋窛 */ +.ant-form .ant-form-item { + margin-bottom: 10px; +} + +/** Tab椤甸潰琛岄棿璺� */ +.ant-tabs-content .ant-form-item { + margin-bottom: 0px; +} +</style> \ No newline at end of file diff --git a/src/views/system/DictList.vue b/src/views/system/DictList.vue index 9c59dc7..f3b28ee 100644 --- a/src/views/system/DictList.vue +++ b/src/views/system/DictList.vue @@ -3,30 +3,79 @@ <!-- 宸︿晶闈㈡澘 --> <div class="table-page-search-wrapper"> - <a-form layout="inline" @keyup.enter.native="searchQuery"> + <a-form + layout="inline" + @keyup.enter.native="searchQuery" + > <a-row :gutter="12"> - <a-col :md="7" :sm="8"> - <a-form-item label="瀛楀吀鍚嶇О" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}"> - <a-input placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" v-model="queryParam.dictName"></a-input> + <a-col + :md="7" + :sm="8" + > + <a-form-item + label="瀛楀吀鍚嶇О" + :labelCol="{span: 6}" + :wrapperCol="{span: 14, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ瓧鍏稿悕绉�" + v-model="queryParam.dictName" + ></a-input> </a-form-item> </a-col> - <a-col :md="7" :sm="8"> - <a-form-item label="瀛楀吀缂栧彿" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}"> - <a-input placeholder="璇疯緭鍏ュ瓧鍏哥紪鍙�" v-model="queryParam.dictCode"></a-input> + <a-col + :md="7" + :sm="8" + > + <a-form-item + label="瀛楀吀缂栧彿" + :labelCol="{span: 6}" + :wrapperCol="{span: 14, offset: 1}" + > + <a-input + placeholder="璇疯緭鍏ュ瓧鍏哥紪鍙�" + v-model="queryParam.dictCode" + ></a-input> </a-form-item> </a-col> - <a-col :md="7" :sm="8"> - <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-col + :md="7" + :sm="8" + > + <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> </span> </a-col> </a-row> </a-form> - <div class="table-operator" style="border-top: 5px"> - <a-button @click="handleAdd" type="primary" icon="plus">娣诲姞</a-button> - + <div + class="table-operator" + style="border-top: 5px" + > + <a-button + @click="handleAdd" + type="primary" + icon="plus" + >娣诲姞</a-button> + <a-button + type="primary" + icon="sync" + @click="refleshCache()" + >鍒锋柊缂撳瓨</a-button> </div> <a-table @@ -37,166 +86,179 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" - @change="handleTableChange"> - <span slot="action" slot-scope="text, record"> + @change="handleTableChange" + > + <span + slot="action" + slot-scope="text, record" + > <a @click="handleEdit(record)"> - <a-icon type="edit"/> + <a-icon type="edit" /> 缂栬緫 </a> - <a-divider type="vertical"/> - <a @click="editDictItem(record)"><a-icon type="setting"/> 瀛楀吀閰嶇疆</a> - <a-divider type="vertical"/> - <a-popconfirm title="纭畾鍒犻櫎鍚�?" @confirm="() =>handleDelete(record.id)"> + <a-divider type="vertical" /> + <a @click="editDictItem(record)"><a-icon type="setting" /> 瀛楀吀閰嶇疆</a> + <a-divider type="vertical" /> + <a-popconfirm + title="纭畾鍒犻櫎鍚�?" + @confirm="() =>handleDelete(record.id)" + > <a>鍒犻櫎</a> </a-popconfirm> </span> </a-table> </div> - <dict-modal ref="modalForm" @ok="modalFormOk"></dict-modal> <!-- 瀛楀吀绫诲瀷 --> + <dict-modal + ref="modalForm" + @ok="modalFormOk" + ></dict-modal> <!-- 瀛楀吀绫诲瀷 --> <dict-item-list ref="dictItemList"></dict-item-list> - <dict-delete-list ref="dictDeleteList" @refresh="() =>loadData()"></dict-delete-list> + <dict-delete-list + ref="dictDeleteList" + @refresh="() =>loadData()" + ></dict-delete-list> </a-card> </template> <script> - import { filterObj } from '@/utils/util'; - import { JeecgListMixin } from '@/mixins/JeecgListMixin' - import DictModal from './modules/DictModal' - import DictItemList from './DictItemList' - import DictDeleteList from './DictDeleteList' - import { getAction } from '@/api/manage' - import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" - import Vue from 'vue' +import { filterObj } from '@/utils/util'; +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import DictModal from './modules/DictModal' +import DictItemList from './DictItemList' +import DictDeleteList from './DictDeleteList' +import { getAction } from '@/api/manage' +import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" +import Vue from 'vue' - export default { - name: "DictList", - mixins:[JeecgListMixin], - components: {DictModal, DictItemList,DictDeleteList}, - data() { - return { - description: '杩欐槸鏁版嵁瀛楀吀椤甸潰', - visible: false, - // 鏌ヨ鏉′欢 - queryParam: { - dictCode: "", - dictName: "", - }, - // 琛ㄥご - columns: [ - { - title: '#', - dataIndex: '', - key: 'rowIndex', - width: 120, - align: "center", - customRender: function (t, r, index) { - return parseInt(index) + 1; - } - }, - { - title: '瀛楀吀鍚嶇О', - align: "left", - dataIndex: 'dictName', - }, - { - title: '瀛楀吀缂栧彿', - align: "left", - dataIndex: 'dictCode', - }, - { - title: '鎻忚堪', - align: "left", - dataIndex: 'description', - }, - { - title: '鎿嶄綔', - dataIndex: 'action', - align: "center", - scopedSlots: {customRender: 'action'}, +export default { + name: "DictList", + mixins: [JeecgListMixin], + components: { DictModal, DictItemList, DictDeleteList }, + data() { + return { + description: '杩欐槸鏁版嵁瀛楀吀椤甸潰', + visible: false, + // 鏌ヨ鏉′欢 + queryParam: { + dictCode: "", + dictName: "", + }, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 120, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; } - ], - dict: "", - labelCol: { - xs: {span: 8}, - sm: {span: 5}, }, - wrapperCol: { - xs: {span: 16}, - sm: {span: 19}, + { + title: '瀛楀吀鍚嶇О', + align: "left", + dataIndex: 'dictName', }, - url: { - list: "/sys/dict/list", - delete: "/sys/dict/delete", - exportXlsUrl: "sys/dict/exportXls", - importExcelUrl: "sys/dict/importExcel", - refleshCache: "sys/dict/refleshCache", - queryAllDictItems: "sys/dict/queryAllDictItems", + { + title: '瀛楀吀缂栧彿', + align: "left", + dataIndex: 'dictCode', }, - } - }, - computed: { - importExcelUrl: function () { - return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; - } - }, - methods: { - getQueryParams() { - var param = Object.assign({}, this.queryParam, this.isorter); - param.field = this.getQueryField(); - param.pageNo = this.ipagination.current; - param.pageSize = this.ipagination.pageSize; - if (this.superQueryParams) { - param['superQueryParams'] = encodeURI(this.superQueryParams) - param['superQueryMatchType'] = this.superQueryMatchType + { + title: '鎻忚堪', + align: "left", + dataIndex: 'description', + }, + { + title: '鎿嶄綔', + dataIndex: 'action', + align: "center", + scopedSlots: { customRender: 'action' }, } - return filterObj(param); + ], + dict: "", + labelCol: { + xs: { span: 8 }, + sm: { span: 5 }, }, - //鍙栨秷閫夋嫨 - cancelDict() { - this.dict = ""; - this.visible = false; - this.loadData(); + wrapperCol: { + xs: { span: 16 }, + sm: { span: 19 }, }, - //缂栬緫瀛楀吀鏁版嵁 - editDictItem(record) { - this.$refs.dictItemList.edit(record); + url: { + list: "/sys/dict/list", + delete: "/sys/dict/delete", + exportXlsUrl: "sys/dict/exportXls", + importExcelUrl: "sys/dict/importExcel", + refleshCache: "sys/dict/refleshCache", + queryAllDictItems: "sys/dict/queryAllDictItems", }, - // 閲嶇疆瀛楀吀绫诲瀷鎼滅储妗嗙殑鍐呭 - searchReset() { - var that = this; - that.queryParam.dictName = ""; - that.queryParam.dictCode = ""; - that.loadData(this.ipagination.current); - }, - openDeleteList(){ - this.$refs.dictDeleteList.show() - }, - refleshCache(){ - getAction(this.url.refleshCache).then((res) => { - if (res.success) { - //閲嶆柊鍔犺浇缂撳瓨 - getAction(this.url.queryAllDictItems).then((res) => { - if (res.success) { - Vue.ls.remove(UI_CACHE_DB_DICT_DATA) - Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) - } - }) - this.$message.success("鍒锋柊缂撳瓨瀹屾垚锛�"); - } - }).catch(e=>{ - this.$message.warn("鍒锋柊缂撳瓨澶辫触锛�"); - console.log("鍒锋柊澶辫触",e) - }) + } + }, + computed: { + importExcelUrl: function () { + return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; + } + }, + methods: { + getQueryParams() { + var param = Object.assign({}, this.queryParam, this.isorter); + param.field = this.getQueryField(); + param.pageNo = this.ipagination.current; + param.pageSize = this.ipagination.pageSize; + if (this.superQueryParams) { + param['superQueryParams'] = encodeURI(this.superQueryParams) + param['superQueryMatchType'] = this.superQueryMatchType } + return filterObj(param); }, - watch: { - openKeys(val) { - console.log('openKeys', val) - }, + //鍙栨秷閫夋嫨 + cancelDict() { + this.dict = ""; + this.visible = false; + this.loadData(); }, - } + //缂栬緫瀛楀吀鏁版嵁 + editDictItem(record) { + this.$refs.dictItemList.edit(record); + }, + // 閲嶇疆瀛楀吀绫诲瀷鎼滅储妗嗙殑鍐呭 + searchReset() { + var that = this; + that.queryParam.dictName = ""; + that.queryParam.dictCode = ""; + that.loadData(this.ipagination.current); + }, + openDeleteList() { + this.$refs.dictDeleteList.show() + }, + refleshCache() { + getAction(this.url.refleshCache).then((res) => { + if (res.success) { + //閲嶆柊鍔犺浇缂撳瓨 + getAction(this.url.queryAllDictItems).then((res) => { + if (res.success) { + Vue.ls.remove(UI_CACHE_DB_DICT_DATA) + Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000) + } + }) + this.$message.success("鍒锋柊缂撳瓨瀹屾垚锛�"); + } + }).catch(e => { + this.$message.warn("鍒锋柊缂撳瓨澶辫触锛�"); + console.log("鍒锋柊澶辫触", e) + }) + } + }, + watch: { + openKeys(val) { + console.log('openKeys', val) + }, + }, +} </script> <style scoped> - @import '~@assets/less/common.less' +@import '~@assets/less/common.less'; </style> \ No newline at end of file -- Gitblit v1.9.3