...
|
...
|
@@ -17,7 +17,7 @@ |
|
|
</filter-item>
|
|
|
<filter-item :label="filters.createTime.label">
|
|
|
<Date-picker v-model="filters.createTime.model"
|
|
|
type="datetimerange" format="yyyy-MM-dd" placeholder="选择日期和时间">
|
|
|
type="datetimerange" format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期和时间">
|
|
|
</Date-picker>
|
|
|
</filter-item>
|
|
|
<filter-item>
|
...
|
...
|
@@ -26,6 +26,7 @@ |
|
|
</filter-item>
|
|
|
</layout-filter>
|
|
|
<layout-list>
|
|
|
<Button type="warning" @click="exportData" class="table-btn">导出</Button>
|
|
|
<Table border :columns="tableCols" :data="tableData"></Table>
|
|
|
<Page :total="pageData.total" :current="pageData.pageNo"
|
|
|
@on-change="pageChange" :page-size="20" show-total></Page>
|
...
|
...
|
@@ -35,15 +36,17 @@ |
|
|
|
|
|
<script>
|
|
|
import list from './store/list';
|
|
|
import filter from './store/filter';
|
|
|
import FinanceService from 'services/finance/finance-service';
|
|
|
import _ from 'lodash';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return list.call(this);
|
|
|
return _.assign(list.call(this), filter);
|
|
|
},
|
|
|
created() {
|
|
|
this.FinanceService = new FinanceService();
|
|
|
this.search();
|
|
|
},
|
|
|
computed: {
|
|
|
startTime() {
|
...
|
...
|
@@ -66,13 +69,11 @@ export default { |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
search() {
|
|
|
// 在这里实现异步查询的方法,建议在service中做
|
|
|
filterValues() {
|
|
|
let params = {
|
|
|
type: 1,
|
|
|
supplierId: 128,
|
|
|
balanceId: +this.filters.balanceId.model,
|
|
|
brandId: this.filters.brandId.model,
|
|
|
brandId: +this.filters.brandId.model,
|
|
|
status: this.filters.status.model,
|
|
|
beginTime: this.startTime,
|
|
|
endTime: this.endTime,
|
...
|
...
|
@@ -80,12 +81,13 @@ export default { |
|
|
pageNo: this.pageData.pageNo
|
|
|
};
|
|
|
|
|
|
params = _.pickBy(params, val => val);
|
|
|
|
|
|
this.FinanceService.balanceList(params).then(ret => {
|
|
|
return _.pickBy(params, val => val);
|
|
|
},
|
|
|
search() {
|
|
|
this.FinanceService.balanceList(this.filterValues()).then(ret => {
|
|
|
this.tableData = _.get(ret, 'data.records', []);
|
|
|
this.pageData.total = ret.data.pageNo;
|
|
|
this.pageData.pageNo = ret.data.pageNo;
|
|
|
this.pageData.total = _.get(ret, 'data.totalCount', 0);
|
|
|
this.pageData.pageNo = _.get(ret, 'data.pageNo', 1);
|
|
|
});
|
|
|
},
|
|
|
reset() {
|
...
|
...
|
@@ -95,6 +97,8 @@ export default { |
|
|
this.filters.createTime.model = null;
|
|
|
this.pageData.pageNo = 1;
|
|
|
this.pageData.total = 0;
|
|
|
|
|
|
this.search();
|
|
|
},
|
|
|
pageChange(val) {
|
|
|
this.pageData.pageNo = val;
|
...
|
...
|
@@ -102,24 +106,35 @@ export default { |
|
|
},
|
|
|
onClickInfo(params) {
|
|
|
this.$router.push({
|
|
|
name: 'finance.clearing.detail',
|
|
|
params: {},
|
|
|
query: {
|
|
|
balanceId: params.row.balanceId,
|
|
|
status: {未结算: 1, 已结算: 2}[params.row.statusDesc],
|
|
|
brandId: params.row.brandId
|
|
|
}
|
|
|
name: 'finance.clearing.detail'
|
|
|
});
|
|
|
},
|
|
|
onClickStock(params) {
|
|
|
let opt = _.pickBy({
|
|
|
brandId: params.row.brandId,
|
|
|
begin: this.startTime,
|
|
|
end: this.endTime
|
|
|
}, val => val);
|
|
|
|
|
|
this.$router.push({
|
|
|
name: 'finance.stock',
|
|
|
name: 'finance.clearing.stock',
|
|
|
params: {},
|
|
|
query: {
|
|
|
brandId: params.row.brandId,
|
|
|
shopId
|
|
|
}
|
|
|
query: opt
|
|
|
});
|
|
|
},
|
|
|
exportData() {
|
|
|
let params = {};
|
|
|
let temp = [];
|
|
|
|
|
|
_.assign(params, this.filterValues());
|
|
|
|
|
|
_.each(params, (val, key) => {
|
|
|
temp.push(`${key}=${val}`);
|
|
|
});
|
|
|
|
|
|
const href = `/Api/erp/exportBalanceList?${temp.join('&')}`;
|
|
|
|
|
|
window.open(href, '_blank');
|
|
|
}
|
|
|
}
|
|
|
};
|
...
|
...
|
@@ -129,4 +144,8 @@ export default { |
|
|
.ivu-date-picker .ivu-select-dropdown {
|
|
|
left: -284px !important;
|
|
|
}
|
|
|
|
|
|
.table-btn {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|