|
@@ -377,9 +377,9 @@
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
- <template v-slot:productWeight="{ row, $index }">
|
|
|
|
|
|
|
+ <!-- <template v-slot:productWeight="{ row, $index }">
|
|
|
<span>{{ row.productWeight ? row.productWeight : '-' }}</span>
|
|
<span>{{ row.productWeight ? row.productWeight : '-' }}</span>
|
|
|
- </template>
|
|
|
|
|
|
|
+ </template> -->
|
|
|
|
|
|
|
|
<template v-slot:set="{ row, $index }">
|
|
<template v-slot:set="{ row, $index }">
|
|
|
<el-button type="text" @click="handleDeleteItem($index)"
|
|
<el-button type="text" @click="handleDeleteItem($index)"
|
|
@@ -701,9 +701,9 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
{
|
|
{
|
|
|
- slot: 'productWeight',
|
|
|
|
|
- prop: 'productWeight',
|
|
|
|
|
- label: '订单重量',
|
|
|
|
|
|
|
+ slot: 'newSumOrderWeight',
|
|
|
|
|
+ prop: 'newSumOrderWeight',
|
|
|
|
|
+ label: '计划重量',
|
|
|
align: 'center',
|
|
align: 'center',
|
|
|
minWidth: 140
|
|
minWidth: 140
|
|
|
},
|
|
},
|
|
@@ -1378,20 +1378,6 @@
|
|
|
if (!this.form.id) {
|
|
if (!this.form.id) {
|
|
|
if (this.form.productInfoList.length) {
|
|
if (this.form.productInfoList.length) {
|
|
|
this.form.productInfoList.map((item, index) => {
|
|
this.form.productInfoList.map((item, index) => {
|
|
|
- if (
|
|
|
|
|
- item.weightUnit == 'G' ||
|
|
|
|
|
- item.weightUnit == 'g' ||
|
|
|
|
|
- item.weightUnit == '克'
|
|
|
|
|
- ) {
|
|
|
|
|
- let total =
|
|
|
|
|
- ((item.requiredFormingNum - 0) * item.productUnitWeight) /
|
|
|
|
|
- 1000;
|
|
|
|
|
- item.newSumOrderWeight = total.toFixed(2);
|
|
|
|
|
- item.newWeightUnit = 'KG';
|
|
|
|
|
- } else {
|
|
|
|
|
- item.newWeightUnit = item.weightUnit;
|
|
|
|
|
- item.newSumOrderWeight = item.requiredFormingNum;
|
|
|
|
|
- }
|
|
|
|
|
delete item.selectionRowShow;
|
|
delete item.selectionRowShow;
|
|
|
// if (item.bomVersionList && item.bomVersionList.length) {
|
|
// if (item.bomVersionList && item.bomVersionList.length) {
|
|
|
// item.bomCategoryName = item.bomVersionList[0].name;
|
|
// item.bomCategoryName = item.bomVersionList[0].name;
|
|
@@ -1600,6 +1586,30 @@
|
|
|
// }
|
|
// }
|
|
|
// 更新绑定值
|
|
// 更新绑定值
|
|
|
row.requiredFormingNum = value;
|
|
row.requiredFormingNum = value;
|
|
|
|
|
+ // if (
|
|
|
|
|
+ // item.weightUnit == 'G' ||
|
|
|
|
|
+ // item.weightUnit == 'g' ||
|
|
|
|
|
+ // item.weightUnit == '克'
|
|
|
|
|
+ // ) {
|
|
|
|
|
+ // let total =
|
|
|
|
|
+ // ((item.requiredFormingNum - 0) * item.productUnitWeight) /
|
|
|
|
|
+ // 1000;
|
|
|
|
|
+ // item.newSumOrderWeight = total.toFixed(2);
|
|
|
|
|
+ // item.newWeightUnit = 'KG';
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // item.newWeightUnit = item.weightUnit;
|
|
|
|
|
+ // item.newSumOrderWeight = item.requiredFormingNum;
|
|
|
|
|
+ // }
|
|
|
|
|
+ row.newWeightUnit = row.weightUnit;
|
|
|
|
|
+ if (row.weightUnit == row.measuringUnit) {
|
|
|
|
|
+ row.newSumOrderWeight = row.requiredFormingNum;
|
|
|
|
|
+ } else if (row.requiredFormingNum && row.productUnitWeight) {
|
|
|
|
|
+ row.newSumOrderWeight =
|
|
|
|
|
+ row.requiredFormingNum * row.productUnitWeight;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ row.newSumOrderWeight = 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ row.productWeight = row.newSumOrderWeight;
|
|
|
this.tableHandleKeyUp(row, 'sum');
|
|
this.tableHandleKeyUp(row, 'sum');
|
|
|
},
|
|
},
|
|
|
changeProduceType(e) {
|
|
changeProduceType(e) {
|