|
@@ -116,8 +116,8 @@
|
|
|
<el-input
|
|
<el-input
|
|
|
v-model="scope.row.singlePrice"
|
|
v-model="scope.row.singlePrice"
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
- @input="changeCount(scope.row, scope.$index)"
|
|
|
|
|
- :disabled="item.orderCategory != 4"
|
|
|
|
|
|
|
+ @input="changeCount(scope.row, scope.$index, item, index)"
|
|
|
|
|
+ :disabled="item.orderCategory != 4 || dialogType === 'view'"
|
|
|
type="number"
|
|
type="number"
|
|
|
>
|
|
>
|
|
|
<template slot="append">元</template>
|
|
<template slot="append">元</template>
|
|
@@ -139,7 +139,7 @@
|
|
|
placeholder="请输入"
|
|
placeholder="请输入"
|
|
|
type="number"
|
|
type="number"
|
|
|
@input="getNotaxSinglePrice(scope.row, scope.$index)"
|
|
@input="getNotaxSinglePrice(scope.row, scope.$index)"
|
|
|
- :disabled="item.orderCategory != 4"
|
|
|
|
|
|
|
+ :disabled="item.orderCategory != 4 || dialogType === 'view'"
|
|
|
>
|
|
>
|
|
|
<template slot="append">%</template>
|
|
<template slot="append">%</template>
|
|
|
</el-input>
|
|
</el-input>
|
|
@@ -161,7 +161,7 @@
|
|
|
type="number"
|
|
type="number"
|
|
|
:min="0"
|
|
:min="0"
|
|
|
:max="100"
|
|
:max="100"
|
|
|
- :disabled="item.orderCategory != 4"
|
|
|
|
|
|
|
+ :disabled="item.orderCategory != 4 || dialogType === 'view'"
|
|
|
@input="getDiscountRatioPrice(scope.row, scope.$index)"
|
|
@input="getDiscountRatioPrice(scope.row, scope.$index)"
|
|
|
>
|
|
>
|
|
|
<template slot="append">%</template>
|
|
<template slot="append">%</template>
|
|
@@ -629,7 +629,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
//改变数量
|
|
//改变数量
|
|
|
- changeCount(item, index) {
|
|
|
|
|
|
|
+ changeCount(item, index, row, tableIndex) {
|
|
|
console.log('changeCount~~~', item)
|
|
console.log('changeCount~~~', item)
|
|
|
console.log('this.datasource[index]~~~', this.datasource[index])
|
|
console.log('this.datasource[index]~~~', this.datasource[index])
|
|
|
// row.totalPrice = parseFloat((item.totalCount * item.singlePrice).toFixed(2))
|
|
// row.totalPrice = parseFloat((item.totalCount * item.singlePrice).toFixed(2))
|
|
@@ -645,7 +645,7 @@ export default {
|
|
|
item.totalPrice = ''
|
|
item.totalPrice = ''
|
|
|
}
|
|
}
|
|
|
this.getNotaxSinglePrice(item, index);
|
|
this.getNotaxSinglePrice(item, index);
|
|
|
- this.getDiscountRatioPrice(item, index);
|
|
|
|
|
|
|
+ this.getDiscountRatioPrice(item, index, row, tableIndex);
|
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
|
// if (this.clientEnvironmentId == 4 && !isBlockCount) {
|
|
// if (this.clientEnvironmentId == 4 && !isBlockCount) {
|
|
|
// this.tableHandleKeyUp(row, index, 'sum');
|
|
// this.tableHandleKeyUp(row, index, 'sum');
|
|
@@ -675,7 +675,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 计算折让单价,折让总价
|
|
// 计算折让单价,折让总价
|
|
|
- getDiscountRatioPrice(item, index) {
|
|
|
|
|
|
|
+ getDiscountRatioPrice(item, index, row, tableIndex) {
|
|
|
|
|
|
|
|
if (item.singlePrice && item.discountRatio) {
|
|
if (item.singlePrice && item.discountRatio) {
|
|
|
// this.$set(
|
|
// this.$set(
|
|
@@ -706,6 +706,14 @@ export default {
|
|
|
item.discountSinglePrice = ''
|
|
item.discountSinglePrice = ''
|
|
|
item.discountTotalPrice = ''
|
|
item.discountTotalPrice = ''
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log('row~~~', row, tableIndex)
|
|
|
|
|
+ row.unStatementAmount = this.datasource[tableIndex].deliveryProducts.reduce((prev, curr) => {
|
|
|
|
|
+ return prev + Number(curr.discountTotalPrice || 0)
|
|
|
|
|
+ }, 0)
|
|
|
|
|
+ row.amountTotalPrice = this.datasource[tableIndex].deliveryProducts.reduce((prev, curr) => {
|
|
|
|
|
+ return prev + Number(curr.discountTotalPrice || 0)
|
|
|
|
|
+ }, 0)
|
|
|
|
|
+ this.$emit('changeDiscountPrice', row.amountTotalPrice, tableIndex)
|
|
|
},
|
|
},
|
|
|
remove(tableIndex, lineIndex, delType) {
|
|
remove(tableIndex, lineIndex, delType) {
|
|
|
let params = {
|
|
let params = {
|