From 22e50c4d70ee6feb9647f66fa6a46d9eae2818ed Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 15 Aug 2025 17:39:42 +0800 Subject: [PATCH] =?UTF-8?q?2025-08-15=20=E7=89=A9=E6=96=99=E6=A1=A3?= =?UTF-8?q?=E6=A1=88=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/qc/qc.js | 2 + src/views/modules/qc/qcPartAttribute.vue | 651 ++++++++++++++++------- 2 files changed, 475 insertions(+), 178 deletions(-) diff --git a/src/api/qc/qc.js b/src/api/qc/qc.js index 1456234..d9a14bd 100644 --- a/src/api/qc/qc.js +++ b/src/api/qc/qc.js @@ -230,3 +230,5 @@ export const deleteObjectFile= data => createAPI(`/pms/qc/deleteObjectFile`,'pos export const getUserRoleList= data => createAPI(`/pms/qc/getUserRoleList`,'post',data) export const getOperatorList = data => createAPI(`/pms/qc/getOperatorList`,'post',data) +export const getCustomerList = data => createAPI(`/pms/qc/getCustomerList`,'post',data) + diff --git a/src/views/modules/qc/qcPartAttribute.vue b/src/views/modules/qc/qcPartAttribute.vue index 291493c..79ce623 100644 --- a/src/views/modules/qc/qcPartAttribute.vue +++ b/src/views/modules/qc/qcPartAttribute.vue @@ -169,45 +169,41 @@
仓库配置
- - + + - - - + + + 入库默认仓库 + 入库默认仓库 + + + + + + + 入库默认库位 + 入库默认库位 + + - - - 入库默认仓库 - 入库默认仓库 - - - - + + + - + 领料默认仓库 领料默认仓库 - - - - - - - 默认库位 - 默认库位 - - - + @@ -607,7 +603,7 @@ - + - 查询 + 查询 - - 工序 - 供应商 + + 工序 + 供应商 + 客户 - - 机台 + + 机台
- - - 可选模板: - - - - - - - - - - - - -
- 添加>> -
-
- 删除<< + + + + + 可选模板: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 添加 + 删除
- - 已有模板: - - - - - - - - - - - - - - - - - + + 已有模板: +
+ + + + + + + + + + + + + + + + + + +
+
- + 关闭 @@ -746,22 +843,24 @@ - 查询 + 查询 - - +
- - 确认 + + 确认 @@ -787,22 +886,24 @@ - 查询 + 查询 - - + - - 确认 + + 确认 @@ -834,7 +935,7 @@ - 查询 + 查询 - - 确认 + + 确认 关闭 + + +
+ + + + + + + + + 查询 + + + + + + + + + + +
+ + 确认 + 关闭 + +
+ @@ -1012,6 +1165,7 @@ saveLabelTemplate, // 新增标签模版设置 deleteLabelTemplate, // 删除标签模版设置 updateLabelTemplate, // 编辑标签模版设置 + getCustomerList, // 查询客户列表 } from "@/api/qc/qc.js" import {getTableDefaultListLanguage, getTableUserListLanguage} from "@/api/table.js" import Chooselist from '@/views/modules/common/Chooselist_eam' @@ -1680,6 +1834,7 @@ operation: '', resourceId: '', selectionManufacturer: [], + selectionManufacturer2: [], // 供应商 manufacturerList: [], manufacturerModelFlag: false, @@ -1778,7 +1933,22 @@ defectTrackingModal: false, defectTrackingDisableFlag: false, labelTemplateModal: false, - labelTemplateDisableFlag: false + labelTemplateDisableFlag: false, + selectionCustomer: [], + selectionCustomer2: [], + dataListCustomerSelections: [], + span1: 12, + span2: 12, + span3: 12, + operationSelections: [], + resourceSelections: [], + customerData: { + site: '', + customerID: '', + customerName: '' + }, + customerModelFlag: false, + customerList: [], } }, @@ -2045,8 +2215,23 @@ checkInspectionType () { getPartTemplateLists(this.detailData).then(({data}) => { - this.operation = '' - this.resourceId = '' + this.itemList1 = data.row1 + this.itemList2 = data.row2 + }) + if (this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '107') { + this.span1 = 12 + this.span2 = 6 + this.span3 = 6 + } else if (this.detailData.inspectionTypeNo === '105' || this.detailData.inspectionTypeNo === '109') { + this.span1 = 12 + this.span2 = 12 + } else { + this.span1 = 24 + } + }, + + checkInspectionType2 () { + getPartTemplateLists(this.detailData).then(({data}) => { this.itemList1 = data.row1 this.itemList2 = data.row2 }) @@ -2090,15 +2275,15 @@ this.detailData.inspectionTypeNo = this.options[0].inspectionTypeNo this.checkInspectionType() this.dataListOperationSelections = [] - this.operation = '' - this.resourceId = '' this.operationData.operationDesc = '' this.resourceData.resourceId = '' this.resourceData.resourceDesc = '' - this.operationCurrent = -1 - this.resourceCurrent = -1 this.selectionManufacturer = [] + this.selectionManufacturer2 = [] this.dataListManufacturerSelections = [] + this.selectionCustomer = [] + this.selectionCustomer2 = [] + this.dataListCustomerSelections = [] this.fastAddFlag = true }, @@ -2126,11 +2311,11 @@ this.$message.warning('请选择可选模板!') return } - if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operation == null || this.operation === '')) { + if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.operationSelections.length === 0)) { this.$message.warning('请选择工序!') return } - if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceId == null || this.resourceId === '')) { + if ((this.detailData.inspectionTypeNo === '101' || this.detailData.inspectionTypeNo === '102' || this.detailData.inspectionTypeNo === '103' || this.detailData.inspectionTypeNo === '104' || this.detailData.inspectionTypeNo === '106' || this.detailData.inspectionTypeNo === '107') && (this.resourceSelections.length === 0)) { this.$message.warning('请选择机台!') return } @@ -2143,9 +2328,10 @@ buNo: this.detailData.buNo, attributeNo: this.detailData.partNo, itemList: this.itemSelections1, - operation: this.operation, - resourceID: this.resourceId, + operation: this.operationSelections.length === 0 ? '' : this.operationSelections[0].operationDesc, + resourceID: this.resourceSelections.length === 0 ? '' : this.resourceSelections[0].resourceId, manufacturerList: this.selectionManufacturer, + customerList: this.selectionCustomer, attributeType: this.detailData.attributeType, inspectionTypeNo: this.detailData.inspectionTypeNo } @@ -2156,9 +2342,10 @@ this.itemList2 = data.row2 }) this.itemSelections1 = [] - this.operation = '' - this.resourceId = '' this.selectionManufacturer = [] + this.selectionManufacturer2 = [] + this.selectionCustomer = [] + this.selectionCustomer2 = [] } else { this.$message.error(data.msg) } @@ -2207,7 +2394,9 @@ }).then(() => { deletePartAttributeDetails(row).then(({data}) => { if (data && data.code === 0) { - this.detailModal() + searchPartAttributeDetails(this.detailData).then(({data}) => { + this.detailList = data.rows + }) this.$message.success('操作成功') } else { this.$message.error(data.msg) @@ -2685,18 +2874,30 @@ // 多选工序 selectionOperationChangeHandle (val) { - this.operation = val[0].operationDesc - if (val) { - this.operationCurrent = val.index - } + this.operationSelections = val + }, + + operationSelect (selection, row) { + this.$refs.operationTable.clearSelection() + this.$refs.operationTable.toggleRowSelection(row, true) + }, + + getRowKeys (row) { + return row.operationDesc }, // 多选机台 selectionResourceChangeHandle (val) { - this.resourceId = val[0].resourceId - if (val) { - this.resourceCurrent = val.index - } + this.resourceSelections = val + }, + + resourceSelect (selection, row) { + this.$refs.resourceTable.clearSelection() + this.$refs.resourceTable.toggleRowSelection(row, true) + }, + + getRowKeys2 (row) { + return row.resourceId }, operationRowClassName ({row, rowIndex}) { @@ -2741,6 +2942,30 @@ }) }, + // 获取供应商列表 + getManufacturerList2 () { + this.manufacturerData.site = this.detailData.site + getManufacturerList(this.manufacturerData).then(({data}) => { + if (data && data.code === 0) { + this.manufacturerList = data.rows + //拿到选中的供应商 + let tempDataList = this.selectionManufacturer + this.manufacturerList.forEach(val => { + // 回显选中的供应商 + if (tempDataList.includes(val.manufacturerID)) { + this.$nextTick(() => this.$refs.manufacturerTable.toggleRowSelection(val, true)) + } + }) + } else { + this.manufacturerList = [] + } + }) + }, + + getRowKeys3 (row) { + return row.manufacturerID + }, + // 点击行选中复选框 manufacturerClickRow (row) { this.$refs.manufacturerTable.toggleRowSelection(row) @@ -2754,12 +2979,82 @@ // 确认多选供应商 confirmManufacturer () { this.selectionManufacturer = [] + this.selectionManufacturer2 = [] for (let i = 0; i < this.dataListManufacturerSelections.length; i++) { this.selectionManufacturer.push(this.dataListManufacturerSelections[i].manufacturerID) + this.selectionManufacturer2.push(this.dataListManufacturerSelections[i]) } this.manufacturerModelFlag = false }, + // 获取客户列表 + getCustomerList () { + this.customerData.site = this.detailData.site + getCustomerList(this.customerData).then(({data}) => { + if (data && data.code === 0) { + this.customerList = data.rows + // 先清空缓存选中 + this.$nextTick(() => this.$refs.customerTable.clearSelection()) + // 拿到选中的客户 + let tempDataList = this.selectionCustomer + this.customerList.forEach(val => { + // 回显选中的客户 + if (tempDataList.includes(val.customerID)) { + this.$nextTick(() => this.$refs.customerTable.toggleRowSelection(val, true)) + } + }) + this.customerModelFlag = true + } else { + this.$message.error(data.msg) + } + }) + }, + + // 获取客户列表 + getCustomerList2 () { + this.customerData.site = this.detailData.site + getCustomerList(this.customerData).then(({data}) => { + if (data && data.code === 0) { + this.customerList = data.rows + //拿到选中的客户 + let tempDataList = this.selectionCustomer + this.manufacturerList.forEach(val => { + // 回显选中的客户 + if (tempDataList.includes(val.customerID)) { + this.$nextTick(() => this.$refs.customerTable.toggleRowSelection(val, true)) + } + }) + } else { + this.customerList = [] + } + }) + }, + + // 点击行选中复选框 + customerClickRow (row) { + this.$refs.customerTable.toggleRowSelection(row) + }, + + // 多选客户 + selectionCustomerChangeHandle (val) { + this.dataListCustomerSelections = val + }, + + getRowKeys4 (row) { + return row.customerID + }, + + // 确认多选客户 + confirmCustomer () { + this.selectionCustomer = [] + this.selectionCustomer2 = [] + for (let i = 0; i < this.dataListCustomerSelections.length; i++) { + this.selectionCustomer.push(this.dataListCustomerSelections[i].customerID) + this.selectionCustomer2.push(this.dataListCustomerSelections[i]) + } + this.customerModelFlag = false + }, + // sop文件列表 sopFileList (row) { this.sopData = {