Authored by htoooth

fix

@@ -41,8 +41,20 @@ @@ -41,8 +41,20 @@
41 } 41 }
42 }, 42 },
43 data() { 43 data() {
  44 + let cols = null;
  45 +
  46 + if (this.show) {
  47 + cols = table.infoCols.call(this);
  48 + } else {
  49 + cols = table.cols.call(this);
  50 + if (!this.selected) {
  51 + // 可选商品不需要结算折扣
  52 + cols.splice(7, 1);
  53 + }
  54 + }
  55 +
44 return { 56 return {
45 - tableCols: this.show ? table.infoCols.call(this) : table.cols.call(this), 57 + tableCols: cols,
46 tableData: [], 58 tableData: [],
47 pageData: { 59 pageData: {
48 total: 0, 60 total: 0,
@@ -47,9 +47,22 @@ let cols = function() { @@ -47,9 +47,22 @@ let cols = function() {
47 title: '吊牌价/销售价/进货价', 47 title: '吊牌价/销售价/进货价',
48 align: 'center', 48 align: 'center',
49 render: (h, params) => { 49 render: (h, params) => {
  50 + if (this.selected) {
50 return ( 51 return (
51 <div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} / {params.row.purchasePrice || '-'}</div> 52 <div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} / {params.row.purchasePrice || '-'}</div>
52 ); 53 );
  54 + } else {
  55 + return (
  56 + <div>{params.row.retailPrice || '-'} / {params.row.salesPrice || '-'} </div>
  57 + );
  58 + }
  59 + },
  60 + renderHeader: () => {
  61 + if (this.selected) {
  62 + return '吊牌价/销售价/进货价';
  63 + } else {
  64 + return '吊牌价/销售价';
  65 + }
53 } 66 }
54 }, 67 },
55 68
@@ -186,7 +199,6 @@ let infoCols = function() { @@ -186,7 +199,6 @@ let infoCols = function() {
186 ); 199 );
187 } 200 }
188 }, 201 },
189 -  
190 { 202 {
191 title: '结算折扣', 203 title: '结算折扣',
192 key: 'purchaseDiscount', 204 key: 'purchaseDiscount',