From 948f7e45adbe2576b45b498841f6800893bcd2b7 Mon Sep 17 00:00:00 2001 From: fengyuan_yang <1976974459@qq.com> Date: Fri, 31 May 2024 15:17:45 +0800 Subject: [PATCH] =?UTF-8?q?2024-05-31=20=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/changeManagement/changeRecord.vue | 196 ++++++++++-------- .../processManagement/processBindingInfo.vue | 10 +- .../modules/quotation/requestForQuote.vue | 163 ++++++++------- src/views/modules/test/requestForTest.vue | 85 ++++++-- 4 files changed, 261 insertions(+), 193 deletions(-) diff --git a/src/views/modules/changeManagement/changeRecord.vue b/src/views/modules/changeManagement/changeRecord.vue index 5bb87ab..0ce1fa1 100644 --- a/src/views/modules/changeManagement/changeRecord.vue +++ b/src/views/modules/changeManagement/changeRecord.vue @@ -81,9 +81,9 @@
- 申请人 + 申请人 申请人 - + @@ -94,7 +94,7 @@ - + - + - + - + - + - ECN种类 + ECN种类 - 审批人员 + 审批人员 审批人员 - + --> - + - I/E + I/E I/E - + @@ -160,21 +160,21 @@ - CQC + CQC CQC - + - FAI + FAI FAI - + - + @@ -228,8 +228,8 @@ min-width="170" label="新物料编码"> - 在生产品 + 在生产品 - + - + - + - 执行人 + 执行人 执行人 - + - 成品库存 + 成品库存 - + - + - + - 执行人 + 执行人 执行人 - + - 新订单 + 新订单 - + - 影响的原材料及其库存量 + 影响的原材料及其库存量 - + - + - + - 执行人 + 执行人 执行人 - + @@ -400,7 +400,7 @@ min-width="60" label="可选值"> @@ -411,7 +411,7 @@ min-width="120" label="备注"> @@ -431,27 +431,27 @@
- + - + - + - + - + - + - +
@@ -497,7 +497,7 @@ min-width="150" label="备注"> { + if (!this.plmChangeRequestArr){ + return 'N' + } let arr = this.plmChangeRequestArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -908,6 +911,9 @@ }, changeRequestDetailFlag () { return (value) => { + if (!this.plmChangeRequestDetailArr){ + return 'N' + } let arr = this.plmChangeRequestDetailArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -917,6 +923,9 @@ }, changeCostImpactFlag () { return (value) => { + if (!this.plmChangeCostImpactArr){ + return 'N' + } let arr = this.plmChangeCostImpactArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -926,6 +935,9 @@ }, changeFAItemFlag () { return (value) => { + if (!this.plmChangeFAItemArr){ + return 'N' + } let arr = this.plmChangeFAItemArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -935,6 +947,9 @@ }, changeExecutionInfoFlag () { return (value) => { + if (!this.plmChangeExecutionInfoArr){ + return 'N' + } let arr = this.plmChangeExecutionInfoArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -944,6 +959,9 @@ }, changeItemFlag () { return (value) => { + if (!this.plmChangeItemArr){ + return 'N' + } let arr = this.plmChangeItemArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -953,6 +971,9 @@ }, changeCountersignatureItemFlag () { return (value) => { + if (!this.plmChangeCountersignatureItemArr){ + return 'N' + } let arr = this.plmChangeCountersignatureItemArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -1954,13 +1975,12 @@ } await getNodeAuthority(tempData).then(({data}) => { if (data && data.code === 0) { - this.plmChangeRequestArr = data.rows.plmChangeRequest - this.plmChangeRequestDetailArr = data.rows.plmChangeRequestDetail - this.plmChangeCostImpactArr = data.rows.plmChangeCostImpact - this.plmChangeFAItemArr = data.rows.plmChangeFAItem - this.plmChangeExecutionInfoArr = data.rows.plmChangeExecutionInfo - this.plmChangeItemArr = data.rows.plmChangeItem - this.plmChangeCountersignatureItemArr = data.rows.plmChangeCountersignatureItem + this.plmChangeRequestArr = data.rows.plm_change_request + this.plmChangeRequestDetailArr = data.rows.plm_change_request_detail + this.plmChangeCostImpactArr = data.rows.plm_change_cost_impact + this.plmChangeFAItemArr = data.rows.plm_change_FA_item + this.plmChangeExecutionInfoArr = data.rows.plm_change_execution_info + this.plmChangeItemArr = data.rows.plm_change_item } }) }, @@ -2437,35 +2457,31 @@ // 提交 submitData () { - // if (this.modalData.nodeConclusion == null || this.modalData.nodeConclusion === '') { - // this.$message.warning('请选择节点结论!') - // return - // } - // this.$confirm(`是否确认提交?`, '提示', { - // confirmButtonText: '确定', - // cancelButtonText: '取消', - // type: 'warning' - // }).then(() => { - let tempData = { - site: this.modalData.site, - userName: this.$store.state.user.name, - changeNo: this.modalData.changeNo, - menuId: this.$route.meta.menuId, - nodeConclusion: this.modalData.nodeConclusion + for (let i = 0; i < this.plmChangeRequestArr.length; i++) { + if (!this.modalData[this.plmChangeRequestArr[i].fieldId] && this.plmChangeRequestArr[i].required === 'Y') { + this.$message.warning(this.plmChangeRequestArr[i].fieldName + '不能为空!') + return } - submitChange(tempData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.$message({message: '操作成功', type: 'success'}) - this.submitModalFlag = false - this.modalFlag = false - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) - } - }) - // }) + } + let tempData = { + site: this.modalData.site, + userName: this.$store.state.user.name, + changeNo: this.modalData.changeNo, + menuId: this.$route.meta.menuId, + nodeConclusion: this.modalData.nodeConclusion + } + submitChange(tempData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.$message({message: '操作成功', type: 'success'}) + this.submitModalFlag = false + this.modalFlag = false + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) }, // 获取选择的ECN种类 diff --git a/src/views/modules/processManagement/processBindingInfo.vue b/src/views/modules/processManagement/processBindingInfo.vue index 13f9cc3..fcd2861 100644 --- a/src/views/modules/processManagement/processBindingInfo.vue +++ b/src/views/modules/processManagement/processBindingInfo.vue @@ -1174,13 +1174,19 @@ passTable: [], addTable: [] } - }else if (row.menuId === '103001'){// 打样 + } else if (row.menuId === '103001'){ // 打样 this.queryTableParam = { tableType: 'plm_proofing', passTable: [], addTable: [] } - }else { + } else if (row.menuId === '107001') { // 测试 + this.queryTableParam = { + tableType: 'plm_test_information', + passTable: [], + addTable: ['plm_test_so_bom'] + } + } else { return } this.getTableList() diff --git a/src/views/modules/quotation/requestForQuote.vue b/src/views/modules/quotation/requestForQuote.vue index ec1b1b3..c4f4205 100644 --- a/src/views/modules/quotation/requestForQuote.vue +++ b/src/views/modules/quotation/requestForQuote.vue @@ -180,8 +180,7 @@ - 客户编码 + 客户编码 @@ -194,19 +193,20 @@ - + - + - + @@ -228,8 +228,8 @@ - + @@ -245,14 +245,16 @@ - 采购专员 - + 采购专员 + 采购专员 + - 报价专员 - + 报价专员 + 报价专员 + @@ -271,13 +273,13 @@ - + - + @@ -294,6 +296,7 @@ @@ -1030,6 +1033,9 @@ export default { }, quotationInformationFlag () { return (value) => { + if (!this.plmQuotationInformationArr){ + return 'N' + } let arr = this.plmQuotationInformationArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -1157,6 +1163,7 @@ export default { page: 1, limit: 10, menuId: this.$route.meta.menuId, + quotationNo: '' }, // 其它 dataListLoading: false, @@ -2060,6 +2067,32 @@ export default { created() { this.getDataList() }, + activated () { + if (this.$route.params.type === 'tokenLogin') { + if (this.$route.params.docNo) { + this.searchData.quotationNo = this.$route.params.docNo + } + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + quotationInformationSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + this.$refs.selectDiv.setLengthAll(this.dataList.length) + //判断是否全部存在数据 + if (this.totalPage > 0) { + //设置选中行 + // this.$refs.quotationTable.setCurrentRow(this.dataList[0]) + // this.refreshCurrentTabTable() //加载当前的页签的table + this.quotationClickRow(this.dataList[0]) + this.updateModal(this.dataList[0]) + } + } + }) + } + }, methods: { // ======== 分页相关方法 ======== /** @@ -2448,67 +2481,44 @@ export default { return } this.confirmProjectPart(); - // 验证详情 - this.$refs[this.modalData.flag === '1'?'saveDetailForm':'editDetailForm'].validate((valid) => { - if (!valid){ - if (this.priceCheckDetail.associatedPartNo === ''|| this.savePriceDetail.associatedPartNo === ''){ - this.$message.warning('请输入关联零件号信息!') - return - } - if (this.priceCheckDetail.materialRequired === '' || this.savePriceDetail.materialRequired === ''){ - this.$message.warning('请输入所需材料!') - return - } - if (this.priceCheckDetail.yearlyOrMonthlyRequirement === '' || this.savePriceDetail.yearlyOrMonthlyRequirement === ''){ - this.$message.warning('请输入年度/月度需求!') - return - } - if (this.priceCheckDetail.runningWidth === '' || this.savePriceDetail.yearlyOrMonthlyRequirement === ''){ - this.$message.warning('请输入运行宽度!') - return - } - }else { - if (this.modalData.flag === '1') { - this.modalData.priceCheckDetail = this.savePriceDetail - quotationInformationSave(this.modalData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.modalFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + + if (this.modalData.flag === '1') { + quotationInformationSave(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { } }) } else { - this.modalData.priceCheckDetail = this.priceCheckDetail - quotationInformationEdit(this.modalData).then(({data}) => { - if (data && data.code === 0) { - this.getDataList() - this.modalFlag = false - this.$message({ - message: '操作成功', - type: 'success', - duration: 1500, - onClose: () => { - } - }) - } else { - this.$alert(data.msg, '错误', { - confirmButtonText: '确定' - }) + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) + } + }) + } else { + quotationInformationEdit(this.modalData).then(({data}) => { + if (data && data.code === 0) { + this.getDataList() + this.modalFlag = false + this.$message({ + message: '操作成功', + type: 'success', + duration: 1500, + onClose: () => { } }) + } else { + this.$alert(data.msg, '错误', { + confirmButtonText: '确定' + }) } - } - }) + }) + } } }) }, @@ -3313,14 +3323,9 @@ export default { // 提交 submitData () { - let tempData = { - site: this.modalData.site, - userName: this.$store.state.user.name, - quotationNo: this.modalData.quotationNo, - menuId: this.$route.meta.menuId, - nodeConclusion: this.modalData.nodeConclusion - } - submitChange(tempData).then(({data}) => { + this.modalData.userName = this.$store.state.user.name + this.modalData.menuId = this.$route.meta.menuId + submitChange(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.$message({message: '操作成功', type: 'success'}) diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index 56162f0..c0b23e6 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -184,23 +184,27 @@
- +
- + - + - + @@ -238,7 +242,7 @@ - + @@ -261,27 +265,31 @@ - Artwork - + 报价专员 + Artwork + - TP工程师 - + TP工程师 + TP工程师 + - CQC - + CQC + CQC + - FAI - + FAI + FAI + @@ -299,7 +307,8 @@ - + @@ -1112,6 +1121,9 @@ computed: { testInformationFlag () { return (value) => { + if (!this.plmTestInformationArr){ + return 'N' + } let arr = this.plmTestInformationArr.filter(a => a.fieldId === value) if (arr.length > 0) { return arr[0].updateFlag @@ -1219,6 +1231,7 @@ page: 1, limit: 10, menuId: this.$route.meta.menuId, + testNo: '' }, // 其它 dataListLoading: false, @@ -2173,6 +2186,39 @@ created () { this.getDataList() }, + activated () { + if (this.$route.params.type === 'tokenLogin') { + if (this.$route.params.docNo) { + this.searchData.testNo = this.$route.params.docNo + } + this.searchData.limit = this.pageSize + this.searchData.page = this.pageIndex + testInformationSearch(this.searchData).then(({data}) => { + if (data.code === 0) { + this.dataList = data.page.list + this.pageIndex = data.page.currPage + this.pageSize = data.page.pageSize + this.totalPage = data.page.totalCount + this.$refs.selectDiv.setLengthAll( this.dataList.length) + // 判断是否全部存在数据 + if (this.totalPage > 0) { + //设置选中行 + this.$refs.testTable.setCurrentRow(this.dataList[0]) + // 加载当前的页签的table + this.refreshCurrentTabTable() + this.testClickRow(this.dataList[0]) + this.updateModal(this.dataList[0]) + } else { + //设置选中行 + this.$refs.testTable.setCurrentRow({}) + // 加载当前的页签的table + this.refreshCurrentTabTable() + this.testClickRow({}) + } + } + }) + } + }, methods: { searchTestPropertiesItem(){ let params={ @@ -3353,14 +3399,9 @@ // 提交 submitData () { - let tempData = { - site: this.modalData.site, - userName: this.$store.state.user.name, - testNo: this.modalData.testNo, - menuId: this.$route.meta.menuId, - nodeConclusion: this.modalData.nodeConclusion - } - submitChange(tempData).then(({data}) => { + this.modalData.userName = this.$store.state.user.name + this.modalData.menuId = this.$route.meta.menuId + submitChange(this.modalData).then(({data}) => { if (data && data.code === 0) { this.getDataList() this.$message({message: '操作成功', type: 'success'})