|
|
<template>
|
|
|
<layout-body>
|
|
|
<layout-filter ref="filter" :model="query">
|
|
|
<filter-item label="SKN编码">
|
|
|
<Input v-model.trim="query.sknCode" :maxlength="9"></Input>
|
|
|
<layout-filter>
|
|
|
<filter-item :label="filters.balanceId.label">
|
|
|
<Input v-model.trim="filters.balanceId.model"
|
|
|
:placeholder="filters.balanceId.holder"></Input>
|
|
|
</filter-item>
|
|
|
<filter-item label="商家编码">
|
|
|
<Input v-model.trim="query.prodCode"></Input>
|
|
|
<filter-item :label="filters.brandId.label">
|
|
|
<select-brand v-model="filters.brandId.model"></select-brand>
|
|
|
</filter-item>
|
|
|
<filter-item label="商品名称">
|
|
|
<Input v-model.trim="query.prodName"></Input>
|
|
|
</filter-item>
|
|
|
<filter-item label="商品条码">
|
|
|
<Input v-model.trim="query.prodBarCode"></Input>
|
|
|
<filter-item :label="filters.createTime.label">
|
|
|
<Date-picker v-model="filters.createTime.model"
|
|
|
type="datetimerange" format="yyyy-MM-dd" placeholder="选择日期和时间">
|
|
|
</Date-picker>
|
|
|
</filter-item>
|
|
|
<filter-item>
|
|
|
<Button type="primary" @click="search">筛选</Button>
|
...
|
...
|
@@ -21,79 +21,91 @@ |
|
|
<layout-list>
|
|
|
<Demo></Demo>
|
|
|
<Table border :columns="tableCols" :data="tableData"></Table>
|
|
|
<Page :total="pageData.total" :current="pageData.current"
|
|
|
<Page :total="pageData.total" :current="pageData.pageNo"
|
|
|
@on-change="pageChange" :page-size="20" show-total></Page>
|
|
|
</layout-list>
|
|
|
</layout-body>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {Demo} from './components';
|
|
|
import list from './store/list';
|
|
|
import FinanceService from 'services/finance/finance-service';
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
query: {
|
|
|
sknCode: '',
|
|
|
prodCode: '',
|
|
|
prodName: '',
|
|
|
prodBarCode: '',
|
|
|
category: [],
|
|
|
brand: 0,
|
|
|
saleStatus: 0,
|
|
|
stockStatus: 0
|
|
|
},
|
|
|
pageData: {
|
|
|
total: 0,
|
|
|
current: 1,
|
|
|
},
|
|
|
tableData: [{
|
|
|
col1: '1',
|
|
|
col2: '2'
|
|
|
}, {
|
|
|
col1: '3',
|
|
|
col2: '4'
|
|
|
}, {
|
|
|
col1: '5',
|
|
|
col2: '6'
|
|
|
}],
|
|
|
tableCols: [{
|
|
|
title: '列1',
|
|
|
key: 'col1'
|
|
|
}, {
|
|
|
title: '列2',
|
|
|
key: 'col2'
|
|
|
}, {
|
|
|
title: '操作',
|
|
|
render: (h, params) => {
|
|
|
return (
|
|
|
<action-group>
|
|
|
<i-button type="primary" size="small" onClick={() => this.edit(params.row)}>编辑</i-button>
|
|
|
<i-button type="error" size="small" onClick={() => this.del(params.row)}>删除</i-button>
|
|
|
</action-group>
|
|
|
);
|
|
|
}
|
|
|
}]
|
|
|
};
|
|
|
return list.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 = Object.assin(this.query, this.pageData);
|
|
|
let params = {
|
|
|
type: 2,
|
|
|
balanceId: +this.filters.balanceId.model,
|
|
|
brandId: this.filters.brandId.model,
|
|
|
status: this.filters.status.model,
|
|
|
beginTime: this.startTime,
|
|
|
endTime: this.endTime,
|
|
|
pageSize: this.pageData.pageSize,
|
|
|
pageNo: this.pageData.pageNo
|
|
|
};
|
|
|
|
|
|
console.log(params);
|
|
|
this.FinanceService.settlementList(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.createTime.model = null;
|
|
|
this.pageData.pageNo = 1;
|
|
|
this.pageData.total = 0;
|
|
|
},
|
|
|
pageChange() {
|
|
|
pageChange(val) {
|
|
|
this.pageData.current = val;
|
|
|
this.search();
|
|
|
},
|
|
|
edit() {},
|
|
|
del() {}
|
|
|
},
|
|
|
components: {Demo}
|
|
|
onClickInfo(params) {
|
|
|
this.$router.push({
|
|
|
name: 'finance.payment.detail',
|
|
|
params: {},
|
|
|
query: {
|
|
|
balanceId: params.row.balanceId,
|
|
|
status: params.row.statusDesc,
|
|
|
brandName: params.row.brandName
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
onClickStock() {}
|
|
|
}
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
.ivu-date-picker .ivu-select-dropdown {
|
|
|
left: -284px !important;
|
|
|
}
|
|
|
</style> |
...
|
...
|
|