Authored by htoooth

fix

... ... @@ -41,8 +41,20 @@
}
},
data() {
let cols = null;
if (this.show) {
cols = table.infoCols.call(this);
} else {
cols = table.cols.call(this);
if (!this.selected) {
// 可选商品不需要结算折扣
cols.splice(7, 1);
}
}
return {
tableCols: this.show ? table.infoCols.call(this) : table.cols.call(this),
tableCols: cols,
tableData: [],
pageData: {
total: 0,
... ...
... ... @@ -47,9 +47,22 @@ let cols = function() {
title: '吊牌价/销售价/进货价',
align: 'center',
render: (h, params) => {
return (
<div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} / {params.row.purchasePrice || '-'}</div>
);
if (this.selected) {
return (
<div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} / {params.row.purchasePrice || '-'}</div>
);
} else {
return (
<div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} </div>
);
}
},
renderHeader: () => {
if (this.selected) {
return '吊牌价/销售价/进货价';
} else {
return '吊牌价/销售价';
}
}
},
... ... @@ -186,7 +199,6 @@ let infoCols = function() {
);
}
},
{
title: '结算折扣',
key: 'purchaseDiscount',
... ...