Authored by jiran.zhao

修改

@@ -23,129 +23,129 @@ @@ -23,129 +23,129 @@
23 </template> 23 </template>
24 24
25 <script> 25 <script>
26 - import moment from "moment";  
27 - import {ServiceList} from './store';  
28 - import FinanceService from 'services/finance/finance-service'; 26 +import moment from "moment";
  27 +import {ServiceList} from './store';
  28 +import FinanceService from 'services/finance/finance-service';
29 29
30 - export default {  
31 - data(){  
32 - return ServiceList.call(this); 30 +export default {
  31 + data(){
  32 + return ServiceList.call(this);
  33 + },
  34 + created() {
  35 + this.financeService = new FinanceService();
  36 + },
  37 + mounted() {
  38 + this.loadData();
  39 + },
  40 + watch: {
  41 + date() {
  42 + this.loadData();
33 }, 43 },
34 - created() {  
35 - this.financeService = new FinanceService(); 44 + day(newDay) {
  45 + let curDay = moment().format('YYYY-MM-DD');
  46 + if (newDay === this.beginTime || !newDay) {
  47 + return;
  48 + }
  49 + this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
36 }, 50 },
37 - mounted() {  
38 - this.loadData(); 51 + dateRange(newDate) {
  52 + this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
  53 + this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
  54 + this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
  55 + this.pageData.current = 1;
  56 + this.list();
39 }, 57 },
40 - watch: {  
41 - date() {  
42 - this.loadData();  
43 - },  
44 - day(newDay) {  
45 - let curDay = moment().format('YYYY-MM-DD');  
46 - if (newDay === this.beginTime || !newDay) {  
47 - return;  
48 - }  
49 - this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];  
50 - },  
51 - dateRange(newDate) {  
52 - this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');  
53 - this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');  
54 - this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;  
55 - this.pageData.current = 1;  
56 - this.list();  
57 - }, 58 + },
  59 + methods: {
  60 + loadData() {
  61 + this.list();
58 }, 62 },
59 - methods: {  
60 - loadData() {  
61 - this.list();  
62 - },  
63 - changeLimit(limit) {  
64 - if (limit > 1) {  
65 - this.dateRange = [this[`day${limit}`], this.today];  
66 - } else if (limit === 1) {  
67 - this.dateRange = [this.yesterday, this.today];  
68 - } else {  
69 - this.dateRange = [this.today, this.today];  
70 - }  
71 - this.pageData.current = 1;  
72 - },  
73 - pageChange() {  
74 - this.pageData.current = page;  
75 - this.list();  
76 - },  
77 - filtersParams() {  
78 - let params = {};  
79 - let fts = this.filters;  
80 - let withdrawStatus = fts.withdrawStatus.model,  
81 - statementSn = fts.statementSn.model === '' || fts.brand.model === null ?  
82 - null : fts.statementSn.model;  
83 - let pageNo = this.pageData.current;  
84 - let pageSize = this.pageData.pageSize; 63 + changeLimit(limit) {
  64 + if (limit > 1) {
  65 + this.dateRange = [this[`day${limit}`], this.today];
  66 + } else if (limit === 1) {
  67 + this.dateRange = [this.yesterday, this.today];
  68 + } else {
  69 + this.dateRange = [this.today, this.today];
  70 + }
  71 + this.pageData.current = 1;
  72 + },
  73 + pageChange() {
  74 + this.pageData.current = page;
  75 + this.list();
  76 + },
  77 + filtersParams() {
  78 + let params = {};
  79 + let fts = this.filters;
  80 + let withdrawStatus = fts.withdrawStatus.model,
  81 + statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
  82 + null : fts.statementSn.model;
  83 + let pageNo = this.pageData.current;
  84 + let pageSize = this.pageData.pageSize;
85 85
86 - if (this.filters.withdrawStatus.model) {  
87 - if (this.isNumber(this.filters.withdrawStatus.mode)) {  
88 - params.withdrawStatus = this.filters.withdrawStatus.model;  
89 - } 86 + if (this.filters.withdrawStatus.model) {
  87 + if (this.isNumber(this.filters.withdrawStatus.mode)) {
  88 + params.withdrawStatus = this.filters.withdrawStatus.model;
90 } 89 }
91 - if (this.filters.statementSn.model) {  
92 - if (this.isString(this.filters.statementSn.mode)) {  
93 - params.statementSn = this.filters.statementSn.model;  
94 - } 90 + }
  91 + if (this.filters.statementSn.model) {
  92 + if (this.isString(this.filters.statementSn.mode)) {
  93 + params.statementSn = this.filters.statementSn.model;
95 } 94 }
96 - params.pageSize = this.pageData.pageSize;  
97 - params.pageNo = this.pageData.current; 95 + }
  96 + params.pageSize = this.pageData.pageSize;
  97 + params.pageNo = this.pageData.current;
98 98
99 - return Promise.resolve({  
100 - params,  
101 - withdrawStatus,  
102 - statementSn,  
103 - pageNo,  
104 - pageSize  
105 - });  
106 - },  
107 - list() {  
108 - this.$Loading.start();  
109 - return this.filtersParams().then((params) => {  
110 - let filter = {  
111 - beginTime: this.beginDate,  
112 - endTime: this.endDate,  
113 - pageNo: params.pageNo,  
114 - };  
115 - if (this.withdrawStatus && this.withdrawStatus !== '-1') {  
116 - filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});  
117 - }  
118 - return this.FinanceService.shopWithdrawServiceList(filter);  
119 - }).then(result => {  
120 - if (!result.data) {  
121 - result.data = {  
122 - pageNo: 1,  
123 - pageSize: 1,  
124 - totalCount: 1,  
125 - totalPage: 1,  
126 - records: []  
127 - } 99 + return Promise.resolve({
  100 + params,
  101 + withdrawStatus,
  102 + statementSn,
  103 + pageNo,
  104 + pageSize
  105 + });
  106 + },
  107 + list() {
  108 + this.$Loading.start();
  109 + return this.filtersParams().then((params) => {
  110 + let filter = {
  111 + beginTime: this.beginDate,
  112 + endTime: this.endDate,
  113 + pageNo: params.pageNo,
  114 + };
  115 + if (this.withdrawStatus && this.withdrawStatus !== '-1') {
  116 + filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
  117 + }
  118 + return this.FinanceService.shopWithdrawServiceList(filter);
  119 + }).then(result => {
  120 + if (!result.data) {
  121 + result.data = {
  122 + pageNo: 1,
  123 + pageSize: 1,
  124 + totalCount: 1,
  125 + totalPage: 1,
  126 + records: []
128 } 127 }
129 - this.pageData.total = result.data.totalCount;  
130 - this.pageData.current = result.data.pageNo;  
131 - this.tableData = result.data.records;  
132 - this.$Loading.finish();  
133 - }).catch(() => {  
134 - this.$Loading.finish();  
135 - });  
136 - },  
137 - reset() {  
138 - this.filters.withdrawStatus.model = null;  
139 - this.filters.statementSn.model = null;  
140 - this.filters.timeFlag.model = null;  
141 - this.filters.beginTime.model = null;  
142 - this.filters.endTime.model = null;  
143 - this.pageData.pageNo = 1;  
144 - this.pageData.total = 0;  
145 - this.list();  
146 - } 128 + }
  129 + this.pageData.total = result.data.totalCount;
  130 + this.pageData.current = result.data.pageNo;
  131 + this.tableData = result.data.records;
  132 + this.$Loading.finish();
  133 + }).catch(() => {
  134 + this.$Loading.finish();
  135 + });
  136 + },
  137 + reset() {
  138 + this.filters.withdrawStatus.model = null;
  139 + this.filters.statementSn.model = null;
  140 + this.filters.timeFlag.model = null;
  141 + this.filters.beginTime.model = null;
  142 + this.filters.endTime.model = null;
  143 + this.pageData.pageNo = 1;
  144 + this.pageData.total = 0;
  145 + this.list();
147 } 146 }
148 - }; 147 + }
  148 +};
