diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue index 91d11a2..bb7a3aa 100644 --- a/src/views/modules/ecss/codelnotifyConfirm.vue +++ b/src/views/modules/ecss/codelnotifyConfirm.vue @@ -2101,6 +2101,8 @@ }) return false } + // 添加更新人信息 + this.confirmModel.updateBy = this.$store.state.user.name updateEcssDel(this.confirmModel).then(({data}) => { if (data && data.code === 0) { this.searchTable() diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue index aa73c7f..0e53cf2 100644 --- a/src/views/modules/ecss/declaration.vue +++ b/src/views/modules/ecss/declaration.vue @@ -824,7 +824,8 @@ getNotifyPartDetail, getCustomerInfo, searchTemplateList, - getPropertiesListByDeclaration + getPropertiesListByDeclaration, + searchEcssCoDelPalletHeaderData }from "@/api/ecss/ecss.js" import { getTableUserListLanguage} from "@/api/table.js" import {getTableDefaultListLanguage} from "../../../api/table"; @@ -2239,6 +2240,33 @@ this.exportHeader.arrivalCountry = this.currentRow.receiveArea || '' this.exportHeader.tradeCountry = this.currentRow.salesArea || '' + // 获取装箱数据,根据托数设置托/箱默认值 + try { + // 只传递必要的字段,避免日期格式问题 + const queryData = { + site: this.currentRow.site, + buNo: this.currentRow.buNo, + delNo: this.currentRow.delNo + } + const palletData = await searchEcssCoDelPalletHeaderData(queryData) + if (palletData && palletData.data && palletData.data.code === 0) { + const palletList = palletData.data.rows || [] + // 计算总托数 + const totalPalletQty = palletList.reduce((sum, item) => { + return sum + (item.palletQty || 0) + }, 0) + // 根据托数设置默认值:托数不为0选择"托",托数为0选择"箱" + this.packageUnit = totalPalletQty > 0 ? '托' : '箱' + } else { + // 如果获取装箱数据失败,默认选择"箱" + this.packageUnit = '箱' + } + } catch (error) { + console.error('获取装箱数据失败:', error) + // 如果获取装箱数据失败,默认选择"箱" + this.packageUnit = '箱' + } + // 报关要素 this.brandType='境外品牌(其他)' this.exportAllFlag = true