From 46461ee3df258296c66ab215d3318bd889f06d55 Mon Sep 17 00:00:00 2001 From: zelian_wu Date: Wed, 27 Mar 2024 11:26:17 +0800 Subject: [PATCH] =?UTF-8?q?2024-03-27=20=E6=B5=8B=E8=AF=95=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/quotation/sellForQuotation.vue | 2 +- src/views/modules/test/requestForTest.vue | 38 ++-- .../test/testSoAttribute/testAttribute.vue | 2 +- .../modules/test/testSoBom/testTable.vue | 210 ++++++++++++------ .../test/testSoRouting/testRoutingTable.vue | 42 +++- 5 files changed, 197 insertions(+), 97 deletions(-) diff --git a/src/views/modules/quotation/sellForQuotation.vue b/src/views/modules/quotation/sellForQuotation.vue index 94b793b..e626903 100644 --- a/src/views/modules/quotation/sellForQuotation.vue +++ b/src/views/modules/quotation/sellForQuotation.vue @@ -126,7 +126,7 @@ - + diff --git a/src/views/modules/test/requestForTest.vue b/src/views/modules/test/requestForTest.vue index c3fede9..bdaec18 100644 --- a/src/views/modules/test/requestForTest.vue +++ b/src/views/modules/test/requestForTest.vue @@ -164,7 +164,7 @@ 客户编码 - + @@ -204,7 +204,7 @@ 项目编码 - + @@ -327,7 +327,7 @@ - + @@ -609,7 +609,7 @@ - + @@ -1248,7 +1248,7 @@ tableName: '测试信息表', columnProp: 'customerDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '客户名称', columnHidden: false, columnImage: false, @@ -1266,7 +1266,7 @@ tableName: '测试信息表', columnProp: 'projectId', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '项目编码', columnHidden: false, columnImage: false, @@ -1284,7 +1284,7 @@ tableName: '测试信息表', columnProp: 'projectName', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '项目名称', columnHidden: false, columnImage: false, @@ -1338,7 +1338,7 @@ tableName: '测试信息表', columnProp: 'testPartNo', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '项目料号', columnHidden: false, columnImage: false, @@ -1356,7 +1356,7 @@ tableName: '测试信息表', columnProp: 'partName', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '物料名称', columnHidden: false, columnImage: false, @@ -1392,7 +1392,7 @@ tableName: '测试信息表', columnProp: 'testNumber', headerAlign: 'center', - align: 'center', + align: 'right', columnLabel: '测试数量', columnHidden: false, columnImage: false, @@ -1613,14 +1613,14 @@ columnProp: 'testPartNo', headerAlign: 'center', align: 'center', - columnLabel: '产品编码', + columnLabel: '物料编码', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 150 + columnWidth: 120 }, { userId: this.$store.state.user.name, @@ -1630,15 +1630,15 @@ tableName: '项目物料表', columnProp: 'partDesc', headerAlign: 'center', - align: 'center', - columnLabel: '产品名称', + align: 'left', + columnLabel: '物料名称', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 120 + columnWidth: 200 },{ userId: this.$store.state.user.name, functionId: 103001, @@ -1648,7 +1648,7 @@ columnProp: 'partSpec', headerAlign: 'center', align: 'center', - columnLabel: '产品规格', + columnLabel: '物料规格', columnHidden: false, columnImage: false, columnSortable: false, @@ -1665,14 +1665,14 @@ columnProp: 'partTypeDesc', headerAlign: 'center', align: 'center', - columnLabel: '产品类型', + columnLabel: '物料类型', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 120 + columnWidth: 140 },{ userId: this.$store.state.user.name, functionId: 103001, @@ -1698,7 +1698,7 @@ tableName: '项目物料表', columnProp: 'codeDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '模板名称', columnHidden: false, columnImage: false, diff --git a/src/views/modules/test/testSoAttribute/testAttribute.vue b/src/views/modules/test/testSoAttribute/testAttribute.vue index 56ff0cd..6736268 100644 --- a/src/views/modules/test/testSoAttribute/testAttribute.vue +++ b/src/views/modules/test/testSoAttribute/testAttribute.vue @@ -9,7 +9,7 @@ export default { }, height:{ type: Number, - default:300 + default:320 }, attributeList:{ type:Array diff --git a/src/views/modules/test/testSoBom/testTable.vue b/src/views/modules/test/testSoBom/testTable.vue index 7e8c289..67a0ee8 100644 --- a/src/views/modules/test/testSoBom/testTable.vue +++ b/src/views/modules/test/testSoBom/testTable.vue @@ -33,7 +33,7 @@ export default { height:{ type:Number, default:300 - } + }, }, model:{ prop:"dataList", @@ -63,6 +63,8 @@ export default { assemblyQty: [{required: true,message: ' ',trigger: ['change','blur']}], fixedScrapQty: [{required: true,message: ' ',trigger: ['change','blur']}], scrapFactor: [{required: true,message: ' ',trigger: ['change','blur']}], + unitCost: [{required: true,message: ' ',trigger: ['change','blur']}], + totalCost: [{required: true,message: ' ',trigger: ['change','blur']}], }, testSoBom:{ site:this.$store.state.user.site, @@ -83,6 +85,8 @@ export default { rmTypeDb:0, issuedType:undefined, remark:undefined, + unitCost:0, + totalCost:0, }, selectionTestSoBomList:[], testSoBomColumnList:[{ @@ -135,7 +139,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 200 },{ userId: this.$store.state.user.name, functionId: 102001, @@ -153,41 +157,44 @@ export default { status: true, fixed: '', columnWidth: 100 - },{ - userId: this.$store.state.user.name, - functionId: 102001, - serialNumber: '102001Table3AssemblyQty', - tableId: '102001Table3', - tableName: '测试产品结构', - columnProp: 'assemblyQty', - headerAlign: 'center', - align: 'left', - columnLabel: '单位用量', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100 - },{ - userId: this.$store.state.user.name, - functionId: 102001, - serialNumber: '102001Table3FixedScrapQty', - tableId: '102001Table3', - tableName: '测试产品结构', - columnProp: 'fixedScrapQty', - headerAlign: 'center', - align: 'left', - columnLabel: '固定损耗', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100 - },{ + }, + // { + // userId: this.$store.state.user.name, + // functionId: 102001, + // serialNumber: '102001Table3AssemblyQty', + // tableId: '102001Table3', + // tableName: '测试产品结构', + // columnProp: 'assemblyQty', + // headerAlign: 'center', + // align: 'left', + // columnLabel: '单位用量', + // columnHidden: false, + // columnImage: false, + // columnSortable: false, + // sortLv: 0, + // status: true, + // fixed: '', + // columnWidth: 100 + // }, + // { + // userId: this.$store.state.user.name, + // functionId: 102001, + // serialNumber: '102001Table3FixedScrapQty', + // tableId: '102001Table3', + // tableName: '测试产品结构', + // columnProp: 'fixedScrapQty', + // headerAlign: 'center', + // align: 'left', + // columnLabel: '固定损耗', + // columnHidden: false, + // columnImage: false, + // columnSortable: false, + // sortLv: 0, + // status: true, + // fixed: '', + // columnWidth: 100 + // }, + { userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3UmName', @@ -204,24 +211,26 @@ export default { status: true, fixed: '', columnWidth: 100 - },{ - userId: this.$store.state.user.name, - functionId: 102001, - serialNumber: '102001Table3ScrapFactor', - tableId: '102001Table3', - tableName: '测试产品结构', - columnProp: 'scrapFactor', - headerAlign: 'center', - align: 'left', - columnLabel: '报废率%', - columnHidden: false, - columnImage: false, - columnSortable: false, - sortLv: 0, - status: true, - fixed: '', - columnWidth: 100 - },{ + }, + // { + // userId: this.$store.state.user.name, + // functionId: 102001, + // serialNumber: '102001Table3ScrapFactor', + // tableId: '102001Table3', + // tableName: '测试产品结构', + // columnProp: 'scrapFactor', + // headerAlign: 'center', + // align: 'left', + // columnLabel: '报废率%', + // columnHidden: false, + // columnImage: false, + // columnSortable: false, + // sortLv: 0, + // status: true, + // fixed: '', + // columnWidth: 100 + // }, + { userId: this.$store.state.user.name, functionId: 102001, serialNumber: '102001Table3RequiredQty', @@ -229,7 +238,7 @@ export default { tableName: '测试产品结构', columnProp: 'requiredQty', headerAlign: 'center', - align: 'left', + align: 'right', columnLabel: '需求数量', columnHidden: false, columnImage: false, @@ -275,6 +284,42 @@ export default { // fixed: '', // columnWidth: 100 // }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table3UnitCost', + tableId: '102001Table3', + tableName: '测试产品结构', + columnProp: 'unitCost', + headerAlign: 'center', + align: 'right', + columnLabel: '单价', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, + { + userId: this.$store.state.user.name, + functionId: 102001, + serialNumber: '102001Table3TotalCost', + tableId: '102001Table3', + tableName: '测试产品结构', + columnProp: 'totalCost', + headerAlign: 'center', + align: 'right', + columnLabel: '总价', + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, { userId: this.$store.state.user.name, functionId: 102001, @@ -291,7 +336,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 140 }, // { // userId: this.$store.state.user.name, @@ -330,10 +375,21 @@ export default { } this.partList = []; }, - initPartList(){ + openPartDialog(){ + this.partData.partNo = this.testSoBom.componentPartNo + this.initPartList(); + }, + initPartList(flag){ searchPartList(this.partData).then(({data})=>{ if (data && data.code === 200) { this.partList = data.data; + if (flag === true){ + if (this.partList.length === 1 && this.partList[0].partNo === this.testSoBom.componentPartNo){ + this.dblClickPartTable(this.partList[0]) + }else { + this.dblClickPartTable({partNo:this.testSoBom.componentPartNo,partDesc:'',umId:''}) + } + } } }) }, @@ -406,6 +462,8 @@ export default { rmTypeDb:0, issuedType:undefined, remark:undefined, + unitCost:0, + totalCost:0, } }, clearTable(){ @@ -509,6 +567,14 @@ export default { computeQuantityRequired(){ let total = new Decimal(this.testNumber).mul(new Decimal(this.testSoBom.assemblyQty)).div((new Decimal(100).sub(new Decimal(this.testSoBom.scrapFactor))).div(new Decimal(100))) this.testSoBom.requiredQty = new Decimal(total.toFixed(3,Decimal.ROUND_FLOOR)).toSignificantDigits().toNumber(); + }, + computeTotalCost(val){ + this.testSoBom.assemblyQty = new Decimal(this.testSoBom.requiredQty).div(new Decimal(this.testNumber)).toNumber() + this.testSoBom.totalCost = new Decimal(this.testSoBom.requiredQty).mul(new Decimal(this.testSoBom.unitCost)).toNumber() + }, + changePartNo(val){ + this.partData.partNo = val + this.initPartList(true); } }, @@ -563,7 +629,7 @@ export default { 物料编码 - + @@ -580,17 +646,17 @@ export default { - + - + - + - + @@ -617,7 +683,21 @@ export default { - + + + + + + + + + + + + + + + @@ -635,7 +715,7 @@ export default { diff --git a/src/views/modules/test/testSoRouting/testRoutingTable.vue b/src/views/modules/test/testSoRouting/testRoutingTable.vue index c958d52..66a2d2e 100644 --- a/src/views/modules/test/testSoRouting/testRoutingTable.vue +++ b/src/views/modules/test/testSoRouting/testRoutingTable.vue @@ -124,15 +124,15 @@ export default { tableName: '测试工艺路线', columnProp: 'itemDesc', headerAlign: 'center', - align: 'center', - columnLabel: '工序号', + align: 'left', + columnLabel: '工序描述', columnHidden: false, columnImage: false, columnSortable: false, sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 200 }, { userId: this.$store.state.user.name, @@ -142,7 +142,7 @@ export default { tableName: '测试工艺路线', columnProp: 'workCenterNo', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '加工中心', columnHidden: false, columnImage: false, @@ -160,7 +160,7 @@ export default { tableName: '测试工艺路线', columnProp: 'workCenterDesc', headerAlign: 'center', - align: 'center', + align: 'left', columnLabel: '加工中心名称', columnHidden: false, columnImage: false, @@ -168,7 +168,7 @@ export default { sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 150 }, { userId: this.$store.state.user.name, @@ -401,7 +401,7 @@ export default { this.testSoRouting.workCenterType = row.workCenterType this.workCenterDialogFlag = false }, - searchWorkCenter(){ + searchWorkCenter(flag){ let params = { site:this.$store.state.user.site, workCenterNo:this.workCenter.workCenterNo, @@ -412,6 +412,18 @@ export default { searchWorkCenter(params).then(({data})=>{ if (data && data.code === 200){ this.workCenterList = data.data; + if (flag === true){ + if (this.workCenterList.length === 1 && this.workCenterList[0].workCenterNo === this.testSoRouting.workCenterNo){ + this.dblClickWorkCenterTable(this.workCenterList[0]) + }else { + let workCenter = { + workCenterNo:this.testSoRouting.workCenterNo, + workCenterDesc:'', + workCenterType:'' + } + this.dblClickWorkCenterTable(workCenter) + } + } } }) }, @@ -592,6 +604,14 @@ export default { this.testSoRouting.itemNo = this.dataList.length > 0?this.dataList[this.dataList.length-1].itemNo +10:10; } }, + changeWorkCenter(val){ + this.workCenter.workCenterNo = val + this.searchWorkCenter(true) + }, + openWorkCenterDialog(){ + this.workCenter.workCenterNo = this.testSoRouting.workCenterNo; + this.searchWorkCenter() + } }, } @@ -635,7 +655,7 @@ export default { - + @@ -643,7 +663,7 @@ export default { - + @@ -653,7 +673,7 @@ export default { 加工中心 - + @@ -751,7 +771,7 @@ export default { - +