diff --git a/src/views/modules/eam/eamWorkOrderForDefect2.vue b/src/views/modules/eam/eamWorkOrderForDefect2.vue index 0ac7007..baecf0a 100644 --- a/src/views/modules/eam/eamWorkOrderForDefect2.vue +++ b/src/views/modules/eam/eamWorkOrderForDefect2.vue @@ -648,6 +648,31 @@ + +
+ + + + + +
+
@@ -842,6 +867,7 @@ import {isAuth} from '../../../utils' import excel from "@/utils/excel-util.js"; import {deleteSchedulingRecord} from "../../../api/scheduling/scheduling"; import {abandonedEamWorkOrder, coreComponentsExpiortExcel, eamWorkOrderExpiortExcel} from "../../../api/eam/eam"; +import { getRepairWorkOrderPartSpareList } from '@/api/partspare/repairtransdetail.js' export default { components: { Chooselist @@ -1944,8 +1970,121 @@ export default { columnWidth: 120, }, ], + columnRepairConsumePartSpareList: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'center', + columnLabel: '备品备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备品备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 180, + }, + { + columnProp: 'averagePrice', + headerAlign: 'center', + align: 'right', + columnLabel: '单价', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 100, + }, + { + columnProp: 'warehouseId', + headerAlign: 'center', + align: 'center', + columnLabel: '仓库编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'locationId', + headerAlign: 'center', + align: 'center', + columnLabel: '货位编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'transQty', + headerAlign: 'center', + align: 'right', + columnLabel: '数量', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 80, + }, + { + columnProp: 'batchNo', + headerAlign: 'center', + align: 'center', + columnLabel: '序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'transDate', + headerAlign: 'center', + align: 'center', + columnLabel: '出库时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 150, + }, + { + columnProp: 'transType', + headerAlign: 'center', + align: 'center', + columnLabel: '记录类型', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 100, + }, + { + columnProp: 'operateUserName', + headerAlign: 'center', + align: 'center', + columnLabel: '操作人', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 100, + }, + ], knowledgeFlag: '', corePartSpareList: [], + repairConsumePartSpareList: [], // 核心备件更换记录 导出 查询参数 partSearchData: {} } @@ -2825,6 +2964,8 @@ export default { this.getSparPartImages() } else if (this.activeTable === 'core_component') { this.getCorePartSpareList() + } else if (this.activeTable === 'repair_consume_part_spare') { + this.getRepairConsumePartSpareList() } }, @@ -2878,6 +3019,32 @@ export default { }) }, + // 获取维修耗用配件明细(根据工单号) + getRepairConsumePartSpareList () { + if (!this.detailData.orderNo) { + this.repairConsumePartSpareList = [] + return + } + let tempData = { + userName: this.$store.state.user.name, + orderNo: this.detailData.orderNo, + page: 1, + limit: 500 + } + getRepairWorkOrderPartSpareList(tempData).then(({data}) => { + if (data && data.code === 0) { + let sourceList = data.page && data.page.list ? data.page.list : [] + // 这里按工单号做精确过滤,避免后端模糊查询带出相似工单 + this.repairConsumePartSpareList = sourceList.filter(item => item.orderNo === this.detailData.orderNo) + } else { + this.repairConsumePartSpareList = [] + } + }).catch((error)=>{ + this.repairConsumePartSpareList = [] + this.$message.error(error) + }) + }, + // 维修记录 queryHistoryRecord () { let tempData = { diff --git a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue index 9320c2f..54d1ebc 100644 --- a/src/views/modules/reportWorkOrder/reportDefectOrder2.vue +++ b/src/views/modules/reportWorkOrder/reportDefectOrder2.vue @@ -472,6 +472,31 @@ + +
+ + + + + +
+
@@ -742,6 +767,7 @@ import reportImageUpload from "./report_image_upload.vue" import UploadFileList from "../common/uploadFileList.vue"; import {verifyData} from "../../../api/part/partInformation"; import excel from "@/utils/excel-util.js"; +import { getRepairWorkOrderPartSpareList } from '@/api/partspare/repairtransdetail.js' export default { components: { Chooselist, @@ -1367,6 +1393,118 @@ export default { columnWidth: 120, }, ], + columnRepairConsumePartSpareList: [ + { + columnProp: 'partNo', + headerAlign: 'center', + align: 'center', + columnLabel: '备品备件编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'partDescription', + headerAlign: 'center', + align: 'left', + columnLabel: '备品备件名称', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 200, + }, + { + columnProp: 'averagePrice', + headerAlign: 'center', + align: 'right', + columnLabel: '单价', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 90, + }, + { + columnProp: 'warehouseId', + headerAlign: 'center', + align: 'center', + columnLabel: '仓库编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'locationId', + headerAlign: 'center', + align: 'center', + columnLabel: '货位编码', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'transQty', + headerAlign: 'center', + align: 'right', + columnLabel: '数量', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 80, + }, + { + columnProp: 'batchNo', + headerAlign: 'center', + align: 'center', + columnLabel: '序列号', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 120, + }, + { + columnProp: 'transDate', + headerAlign: 'center', + align: 'center', + columnLabel: '出库时间', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 150, + }, + { + columnProp: 'transType', + headerAlign: 'center', + align: 'center', + columnLabel: '记录类型', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 110, + }, + { + columnProp: 'operateUserName', + headerAlign: 'center', + align: 'center', + columnLabel: '操作人', + columnHidden: false, + columnImage: false, + status: true, + fixed: false, + columnWidth: 100, + }, + ], // 日期限制 pickerOptions: { disabledDate(time) { @@ -1378,6 +1516,7 @@ export default { feedBackImages: [], sparPartImages: [], partSpareList: [], + repairConsumePartSpareList: [], coreComponentList: [], columnHistoryList: [ { @@ -2558,6 +2697,8 @@ export default { this.getSparPartImages() } else if (this.activeTable === 'core_component') { this.getCorePartSpareList() + } else if (this.activeTable === 'repair_consume_part_spare') { + this.getRepairConsumePartSpareList() } }, @@ -2671,6 +2812,32 @@ export default { }) }, + // 获取维修耗用配件明细(根据工单号) + getRepairConsumePartSpareList () { + if (!this.saveData.orderNo) { + this.repairConsumePartSpareList = [] + return + } + let tempData = { + userName: this.$store.state.user.name, + orderNo: this.saveData.orderNo, + page: 1, + limit: 500 + } + getRepairWorkOrderPartSpareList(tempData).then(({data}) => { + if (data && data.code === 0) { + let sourceList = data.page && data.page.list ? data.page.list : [] + // 这里按工单号做精确过滤,避免后端模糊查询带出相似工单 + this.repairConsumePartSpareList = sourceList.filter(item => item.orderNo === this.saveData.orderNo) + } else { + this.repairConsumePartSpareList = [] + } + }).catch((error)=>{ + this.repairConsumePartSpareList = [] + this.$message.error(error) + }) + }, + // 预览 previewFile (row) { // 预览文件