diff --git a/src/views/modules/ecss/codelnotify.vue b/src/views/modules/ecss/codelnotify.vue
index faee425..8e02cd0 100644
--- a/src/views/modules/ecss/codelnotify.vue
+++ b/src/views/modules/ecss/codelnotify.vue
@@ -509,9 +509,9 @@
英文
-
-
-
+
+
+ 显示毛净重
@@ -534,6 +534,11 @@
+
+
+
+
+
@@ -1700,6 +1705,7 @@
overseasShipper:'',
overseasAddress:'',
fpremark:'',
+ showWeight:false
},
exportGoodsFlag:false,
exportGoods:{
@@ -2600,6 +2606,7 @@
this.exportInvoice.hsCodeDescType=this.currentRow.hsCodeDescType?this.currentRow.hsCodeDescType:row.hsCodeDescType
this.exportInvoice.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel
this.exportInvoice.fpremark=row.remark
+ this.exportInvoice.showWeight = row.showWeight
} else if (this.templateData.type=='出口货物委托书'){
this.exportGoods.salesMethod = row.salesMethod
this.exportGoods.currency = row.currency
diff --git a/src/views/modules/ecss/codelnotifyConfirm.vue b/src/views/modules/ecss/codelnotifyConfirm.vue
index 48da88a..8b8bf9d 100644
--- a/src/views/modules/ecss/codelnotifyConfirm.vue
+++ b/src/views/modules/ecss/codelnotifyConfirm.vue
@@ -2023,7 +2023,7 @@
if (column.property === 'qty' && row.modifyQtyFlag===true) {
return { color: '#ff5d03' };
}
-
+
// PN列保持原有的 modifyFlag 判断
if (column.property === 'pn' && row.modifyFlag===true) {
return { color: '#ff5d03' };
@@ -2375,7 +2375,7 @@
// 计算rolls:装箱数量 / 每卷数量
const rolls = row.useQty / rollQty;
this.$set(row, 'rolls', parseFloat(rolls.toFixed(4)));
-
+
// 装箱数量变化后,重新计算总箱数和重量
this.calculateTotalBoxQtyAndWeights();
} else {
@@ -2399,7 +2399,7 @@
calculateTotalBoxQtyAndWeights() {
// 获取有装箱数量的物料列表
const selectedRows = this.dataList8.filter(item => item.useQty && item.useQty > 0);
-
+
if (selectedRows.length === 0) {
// 没有装箱数量时,清空
this.palletModelData.boxQty = null;
@@ -2409,10 +2409,10 @@
}
// 检查是否所有物料都已缓存包装属性
- const allHaveCache = selectedRows.every(row =>
+ const allHaveCache = selectedRows.every(row =>
row.rollQtyCache && row.boxRollsCache && row.boxWeightCache
);
-
+
if (!allHaveCache) {
// 如果有物料未缓存属性,不自动计算(避免数据不完整)
return;
@@ -2429,7 +2429,7 @@
const partBoxQty = Math.ceil(row.useQty / eaPerBox);
// 该物料的毛重 = 箱数 × 箱重量
const partGrossWeight = partBoxQty * row.boxWeightCache;
-
+
totalBoxQty += partBoxQty;
totalGrossWeight += partGrossWeight;
});
@@ -2458,7 +2458,7 @@
// 获取有装箱数量的物料列表
const selectedRows = this.dataList8.filter(item => item.useQty && item.useQty > 0);
-
+
if (selectedRows.length === 0) {
// 没有选择物料时,不自动计算,允许用户手动输入
return;
@@ -2466,7 +2466,7 @@
// 检查是否所有物料都已缓存箱重量
const needFetchProperties = selectedRows.filter(row => !row.boxWeightCache);
-
+
if (needFetchProperties.length === 0) {
// 所有物料都有缓存,直接计算
this.calculateWeightsWithCache(selectedRows);
@@ -2482,7 +2482,7 @@
// 根据装箱数量计算加权平均箱重量
let totalWeight = 0;
let totalQty = 0;
-
+
selectedRows.forEach(row => {
if (row.boxWeightCache && row.boxWeightCache > 0 && row.rollQtyCache && row.rollQtyCache > 0 && row.boxRollsCache && row.boxRollsCache > 0) {
// 每箱EA = 每卷数量 × 每箱卷数
@@ -2544,13 +2544,13 @@
*/
calculateFinalWeights(avgBoxWeight) {
const boxQty = parseFloat(this.palletModelData.boxQty);
-
+
// 毛重 = 箱数 × 箱重量
const grossWeight = boxQty * avgBoxWeight;
-
+
// 净重 = 毛重 - (箱数 / 2)
const netWeight = grossWeight - (boxQty / 2);
-
+
// 保留2位小数
this.palletModelData.grossWeight = parseFloat(grossWeight.toFixed(2));
this.palletModelData.netWeight = parseFloat(netWeight.toFixed(2));
@@ -2633,10 +2633,22 @@
},
updateCodelPalletHeaderPalletQty(row){
+ // 显示页面loading
+ const loading = this.$loading({
+ lock: true,
+ text: '保存中...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.3)'
+ });
+
updateCodelPalletHeaderPalletQty(this.palletModelData).then(({data}) => {
+ loading.close();
if (data && data.code === 0) {
this.palletEditFlag = false
+ // 刷新当前tab表格
this.refreshCurrentTabTable()
+ // 刷新上方的发货通知单列表
+ this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
@@ -2648,14 +2660,28 @@
confirmButtonText: '确定'
})
}
+ }).catch(error => {
+ loading.close();
+ this.$message.error('保存失败: ' + (error.message || '未知错误'))
})
},
deletePallet(row){
this.$confirm('确认删除此明细?', '提示').then(() => {
+ // 显示页面loading
+ const loading = this.$loading({
+ lock: true,
+ text: '删除中...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.3)'
+ });
+
deletePalletHeader(row).then(({data}) => {
+ loading.close();
if (data && data.code === 0) {
this.refreshCurrentTabTable()
+ // 刷新上方的发货通知单列表
+ this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
@@ -2667,6 +2693,9 @@
confirmButtonText: '确定'
})
}
+ }).catch(error => {
+ loading.close();
+ this.$message.error('删除失败: ' + (error.message || '未知错误'))
})
})
},
@@ -2757,10 +2786,23 @@
delNo: this.currentRow.delNo,
boxRemnant: this.oneClickPackingModelData.boxRemnant,
}
+
+ // 显示页面loading
+ const loading = this.$loading({
+ lock: true,
+ text: '一键装箱计算中...',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.3)'
+ });
+
saveOneClickPacking(saveData).then(({data}) => {
+ loading.close();
if (data && data.code === 0) {
- this.refreshCurrentTabTable()
this.oneClickPackingModelFlag=false;
+ // 刷新当前tab表格
+ this.refreshCurrentTabTable()
+ // 刷新上方的发货通知单列表
+ this.searchTable()
this.$message({
message: '操作成功',
type: 'success',
@@ -2772,6 +2814,9 @@
confirmButtonText: '确定'
})
}
+ }).catch(error => {
+ loading.close();
+ this.$message.error('一键装箱失败: ' + (error.message || '未知错误'))
})
},
diff --git a/src/views/modules/ecss/declaration.vue b/src/views/modules/ecss/declaration.vue
index 712dac6..ce6bf4b 100644
--- a/src/views/modules/ecss/declaration.vue
+++ b/src/views/modules/ecss/declaration.vue
@@ -539,9 +539,9 @@
英文
-
-
-
+
+
+ 显示毛净重
@@ -564,6 +564,11 @@
+
+
+
+
+
@@ -2606,6 +2611,7 @@
this.exportInvoice.hsCodeFlag=row.hsCodeFlag
this.exportInvoice.goodsLabel=this.currentRow.goodsLabel?this.currentRow.goodsLabel:row.goodsLabel
this.exportInvoice.fpremark = row.remark
+ this.exportInvoice.showWeight = row.showWeight
} else if (this.templateData.type=='箱单'){
this.exportPaking.templateName=row.name
this.exportPaking.upc=row.upc
diff --git a/src/views/modules/ecss/ecssTemplate.vue b/src/views/modules/ecss/ecssTemplate.vue
index bc99ae4..ace881c 100644
--- a/src/views/modules/ecss/ecssTemplate.vue
+++ b/src/views/modules/ecss/ecssTemplate.vue
@@ -220,6 +220,11 @@
+
+
+ 显示毛净重
+
+
@@ -406,6 +411,7 @@
remark:'',
boxChange:'',
salesMethod :'EXW',
+ showWeight:false,
currency:'USD',
madeArea:'Shanghai, China',
sendPort:'Shanghai, China',
@@ -731,7 +737,8 @@
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'
+ '上海市浦东新区沪南路2419弄31号1411室\t\t\t\t\t\t\n',
+ showWeight:false
}
this.addModelFlag=true
@@ -774,6 +781,7 @@
shippingDate:row.shippingDate,
shipper:row.shipper,
highPalletFlag:row.highPalletFlag,
+ showWeight:row.showWeight,
}
this.addModelFlag=true
},