From bb09ab58bf5034513ca444f4a198d6f48a4ed466 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Fri, 5 Jun 2026 13:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/ecss/declaration.vue | 31 +++++++++-- src/views/modules/ecss/hsCode.vue | 76 ++++++++++++++++++++++++-- 2 files changed, 95 insertions(+), 12 deletions(-) diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue index 9a69e9d..22378e3 100644 --- a/src/views/modules/ecss/declaration.vue +++ b/src/views/modules/ecss/declaration.vue @@ -492,7 +492,12 @@ Hs Code - + + + 合同 + + + @@ -519,10 +524,10 @@ - + - + @@ -2339,7 +2344,7 @@ this.exportPaking.itemNo=this.currentRow.itemNo this.exportPaking.upc=this.currentRow.upc this.exportPaking.so=this.currentRow.so - this.exportPaking.shippingMark=this.currentRow.cmcInvoice + this.exportPaking.shippingMark=this.buildDefaultShippingMark() this.exportPaking.palletWeight=this.currentRow.palletWeight this.exportPaking.hsCodeDesc=this.currentRow.hsCodeDesc this.exportPaking.contractFlag=this.currentRow.contractFlag @@ -2421,6 +2426,20 @@ return '' }, + buildDefaultShippingMark() { + if (!this.currentRow || !this.currentRow.buNo) { + return '' + } + const cmcInvoice = this.currentRow.cmcInvoice ? String(this.currentRow.cmcInvoice).trim() : '' + const destination = this.currentRow.destination ? String(this.currentRow.destination).trim() : '' + if (this.currentRow.buNo === '01-Label' || this.currentRow.buNo === '03-RFID') { + return cmcInvoice + } else { + return ['Checkpoint '+destination, cmcInvoice].filter(Boolean).join('\n') + } + return '' + }, + // 导出 downloadDeclarationElements() { if (!this.currentRow || !this.currentRow.buNo) { @@ -2681,7 +2700,7 @@ this.exportPaking.itemNo=this.currentRow.itemNo this.exportPaking.upc=this.currentRow.upc this.exportPaking.so=this.currentRow.so - this.exportPaking.shippingMark=this.exportHeader.contractNo + this.exportPaking.shippingMark=this.buildDefaultShippingMark() this.exportPaking.palletWeight=this.currentRow.palletWeight this.exportPaking.hsCodeDesc=this.currentRow.hsCodeDesc this.exportPaking.contractFlag=this.currentRow.contractFlag @@ -2778,7 +2797,7 @@ } else if (this.currentRow.buNo==='02-Hardtag'){ this.exportPaking.kgs=5.4 } - this.exportPaking.shippingMark=this.exportHeader.contractNo + this.exportPaking.shippingMark=this.buildDefaultShippingMark() if (this.currentRow.buNo==='03-RFID' || this.currentRow.buNo==='01-Label') { this.exportAllFlag = true } else { diff --git a/src/views/modules/ecss/hsCode.vue b/src/views/modules/ecss/hsCode.vue index 71087a5..4dbe592 100644 --- a/src/views/modules/ecss/hsCode.vue +++ b/src/views/modules/ecss/hsCode.vue @@ -18,6 +18,9 @@ + + + {{'查询'}} {{'新增'}} @@ -82,7 +85,7 @@ - + - + + + + + + @@ -168,6 +176,7 @@ buNo:'', hsCode:'', hsCodeDesc:'', + brand:'', codeNo:'', username:this.$store.state.user.name, }, @@ -185,6 +194,7 @@ codeNo:'', unit:'', remark:'', + brand:'无' }, addDisabledFlag:true, activeName:'attribute', @@ -297,6 +307,24 @@ fixed: '', columnWidth: 100 }, + { + userId: this.$store.state.user.name, + functionId: 801003, + serialNumber: '801003Table1Brand', + tableId: "801003Table1", + tableName: "HsCode基础信息", + columnProp: "brand", + 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: 801003, @@ -454,7 +482,7 @@ }, refreshCurrentTabTable(){ if(this.currentRow===''||this.currentRow===null){ - this.currentRow={site:'',hsCode:'',hsCodeDesc: '',buNo:'',recordType:'',codeNo:''} + this.currentRow={site:'',hsCode:'',hsCodeDesc: '',buNo:'',recordType:'',codeNo:'',brand:''} } if(this.activeName==='detail'){ // searchEcssCoDelNotifyDetail(this.currentRow).then(({data}) => { @@ -491,13 +519,36 @@ buNo:'', hsCode:'', hsCodeDesc: '', + hsCodeDescEn:'', codeNo:'', unit:'', remark:'', - brand:'无' + brand:'' } this.addModelFlag=true }, + getBuMatchText(buNo) { + let currentBuNo = buNo || '' + let buItem = this.buList.find(item => item.buNo === currentBuNo) + let buDesc = buItem && buItem.buDesc ? buItem.buDesc : '' + return (currentBuNo + ' ' + buDesc).toLowerCase() + }, + isSoftRfidBu(buNo) { + let matchText = this.getBuMatchText(buNo) + return matchText.indexOf('软标') !== -1 || matchText.indexOf('rfid') !== -1 + }, + isCodeNoOptionalBu(buNo) { + let matchText = this.getBuMatchText(buNo) + return matchText.indexOf('硬标') !== -1 || matchText.indexOf('alpha') !== -1 || matchText.indexOf('天线') !== -1 + }, + changeAddBu(val) { + if (this.addModel.addFlag !== 0) { + return + } + if (this.isSoftRfidBu(val) && (!this.addModel.brand || this.addModel.brand.trim() === '')) { + this.addModel.brand = '无' + } + }, updateModelOpen(row){ this.addDisabledFlag=false this.addModel={ @@ -516,7 +567,14 @@ }, deleteHsCode(row){ this.$confirm('确认删除?', '提示').then(() => { - deleteHsCode(row).then(({data}) => { + let deleteData = { + site: row.site, + buNo: row.buNo, + hsCodeDesc: row.hsCodeDesc, + brand: row.brand || '无', + codeNo: row.codeNo + } + deleteHsCode(deleteData).then(({data}) => { if (data && data.code === 0) { this.searchTable() this.$message({ @@ -552,7 +610,13 @@ }) return false } - if(this.addModel.codeNo==null||this.addModel.codeNo===''){ + if(this.addModel.brand==null||this.addModel.brand===''){ + this.$alert('请输入品牌!', '错误', { + confirmButtonText: '确定' + }) + return false + } + if(!this.isCodeNoOptionalBu(this.addModel.buNo) && (this.addModel.codeNo==null||this.addModel.codeNo==='')){ this.$alert('请选择属性模板!', '错误', { confirmButtonText: '确定' })