Authored by jiran.zhao

申请提现 账户余额信息

@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 <td>收款账户</td> 22 <td>收款账户</td>
23 <td>{{ data.targetAccount }}</td> 23 <td>{{ data.targetAccount }}</td>
24 <td>付款账户</td> 24 <td>付款账户</td>
25 - <td>有货商贸有限公司(yh@yoho.cn){{ data.targetAccount }}</td> 25 + <td>{{ data.payAccount }}</td>
26 </tr> 26 </tr>
27 <tr> 27 <tr>
28 <td>申请金额(元)</td> 28 <td>申请金额(元)</td>
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <td>成功金额(元)</td> 34 <td>成功金额(元)</td>
35 <td>{{ data.tradeSuccessAmount }}</td> 35 <td>{{ data.tradeSuccessAmount }}</td>
36 <td>操作人</td> 36 <td>操作人</td>
37 - <td>{{ data.applyPid }}</td> 37 + <td>{{ data.applyAccount }}</td>
38 </tr> 38 </tr>
39 <tr> 39 <tr>
40 <td>说明</td> 40 <td>说明</td>
@@ -72,8 +72,8 @@ @@ -72,8 +72,8 @@
72 <!-- </Select>--> 72 <!-- </Select>-->
73 <!-- </div>--> 73 <!-- </div>-->
74 <div class="select-container"> 74 <div class="select-container">
75 - <Select v-model.trim="filters.withdrawStatus.model" :placeholder="filters.withdrawStatus.label" clearable>  
76 - <Option v-for="option in filters.withdrawStatus.options" :key="option.value" :value="option.value">{{ 75 + <Select v-model.trim="filters.status.model" :placeholder="filters.status.label" clearable>
  76 + <Option v-for="option in filters.status.options" :key="option.value" :value="option.value">{{
77 option.label 77 option.label
78 }}</Option> 78 }}</Option>
79 </Select> 79 </Select>
@@ -127,7 +127,7 @@ export default { @@ -127,7 +127,7 @@ export default {
127 orderCode: 'orderCode', 127 orderCode: 'orderCode',
128 clearingType: 'clearingType', 128 clearingType: 'clearingType',
129 subClearingType: 'subClearingType', 129 subClearingType: 'subClearingType',
130 - withdrawStatus: 'withdrawStatus', 130 + status: 'status',
131 }; 131 };
132 132
133 if (this.enableFilter) { 133 if (this.enableFilter) {
1 import moment from 'moment'; 1 import moment from 'moment';
2 2
3 const withdrawStatus = { 3 const withdrawStatus = {
4 - 0: '提现中',  
5 - 1: '提现成功',  
6 - 2: '提现失败',  
7 - 3: '冻结中',  
8 - 4: '可提现', 4 + 0: '冻结中',
  5 + 1: '可提现',
  6 + 2: '提现中',
  7 + 3: '提现成功',
  8 + '-1': '提现失败',
9 }; 9 };
10 10
11 export default function() { 11 export default function() {
@@ -61,29 +61,29 @@ export default function() { @@ -61,29 +61,29 @@ export default function() {
61 }, 61 },
62 ], 62 ],
63 }, 63 },
64 - withdrawStatus: { 64 + status: {
65 label: '提现状态', 65 label: '提现状态',
66 model: '', 66 model: '',
67 options: [ 67 options: [
68 { 68 {
69 value: 0, 69 value: 0,
70 - label: '提现中', 70 + label: '冻结中',
71 }, 71 },
72 { 72 {
73 value: 1, 73 value: 1,
74 - label: '提现成功', 74 + label: '可提现',
75 }, 75 },
76 { 76 {
77 value: 2, 77 value: 2,
78 - label: '提现失败', 78 + label: '提现',
79 }, 79 },
80 { 80 {
81 value: 3, 81 value: 3,
82 - label: '冻结中', 82 + label: '提现成功',
83 }, 83 },
84 { 84 {
85 - value: 4,  
86 - label: '可提现', 85 + value: -1,
  86 + label: '提现失败',
87 }, 87 },
88 ], 88 ],
89 }, 89 },
@@ -132,9 +132,6 @@ export default function() { @@ -132,9 +132,6 @@ export default function() {
132 key: 'status', 132 key: 'status',
133 align: 'center', 133 align: 'center',
134 render: (h, params) => { 134 render: (h, params) => {
135 - if (!params.row.status) {  
136 - return '';  
137 - }  
138 const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; 135 const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : '';
139 return <div>{withdrawStatusText}</div>; 136 return <div>{withdrawStatusText}</div>;
140 }, 137 },
1 import moment from 'moment'; 1 import moment from 'moment';
2 2
3 const withdrawStatus = { 3 const withdrawStatus = {
4 - 0: '提现中',  
5 - 1: '提现成功',  
6 - 2: '提现失败', 4 + 0: '冻结中',
  5 + 1: '可提现',
  6 + 2: '提现中',
  7 + 3: '提现成功',
  8 + '-1': '提现失败',
7 }; 9 };
8 10
9 export default function() { 11 export default function() {
@@ -33,14 +35,22 @@ export default function() { @@ -33,14 +35,22 @@ export default function() {
33 options: [ 35 options: [
34 { 36 {
35 value: 0, 37 value: 0,
36 - label: '提现中', 38 + label: '冻结中',
37 }, 39 },
38 { 40 {
39 value: 1, 41 value: 1,
40 - label: '提现成功', 42 + label: '可提现',
41 }, 43 },
42 { 44 {
43 value: 2, 45 value: 2,
  46 + label: '提现中',
  47 + },
  48 + {
  49 + value: 3,
  50 + label: '提现成功',
  51 + },
  52 + {
  53 + value: -1,
44 label: '提现失败', 54 label: '提现失败',
45 }, 55 },
46 ], 56 ],
1 import moment from 'moment'; 1 import moment from 'moment';
2 2
3 const withdrawStatus = { 3 const withdrawStatus = {
4 - 0: '提现中',  
5 - 1: '提现成功',  
6 - 2: '提现失败', 4 + 0: '冻结中',
  5 + 1: '可提现',
  6 + 2: '提现中',
  7 + 3: '提现成功',
  8 + '-1': '提现失败',
7 }; 9 };
8 10
9 export default function() { 11 export default function() {
@@ -30,14 +32,22 @@ export default function() { @@ -30,14 +32,22 @@ export default function() {
30 options: [ 32 options: [
31 { 33 {
32 value: 0, 34 value: 0,
33 - label: '提现中', 35 + label: '冻结中',
34 }, 36 },
35 { 37 {
36 value: 1, 38 value: 1,
37 - label: '提现成功', 39 + label: '可提现',
38 }, 40 },
39 { 41 {
40 value: 2, 42 value: 2,
  43 + label: '提现中',
  44 + },
  45 + {
  46 + value: 3,
  47 + label: '提现成功',
  48 + },
  49 + {
  50 + value: -1,
41 label: '提现失败', 51 label: '提现失败',
42 }, 52 },
43 ], 53 ],
@@ -169,9 +179,6 @@ export default function() { @@ -169,9 +179,6 @@ export default function() {
169 key: 'status', 179 key: 'status',
170 align: 'center', 180 align: 'center',
171 render: (h, params) => { 181 render: (h, params) => {
172 - if (!params.row.status) {  
173 - return '';  
174 - }  
175 const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : ''; 182 const withdrawStatusText = withdrawStatus[params.row.status] ? withdrawStatus[params.row.status] : '';
176 return <div>{withdrawStatusText}</div>; 183 return <div>{withdrawStatusText}</div>;
177 }, 184 },
@@ -8,6 +8,7 @@ const withdrawStatus = { @@ -8,6 +8,7 @@ const withdrawStatus = {
8 8
9 export default function() { 9 export default function() {
10 return { 10 return {
  11 + accountData: [],
11 filters: { 12 filters: {
12 createTime: { 13 createTime: {
13 label: '创建时间', 14 label: '创建时间',
1 <template> 1 <template>
2 - <div>  
3 - <layout-body>  
4 - <p slot="title">资金总览</p>  
5 - <layout-filter ref="filter" :model="filters" class="box-filter" :inline="true" :col="1">  
6 - <filter-item label="起止时间">  
7 - <Date-picker  
8 - v-model="filters.createTime.model"  
9 - type="datetimerange"  
10 - format="yyyy-MM-dd"  
11 - placeholder="选择日期和时间"  
12 - @on-change="createTimeChange"  
13 - ></Date-picker>  
14 - <div class="quick">  
15 - <a  
16 - href="javascript:;"  
17 - @click="  
18 - () => {  
19 - timeFlag(1);  
20 - }  
21 - "  
22 - >今天</a  
23 - >  
24 - <a  
25 - href="javascript:;"  
26 - @click="  
27 - () => {  
28 - timeFlag(2);  
29 - }  
30 - "  
31 - >昨天</a  
32 - >  
33 - <a  
34 - href="javascript:;"  
35 - @click="  
36 - () => {  
37 - timeFlag(3);  
38 - }  
39 - "  
40 - >最近7天</a  
41 - >  
42 - <a  
43 - href="javascript:;"  
44 - @click="  
45 - () => {  
46 - timeFlag(4);  
47 - }  
48 - "  
49 - >最近30天</a  
50 - > 2 + <div class="ivu-row">
  3 + <div class="ivu-card">
  4 + <div class="ivu-card-head">
  5 + <p slot="title" style="height: 30px; line-height: 30px; font-size: 20px;">资金总览</p>
  6 + </div>
  7 + <div class="ivu-card-body">
  8 + <div class="ivu-row">
  9 + <div class="ivu-flot-left">
  10 + <div class="ivu-row">
  11 + <div class="ivu-col ivu-font-b-16">我的余额</div>
  12 + </div>
  13 + <br />
  14 + <div class="ivu-row">
  15 + <div class="ivu-col ivu-col-span-12">可提现金额(元)</div>
  16 + <div class="ivu-col ivu-col-span-12 ivu-font-b-16">{{ accountData.availableAmount }}</div>
  17 + </div>
  18 + <br />
  19 + <div class="ivu-row">
  20 + <div class="ivu-col ivu-col-span-12">不可提现金额(元)</div>
  21 + <div class="ivu-col ivu-col-span-12 ivu-font-b-16">{{ accountData.unavailableAmount }}</div>
  22 + </div>
  23 + <br />
  24 + <div class="ivu-row">
  25 + <i-button type="primary" @click="goWithdrawApply">申请提现</i-button>
  26 + </div>
51 </div> 27 </div>
52 - </filter-item>  
53 - <filter-item>  
54 - <div class="select-container">  
55 - <Select v-model.trim="filters.status.model" :placeholder="filters.status.label" clearable>  
56 - <Option v-for="option in filters.status.options" :key="option.value" :value="option.value">{{  
57 - option.label  
58 - }}</Option>  
59 - </Select> 28 + <div class="ivu-flot-right">
  29 + <div class="ivu-row">
  30 + <div class="ivu-col ivu-font-b-16">账户信息</div>
  31 + </div>
  32 + <br />
  33 + <div class="ivu-row">
  34 + <div class="ivu-col">支付宝账号: {{ accountData.withdrawAccount }}</div>
  35 + </div>
  36 + <br />
  37 + <div class="ivu-row">
  38 + <div class="ivu-col">账号名称: {{ accountData.withdrawAccountName }}</div>
  39 + </div>
  40 + <br />
  41 + <div class="ivu-row">
  42 + <div class="ivu-col">联系方式: {{ accountData.customerTel }}</div>
  43 + </div>
  44 + <br />
60 </div> 45 </div>
61 - <div class="select-container">  
62 - <Input v-model.trim="filters.statementSn.model" :placeholder="filters.statementSn.label" />  
63 - </div>  
64 - <div class="select-container">  
65 - <Input v-model.trim="filters.targetAccount.model" :placeholder="filters.targetAccount.label" />  
66 - </div>  
67 - <div class="select-container">  
68 - <Button type="primary" @click="search">查询</Button>  
69 - <Button type="primary" @click="reset">全部</Button>  
70 - <!-- <Button type="primary" @click="exportData">导出</Button>-->  
71 - </div>  
72 - </filter-item>  
73 - </layout-filter>  
74 - <layout-list>  
75 - <Table border :columns="tableCols" :data="tableData"></Table>  
76 - <Page  
77 - :total="pageData.total"  
78 - :current="pageData.current"  
79 - :page-size="pageData.pageSize"  
80 - show-total  
81 - @on-change="pageChange"  
82 - ></Page>  
83 - </layout-list>  
84 - </layout-body> 46 + </div>
  47 + </div>
  48 + </div>
  49 + <div class="ivu-card">
  50 + <div class="ivu-card-head">
  51 + <p slot="title" style="height: 30px; line-height: 30px; font-size: 20px;">资金操作明细</p>
  52 + </div>
  53 + <div class="ivu-card-body">
  54 + <layout-filter ref="filter" :model="filters" class="box-filter" :inline="true" :col="1">
  55 + <filter-item label="起止时间">
  56 + <Date-picker
  57 + v-model="filters.createTime.model"
  58 + type="datetimerange"
  59 + format="yyyy-MM-dd"
  60 + placeholder="选择日期和时间"
  61 + @on-change="createTimeChange"
  62 + ></Date-picker>
  63 + <div class="quick">
  64 + <a
  65 + href="javascript:;"
  66 + @click="
  67 + () => {
  68 + timeFlag(1);
  69 + }
  70 + "
  71 + >今天</a
  72 + >
  73 + <a
  74 + href="javascript:;"
  75 + @click="
  76 + () => {
  77 + timeFlag(2);
  78 + }
  79 + "
  80 + >昨天</a
  81 + >
  82 + <a
  83 + href="javascript:;"
  84 + @click="
  85 + () => {
  86 + timeFlag(3);
  87 + }
  88 + "
  89 + >最近7天</a
  90 + >
  91 + <a
  92 + href="javascript:;"
  93 + @click="
  94 + () => {
  95 + timeFlag(4);
  96 + }
  97 + "
  98 + >最近30天</a
  99 + >
  100 + </div>
  101 + </filter-item>
  102 + <filter-item>
  103 + <div class="select-container">
  104 + <Select v-model.trim="filters.status.model" :placeholder="filters.status.label" clearable>
  105 + <Option v-for="option in filters.status.options" :key="option.value" :value="option.value">{{
  106 + option.label
  107 + }}</Option>
  108 + </Select>
  109 + </div>
  110 + <div class="select-container">
  111 + <Input v-model.trim="filters.statementSn.model" :placeholder="filters.statementSn.label" />
  112 + </div>
  113 + <div class="select-container">
  114 + <Input v-model.trim="filters.targetAccount.model" :placeholder="filters.targetAccount.label" />
  115 + </div>
  116 + <div class="select-container">
  117 + <Button type="primary" @click="search">查询</Button>
  118 + <Button type="primary" @click="reset">全部</Button>
  119 + <!-- <Button type="primary" @click="exportData">导出</Button>-->
  120 + </div>
  121 + </filter-item>
  122 + </layout-filter>
  123 + <layout-list>
  124 + <Table border :columns="tableCols" :data="tableData"></Table>
  125 + <Page
  126 + :total="pageData.total"
  127 + :current="pageData.current"
  128 + :page-size="pageData.pageSize"
  129 + show-total
  130 + @on-change="pageChange"
  131 + ></Page>
  132 + </layout-list>
  133 + </div>
  134 + </div>
85 </div> 135 </div>
86 </template> 136 </template>
87 <script> 137 <script>
@@ -98,6 +148,7 @@ export default { @@ -98,6 +148,7 @@ export default {
98 created() { 148 created() {
99 this.financeService = new FinanceService(); 149 this.financeService = new FinanceService();
100 this.search(); 150 this.search();
  151 + this.initAccount();
101 }, 152 },
102 methods: { 153 methods: {
103 filterValues() { 154 filterValues() {
@@ -179,6 +230,22 @@ export default { @@ -179,6 +230,22 @@ export default {
179 }, 230 },
180 }); 231 });
181 }, 232 },
  233 + initAccount() {
  234 + const params = {
  235 + token: this.$user.token,
  236 + timestamps: Math.round(new Date().getTime() / 1000),
  237 + };
  238 + this.financeService.shopWithdrawApplyInit(params).then(result => {
  239 + if (result.code === 200) {
  240 + this.accountData = result.data;
  241 + this.data = result.data;
  242 + this.data.withdrawAmount = result.data.withdrawAmount ? result.data.withdrawAmount : 0;
  243 + }
  244 + });
  245 + },
  246 + goWithdrawApply() {
  247 + this.$router.push({ name: 'finance.withdraw.withdrawapply' });
  248 + },
182 }, 249 },
183 }; 250 };
184 </script> 251 </script>
@@ -201,24 +268,6 @@ export default { @@ -201,24 +268,6 @@ export default {
201 margin-bottom: 10px; 268 margin-bottom: 10px;
202 } 269 }
203 270
204 -.box-title {  
205 - font-weight: 700;  
206 - color: #495060;  
207 - font-size: 16px;  
208 - line-height: 22px;  
209 - margin: 5px;  
210 -  
211 - &:before {  
212 - content: ' ';  
213 - display: inline-block;  
214 - width: 5px;  
215 - margin-right: 2px;  
216 - height: 22px;  
217 - vertical-align: top;  
218 - background-color: #999;  
219 - }  
220 -}  
221 -  
222 .box-item { 271 .box-item {
223 width: 90%; 272 width: 90%;
224 height: 50px; 273 height: 50px;
@@ -290,4 +339,25 @@ export default { @@ -290,4 +339,25 @@ export default {
290 } 339 }
291 } 340 }
292 } 341 }
  342 +
  343 +.ivu-flot-left {
  344 + width: 360px;
  345 + height: 220px;
  346 + float: left;
  347 + border: 1px solid #cccccc;
  348 + padding: 12px;
  349 +}
  350 +.ivu-flot-right {
  351 + width: 360px;
  352 + height: 220px;
  353 + float: left;
  354 + border: 1px solid #cccccc;
  355 + padding: 12px;
  356 + margin-left: 20px;
  357 +}
  358 +
  359 +.ivu-font-b-16 {
  360 + font-size: 16px;
  361 + font-weight: bold;
  362 +}
293 </style> 363 </style>