|
@@ -306,9 +306,11 @@
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{
|
|
{{
|
|
|
- $math.format(
|
|
|
|
|
- row.minPackingQuantity * row.packingQuantity,
|
|
|
|
|
- 14
|
|
|
|
|
|
|
+ changeCount(
|
|
|
|
|
+ $math.format(
|
|
|
|
|
+ row.minPackingQuantity * row.packingQuantity,
|
|
|
|
|
+ 14
|
|
|
|
|
+ )
|
|
|
)
|
|
)
|
|
|
}}
|
|
}}
|
|
|
</template>
|
|
</template>
|
|
@@ -387,11 +389,13 @@
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{
|
|
{{
|
|
|
- calcSumTotal(
|
|
|
|
|
- row.packingQuantity,
|
|
|
|
|
- row.minPackingQuantity,
|
|
|
|
|
- row.price,
|
|
|
|
|
- row
|
|
|
|
|
|
|
+ changeCount(
|
|
|
|
|
+ calcSumTotal(
|
|
|
|
|
+ row.packingQuantity,
|
|
|
|
|
+ row.minPackingQuantity,
|
|
|
|
|
+ row.price,
|
|
|
|
|
+ row
|
|
|
|
|
+ )
|
|
|
)
|
|
)
|
|
|
}}
|
|
}}
|
|
|
</template>
|
|
</template>
|
|
@@ -912,6 +916,7 @@
|
|
|
import { sceneState } from '@/utils/dict/index';
|
|
import { sceneState } from '@/utils/dict/index';
|
|
|
import { getTreeByGroup } from '@/api/classifyManage';
|
|
import { getTreeByGroup } from '@/api/classifyManage';
|
|
|
import { deepClone } from '@/utils';
|
|
import { deepClone } from '@/utils';
|
|
|
|
|
+ import BigNumber from 'bignumber.js';
|
|
|
export default {
|
|
export default {
|
|
|
components: {
|
|
components: {
|
|
|
selectType,
|
|
selectType,
|
|
@@ -1027,6 +1032,9 @@
|
|
|
this.getNowFormatDate();
|
|
this.getNowFormatDate();
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ changeCount(number) {
|
|
|
|
|
+ return new BigNumber(number).toString();
|
|
|
|
|
+ },
|
|
|
selectSupplier(val, row) {
|
|
selectSupplier(val, row) {
|
|
|
row.supplierId = val;
|
|
row.supplierId = val;
|
|
|
row.supplierName = row.supplierListOptions.filter(
|
|
row.supplierName = row.supplierListOptions.filter(
|
|
@@ -1579,8 +1587,8 @@
|
|
|
const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
|
|
const decimalCount = (newValue.match(/\./g) || []).length; // 计算小数点的个数
|
|
|
if (row.weight < 0) {
|
|
if (row.weight < 0) {
|
|
|
row.weight = 0;
|
|
row.weight = 0;
|
|
|
- } else if (row.weight > 9999) {
|
|
|
|
|
- row.weight = 9999;
|
|
|
|
|
|
|
+ } else if (row.weight > 999999) {
|
|
|
|
|
+ row.weight = 999999;
|
|
|
} else {
|
|
} else {
|
|
|
if (decimalCount > 1) {
|
|
if (decimalCount > 1) {
|
|
|
// 如果小数点个数大于1,移除多余的小数点
|
|
// 如果小数点个数大于1,移除多余的小数点
|
|
@@ -1625,8 +1633,8 @@
|
|
|
minPackingQuantityChange(row, value, index) {
|
|
minPackingQuantityChange(row, value, index) {
|
|
|
console.log(value);
|
|
console.log(value);
|
|
|
if (row.measureUnit !== 'KG') {
|
|
if (row.measureUnit !== 'KG') {
|
|
|
- if (value.replace(/^(0+)|[^\d]+/g, '') > 9999) {
|
|
|
|
|
- this.$set(this.productList[index], 'minPackingQuantity', 9999);
|
|
|
|
|
|
|
+ if (value.replace(/^(0+)|[^\d]+/g, '') > 999999) {
|
|
|
|
|
+ this.$set(this.productList[index], 'minPackingQuantity', 999999);
|
|
|
} else {
|
|
} else {
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.productList[index],
|
|
this.productList[index],
|
|
@@ -1637,8 +1645,8 @@
|
|
|
} else {
|
|
} else {
|
|
|
if (value < 1) {
|
|
if (value < 1) {
|
|
|
this.$set(this.productList[index], 'minPackingQuantity', 1);
|
|
this.$set(this.productList[index], 'minPackingQuantity', 1);
|
|
|
- } else if (value > 9999) {
|
|
|
|
|
- this.$set(this.productList[index], 'minPackingQuantity', 9999);
|
|
|
|
|
|
|
+ } else if (value > 999999) {
|
|
|
|
|
+ this.$set(this.productList[index], 'minPackingQuantity', 999999);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (row.packingQuantity >= 0 && value >= 0) {
|
|
if (row.packingQuantity >= 0 && value >= 0) {
|
|
@@ -1650,15 +1658,15 @@
|
|
|
const total = {
|
|
const total = {
|
|
|
minPackingQuantity: Number(
|
|
minPackingQuantity: Number(
|
|
|
row.minPackingQuantity > 0
|
|
row.minPackingQuantity > 0
|
|
|
- ? row.minPackingQuantity > 9999
|
|
|
|
|
- ? 9999
|
|
|
|
|
|
|
+ ? row.minPackingQuantity > 999999
|
|
|
|
|
+ ? 999999
|
|
|
: row.minPackingQuantity
|
|
: row.minPackingQuantity
|
|
|
: 0
|
|
: 0
|
|
|
),
|
|
),
|
|
|
packingQuantity: Number(
|
|
packingQuantity: Number(
|
|
|
row.packingQuantity > 0
|
|
row.packingQuantity > 0
|
|
|
- ? row.packingQuantity > 9999
|
|
|
|
|
- ? 9999
|
|
|
|
|
|
|
+ ? row.packingQuantity > 999999
|
|
|
|
|
+ ? 999999
|
|
|
: row.packingQuantity
|
|
: row.packingQuantity
|
|
|
: 0
|
|
: 0
|
|
|
)
|
|
)
|
|
@@ -1691,8 +1699,8 @@
|
|
|
// 清空仓库
|
|
// 清空仓库
|
|
|
this.$set(this.productList[index], 'warehouseId', '');
|
|
this.$set(this.productList[index], 'warehouseId', '');
|
|
|
this.$set(this.productList[index], 'warehouseName', '');
|
|
this.$set(this.productList[index], 'warehouseName', '');
|
|
|
- if (value.replace(/^(0+)|[^\d]+/g, '') > 9999) {
|
|
|
|
|
- this.$set(this.productList[index], 'packingQuantity', 9999);
|
|
|
|
|
|
|
+ if (value.replace(/^(0+)|[^\d]+/g, '') > 999999) {
|
|
|
|
|
+ this.$set(this.productList[index], 'packingQuantity', 999999);
|
|
|
} else {
|
|
} else {
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.productList[index],
|
|
this.productList[index],
|