149 </script> 149 </script>
150 150
151 <style lang="scss"> 151 <style lang="scss">
@@ -21,19 +21,19 @@ export default function() { @@ -21,19 +21,19 @@ export default function() {
21 timeLimit: true, 21 timeLimit: true,
22 tableCols: [ 22 tableCols: [
23 { 23 {
24 - title: 'ID',  
25 - key: 'id', 24 + title: '提现时间',
  25 + key: 'withdrawTime',
26 width: 60, 26 width: 60,
27 align: 'center' 27 align: 'center'
28 }, 28 },
29 { 29 {
30 - title: '申请时间',  
31 - key: 'createTime', 30 + title: '账务ID',
  31 + key: 'id',
32 width: 90, 32 width: 90,
33 align: 'center' 33 align: 'center'
34 }, { 34 }, {
35 - title: '结算类型',  
36 - key: 'clearingType', 35 + title: '商家名称',
  36 + key: 'productName',
37 width: 90, 37 width: 90,
38 align: 'center' 38 align: 'center'
39 }, { 39 }, {
@@ -42,18 +42,41 @@ export default function() { @@ -42,18 +42,41 @@ export default function() {
42 width: 90, 42 width: 90,
43 align: 'center' 43 align: 'center'
44 }, { 44 }, {
45 - title: '申请金额(元)', 45 + title: '订单号',
  46 + key: 'orderCode',
  47 + width: 90,
  48 + align: 'center'
  49 + }, {
  50 + title: 'sku',
  51 + key: 'productSku',
  52 + width: 90,
  53 + align: 'center'
  54 + }, {
  55 + title: '商品名称',
  56 + key: 'productName',
  57 + width: 90,
  58 + align: 'center'
  59 + }, {
  60 + title: '业务单据号',
  61 + key: 'targetAccount',
  62 + width: 90,
  63 + align: 'center'
  64 + }, {
  65 + title: '账务类型',
  66 + key: 'clearingType',
  67 + width: 90,
  68 + align: 'center'
  69 + }, {
  70 + title: '子账务类型',
46 key: 'applyAmount', 71 key: 'applyAmount',
47 width: 90, 72 width: 90,
48 align: 'center' 73 align: 'center'
49 }, { 74 }, {
50 - title: '服务费(元)', 75 + title: '服务费金额(元)',
51 key: 'serviceAmount', 76 key: 'serviceAmount',
52 width: 90, 77 width: 90,
53 align: 'center' 78 align: 'center'
54 }, { 79 }, {
55 - title: '成功金额(元)',  
56 - }, {  
57 title: '提现状态', 80 title: '提现状态',
58 key: 'status', 81 key: 'status',
59 align: 'center', 82 align: 'center',
@@ -62,40 +85,14 @@ export default function() { @@ -62,40 +85,14 @@ export default function() {
62 const as = row.status; 85 const as = row.status;
63 const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as]; 86 const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
64 ow.lineIndex = params.index; 87 ow.lineIndex = params.index;
65 - return (  
66 - <p class={{'high-light': as === 2}}>{asText}</p>  
67 - ); 88 + return (<p class={{'high-light': as === 2}}>{asText}</p>);
68 }, 89 },
69 className: 'status-column' 90 className: 'status-column'
70 }, { 91 }, {
71 - title: '业务单据号',  
72 - key: 'statementSn',  
73 - width: 90,  
74 - align: 'center'  
75 - }, {  
76 - title: '说明',  
77 - }, {  
78 - title: '操作人',  
79 - key: 'applyPid', 92 + title: '入账时间',
  93 + key: 'createTime',
80 width: 90, 94 width: 90,
81 align: 'center' 95 align: 'center'
82 - }, {  
83 - title: '操作',  
84 - key: 'action',  
85 - width: 180,  
86 - align: 'center',  
87 - render: (h, params) => {  
88 - const row = params.row;  
89 - return (  
90 - <div><div class="cell-action-row">  
91 - <i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>提现明细</i-button>  
92 - </div>  
93 - <div class="cell-action-row">  
94 - <i-button type="primary" size="small" onClick={() => this.getInfoById(row.id)}>结算明细</i-button>  
95 - </div></div>  
96 - );  
97 - },  
98 - className: 'action-column'  
99 } 96 }
100 ], 97 ],
101 tableData: [], 98 tableData: [],
@@ -50,148 +50,148 @@ @@ -50,148 +50,148 @@
50 </template> 50 </template>
51 51
52 <script> 52 <script>
53 - import moment from "moment";  
54 - import {Withdraw} from './store';  
55 - import FinanceService from 'services/finance/finance-service';  
56 - import _ from "lodash"; 53 +import moment from "moment";
  54 +import {Withdraw} from './store';
  55 +import FinanceService from 'services/finance/finance-service';
  56 +import _ from "lodash";
57 57
58 - export default {  
59 - data() {  
60 - return Withdraw.call(this); 58 +export default {
  59 + data() {
  60 + return Withdraw.call(this);
  61 + },
  62 + created() {
  63 + this.financeService = new FinanceService();
  64 + },
  65 + mounted() {
  66 + this.loadData();
  67 + },
  68 + watch: {
  69 + date() {
  70 + this.loadData();
61 }, 71 },
62 - created() {  
63 - this.financeService = new FinanceService(); 72 + day(newDay) {
  73 + let curDay = moment().format('YYYY-MM-DD');
  74 + if (newDay === this.beginTime || !newDay) {
  75 + return;
  76 + }
  77 + this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
64 }, 78 },
65 - mounted() {  
66 - this.loadData(); 79 + dateRange(newDate) {
  80 + this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
  81 + this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
  82 + this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
  83 + this.pageData.current = 1;
  84 + this.list();
67 }, 85 },
68 - watch: {  
69 - date() {  
70 - this.loadData();  
71 - },  
72 - day(newDay) {  
73 - let curDay = moment().format('YYYY-MM-DD');  
74 - if (newDay === this.beginTime || !newDay) {  
75 - return;  
76 - }  
77 - this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];  
78 - },  
79 - dateRange(newDate) {  
80 - this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');  
81 - this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');  
82 - this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;  
83 - this.pageData.current = 1;  
84 - this.list();  
85 - }, 86 + },
  87 + methods: {
  88 + loadData() {
  89 + this.list();
86 }, 90 },
87 - methods: {  
88 - loadData() {  
89 - this.list();  
90 - },  
91 - changeLimit(limit) {  
92 - if(limit > 1) {  
93 - this.dateRange = [this[`day${limit}`], this.today];  
94 - }else if(limit===1){  
95 - this.dateRange = [this.yesterday, this.today];  
96 - }else{  
97 - this.dateRange = [this.today, this.today];  
98 - }  
99 - this.pageData.current = 1;  
100 - },  
101 - pageChange() {  
102 - this.pageData.current = page;  
103 - this.list();  
104 - },  
105 - filtersParams() {  
106 - let params = {};  
107 - let fts = this.filters;  
108 - let withdrawStatus = fts.withdrawStatus.model,  
109 - statementSn = fts.statementSn.model === '' || fts.brand.model === null ?  
110 - null : fts.statementSn.model;  
111 - let pageNo = this.pageData.current;  
112 - let pageSize = this.pageData.pageSize; 91 + changeLimit(limit) {
  92 + if(limit > 1) {
  93 + this.dateRange = [this[`day${limit}`], this.today];
  94 + }else if(limit===1){
  95 + this.dateRange = [this.yesterday, this.today];
  96 + }else{
  97 + this.dateRange = [this.today, this.today];
  98 + }
  99 + this.pageData.current = 1;
  100 + },
  101 + pageChange() {
  102 + this.pageData.current = page;
  103 + this.list();
  104 + },
  105 + filtersParams() {
  106 + let params = {};
  107 + let fts = this.filters;
  108 + let withdrawStatus = fts.withdrawStatus.model,
  109 + statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
  110 + null : fts.statementSn.model;
  111 + let pageNo = this.pageData.current;
  112 + let pageSize = this.pageData.pageSize;
113 113
114 - if(this.filters.withdrawStatus.model){  
115 - if (this.isNumber(this.filters.withdrawStatus.mode)) {  
116 - params.withdrawStatus = this.filters.withdrawStatus.model;  
117 - } 114 + if(this.filters.withdrawStatus.model){
  115 + if (this.isNumber(this.filters.withdrawStatus.mode)) {
  116 + params.withdrawStatus = this.filters.withdrawStatus.model;
118 } 117 }
119 - if(this.filters.statementSn.model){  
120 - if (this.isString(this.filters.statementSn.mode)) {  
121 - params.statementSn = this.filters.statementSn.model;  
122 - } 118 + }
  119 + if(this.filters.statementSn.model){
  120 + if (this.isString(this.filters.statementSn.mode)) {
  121 + params.statementSn = this.filters.statementSn.model;
123 } 122 }
124 - params.pageSize = this.pageData.pageSize;  
125 - params.pageNo = this.pageData.current; 123 + }
  124 + params.pageSize = this.pageData.pageSize;
  125 + params.pageNo = this.pageData.current;
126 126
127 - return Promise.resolve({  
128 - params,  
129 - withdrawStatus,  
130 - statementSn,  
131 - pageNo,  
132 - pageSize  
133 - });  
134 - },  
135 - list() {  
136 - this.$Loading.start();  
137 - return this.filtersParams().then((params) => {  
138 - let filter = {  
139 - beginTime: this.beginDate,  
140 - endTime: this.endDate,  
141 - pageNo: params.pageNo,  
142 - };  
143 - if (this.withdrawStatus && this.withdrawStatus !== '-1') {  
144 - filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});  
145 - }  
146 - return this.FinanceService.shopWithdrawList(filter);  
147 - }).then(result => {  
148 - if (!result.data) {  
149 - result.data = {  
150 - pageNo: 1,  
151 - pageSize: 1,  
152 - totalCount: 1,  
153 - totalPage: 1,  
154 - records: []  
155 - } 127 + return Promise.resolve({
  128 + params,
  129 + withdrawStatus,
  130 + statementSn,
  131 + pageNo,
  132 + pageSize
  133 + });
  134 + },
  135 + list() {
  136 + this.$Loading.start();
  137 + return this.filtersParams().then((params) => {
  138 + let filter = {
  139 + beginTime: this.beginDate,
  140 + endTime: this.endDate,
  141 + pageNo: params.pageNo,
  142 + };
  143 + if (this.withdrawStatus && this.withdrawStatus !== '-1') {
  144 + filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
  145 + }
  146 + return this.FinanceService.shopWithdrawList(filter);
  147 + }).then(result => {
  148 + if (!result.data) {
  149 + result.data = {
  150 + pageNo: 1,
  151 + pageSize: 1,
  152 + totalCount: 1,
  153 + totalPage: 1,
  154 + records: []
156 } 155 }
157 - this.pageData.total = result.data.totalCount;  
158 - this.pageData.current = result.data.pageNo;  
159 - this.tableData = result.data.records;  
160 - this.$Loading.finish();  
161 - }).catch(() => {  
162 - this.$Loading.finish();  
163 - });  
164 - },  
165 - reset() {  
166 - this.filters.withdrawStatus.model = null;  
167 - this.filters.statementSn.model = null;  
168 - this.filters.timeFlag.model = null;  
169 - this.filters.beginTime.model = null;  
170 - this.filters.endTime.model = null;  
171 - this.pageData.pageNo = 1;  
172 - this.pageData.total = 0;  
173 - this.list();  
174 - },  
175 - exportFile() {  
176 - let param = {};  
177 -  
178 - param.beginTime = this.beginTime;  
179 - param.endTime = this.endTime;  
180 - // param.timeFlag = '1,2,3,4';  
181 - if (this.withdrawStatus && this.withdrawStatus !== '0') {  
182 - param.withdrawStatus = this.withdrawStatus;  
183 } 156 }
  157 + this.pageData.total = result.data.totalCount;
  158 + this.pageData.current = result.data.pageNo;
  159 + this.tableData = result.data.records;
  160 + this.$Loading.finish();
  161 + }).catch(() => {
  162 + this.$Loading.finish();
  163 + });
  164 + },
  165 + reset() {
  166 + this.filters.withdrawStatus.model = null;
  167 + this.filters.statementSn.model = null;
  168 + this.filters.timeFlag.model = null;
  169 + this.filters.beginTime.model = null;
  170 + this.filters.endTime.model = null;
  171 + this.pageData.pageNo = 1;
  172 + this.pageData.total = 0;
  173 + this.list();
  174 + },
  175 + exportFile() {
  176 + let param = {};
184 177
185 - const href = '/Api/erp/exportShopWithdrawList?queryConf=' +  
186 - JSON.stringify(param); 178 + param.beginTime = this.beginTime;
  179 + param.endTime = this.endTime;
  180 + // param.timeFlag = '1,2,3,4';
  181 + if (this.withdrawStatus && this.withdrawStatus !== '0') {
  182 + param.withdrawStatus = this.withdrawStatus;
  183 + }
187 184
188 - window.open(href, '_blank');  
189 - },  
190 - getDetailById() { 185 + const href = '/Api/erp/exportShopWithdrawList?queryConf=' +
  186 + JSON.stringify(param);
  187 +
  188 + window.open(href, '_blank');
  189 + },
  190 + getDetailById() {
191 191
192 - }  
193 } 192 }
194 - }; 193 + }
  194 +};
195 </script> 195 </script>
196 196
197 <style lang="scss"> 197 <style lang="scss">