...
|
...
|
@@ -17,7 +17,7 @@ |
|
|
<select-brand v-model="filters.brandId.model"></select-brand>
|
|
|
</filter-item>
|
|
|
<filter-item :label="filters.status.label">
|
|
|
<Select v-model.trim="filters.status.model">
|
|
|
<Select v-model="filters.status.model">
|
|
|
<Option v-for="option in filters.status.options"
|
|
|
:value="option.value"
|
|
|
:key="option.value">{{option.label}}</Option>
|
...
|
...
|
@@ -25,6 +25,7 @@ |
|
|
</filter-item>
|
|
|
<filter-item>
|
|
|
<Button type="primary" @click="search">筛选</Button>
|
|
|
<Button type="primary" @click="exportData">导出</Button>
|
|
|
<Button @click="reset">清空条件</Button>
|
|
|
</filter-item>
|
|
|
</layout-filter>
|
...
|
...
|
@@ -43,56 +44,47 @@ import FinanceService from 'services/finance/finance-service'; |
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return list.call(this);
|
|
|
return detail.call(this);
|
|
|
},
|
|
|
created() {
|
|
|
this.FinanceService = new FinanceService();
|
|
|
},
|
|
|
computed: {
|
|
|
startTime() {
|
|
|
let createTime = this.filters.createTime.model;
|
|
|
|
|
|
if (_.isEmpty(createTime)) {
|
|
|
return 0;
|
|
|
} else {
|
|
|
return createTime[0] ? createTime[0].getTime() / 1000 : 0;
|
|
|
}
|
|
|
},
|
|
|
endTime() {
|
|
|
let createTime = this.filters.createTime.model;
|
|
|
|
|
|
if (_.isEmpty(createTime)) {
|
|
|
return 0;
|
|
|
} else {
|
|
|
return createTime[1] ? createTime[1].getTime() / 1000 : 0;
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
search() {
|
|
|
// 在这里实现异步查询的方法,建议在service中做
|
|
|
let params = {
|
|
|
type: 1,
|
|
|
balanceId: +this.filters.balanceId.model,
|
|
|
brandId: this.filters.brandId.model,
|
|
|
orderCode: this.filters.orderCode.model,
|
|
|
status: this.filters.status.model,
|
|
|
beginTime: this.startTime,
|
|
|
endTime: this.endTime,
|
|
|
sku: this.filters.sku.model,
|
|
|
pageSize: this.pageData.pageSize,
|
|
|
pageNo: this.pageData.pageNo
|
|
|
}
|
|
|
|
|
|
this.FinanceService.balanceList(params).then(ret => {
|
|
|
this.FinanceService.balanceDetail(params).then(ret => {
|
|
|
console.log(ret)
|
|
|
});
|
|
|
},
|
|
|
reset() {
|
|
|
this.$refs.filter.reset();
|
|
|
this.filters.balanceId.model = null;
|
|
|
this.filters.brandId.model = null;
|
|
|
this.filters.status.model = null;
|
|
|
this.filters.orderCode.model = null;
|
|
|
this.filters.sku.model = null;
|
|
|
this.pageData.pageNo = 1;
|
|
|
this.pageData.total = 0;
|
|
|
},
|
|
|
pageChange(val) {
|
|
|
this.pageData.current = val;
|
|
|
this.search();
|
|
|
},
|
|
|
exportData() {
|
|
|
console.log('导出');
|
|
|
},
|
|
|
onClickInfo() {},
|
|
|
onClickStock() {}
|
|
|
}
|
...
|
...
|
|