|
@@ -61,6 +61,10 @@ export default {
|
|
|
salesBillSn: {
|
|
|
type: String,
|
|
|
default: ''
|
|
|
+ },
|
|
|
+ showCols: {
|
|
|
+ type: Array,
|
|
|
+ default: () => []
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -115,16 +119,16 @@ export default {
|
|
|
if (column.key >= 4 && column.key <= 8) {
|
|
|
return 'table-header-cell-blue'
|
|
|
}
|
|
|
- if (column.key >= 9 && column.key < 10) {
|
|
|
+ if (column.key >= 9 && column.key < 12) {
|
|
|
return 'table-header-cell-red'
|
|
|
}
|
|
|
- if (column.key >= 10 && column.key <= 13) {
|
|
|
+ if (column.key >= 12 && column.key <= 15) {
|
|
|
return 'table-header-cell-green'
|
|
|
}
|
|
|
- if (column.key >= 14 && column.key <= 16) {
|
|
|
+ if (column.key >= 16 && column.key <= 18) {
|
|
|
return 'table-header-cell-org'
|
|
|
}
|
|
|
- if (column.key >= 17 && column.key <= 19) {
|
|
|
+ if (column.key >= 19 && column.key <= 21) {
|
|
|
return 'table-header-cell-zs'
|
|
|
}
|
|
|
},
|
|
@@ -302,7 +306,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'discountRuleValue',
|
|
|
- key: '91',
|
|
|
+ key: '10',
|
|
|
title: '基础',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
@@ -310,7 +314,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'discountRuleNextValue',
|
|
|
- key: '92',
|
|
|
+ key: '11',
|
|
|
title: '下阶差',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
@@ -323,7 +327,7 @@ export default {
|
|
|
children: [
|
|
|
{
|
|
|
field: 'regularSelected',
|
|
|
- key: '10',
|
|
|
+ key: '12',
|
|
|
title: '已选',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -331,7 +335,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'regularTotal',
|
|
|
- key: '11',
|
|
|
+ key: '13',
|
|
|
title: '累计',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -339,7 +343,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'regularBaseVal',
|
|
|
- key: '12',
|
|
|
+ key: '14',
|
|
|
title: '基础',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
@@ -347,7 +351,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'regularNextVal',
|
|
|
- key: '13',
|
|
|
+ key: '15',
|
|
|
title: '下阶差',
|
|
|
width: 60,
|
|
|
align: 'center',
|
|
@@ -360,7 +364,7 @@ export default {
|
|
|
children: [
|
|
|
{
|
|
|
field: 'promoLimit',
|
|
|
- key: '14',
|
|
|
+ key: '16',
|
|
|
title: '额度',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -368,7 +372,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'promoSelected',
|
|
|
- key: '15',
|
|
|
+ key: '17',
|
|
|
title: '已选',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -376,7 +380,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'promoBalance',
|
|
|
- key: '16',
|
|
|
+ key: '18',
|
|
|
title: '差额',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -389,7 +393,7 @@ export default {
|
|
|
children: [
|
|
|
{
|
|
|
field: 'purchaseLimit',
|
|
|
- key: '17',
|
|
|
+ key: '19',
|
|
|
title: '额度',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -397,7 +401,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'purchaseSelected',
|
|
|
- key: '18',
|
|
|
+ key: '20',
|
|
|
title: '已选',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -405,7 +409,7 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
field: 'purchaseSurplus',
|
|
|
- key: '19',
|
|
|
+ key: '21',
|
|
|
title: '结余',
|
|
|
width: 50,
|
|
|
align: 'center',
|
|
@@ -413,8 +417,8 @@ export default {
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- { field: 'totalCategory', key: '20', title: '款数', width: 50, align: 'center', fixed: 'right' },
|
|
|
- { field: 'totalQty', key: '21', title: '数量', width: 50, align: 'center', fixed: 'right' }
|
|
|
+ { field: 'totalCategory', key: '22', title: '款数', width: 50, align: 'center', fixed: 'right' },
|
|
|
+ { field: 'totalQty', key: '23', title: '数量', width: 50, align: 'center', fixed: 'right' }
|
|
|
]
|
|
|
if (this.type == 'edit') {
|
|
|
cols.unshift({
|
|
@@ -429,14 +433,14 @@ export default {
|
|
|
}
|
|
|
// 销售价权限
|
|
|
if (this.type == 'view' && this.$hasPermissions('B_salesDetail_salesPrice') || this.type == 'edit' && this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
|
- cols.push({ field: 'totalAmount', key: '22', title: '总金额', width: 60, align: 'center', fixed: 'right', renderBodyCell: ({ row, column, rowIndex }, h) => { return this.toThousands(row[column.field]) } })
|
|
|
- cols.push({ field: 'lossAmount', key: '23', title: '优惠金额', width: 60, align: 'center', fixed: 'right', renderBodyCell: ({ row, column, rowIndex }, h) => { return this.toThousands(row[column.field]) } })
|
|
|
+ cols.push({ field: 'totalAmount', key: '24', title: '总金额', width: 60, align: 'center', fixed: 'right', renderBodyCell: ({ row, column, rowIndex }, h) => { return this.toThousands(row[column.field]) } })
|
|
|
+ cols.push({ field: 'lossAmount', key: '25', title: '优惠金额', width: 60, align: 'center', fixed: 'right', renderBodyCell: ({ row, column, rowIndex }, h) => { return this.toThousands(row[column.field]) } })
|
|
|
}
|
|
|
// 编辑页面
|
|
|
if (this.type == 'edit') {
|
|
|
cols.push({
|
|
|
field: '',
|
|
|
- key: '24',
|
|
|
+ key: '26',
|
|
|
title: '状态',
|
|
|
width: 50,
|
|
|
center: 'center',
|
|
@@ -470,7 +474,7 @@ export default {
|
|
|
})
|
|
|
cols.push({
|
|
|
field: '',
|
|
|
- key: '25',
|
|
|
+ key: '27',
|
|
|
title: '操作',
|
|
|
width: 130,
|
|
|
center: 'center',
|
|
@@ -536,7 +540,10 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
- return cols
|
|
|
+ return cols.filter((item, index) => {
|
|
|
+ const i = this.type === 'edit' ? index - 1 : index
|
|
|
+ return this.showCols.includes(i.toString()) || (this.type === 'edit' && index == 0) || index > (this.type === 'edit' ? 8 : 7)
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
methods: {
|