Authored by shuiling.wang@yoho.cn

对账单

@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 <select-brand v-model="filters.brandId.model"></select-brand> 17 <select-brand v-model="filters.brandId.model"></select-brand>
18 </filter-item> 18 </filter-item>
19 <filter-item :label="filters.status.label"> 19 <filter-item :label="filters.status.label">
20 - <Select v-model.trim="filters.status.model"> 20 + <Select v-model="filters.status.model">
21 <Option v-for="option in filters.status.options" 21 <Option v-for="option in filters.status.options"
22 :value="option.value" 22 :value="option.value"
23 :key="option.value">{{option.label}}</Option> 23 :key="option.value">{{option.label}}</Option>
@@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
25 </filter-item> 25 </filter-item>
26 <filter-item> 26 <filter-item>
27 <Button type="primary" @click="search">筛选</Button> 27 <Button type="primary" @click="search">筛选</Button>
  28 + <Button type="primary" @click="exportData">导出</Button>
28 <Button @click="reset">清空条件</Button> 29 <Button @click="reset">清空条件</Button>
29 </filter-item> 30 </filter-item>
30 </layout-filter> 31 </layout-filter>
@@ -43,56 +44,47 @@ import FinanceService from 'services/finance/finance-service'; @@ -43,56 +44,47 @@ import FinanceService from 'services/finance/finance-service';
43 44
44 export default { 45 export default {
45 data() { 46 data() {
46 - return list.call(this); 47 + return detail.call(this);
47 }, 48 },
48 created() { 49 created() {
49 this.FinanceService = new FinanceService(); 50 this.FinanceService = new FinanceService();
50 }, 51 },
51 computed: { 52 computed: {
52 - startTime() {  
53 - let createTime = this.filters.createTime.model;  
54 53
55 - if (_.isEmpty(createTime)) {  
56 - return 0;  
57 - } else {  
58 - return createTime[0] ? createTime[0].getTime() / 1000 : 0;  
59 - }  
60 - },  
61 - endTime() {  
62 - let createTime = this.filters.createTime.model;  
63 -  
64 - if (_.isEmpty(createTime)) {  
65 - return 0;  
66 - } else {  
67 - return createTime[1] ? createTime[1].getTime() / 1000 : 0;  
68 - }  
69 - }  
70 }, 54 },
71 methods: { 55 methods: {
72 search() { 56 search() {
73 // 在这里实现异步查询的方法,建议在service中做 57 // 在这里实现异步查询的方法,建议在service中做
74 let params = { 58 let params = {
75 - type: 1,  
76 balanceId: +this.filters.balanceId.model, 59 balanceId: +this.filters.balanceId.model,
77 brandId: this.filters.brandId.model, 60 brandId: this.filters.brandId.model,
  61 + orderCode: this.filters.orderCode.model,
78 status: this.filters.status.model, 62 status: this.filters.status.model,
79 - beginTime: this.startTime,  
80 - endTime: this.endTime, 63 + sku: this.filters.sku.model,
81 pageSize: this.pageData.pageSize, 64 pageSize: this.pageData.pageSize,
82 pageNo: this.pageData.pageNo 65 pageNo: this.pageData.pageNo
83 } 66 }
84 67
85 - this.FinanceService.balanceList(params).then(ret => { 68 + this.FinanceService.balanceDetail(params).then(ret => {
86 console.log(ret) 69 console.log(ret)
87 }); 70 });
88 }, 71 },
89 reset() { 72 reset() {
90 - this.$refs.filter.reset(); 73 + this.filters.balanceId.model = null;
  74 + this.filters.brandId.model = null;
  75 + this.filters.status.model = null;
  76 + this.filters.orderCode.model = null;
  77 + this.filters.sku.model = null;
  78 + this.pageData.pageNo = 1;
  79 + this.pageData.total = 0;
91 }, 80 },
92 pageChange(val) { 81 pageChange(val) {
93 this.pageData.current = val; 82 this.pageData.current = val;
94 this.search(); 83 this.search();
95 }, 84 },
  85 + exportData() {
  86 + console.log('导出');
  87 + },
96 onClickInfo() {}, 88 onClickInfo() {},
97 onClickStock() {} 89 onClickStock() {}
98 } 90 }
1 import Service from '../service'; 1 import Service from '../service';
2 2
  3 +let apiUrl = {
  4 + balanceList: '/erp/balanceList',
  5 + balanceDetail: '/erp/balanceDetail'
  6 +};
  7 +
3 class FinanceService extends Service { 8 class FinanceService extends Service {
4 getSupplier() { 9 getSupplier() {
5 return this.get('/platform'); 10 return this.get('/platform');
@@ -10,7 +15,12 @@ class FinanceService extends Service { @@ -10,7 +15,12 @@ class FinanceService extends Service {
10 }); 15 });
11 } 16 }
12 balanceList(params) { 17 balanceList(params) {
13 - return this.get('/erp/balanceList', { 18 + return this.get(apiUrl.balanceList, {
  19 + params
  20 + });
  21 + }
  22 + balanceDetail(params) {
  23 + return this.get(apiUrl.balanceDetail, {
14 params 24 params
15 }); 25 });
16 } 26 }
@@ -81,7 +81,8 @@ let domainApis = { @@ -81,7 +81,8 @@ let domainApis = {
81 getRemoteImageUrlBySku: '/product/getRemoteImageUrlBySku', 81 getRemoteImageUrlBySku: '/product/getRemoteImageUrlBySku',
82 importSeller: '/batch/importSeller', 82 importSeller: '/batch/importSeller',
83 downloadFile: '/exceltemplate/download/CreateProductForShops', 83 downloadFile: '/exceltemplate/download/CreateProductForShops',
84 - getSellType: '/SellerProductController/getSellType' 84 + getSellType: '/SellerProductController/getSellType',
  85 + balanceDetail: '/erp-shop-web/financeBill/balanceDetail'
85 }, 86 },
86 shop: { 87 shop: {
87 login: '/loginInter', 88 login: '/loginInter',