From c73e12bcc96baee127c9f51c9fd9156bd584a805 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Mon, 26 May 2025 16:51:09 +0800 Subject: [PATCH] =?UTF-8?q?2025-05-26=20=E6=8A=80=E6=9C=AF=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E5=8D=A1copy=E4=BC=98=E5=8C=96=20masterPart=20invento?= =?UTF-8?q?ryPart=20=E6=8C=89=E9=92=AE=E6=9D=83=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/part/partCatalogInformation.vue | 8 +- src/views/modules/part/partInformation.vue | 20 +- .../technicalSpecificationList.vue | 217 ++++++++++++------ 3 files changed, 156 insertions(+), 89 deletions(-) diff --git a/src/views/modules/part/partCatalogInformation.vue b/src/views/modules/part/partCatalogInformation.vue index 6498104..71c182a 100644 --- a/src/views/modules/part/partCatalogInformation.vue +++ b/src/views/modules/part/partCatalogInformation.vue @@ -10,7 +10,7 @@ 查询 - 新增 + 新增 @@ -178,9 +178,9 @@ - 新增 + 新增 - {{ attributeDialog?'编辑':'保存' }} + {{ attributeDialog?'编辑':'保存' }}
查询 - 新增 - 删除 + 新增 + 删除 @@ -495,22 +512,25 @@ }, data() { return { - approvalList:[], - activeName:'info', - addOrUpdateVisible:false, - height:200, + approvalList: [], + activeName: 'info', + addOrUpdateVisible: false, + height: 200, dataList1: [], - partList:[], - copyData:{ - site:'', - codeNo:'', - oriCodeNo:'', - testPartNo:'', - projectId:'', - revNo:'', - newPartNo:'', + partList: [], + copyData: { + site: '', + buNo: '', + codeNo: '', + oriCodeNo: '', + testPartNo: '', + projectId: '', + revNo: '', + newPartNo: '', + page: 1, + limit: 20 }, - partModelFlag:false, + partModelFlag: false, searchData: { page: 1, limit: 20, @@ -519,14 +539,17 @@ testPartNo: '', oriCodeNo: '', statusDesc: '', - codeNo:'', + codeNo: '', ecnFlag: '', - buNo:'', - customerDesc:'', + buNo: '', + customerDesc: '', }, pageIndex: 1, pageSize: 20, totalPage: 0, + pageIndex2: 1, + pageSize2: 20, + totalPage2: 0, dataListLoading: false, currentRow:'', exportList:[], @@ -1033,12 +1056,27 @@ this.pageIndex = 1 this.search() }, + // 当前页 currentChangeHandle (val) { this.pageIndex = val this.search() }, - search(){ + + // 每页数 + sizeChangeHandle2 (val) { + this.pageSize2 = val + this.pageIndex2 = 1 + this.searchCopyPart() + }, + + // 当前页 + currentChangeHandle2 (val) { + this.pageIndex2 = val + this.searchCopyPart() + }, + + search () { this.searchData.limit = this.pageSize this.searchData.page = this.pageIndex this.dataListLoading = true; @@ -1055,15 +1093,17 @@ } this.dataListLoading = false }).catch((error)=>{ - this.$message.error(error); - this.dataListLoading = false; + this.$message.error(error) + this.dataListLoading = false }) }, - changeData(row) { - this.currentRow = JSON.parse(JSON.stringify(row)); - this.infoData=row; - this.refreshCurrentTabTable (); + + changeData (row) { + this.currentRow = JSON.parse(JSON.stringify(row)) + this.infoData = row + this.refreshCurrentTabTable() }, + // 获取基础数据列表S getBaseList (val, type) { this.tagNo = val @@ -1088,6 +1128,7 @@ this.$refs.baseList.init(val, strVal) }) }, + refreshCurrentTabTable () { if (this.activeName == 'customerInfo') { this.getTechnicalCustomerInfoData(); @@ -1096,19 +1137,21 @@ this.getApprovalList() } }, - getTechnicalCustomerInfoData(){ - let inData={ - id:this.currentRow.id + + getTechnicalCustomerInfoData () { + let inData = { + id: this.currentRow.id } getTechnicalCustomerInfoData(inData).then(({data}) => { //区分请求成功和失败的状况 if (data && data.code == 0) { - this.customerData = data.row; + this.customerData = data.row } else { - this.customerData = []; + this.customerData = [] } - }); + }) }, + /* 列表方法的回调 */ getBaseData (val) { if (this.tagNo === 1013) { @@ -1245,49 +1288,73 @@ }) } }, - copyBM(row){ - this.copyData={ - site:row.site, - codeNo:row.codeNo, - oriCodeNo:row.oriCodeNo, - testPartNo:row.testPartNo, - projectId:row.projectId, - revNo:row.revNo, - newPartNo:'', + + copyBM (row) { + this.copyData = { + site: row.site, + buNo: '', + codeNo: row.codeNo, + oriCodeNo: row.oriCodeNo, + testPartNo: row.testPartNo, + projectId: row.projectId, + revNo: row.revNo, + newPartNo: '', + limit: this.pageSize2, + page: this.pageIndex2 } searchCopyPart(this.copyData).then(({data}) => { - if (data.code == 0) { - this.partList=data.rows + if (data.code === 0) { + this.partList = data.page.list + this.pageIndex2 = data.page.currPage + this.pageSize2 = data.page.pageSize + this.totalPage2 = data.page.totalCount } this.dataListLoading = false }) - this.partModelFlag=true + this.partModelFlag = true + }, + + // copy part 列表查询 + searchCopyPart () { + this.copyData.limit = this.pageSize2 + this.copyData.page = this.pageIndex2 + searchCopyPart(this.copyData).then(({data}) => { + if (data.code === 0) { + this.partList = data.page.list + this.pageIndex2 = data.page.currPage + this.pageSize2 = data.page.pageSize + this.totalPage2 = data.page.totalCount + } else { + this.partList = [] + } + }) }, - choosePartNo(row){ - let saveData={ - site:this.copyData.site, - codeNo:this.copyData.codeNo, - testPartNo:this.copyData.testPartNo, - projectId:this.copyData.projectId, - revNo:this.copyData.revNo, - newPartNo:row.testPartNo, - username:this.$store.state.user.name + + // 双击选择 + choosePartNo (row) { + let tempData = { + site: this.copyData.site, + codeNo: this.copyData.codeNo, + testPartNo: this.copyData.testPartNo, + projectId: this.copyData.projectId, + revNo: this.copyData.revNo, + newPartNo: row.testPartNo, + username: this.$store.state.user.name } this.$confirm('确定要拷贝?', '提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => { - copyBm(saveData).then(({data}) => { + copyBm(tempData).then(({data}) => { if (data && data.code === 0) { this.$message.success( '操作成功') - this.partModelFlag=false; - this.search(); + this.partModelFlag = false + this.search() } else { this.$message.error(data.msg) } }) - }).catch(() => { }) },