|
@@ -187,7 +187,7 @@
|
|
|
</template>
|
|
</template>
|
|
|
<template v-slot:totalPrice="scope">
|
|
<template v-slot:totalPrice="scope">
|
|
|
<el-form-item :prop="'datasource.' + scope.$index + '.totalPrice'">
|
|
<el-form-item :prop="'datasource.' + scope.$index + '.totalPrice'">
|
|
|
- {{ (Number(scope.row.totalPrice) || 0).toFixed(2) }}元
|
|
|
|
|
|
|
+ {{ formatPrice(Number(scope.row.totalPrice) || 0) }}元
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -982,7 +982,7 @@
|
|
|
import ProductionVersion from '@/components/ProductionVersion2/index.vue';
|
|
import ProductionVersion from '@/components/ProductionVersion2/index.vue';
|
|
|
import { getInventoryTotalAPI } from '@/api/wms';
|
|
import { getInventoryTotalAPI } from '@/api/wms';
|
|
|
import { pricingWayList, lbjtList } from '@/enum/dict.js';
|
|
import { pricingWayList, lbjtList } from '@/enum/dict.js';
|
|
|
- import { changeCount, getAllPrice, getAllDiscountPrice } from '@/BIZComponents/setProduct.js';
|
|
|
|
|
|
|
+ import { changeCount, getAllPrice, getAllDiscountPrice, formatPrice } from '@/BIZComponents/setProduct.js';
|
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
|
|
import { contactQueryByCategoryIdsAPI } from '@/api/saleManage/contact';
|
|
|
import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
|
|
import taskinstanceDialog from '@/BIZComponents/procedure/taskinstanceDialog.vue';
|
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
import timeDialog from '@/components/timeDialog/index.vue';
|
|
@@ -1502,7 +1502,7 @@
|
|
|
isNone: !this.isDiscount,
|
|
isNone: !this.isDiscount,
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
formatter: (_row, _column, cellValue) => {
|
|
|
return _row.discountSinglePrice
|
|
return _row.discountSinglePrice
|
|
|
- ? Number(_row.discountSinglePrice).toFixed(2)
|
|
|
|
|
|
|
+ ? formatPrice(Number(_row.discountSinglePrice))
|
|
|
: '';
|
|
: '';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1521,7 +1521,7 @@
|
|
|
isNone: !this.isDiscount,
|
|
isNone: !this.isDiscount,
|
|
|
formatter: (_row, _column, cellValue) => {
|
|
formatter: (_row, _column, cellValue) => {
|
|
|
return _row.discountTotalPrice
|
|
return _row.discountTotalPrice
|
|
|
- ? Number(_row.discountTotalPrice).toFixed(2)
|
|
|
|
|
|
|
+ ? formatPrice(Number(_row.discountTotalPrice))
|
|
|
: '';
|
|
: '';
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -1773,6 +1773,7 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ formatPrice,
|
|
|
handleCountChange(row, index,weightType) {
|
|
handleCountChange(row, index,weightType) {
|
|
|
// 数量变化时,若为生产加工类型,触发含税小计计算
|
|
// 数量变化时,若为生产加工类型,触发含税小计计算
|
|
|
if (this.quoteType === 2) {
|
|
if (this.quoteType === 2) {
|
|
@@ -1949,7 +1950,7 @@
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'totalPrice',
|
|
'totalPrice',
|
|
|
- ((row.increaseTotalWeight || 0) * row.singlePrice).toFixed(2)
|
|
|
|
|
|
|
+ formatPrice((row.increaseTotalWeight || 0) * row.singlePrice)
|
|
|
);
|
|
);
|
|
|
this.changeAll();
|
|
this.changeAll();
|
|
|
}
|
|
}
|
|
@@ -1985,7 +1986,7 @@
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'totalPrice',
|
|
'totalPrice',
|
|
|
- totalPrice.toFixed(2)
|
|
|
|
|
|
|
+ formatPrice(totalPrice)
|
|
|
);
|
|
);
|
|
|
if (
|
|
if (
|
|
|
row[this.countObj.unitKey] == row.weightUnit &&
|
|
row[this.countObj.unitKey] == row.weightUnit &&
|
|
@@ -2030,16 +2031,14 @@
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'discountSinglePrice',
|
|
'discountSinglePrice',
|
|
|
- parseFloat(
|
|
|
|
|
- (item.singlePrice * (item.discountRatio / 100)).toFixed(2)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ formatPrice(item.singlePrice * (item.discountRatio / 100))
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'discountTotalPrice',
|
|
'discountTotalPrice',
|
|
|
- parseFloat(
|
|
|
|
|
- (item.totalPrice * (item.discountRatio / 100)).toFixed(2)
|
|
|
|
|
|
|
+ formatPrice(
|
|
|
|
|
+ item.totalPrice * (item.discountRatio / 100)
|
|
|
)
|
|
)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
@@ -2066,9 +2065,7 @@
|
|
|
this.$set(
|
|
this.$set(
|
|
|
this.form.datasource[index],
|
|
this.form.datasource[index],
|
|
|
'notaxSinglePrice',
|
|
'notaxSinglePrice',
|
|
|
- parseFloat(
|
|
|
|
|
- (item.singlePrice / (1 + item.taxRate / 100)).toFixed(2)
|
|
|
|
|
- )
|
|
|
|
|
|
|
+ formatPrice(item.singlePrice / (1 + item.taxRate / 100))
|
|
|
);
|
|
);
|
|
|
} else {
|
|
} else {
|
|
|
this.$set(this.form.datasource[index], 'notaxSinglePrice', '');
|
|
this.$set(this.form.datasource[index], 'notaxSinglePrice', '');
|
|
@@ -2114,7 +2111,7 @@
|
|
|
let num =
|
|
let num =
|
|
|
(Number(this.form.discountTotalPrice) / Number(this.allPrice)) *
|
|
(Number(this.form.discountTotalPrice) / Number(this.allPrice)) *
|
|
|
Number(row.singlePrice);
|
|
Number(row.singlePrice);
|
|
|
- return isNaN(num) ? '' : num;
|
|
|
|
|
|
|
+ return isNaN(num) ? '' : formatPrice(num);
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
//获取折让比例
|
|
//获取折让比例
|
|
@@ -2136,7 +2133,7 @@
|
|
|
let num = 0;
|
|
let num = 0;
|
|
|
num =
|
|
num =
|
|
|
Number(row.discountSinglePrice) * Number(row[this.countObj.countKey]);
|
|
Number(row.discountSinglePrice) * Number(row[this.countObj.countKey]);
|
|
|
- return isNaN(num) ? '' : num.toFixed(2);
|
|
|
|
|
|
|
+ return isNaN(num) ? '' : formatPrice(num);
|
|
|
},
|
|
},
|
|
|
orderNoChange(row, item) {
|
|
orderNoChange(row, item) {
|
|
|
row['orderId'] = item.orderId;
|
|
row['orderId'] = item.orderId;
|