Showing
5 changed files
with
25 additions
and
22 deletions
@@ -132,11 +132,11 @@ export default function() { | @@ -132,11 +132,11 @@ export default function() { | ||
132 | key: 'status', | 132 | key: 'status', |
133 | align: 'center', | 133 | align: 'center', |
134 | render: (h, params) => { | 134 | render: (h, params) => { |
135 | - const row = params.row; | ||
136 | - const as = row.status; | ||
137 | - const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as]; | ||
138 | - row.lineIndex = params.index; | ||
139 | - return <p class={{ 'high-light': as === 2 }}>{asText}</p>; | 135 | + if (!params.row.status) { |
136 | + return ''; | ||
137 | + } | ||
138 | + const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; | ||
139 | + return <div>{withdrawStatusText}</div>; | ||
140 | }, | 140 | }, |
141 | className: 'status-column', | 141 | className: 'status-column', |
142 | }, | 142 | }, |
@@ -144,11 +144,11 @@ export default function() { | @@ -144,11 +144,11 @@ export default function() { | ||
144 | key: 'status', | 144 | key: 'status', |
145 | align: 'center', | 145 | align: 'center', |
146 | render: (h, params) => { | 146 | render: (h, params) => { |
147 | - const row = params.row; | ||
148 | - const as = row.status; | ||
149 | - const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as]; | ||
150 | - row.lineIndex = params.index; | ||
151 | - return <p class={{ 'high-light': as === 2 }}>{asText}</p>; | 147 | + if (!params.row.status) { |
148 | + return ''; | ||
149 | + } | ||
150 | + const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; | ||
151 | + return <div>{withdrawStatusText}</div>; | ||
152 | }, | 152 | }, |
153 | className: 'status-column', | 153 | className: 'status-column', |
154 | }, | 154 | }, |
@@ -164,11 +164,11 @@ export default function() { | @@ -164,11 +164,11 @@ export default function() { | ||
164 | key: 'status', | 164 | key: 'status', |
165 | align: 'center', | 165 | align: 'center', |
166 | render: (h, params) => { | 166 | render: (h, params) => { |
167 | - const row = params.row; | ||
168 | - const as = row.status; | ||
169 | - const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as]; | ||
170 | - row.lineIndex = params.index; | ||
171 | - return <p class={{ 'high-light': as === 2 }}>{asText}</p>; | 167 | + if (!params.row.status) { |
168 | + return ''; | ||
169 | + } | ||
170 | + const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; | ||
171 | + return <div>{withdrawStatusText}</div>; | ||
172 | }, | 172 | }, |
173 | className: 'status-column', | 173 | className: 'status-column', |
174 | }, | 174 | }, |
@@ -63,6 +63,9 @@ export default function() { | @@ -63,6 +63,9 @@ export default function() { | ||
63 | key: 'createTime', | 63 | key: 'createTime', |
64 | align: 'center', | 64 | align: 'center', |
65 | render(h, params) { | 65 | render(h, params) { |
66 | + if (!params.row.createTime) { | ||
67 | + return ''; | ||
68 | + } | ||
66 | const time = moment.unix(params.row.createTime); | 69 | const time = moment.unix(params.row.createTime); |
67 | return ( | 70 | return ( |
68 | <div> | 71 | <div> |
@@ -90,18 +93,18 @@ export default function() { | @@ -90,18 +93,18 @@ export default function() { | ||
90 | { | 93 | { |
91 | title: '成功金额(元)', | 94 | title: '成功金额(元)', |
92 | key: 'successAmount', | 95 | key: 'successAmount', |
93 | - align: 'center' | 96 | + align: 'center', |
94 | }, | 97 | }, |
95 | { | 98 | { |
96 | title: '提现状态', | 99 | title: '提现状态', |
97 | key: 'status', | 100 | key: 'status', |
98 | align: 'center', | 101 | align: 'center', |
99 | render: (h, params) => { | 102 | render: (h, params) => { |
100 | - const row = params.row; | ||
101 | - const as = row.status; | ||
102 | - const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as]; | ||
103 | - row.lineIndex = params.index; | ||
104 | - return <p class={{ 'high-light': as === 2 }}>{asText}</p>; | 103 | + if (!params.row.status) { |
104 | + return ''; | ||
105 | + } | ||
106 | + const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; | ||
107 | + return <div>{withdrawStatusText}</div>; | ||
105 | }, | 108 | }, |
106 | className: 'status-column', | 109 | className: 'status-column', |
107 | }, | 110 | }, |
@@ -67,7 +67,7 @@ | @@ -67,7 +67,7 @@ | ||
67 | <div class="select-container"> | 67 | <div class="select-container"> |
68 | <Button type="primary" @click="search">查询</Button> | 68 | <Button type="primary" @click="search">查询</Button> |
69 | <Button type="primary" @click="reset">全部</Button> | 69 | <Button type="primary" @click="reset">全部</Button> |
70 | -<!-- <Button>导出</Button>--> | 70 | + <!-- <Button>导出</Button>--> |
71 | </div> | 71 | </div> |
72 | </filter-item> | 72 | </filter-item> |
73 | </layout-filter> | 73 | </layout-filter> |
-
Please register or login to post a comment