|
@@ -405,29 +405,31 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="单价"
|
|
label="单价"
|
|
|
- prop="price"
|
|
|
|
|
|
|
+ prop="unitPrice"
|
|
|
width="200"
|
|
width="200"
|
|
|
align="center"
|
|
align="center"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
<template v-if="row.isSave">
|
|
<template v-if="row.isSave">
|
|
|
- {{ row.price }}元/{{ row.measureUnit }}
|
|
|
|
|
|
|
+ <span>{{ row.unitPrice }}</span>
|
|
|
|
|
+ <span v-if="row.unitPrice">/元</span>
|
|
|
</template>
|
|
</template>
|
|
|
<el-form-item v-else>
|
|
<el-form-item v-else>
|
|
|
<el-input
|
|
<el-input
|
|
|
type="number"
|
|
type="number"
|
|
|
- :ref="'price' + $index"
|
|
|
|
|
|
|
+ :ref="'unitPrice' + $index"
|
|
|
@keyup.native="
|
|
@keyup.native="
|
|
|
- moveFocus($event, $index, 'price', '产品', row)
|
|
|
|
|
|
|
+ moveFocus($event, $index, 'unitPrice', '产品', row)
|
|
|
"
|
|
"
|
|
|
- v-model.number="row.price"
|
|
|
|
|
|
|
+ v-model.number="row.unitPrice"
|
|
|
placeholder="非必填"
|
|
placeholder="非必填"
|
|
|
@input="
|
|
@input="
|
|
|
- (value) => (row.price = value.replace(/[^0-9.]+/g, ''))
|
|
|
|
|
|
|
+ (value) =>
|
|
|
|
|
+ (row.unitPrice = value.replace(/[^0-9.]+/g, ''))
|
|
|
"
|
|
"
|
|
|
>
|
|
>
|
|
|
<template slot="append">
|
|
<template slot="append">
|
|
|
- 元/{{ row.measureUnit }}
|
|
|
|
|
|
|
+ <span v-if="row.unitPrice">/元</span>
|
|
|
</template>
|
|
</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -442,7 +444,7 @@
|
|
|
<template slot-scope="{ row, $index }">
|
|
<template slot-scope="{ row, $index }">
|
|
|
{{
|
|
{{
|
|
|
changeCount(
|
|
changeCount(
|
|
|
- calcSumTotal(row.measureQuantity, row.price, row)
|
|
|
|
|
|
|
+ calcSumTotal(row.measureQuantity, row.unitPrice, row)
|
|
|
)
|
|
)
|
|
|
}}
|
|
}}
|
|
|
</template>
|
|
</template>
|
|
@@ -1301,7 +1303,7 @@
|
|
|
let packingQuantity = filtersItem.totalCount || 0;
|
|
let packingQuantity = filtersItem.totalCount || 0;
|
|
|
let packingUnit = filtersItem.measuringUnit || '';
|
|
let packingUnit = filtersItem.measuringUnit || '';
|
|
|
|
|
|
|
|
- let price = filtersItem.singlePrice || 0;
|
|
|
|
|
|
|
+ let unitPrice = filtersItem.singlePrice || 0;
|
|
|
let pricingWay = filtersItem.pricingWay || '';
|
|
let pricingWay = filtersItem.pricingWay || '';
|
|
|
// 计价方式是重量
|
|
// 计价方式是重量
|
|
|
let singleWeight =
|
|
let singleWeight =
|
|
@@ -1349,7 +1351,7 @@
|
|
|
weight: weight, // 总重量
|
|
weight: weight, // 总重量
|
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
|
totalMoney: totalMoney, // 总价
|
|
totalMoney: totalMoney, // 总价
|
|
|
- price: item.price || price, // 单价
|
|
|
|
|
|
|
+ unitPrice: item.unitPrice || unitPrice, // 单价
|
|
|
pricingWay: pricingWay, //计价方式
|
|
pricingWay: pricingWay, //计价方式
|
|
|
purpose: '', // 用途
|
|
purpose: '', // 用途
|
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
@@ -1525,7 +1527,7 @@
|
|
|
singleWeight: singleWeight,
|
|
singleWeight: singleWeight,
|
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
|
totalMoney: item.totalPrice, // 总价
|
|
totalMoney: item.totalPrice, // 总价
|
|
|
- price: item.price, // 单价
|
|
|
|
|
|
|
+ unitPrice: item.unitPrice, // 单价
|
|
|
purpose: '', // 用途
|
|
purpose: '', // 用途
|
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
isUnpack: item.isUnpack, // 是否允许拆包
|
|
|
warehouseId: this.isMoreProduct
|
|
warehouseId: this.isMoreProduct
|
|
@@ -1771,7 +1773,7 @@
|
|
|
switch (type) {
|
|
switch (type) {
|
|
|
case '产品':
|
|
case '产品':
|
|
|
listLength = this.productList.length;
|
|
listLength = this.productList.length;
|
|
|
- keyfield = ['batchNo', 'packingQuantity', 'price', 'purpose'];
|
|
|
|
|
|
|
+ keyfield = ['batchNo', 'packingQuantity', 'unitPrice', 'purpose'];
|
|
|
break;
|
|
break;
|
|
|
case '包装':
|
|
case '包装':
|
|
|
listLength = this.showPackingList.length;
|
|
listLength = this.showPackingList.length;
|
|
@@ -2171,15 +2173,15 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
//计算金额
|
|
//计算金额
|
|
|
- calcSumTotal(measureQuantity, price, row) {
|
|
|
|
|
|
|
+ calcSumTotal(measureQuantity, unitPrice, row) {
|
|
|
//最小包装单元,包装数量,单价
|
|
//最小包装单元,包装数量,单价
|
|
|
if (this.bizType != 2) {
|
|
if (this.bizType != 2) {
|
|
|
const total = {
|
|
const total = {
|
|
|
measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
|
|
measureQuantity: Number(measureQuantity > 0 ? measureQuantity : 0),
|
|
|
- price: Number(price > 0 ? price : 0)
|
|
|
|
|
|
|
+ unitPrice: Number(unitPrice > 0 ? unitPrice : 0)
|
|
|
};
|
|
};
|
|
|
let number = Number(
|
|
let number = Number(
|
|
|
- this.$math.format(total.measureQuantity * total.price, 14)
|
|
|
|
|
|
|
+ this.$math.format(total.measureQuantity * total.unitPrice, 14)
|
|
|
);
|
|
);
|
|
|
|
|
|
|
|
row.totalMoney = number;
|
|
row.totalMoney = number;
|
|
@@ -2339,7 +2341,7 @@
|
|
|
pricingWay: item.pricingWay,
|
|
pricingWay: item.pricingWay,
|
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
weightUnit: item.weightUnit, // 重量单位
|
|
|
totalMoney: item.totalPrice, // 总价
|
|
totalMoney: item.totalPrice, // 总价
|
|
|
- price: item.price, // 单价
|
|
|
|
|
|
|
+ unitPrice: item.unitPrice, // 单价
|
|
|
purpose: '', // 用途
|
|
purpose: '', // 用途
|
|
|
isUnpack: item.isUnpack // 是否允许拆包
|
|
isUnpack: item.isUnpack // 是否允许拆包
|
|
|
};
|
|
};
|