|
|
@@ -441,6 +441,16 @@
|
|
|
<template v-else>{{ row[item.prop] }}</template>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <el-table-column label="批号" width="100" prop="assetName">
|
|
|
+ <template slot-scope="{ row, $index }">
|
|
|
+ <template v-if="row.isSave">
|
|
|
+ {{ row.manualBatchNo }}
|
|
|
+ </template>
|
|
|
+ <el-form-item v-else>
|
|
|
+ <el-input v-model="row.manualBatchNo"> </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column
|
|
|
label="批次号"
|
|
|
prop="batchNo"
|
|
|
@@ -479,6 +489,7 @@
|
|
|
required
|
|
|
>
|
|
|
<el-input
|
|
|
+ type="number"
|
|
|
v-model="row.minPackingCount"
|
|
|
@input="minPackingCountChange(row, $event)"
|
|
|
>
|
|
|
@@ -833,6 +844,11 @@
|
|
|
width="150"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="批号"
|
|
|
+ prop="manualBatchNo"
|
|
|
+ width="100"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
label="批次号"
|
|
|
prop="batchNo"
|
|
|
@@ -888,7 +904,7 @@
|
|
|
<el-table-column label="重量" prop="weight" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
|
<el-input
|
|
|
- v-if="!row.isPack"
|
|
|
+ v-if="!row.isPack && row.measuringUnit != row.weightUtil"
|
|
|
v-model="row.weight"
|
|
|
@input="weightInput($event, row)"
|
|
|
></el-input>
|
|
|
@@ -1022,6 +1038,11 @@
|
|
|
width="200"
|
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ label="批号"
|
|
|
+ prop="manualBatchNo"
|
|
|
+ width="100"
|
|
|
+ ></el-table-column>
|
|
|
<el-table-column
|
|
|
label="批次号"
|
|
|
prop="batchNo"
|
|
|
@@ -1069,7 +1090,10 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="重量" prop="weight" width="100">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <el-input v-if="!row.isPack" v-model="row.weight"></el-input>
|
|
|
+ <el-input
|
|
|
+ v-if="!row.isPack && row.measuringUnit != row.weightUnit"
|
|
|
+ v-model="row.weight"
|
|
|
+ ></el-input>
|
|
|
<span v-else>{{ row.weight }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -1301,7 +1325,12 @@
|
|
|
methods: {
|
|
|
// 包装维度最小包装单元改变——>总重量
|
|
|
minPackingCountChange(row, value) {
|
|
|
- row.minPackingCount = value.replace(/^(0+)|[^\d]+/g, '');
|
|
|
+ if (value >= 0) {
|
|
|
+ row.minPackingCount = value;
|
|
|
+ } else {
|
|
|
+ row.minPackingCount = 0;
|
|
|
+ }
|
|
|
+ // row.minPackingCount = value.replace(/^(0+)|[^\d]+/g, '');
|
|
|
if (row.outInNum >= 0 && value >= 0) {
|
|
|
this.packNum(row, row.outInNum);
|
|
|
}
|
|
|
@@ -1361,11 +1390,14 @@
|
|
|
item.isPack = true;
|
|
|
// 拆分物料维度并生成列表
|
|
|
for (let i = 1; i <= Number(item.minPackingCount); i++) {
|
|
|
+ console.log(item.weight);
|
|
|
+ console.log(item.minPackingCount);
|
|
|
resultArray.push({
|
|
|
onlyCode: item.onlyCode,
|
|
|
no: item.onlyCode + i.toString().padStart(4, '0'),
|
|
|
assetCode: item.assetCode,
|
|
|
assetName: item.assetName,
|
|
|
+ manualBatchNo: item.manualBatchNo,
|
|
|
batchNo: item.batchNo,
|
|
|
minPackingCount: 1,
|
|
|
measuringUnit: item.measuringUnit,
|
|
|
@@ -1604,8 +1636,10 @@
|
|
|
},
|
|
|
packNum(row, value) {
|
|
|
const total = {
|
|
|
- packingCount: Number(row.minPackingCount),
|
|
|
- outInNum: Number(row.outInNum)
|
|
|
+ packingCount: Number(
|
|
|
+ row.minPackingCount > 0 ? row.minPackingCount : 0
|
|
|
+ ),
|
|
|
+ outInNum: Number(row.outInNum > 0 ? row.outInNum : 0)
|
|
|
};
|
|
|
if (row.measuringUnit == row.weightUnit) {
|
|
|
row.weight = Number(
|
|
|
@@ -1619,7 +1653,10 @@
|
|
|
this.$math.format(total.packingCount * total.outInNum, 14)
|
|
|
);
|
|
|
row.weight = Number(
|
|
|
- this.$math.format(totals * row.netWeight.toFixed(2), 14)
|
|
|
+ this.$math.format(
|
|
|
+ totals * (row.netWeight > 0 ? row.netWeight.toFixed(2) : 0),
|
|
|
+ 14
|
|
|
+ )
|
|
|
);
|
|
|
}
|
|
|
return (row.outInNum = value.replace(/^(0+)|[^\d]+/g, ''));
|
|
|
@@ -1706,14 +1743,13 @@
|
|
|
return row;
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
//计算金额
|
|
|
calcSumTotal(PackingCount, outInNum, univalence) {
|
|
|
//最小包装单元,包装数量,单价
|
|
|
const total = {
|
|
|
- PackingCount: Number(PackingCount),
|
|
|
- outInNum: Number(outInNum),
|
|
|
- univalence: Number(univalence == undefined ? 0 : univalence)
|
|
|
+ PackingCount: Number(PackingCount > 0 ? PackingCount : 0),
|
|
|
+ outInNum: Number(outInNum > 0 ? outInNum : 0),
|
|
|
+ univalence: Number(univalence > 0 ? univalence : 0)
|
|
|
};
|
|
|
return total.PackingCount * total.outInNum * total.univalence;
|
|
|
},
|
|
|
@@ -2158,6 +2194,7 @@
|
|
|
item.warehouseLedgerDetails.forEach((i, index) => {
|
|
|
Object.assign(i, {
|
|
|
num,
|
|
|
+ manualBatchNo: item.manualBatchNo,
|
|
|
batchNo: item.batchNo,
|
|
|
cargoSpaceCode: item.cargoSpaceCode, //货位编码
|
|
|
cargoSpaceId: item.cargoSpaceId, //货位id
|
|
|
@@ -2254,6 +2291,7 @@
|
|
|
return {
|
|
|
netWeight: item.netWeight,
|
|
|
num: item.num,
|
|
|
+ manualBatchNo: item.manualBatchNo,
|
|
|
batchNo: item.batchNo,
|
|
|
categoryId:
|
|
|
this.formData.bizType == 2
|
|
|
@@ -2519,6 +2557,10 @@
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ ::v-deep .el-row {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ }
|
|
|
::v-deep.form-table {
|
|
|
.el-form-item {
|
|
|
margin-bottom: 0;
|