From 11cae868ac31f49e88dd4b4d7c28386c7e7796c0 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Mon, 12 May 2025 14:57:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ecss/ecss.js | 2 + src/views/modules/ecss/codelnotify.vue | 40 +- src/views/modules/ecss/codelnotifyConfirm.vue | 5 +- src/views/modules/ecss/createDeclaration.vue | 10 +- src/views/modules/ecss/declaration.vue | 451 +++++++++++++++++- src/views/modules/ecss/ecssTemplate.vue | 216 ++++++++- src/views/modules/ecss/hsCode.vue | 32 +- 7 files changed, 718 insertions(+), 38 deletions(-) diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js index 4e5887d..1580b21 100644 --- a/src/api/ecss/ecss.js +++ b/src/api/ecss/ecss.js @@ -105,4 +105,6 @@ export const getPropertiesListByDeclaration = data => createAPI(`/ecss/coDel/get export const queryPartListAll = data => createAPI(`/ecss/coDel/queryPartListAll`,'post',data) +export const searchCustomList = (data) => createAPI(`/select/ecssMapper/getCustomerList/list`,'post',data) + diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue index 3f55112..6d8fae1 100644 --- a/src/views/modules/ecss/codelnotify.vue +++ b/src/views/modules/ecss/codelnotify.vue @@ -119,10 +119,10 @@ - { + o.ttlAmount = o.ttlAmount.toFixed(2); + o.sumPrice = o.sumPrice.toFixed(2); + }); } else { this.dataList2 = []; } @@ -1907,6 +1910,36 @@ return s }, + getSummaries(param) { + const { columns } = param; + const sums = []; + columns.forEach((column, index) => { + if (index === 0) { + sums[index] = '合计'; + return; + } + const values = this.dataList2.map(item => Number(item[column.property])); + if (!values.every(value => isNaN(value))) { + switch(column.property) { + case 'qty': + sums[index] = `${values.reduce((a, b) => a + b, 0)}`; + break; + case 'ttlAmount': + sums[index] = `${values.reduce((a, b) => a + b, 0)}`; + break; + case 'sumPrice': + sums[index] = `${values.reduce((a, b) => a + b, 0)}`; + break; + default: + sums[index] = ''; + } + } else { + sums[index] = ''; + } + }); + this.$nextTick(() => this.$refs.detailTable.doLayout());// 强制刷新布局, 否则会被表格覆盖 + return sums; + } }, created() { this.getBu () @@ -1916,4 +1949,5 @@ diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index 9a8fe4d..1d54e1b 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -1997,7 +1997,10 @@ //区分请求成功和失败的状况 if (data && data.code == 0) { this.dataList2 = data.rows - + this.dataList2.forEach(o => { + o.ttlAmount = o.ttlAmount.toFixed(2); + o.sumPrice = o.sumPrice.toFixed(2); + }); } else { this.dataList2 = []; } diff --git a/src/views/modules/ecss/createDeclaration.vue b/src/views/modules/ecss/createDeclaration.vue index 091ad21..2acd919 100644 --- a/src/views/modules/ecss/createDeclaration.vue +++ b/src/views/modules/ecss/createDeclaration.vue @@ -417,6 +417,9 @@ align="right" label="总价" min-width="60"> + { + o.ttlAmount = o.ttlAmount.toFixed(2); + o.sumPrice = o.sumPrice.toFixed(2); + }); } else { this.dataList2 = []; } @@ -1633,6 +1639,8 @@ }, setDestination(){ this.detailList.forEach(o => o.destination=this.customerMap.get(this.declarationData.overseasShipper)) + this.declarationData.receiveArea=this.customerMap.get(this.declarationData.overseasShipper) + this.declarationData.salesArea=this.customerMap.get(this.declarationData.overseasShipper) }, saveDeclaration(){ if(this.detailList==null|| this.detailList.length<1){ diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue index 3bbdd16..7892df9 100644 --- a/src/views/modules/ecss/declaration.vue +++ b/src/views/modules/ecss/declaration.vue @@ -51,8 +51,11 @@ {{'导出出口货物委托书'}} - + + + {{'一键导出'}} @@ -126,6 +129,215 @@ + + + + +
报关要素
+ + + + 境外品牌(其他) + 无品牌 + + + + + 中文 + 英文 + + +
+ +
发票
+ + + + 品名 + + + + + 合同 + + + +
+ +
箱单
+ + + 货物明细 + + + + + UPC + + + + + SO + + + + + 序号 + 栈板号 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
出口货物委托书
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + 确定 + 关闭 + +
+ @@ -447,7 +659,7 @@ - + @@ -534,6 +746,7 @@ }, data() { return { + exportAllFlag:false, templateFlag:false, templateData:{}, templateList:[], @@ -569,7 +782,7 @@ hsCode:'', material:'', hsCodeDescType:'', - goodsLabel:'', + goodsLabel:true, }, exportPakingFlag:false, exportPaking:{ @@ -587,7 +800,7 @@ hsCode:'', material:'', hsCodeDescType:'', - goodsLabel:'', + goodsLabel:true, boxChange:'' }, brandType:'', @@ -1622,6 +1835,17 @@ //this.hsCodeDescType='' this.declarationFlag = true }, + searchTemplateOne() { + this.templateData.buNo = this.currentRow.buNo + this.templateData.customName = this.currentRow.customName + searchTemplateList(this.templateData).then(({data}) => { + if (data && data.code === 0){ + if (data.rows && data.rows.length > 0) { + this.templateRowDblclick(data.rows[0]); + } + } + }) + }, exportInvoiceList() { if (!this.currentRow || !this.currentRow.buNo) { this.$message.warning('请选择报关单!') @@ -1661,6 +1885,8 @@ } }); } + this.templateData.type='发票' + this.searchTemplateOne(); }, exportPakingList() { if (!this.currentRow || !this.currentRow.buNo) { @@ -1707,6 +1933,8 @@ } }); } + this.templateData.type='箱单' + this.searchTemplateOne(); }, exportGoodsList() { if (!this.currentRow || !this.currentRow.buNo) { @@ -1718,7 +1946,7 @@ this.exportGoods.madeArea = 'Shanghai, China' this.exportGoods.sendPort = 'Shanghai, China' this.exportGoods.deliveryGoodsDate = '' - this.exportGoods.voyage = '' + this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:'' this.exportGoods.shippingDate = '' this.exportGoodsFlag = true }, @@ -1845,6 +2073,173 @@ ); this.searchTable() }, + exportAll(){ + if (!this.currentRow || !this.currentRow.buNo) { + this.$message.warning('请选择报关单!') + return + } + let exportParam=this.exportPaking + exportParam.salesMethod=this.exportGoods.salesMethod + exportParam.currency=this.exportGoods.currency + exportParam.madeArea=this.exportGoods.madeArea + exportParam.sendPort=this.exportGoods.sendPort + exportParam.deliveryGoodsDate=this.exportGoods.deliveryGoodsDate + exportParam.voyage=this.exportGoods.voyage + exportParam.shippingDate=this.exportGoods.shippingDate + exportParam.hsCodeDescType=this.exportGoods.hsCodeDescType + exportParam.shipper=this.exportGoods.shipper + + exportParam.brandType = this.brandType + exportParam.hsCodeDescType=this.hsCodeDescType + if (this.propertiesList.length>0) { + this.currentRow.brand='品牌' + exportParam.brand = '品牌' + exportParam.propertiesList = this.propertiesList + } + exportParam.hsCodeDesc = this.exportInvoice.hsCodeDesc + exportParam.contractFlag = this.exportInvoice.contractFlag + + exportParam.declarationNo = this.currentRow.declarationNo + exportParam.site = this.currentRow.site + exportParam.delNo = this.currentRow.delNo + exportParam.notifyPartDetailList = this.notifyPartDetailList + ExportUtil.export( + "/ecss/coDel/downloadAll", + exportParam, this.currentRow.declarationNo+"单证信息.xlsx" + ); + this.exportAllFlag = false + this.searchTable() + }, + + async exportAllOpen() { + if (!this.currentRow || !this.currentRow.buNo) { + this.$message.warning('请选择报关单!') + return + } + // 报关要素 + this.brandType='境外品牌(其他)' + this.exportAllFlag = true + if (this.currentRow.buNo==='02-Hardtag' || this.currentRow.buNo==='04-MHM') { + this.currentRow.brand='品牌' + getPropertiesListByDeclaration(this.currentRow).then(({data}) => { + if (data && data.code == 0) { + this.propertiesList = data.rows + } else { + this.propertiesList = []; + } + }); + } + // 发票 + this.exportInvoice.templateName='' + this.exportInvoice.hsCodeDesc=this.currentRow.hsCodeDesc + this.exportInvoice.contractFlag=this.currentRow.contractFlag + this.exportInvoice.packaging=this.currentRow.packaging + this.exportInvoice.kgs=this.currentRow.kgs + this.exportInvoice.hsCode=this.currentRow.hsCode + this.exportInvoice.material=this.currentRow.material + this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType + this.exportInvoice.goodsLabel=this.currentRow.goodsLabel + this.exportInvoice.origin="made in china" + + if (!this.exportInvoice.origin) { + this.exportInvoice.origin = 'made in china' + } + if (!this.exportInvoice.itemNo) { + this.exportInvoice.itemNo = 'Y' + } + this.notifyPartDetailList = []; + this.templateData.type='发票' + await this.searchTemplateOne(); + // 箱单 + //this.exportPaking.origin='made in china' + this.exportPaking.itemNo=this.currentRow.itemNo + this.exportPaking.upc=this.currentRow.upc + this.exportPaking.so=this.currentRow.so + this.exportPaking.shippingMark=this.currentRow.shippingMark + this.exportPaking.palletWeight=this.currentRow.palletWeight + this.exportPaking.hsCodeDesc=this.currentRow.hsCodeDesc + this.exportPaking.contractFlag=this.currentRow.contractFlag + this.exportPaking.packaging=this.currentRow.packaging + this.exportPaking.kgs=this.currentRow.kgs + this.exportPaking.hsCode=this.currentRow.hsCode + this.exportPaking.material=this.currentRow.material + this.exportPaking.hsCodeDescType=this.currentRow.hsCodeDescType + this.exportPaking.goodsLabel=this.currentRow.goodsLabel + this.exportPaking.boxChange=this.currentRow.boxChange + + if (!this.exportPaking.origin) { + this.exportPaking.origin = 'made in china' + } + if (!this.exportPaking.itemNo) { + this.exportPaking.itemNo = 'Y' + } + this.notifyPartDetailList = []; + this.exportPaking.templateName='' + + if (this.currentRow.buNo==='03-RFID') { + await getNotifyPartDetail(this.currentRow).then(({data}) => { + //区分请求成功和失败的状况 + if (data && data.code == 0) { + this.notifyPartDetailList = data.rows + this.notifyPartDetailList.forEach(o => { + if (!o.lossratio) { + o.lossratio = '1.2'; + } + }); + } else { + this.notifyPartDetailList = []; + } + }); + } + this.templateData.type='箱单' + await searchTemplateList(this.templateData).then(({data}) => { + if (data && data.code === 0){ + if (data.rows && data.rows.length > 0) { + let row = data.rows[0]; + this.exportPaking.templateName=row.name + this.exportPaking.upc=row.upc + this.exportPaking.so=row.so + this.exportPaking.shippingMark=row.shippingMark + this.exportPaking.palletWeight=row.palletWeight + this.exportPaking.boxChange=row.boxChange + this.exportPaking.itemNo=row.itemNo + this.exportPaking.origin=this.currentRow.origin?this.currentRow.origin:row.origin + this.exportPaking.packaging=this.currentRow.packaging?this.currentRow.packaging:row.packaging + this.exportPaking.kgs=this.currentRow.kgs?this.currentRow.kgs:row.kgs + this.exportPaking.hsCode=this.currentRow.hsCode?this.currentRow.hsCode:row.hsCode + this.exportPaking.material=this.currentRow.material?this.currentRow.material:row.material + this.exportPaking.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType + this.exportPaking.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel + this.notifyPartDetailList.forEach(o => { + // 开启fsc损耗则给默认值 + if (o.lossratio) { + if (row.fscWeight) { + o.lossratio = o.lossratio; + } else { + o.lossratio = ''; + } + } else { + if (row.fscWeight) { + o.lossratio = '1.2'; + } else { + o.lossratio = ''; + } + } + }); + } + } + }) + this.exportGoods.salesMethod = 'EXW' + this.exportGoods.currency = 'USD' + this.exportGoods.madeArea = 'Shanghai, China' + this.exportGoods.sendPort = 'Shanghai, China' + this.exportGoods.deliveryGoodsDate = '' + this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:'' + this.exportGoods.shippingDate = ''; + this.templateData.type='出口货物委托书' + await this.searchTemplateOne(); + }, + getCustomerInfo() { getCustomerInfo(this.currentRow).then(({data}) => { //区分请求成功和失败的状况 @@ -1871,6 +2266,7 @@ }, searchTemplateList () { this.templateData.buNo = this.currentRow.buNo + this.templateData.customName = '' searchTemplateList(this.templateData).then(({data}) => { if (data && data.code === 0){ this.templateList = data.rows; @@ -1890,7 +2286,7 @@ this.exportInvoice.material=this.currentRow.material?this.currentRow.material:row.material this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType this.exportInvoice.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel - } else { + } else if (this.templateData.type=='箱单'){ this.exportPaking.templateName=row.name this.exportPaking.upc=row.upc this.exportPaking.so=row.so @@ -1906,6 +2302,33 @@ this.exportPaking.material=this.currentRow.material?this.currentRow.material:row.material this.exportPaking.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType this.exportPaking.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel + } else if (this.templateData.type=='出口货物委托书'){ + this.exportGoods.salesMethod = row.salesMethod + this.exportGoods.currency = row.currency + this.exportGoods.madeArea = row.madeArea + this.exportGoods.sendPort = row.sendPort + this.exportGoods.deliveryGoodsDate = row.deliveryGoodsDate + this.exportGoods.voyage = this.currentRow.buNo==='01-Label' || this.currentRow.buNo==='03-RFID'?this.currentRow.cmcInvoice:row.voyage + this.exportGoods.shippingDate = row.shippingDate; + this.exportGoods.shipper=row.shipper + } + if (this.templateData.type!=='出口货物委托书') { + this.notifyPartDetailList.forEach(o => { + // 开启fsc损耗则给默认值 + if (o.lossratio) { + if (row.fscWeight) { + o.lossratio = o.lossratio; + } else { + o.lossratio = ''; + } + } else { + if (row.fscWeight) { + o.lossratio = '1.2'; + } else { + o.lossratio = ''; + } + } + }); } this.templateFlag = false }, @@ -1922,4 +2345,20 @@ font-size: 12px; height: 24px; } +.custom-divider { + position: relative; + height: 1px; + background: #ebeef5; + margin: 10px 0; + width: 720px; +} +.custom-divider .text { + position: absolute; + left: 20%; + top: -10px; + transform: translateX(-50%); + padding: 0 15px; + background: white; + color: #909399; +} diff --git a/src/views/modules/ecss/ecssTemplate.vue b/src/views/modules/ecss/ecssTemplate.vue index ee872f4..f84d171 100644 --- a/src/views/modules/ecss/ecssTemplate.vue +++ b/src/views/modules/ecss/ecssTemplate.vue @@ -80,7 +80,7 @@ - + + + + + + + @@ -103,12 +113,6 @@ - - - 中文 - 英文 - - 品名 @@ -119,6 +123,18 @@ 合同 + + + 中文 + 英文 + + + + + 序号 + 栈板号 + + UPC @@ -134,17 +150,17 @@ 显示箱数零头 --> - + 货物明细 - - - 序号 - 栈板号 + + + 是否维护纯FSC纸重量损耗 + @@ -155,39 +171,107 @@ - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + 保存 关闭 - + + + + + + + 查询 + + + + + + + + 关闭 + + @@ -200,6 +284,7 @@ searchEcssTemplateData, saveEcssTemplateData, deleteEcssTemplate, + searchCustomList }from "@/api/ecss/ecss.js" import {getBuList}from '@/api/factory/site.js' export default { @@ -209,7 +294,7 @@ }, data() { return { - types: [ '发票', '箱单'], + types: [ '发票', '箱单', '出口货物委托书'], pageIndex: 1, pageSize: 100, totalPage: 0, @@ -234,10 +319,12 @@ addFlag:0, site:'', buNo:'', + customName:'', name:'', type:'', upc:'', so:'', + fscWeight:'', origin:'', packaging:'', kgs:'', @@ -250,7 +337,18 @@ hsCodeDescType:'', goodsLabel:'', remark:'', - boxChange:'' + boxChange:'', + salesMethod :'EXW', + currency:'USD', + madeArea:'Shanghai, China', + sendPort:'Shanghai, China', + deliveryGoodsDate:'', + voyage:'', + shippingDate:'', + shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' + + 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' + + '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' + + '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n' }, addDisabledFlag:true, activeName:'attribute', @@ -273,6 +371,24 @@ fixed: '', columnWidth: 80 }, + { + userId: this.$store.state.user.name, + functionId: 801003, + serialNumber: '801007Table1EcssTemplateNo', + tableId: "801007Table1", + tableName: "EcssTemplate基础信息", + columnProp: "customName", + headerAlign: "center", + align: "center", + columnLabel: "客户名称", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 200 + }, { userId: this.$store.state.user.name, functionId: 801003, @@ -401,6 +517,9 @@ }, ], currentRow:{}, + customFlag:false, + customData:{}, + customList:[], } }, mounted() { @@ -496,6 +615,7 @@ so:'', origin:'', packaging:'', + fscWeight:'', kgs:'', shippingMark:'', hsCode:'', @@ -504,10 +624,22 @@ hsCodeDesc:'', contractFlag:'', hsCodeDescType:'', - goodsLabel:'', + goodsLabel:true, remark:'', - boxChange:'' + boxChange:'', + salesMethod :'EXW', + currency:'USD', + madeArea:'Shanghai, China', + sendPort:'Shanghai, China', + deliveryGoodsDate:'', + voyage:'', + shippingDate:'', + shipper:'Checkpoint Commercial (Shanghai) Co., Ltd. 保点贸易(上海)有限公司\t\t\t\t\t\t\n' + + 'Room 1411, No. 31, Lane 2419, Hunan Road, Pudong New Area, Shanghai\t\t\t\t\t\t\n' + + '电话/Tel: (86-21)38112888 传真/Fax: (86-21)38112990\t\t\t\t\t\t\n' + + '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n' } + this.addModelFlag=true }, updateModelOpen(row){ @@ -524,6 +656,7 @@ origin:row.origin, packaging:row.packaging, itemNo:row.itemNo, + fscWeight:row.fscWeight, kgs:row.kgs, shippingMark:row.shippingMark, hsCode:row.hsCode, @@ -534,7 +667,16 @@ hsCodeDescType:row.hsCodeDescType, goodsLabel:row.goodsLabel, remark:row.remark, - boxChange:row.boxChange + boxChange:row.boxChange, + customName: row.customName, + salesMethod :row.salesMethod, + currency:row.currency, + madeArea:row.madeArea, + sendPort:row.sendPort, + deliveryGoodsDate:row.deliveryGoodsDate, + voyage:row.voyage, + shippingDate:row.shippingDate, + shipper:row.shipper } this.addModelFlag=true }, @@ -593,6 +735,32 @@ } }) }, + openCustom () { + this.customFlag = true; + }, + + openCustomDialog () { + //请求 + this.searchCustomList(); + }, + closeCustomDialog () { + this.customList = [] + this.customFlag = false + }, + searchCustomList () { + searchCustomList(this.customData).then(({data}) => { + if (data && data.code === 0){ + this.customList = data.rows; + } + }) + }, + customRowDblclick (row) { + this.addModel.customName=row.ccusname + this.customFlag = false + }, + changeBu(){ + this.addModel.kgs=this.addModel.buNo==='03-RFID'?'4.5':this.addModel.buNo==='01-Label'?'2.5':'' + } }, activated() { this.searchTable() diff --git a/src/views/modules/ecss/hsCode.vue b/src/views/modules/ecss/hsCode.vue index 3aae29e..33eef4d 100644 --- a/src/views/modules/ecss/hsCode.vue +++ b/src/views/modules/ecss/hsCode.vue @@ -114,6 +114,11 @@ + + + + + @@ -178,6 +183,7 @@ hsCodeDesc:'', hsCodeDescEn:'', codeNo:'', + unit:'', remark:'', }, addDisabledFlag:true, @@ -217,7 +223,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 120 }, { userId: this.$store.state.user.name, @@ -235,7 +241,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 150 }, { userId: this.$store.state.user.name, @@ -253,7 +259,7 @@ sortLv: 0, status: true, fixed: '', - columnWidth: 100 + columnWidth: 150 }, { userId: this.$store.state.user.name, @@ -273,6 +279,24 @@ fixed: '', columnWidth: 100 }, + { + userId: this.$store.state.user.name, + functionId: 801003, + serialNumber: '801003Table1CodeNo', + tableId: "801003Table1", + tableName: "HsCode基础信息", + columnProp: "unit", + headerAlign: "center", + align: "center", + columnLabel: "单位", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 100 + }, { userId: this.$store.state.user.name, functionId: 801003, @@ -468,6 +492,7 @@ hsCode:'', hsCodeDesc: '', codeNo:'', + unit:'', remark:'', } this.addModelFlag=true @@ -482,6 +507,7 @@ hsCodeDesc : row.hsCodeDesc, hsCodeDescEn : row.hsCodeDescEn, codeNo:row.codeNo, + unit:row.unit, remark:row.remark, } this.addModelFlag=true