From bc56e01741619835f7c163a7c607faf0d47abe41 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Wed, 28 Jan 2026 16:27:39 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=87=BA=E7=AE=B1=E5=AD=90?= =?UTF-8?q?=E7=9A=84=E9=95=BF=E5=AE=BD=E9=AB=98=E4=BD=93=E7=A7=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/ecss/partHsCode.vue | 43 ++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/src/views/modules/ecss/partHsCode.vue b/src/views/modules/ecss/partHsCode.vue index 77ff6db..db86106 100644 --- a/src/views/modules/ecss/partHsCode.vue +++ b/src/views/modules/ecss/partHsCode.vue @@ -161,6 +161,26 @@ + + + + + + + + + + + + + + + + + + + + @@ -736,7 +756,10 @@ partDesc: '', hsCode:'', hsCodeDesc:'', - packageNo:'' + packageNo:'', + length: '', + width: '', + height: '' }, currentRow:{ site:'', @@ -747,6 +770,21 @@ } } }, + computed: { + /** + * 计算包装箱体积 (长 * 宽 * 高) + */ + packageVolume() { + const length = parseFloat(this.hsCodeModelData.length) || 0 + const width = parseFloat(this.hsCodeModelData.width) || 0 + const height = parseFloat(this.hsCodeModelData.height) || 0 + + if (length > 0 && width > 0 && height > 0) { + return (length * width * height).toFixed(6) + } + return '' + } + }, mounted() { this.$nextTick(() => { this.height = (window.innerHeight - 240)/2; @@ -909,6 +947,9 @@ }, hsCodeModel(row){ this.hsCodeModelData=JSON.parse(JSON.stringify(row)) + this.hsCodeModelData.length = row.boxLength/100 + this.hsCodeModelData.width = row.boxWidth/100 + this.hsCodeModelData.height = row.boxHeight/100 this.hsCodeModelFlag=true }, changeData(row){