From 01a128b6e4437b3522d7146ff974e83211738562 Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Fri, 8 Aug 2025 14:28:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E5=8A=A1=EF=BC=9A=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=E6=8C=89=E7=85=A7=E5=AE=A2=E6=88=B7+?= =?UTF-8?q?=E8=BF=90=E8=BE=93=E6=96=B9=E5=BC=8F=E7=BB=B4=E6=8A=A4?= 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 | 25 +++--- src/views/modules/ecss/codelnotifyConfirm.vue | 80 ++++++++++++++++--- src/views/modules/ecss/declaration.vue | 25 +++--- src/views/modules/ecss/ecssTemplate.vue | 16 ++++ 5 files changed, 119 insertions(+), 29 deletions(-) diff --git a/src/api/ecss/ecss.js b/src/api/ecss/ecss.js index 8fd0811..26a7d69 100644 --- a/src/api/ecss/ecss.js +++ b/src/api/ecss/ecss.js @@ -104,6 +104,8 @@ export const deleteWalMartOrder= data => createAPI(`/ecss/coDel/deleteWalMartOrd export const saveWalMartOrderByExcel = data => createAPI(`/ecss/coDel/saveWalMartOrderByExcel`,'post',data) +export const updateExportFlag = data => createAPI(`/ecss/coDel/updateExportFlag`,'post',data) + export const getPropertiesListByDeclaration = data => createAPI(`/ecss/coDel/getPropertiesListByDeclaration`,'post',data) export const queryPartListAll = data => createAPI(`/ecss/coDel/queryPartListAll`,'post',data) diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue index 4eef861..ebd1341 100644 --- a/src/views/modules/ecss/codelnotify.vue +++ b/src/views/modules/ecss/codelnotify.vue @@ -496,10 +496,9 @@ 品名 - - - 中文 - 英文 + + + Hs Code @@ -512,6 +511,17 @@ 货物明细 + + + 中文 + 英文 + + + + + + + @@ -532,11 +542,6 @@ - - - - - @@ -1882,6 +1887,7 @@ material:'', hsCodeDescType:'', goodsLabel:true, + hsCodeFlag:true, overseasShipper:'', overseasAddress:'', fpremark:'', @@ -2452,6 +2458,7 @@ searchTemplateOne() { this.templateData.buNo = this.currentRow.buNo this.templateData.customName = this.currentRow.customerName + this.templateData.shippingMode = this.currentRow.shippingMode searchTemplateList(this.templateData).then(({data}) => { if (data && data.code === 0){ if (data.rows && data.rows.length > 0) { diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index 66faec7..2cb7895 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -46,6 +46,13 @@ placeholder="选择日期"> + + + + + + + @@ -640,7 +647,8 @@ deletePalletDetail, saveOneClickPacking, getNotifyPartDetail, - searchPalletList + searchPalletList, + updateExportFlag }from "@/api/ecss/ecss.js" import {getBuList}from '@/api/factory/site.js' import excel from "@/utils/excel-util.js"; @@ -691,6 +699,7 @@ notifyStatus:'', startDate:'', endDate:'', + exportFlag:'', username:this.$store.state.user.name, }, oneClickPackingModelFlag:false, @@ -915,6 +924,24 @@ fixed: '', columnWidth: 50 }, + { + userId: this.$store.state.user.name, + functionId: 801002, + serialNumber: '801002Table1ExportFlag', + tableId: "801002Table1", + tableName: "关务系统发货通知单", + columnProp: "exportFlag", + headerAlign: "center", + align: "center", + columnLabel: "是否导出", + columnHidden: false, + columnImage: false, + columnSortable: false, + sortLv: 0, + status: true, + fixed: '', + columnWidth: 80 + }, { userId: this.$store.state.user.name, functionId: 801002, @@ -2234,16 +2261,47 @@ destination : this.currentRow.destination, createBy: this.$store.state.user.name, } - excel.exportTable({ - url: "/ecss/coDel/searchCoDelPalletList", - columnMapping: excelOpts.PalletSku.columnMapping,//可以直接用table,不需要的列就剔除 - mergeSetting: [],//需要合并的列 - params: searchData, - fileName: "装箱数据导入模版.xlsx", - rowFetcher: res => res.data, - columnFormatter: [], - dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列 - }); + + try { + // 先导出Excel + await excel.exportTable({ + url: "/ecss/coDel/searchCoDelPalletList", + columnMapping: excelOpts.PalletSku.columnMapping,//可以直接用table,不需要的列就剔除 + mergeSetting: [],//需要合并的列 + params: searchData, + fileName: "装箱数据导入模版.xlsx", + rowFetcher: res => res.data, + columnFormatter: [], + dropColumns: [],//需要剔除的列,例如dropColumns: ["netWeight"],即剔除净重列 + }); + + // 导出成功后更新export_flag字段 + let updateData = { + site: this.currentRow.site, + buNo: this.currentRow.buNo, + delNo: this.currentRow.delNo, + exportFlag: 'Y', + updateBy: this.$store.state.user.name + } + + updateExportFlag(updateData).then(({data}) => { + if (data.code === 0) { + // 刷新当前行的导出状态 + this.currentRow.exportFlag = 'Y'; + // 刷新表格数据 + this.searchTable(); + } else { + this.$message.warning('导出成功,但更新导出状态失败:' + data.msg); + } + }).catch(error => { + this.$message.warning('导出成功,但更新导出状态失败'); + console.error('更新导出状态失败:', error); + }); + + } catch (error) { + this.$message.error('导出失败'); + console.error('导出失败:', error); + } }, searchPalletTable(){ this.refreshCurrentTabTable(); diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue index 081549d..a003a90 100644 --- a/src/views/modules/ecss/declaration.vue +++ b/src/views/modules/ecss/declaration.vue @@ -450,10 +450,9 @@ 品名 - - - 中文 - 英文 + + + Hs Code @@ -466,6 +465,17 @@ 货物明细 + + + 中文 + 英文 + + + + + + + @@ -486,11 +496,6 @@ - - - - - @@ -816,6 +821,7 @@ material:'', hsCodeDescType:'', goodsLabel:true, + hsCodeFlag:true, fpremark:'' }, exportPakingFlag:false, @@ -1874,6 +1880,7 @@ searchTemplateOne() { this.templateData.buNo = this.currentRow.buNo this.templateData.customName = this.currentRow.customName + this.templateData.shippingMode = this.currentRow.shippingMode searchTemplateList(this.templateData).then(({data}) => { if (data && data.code === 0){ if (data.rows && data.rows.length > 0) { diff --git a/src/views/modules/ecss/ecssTemplate.vue b/src/views/modules/ecss/ecssTemplate.vue index b3c9187..a4dbe37 100644 --- a/src/views/modules/ecss/ecssTemplate.vue +++ b/src/views/modules/ecss/ecssTemplate.vue @@ -100,6 +100,11 @@ + + + + + @@ -138,6 +143,11 @@ 货物明细 + + + Hs Code + + 是否维护纯FSC纸重量损耗 @@ -343,6 +353,8 @@ contractFlag:'', hsCodeDescType:'', goodsLabel:'', + hsCodeFlag:'', + shippingMode:'', remark:'', boxChange:'', salesMethod :'EXW', @@ -632,6 +644,8 @@ contractFlag:'', hsCodeDescType:'', goodsLabel:true, + hsCodeFlag:false, + shippingMode:'', remark:'', boxChange:'', salesMethod :'EXW', @@ -673,6 +687,8 @@ contractFlag:row.contractFlag, hsCodeDescType:row.hsCodeDescType, goodsLabel:row.goodsLabel, + hsCodeFlag:row.hsCodeFlag, + shippingMode:row.shippingMode, remark:row.remark, boxChange:row.boxChange, customName: row.customName,