|
|
@ -63,11 +63,10 @@ |
|
|
label="操作" |
|
|
label="操作" |
|
|
width="120" |
|
|
width="120" |
|
|
align="center" |
|
|
align="center" |
|
|
fixed="right" |
|
|
|
|
|
v-if="showActions"> |
|
|
|
|
|
|
|
|
fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" @click="handleEditDetail(scope.row, props.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" @click="handleDeleteDetail(scope.row, props.row)">删除</a> |
|
|
|
|
|
|
|
|
<a type="text" size="small" v-if="showActions" @click="handleEditDetail(scope.row, props.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" v-if="showActions" @click="handleDeleteDetail(scope.row, props.row)">删除</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -103,11 +102,10 @@ |
|
|
label="操作" |
|
|
label="操作" |
|
|
width="120" |
|
|
width="120" |
|
|
align="center" |
|
|
align="center" |
|
|
fixed="right" |
|
|
|
|
|
v-if="showActions"> |
|
|
|
|
|
|
|
|
fixed="right"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" @click="handleEditBox(scope.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" @click="handleDeleteBox(scope.row)">删除</a> |
|
|
|
|
|
|
|
|
<a type="text" size="small" v-if="showActions" @click="handleEditBox(scope.row)">修改</a> |
|
|
|
|
|
<a type="text" size="small" v-if="showActions" @click="handleDeleteBox(scope.row)">删除</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
@ -358,7 +356,7 @@ |
|
|
<el-dialog |
|
|
<el-dialog |
|
|
title="调整实际总毛重" |
|
|
title="调整实际总毛重" |
|
|
:visible.sync="adjustWeightDialogVisible" |
|
|
:visible.sync="adjustWeightDialogVisible" |
|
|
width="600px" |
|
|
|
|
|
|
|
|
width="450px" |
|
|
:close-on-click-modal="false"> |
|
|
:close-on-click-modal="false"> |
|
|
|
|
|
|
|
|
<el-form :model="adjustWeightForm" label-width="250px"> |
|
|
<el-form :model="adjustWeightForm" label-width="250px"> |
|
|
@ -378,12 +376,11 @@ |
|
|
<el-input |
|
|
<el-input |
|
|
ref="actualWeightInput" |
|
|
ref="actualWeightInput" |
|
|
v-model="adjustWeightForm.actualGrossWeight" |
|
|
v-model="adjustWeightForm.actualGrossWeight" |
|
|
placeholder="请输入实际称重的总毛重" |
|
|
|
|
|
type="number" @keyup.enter.native="submitAdjustWeight()" |
|
|
|
|
|
size="medium" |
|
|
|
|
|
|
|
|
placeholder="请输入实际称重的总毛重(KG)" |
|
|
|
|
|
@keyup.enter.native="submitAdjustWeight()" |
|
|
|
|
|
size="large" |
|
|
clearable |
|
|
clearable |
|
|
autofocus> |
|
|
autofocus> |
|
|
<template slot="append">KG</template> |
|
|
|
|
|
</el-input> |
|
|
</el-input> |
|
|
<div style="font-size: 12px; color: #909399; margin-top: 5px; line-height: 1.5;"> |
|
|
<div style="font-size: 12px; color: #909399; margin-top: 5px; line-height: 1.5;"> |
|
|
注:输入的总毛重不含托盘重量 |
|
|
注:输入的总毛重不含托盘重量 |
|
|
@ -956,16 +953,16 @@ export default { |
|
|
try { |
|
|
try { |
|
|
const newBoxQty = parseFloat(value) || 0; |
|
|
const newBoxQty = parseFloat(value) || 0; |
|
|
const boxWeight = parseFloat(this.editBoxForm.boxWeight) || 0; |
|
|
const boxWeight = parseFloat(this.editBoxForm.boxWeight) || 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (boxWeight <= 0) { |
|
|
if (boxWeight <= 0) { |
|
|
this.$message.warning('该物料未配置箱重量,无法自动计算毛重'); |
|
|
this.$message.warning('该物料未配置箱重量,无法自动计算毛重'); |
|
|
this._isCalculating = false; |
|
|
this._isCalculating = false; |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据物料箱重量计算新毛重:新毛重 = 箱重量 × 箱数 |
|
|
// 根据物料箱重量计算新毛重:新毛重 = 箱重量 × 箱数 |
|
|
const newGrossWeight = boxWeight * newBoxQty; |
|
|
const newGrossWeight = boxWeight * newBoxQty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算新净重:净重 = 毛重 - box_qty/2 |
|
|
// 计算新净重:净重 = 毛重 - box_qty/2 |
|
|
const newNetWeight = newGrossWeight - (newBoxQty / 2); |
|
|
const newNetWeight = newGrossWeight - (newBoxQty / 2); |
|
|
|
|
|
|
|
|
@ -1402,24 +1399,24 @@ export default { |
|
|
try { |
|
|
try { |
|
|
const boxKey = row._boxKey; |
|
|
const boxKey = row._boxKey; |
|
|
const newBoxQty = parseFloat(row.box_qty) || 0; |
|
|
const newBoxQty = parseFloat(row.box_qty) || 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 从原始数据中获取物料的箱重量 |
|
|
// 从原始数据中获取物料的箱重量 |
|
|
const originalData = this.batchEditOriginalData[boxKey]; |
|
|
const originalData = this.batchEditOriginalData[boxKey]; |
|
|
if (!originalData) return; |
|
|
if (!originalData) return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const boxWeight = parseFloat(originalData.boxWeight) || 0; |
|
|
const boxWeight = parseFloat(originalData.boxWeight) || 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (boxWeight <= 0) { |
|
|
if (boxWeight <= 0) { |
|
|
this.$message.warning('该物料未配置箱重量,无法自动计算毛重'); |
|
|
this.$message.warning('该物料未配置箱重量,无法自动计算毛重'); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据物料箱重量计算新毛重:新毛重 = 箱重量 × 箱数 |
|
|
// 根据物料箱重量计算新毛重:新毛重 = 箱重量 × 箱数 |
|
|
const newGrossWeight = boxWeight * newBoxQty; |
|
|
const newGrossWeight = boxWeight * newBoxQty; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算新净重:净重 = 毛重 - box_qty/2 |
|
|
// 计算新净重:净重 = 毛重 - box_qty/2 |
|
|
const newNetWeight = newGrossWeight - (newBoxQty / 2); |
|
|
const newNetWeight = newGrossWeight - (newBoxQty / 2); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新当前行 |
|
|
// 更新当前行 |
|
|
row.grossWeight = newGrossWeight.toFixed(3); |
|
|
row.grossWeight = newGrossWeight.toFixed(3); |
|
|
row.netWeight = newNetWeight.toFixed(3); |
|
|
row.netWeight = newNetWeight.toFixed(3); |
|
|
@ -1929,7 +1926,7 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/deep/ .expand-detail-table .el-table__header th { |
|
|
/deep/ .expand-detail-table .el-table__header th { |
|
|
background: #eef7f0; |
|
|
|
|
|
|
|
|
background: #e6e8eb; |
|
|
color: #333; |
|
|
color: #333; |
|
|
font-weight: 500; |
|
|
font-weight: 500; |
|
|
border-bottom: 2px solid #e9ecef; |
|
|
border-bottom: 2px solid #e9ecef; |
|
|
@ -2182,7 +2179,7 @@ export default { |
|
|
/* 输入框高亮 */ |
|
|
/* 输入框高亮 */ |
|
|
.input-highlight /deep/ .el-input__inner { |
|
|
.input-highlight /deep/ .el-input__inner { |
|
|
height: 50px; |
|
|
height: 50px; |
|
|
font-size: 18px; |
|
|
|
|
|
|
|
|
font-size: 12px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
border: 2px solid #409eff; |
|
|
border: 2px solid #409eff; |
|
|
font-family: 'Courier New', monospace; |
|
|
font-family: 'Courier New', monospace; |
|
|
@ -2204,7 +2201,7 @@ export default { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.input-highlight /deep/ .el-form-item__label { |
|
|
.input-highlight /deep/ .el-form-item__label { |
|
|
font-size: 15px; |
|
|
|
|
|
|
|
|
font-size: 12px; |
|
|
font-weight: 600; |
|
|
font-weight: 600; |
|
|
color: #303133; |
|
|
color: #303133; |
|
|
} |
|
|
} |
|
|
|