|
|
|
@ -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 |
|
|
|
|