...
|
...
|
@@ -52,6 +52,9 @@ |
|
|
</filter-item>
|
|
|
<filter-item>
|
|
|
<div class="select-container">
|
|
|
<Input v-model.trim="filters.orderCode.model" :placeholder="filters.orderCode.label" />
|
|
|
</div>
|
|
|
<div class="select-container">
|
|
|
<Input v-model.trim="filters.productSku.model" :placeholder="filters.productSku.label" />
|
|
|
</div>
|
|
|
<div class="select-container">
|
...
|
...
|
@@ -61,35 +64,16 @@ |
|
|
}}</Option>
|
|
|
</Select>
|
|
|
</div>
|
|
|
<!-- <div class="select-container">-->
|
|
|
<!-- <Input v-model.trim="filters.targetAccount.model" :placeholder="filters.targetAccount.label" />-->
|
|
|
<!-- </div>-->
|
|
|
<!-- <div class="select-container">-->
|
|
|
<!-- <Select v-model.trim="filters.clearingType.model" :placeholder="filters.clearingType.label">-->
|
|
|
<!-- <Option v-for="option in filters.clearingType.options" :key="option.value" :value="option.value">{{-->
|
|
|
<!-- option.label-->
|
|
|
<!-- }}</Option>-->
|
|
|
<!-- </Select>-->
|
|
|
<!-- </div>-->
|
|
|
<!-- <div class="select-container">-->
|
|
|
<!-- <Select v-model.trim="filters.subClearingType.model" :placeholder="filters.subClearingType.label">-->
|
|
|
<!-- <Option v-for="option in filters.subClearingType.options" :key="option.value" :value="option.value">{{-->
|
|
|
<!-- option.label-->
|
|
|
<!-- }}</Option>-->
|
|
|
<!-- </Select>-->
|
|
|
<!-- </div>-->
|
|
|
<div class="select-container">
|
|
|
<Input v-model.trim="filters.orderCode.model" :placeholder="filters.orderCode.label" />
|
|
|
</div>
|
|
|
<div class="select-container">
|
|
|
<Button type="primary" @click="search">查询</Button>
|
|
|
<Button type="primary" @click="reset">全部</Button>
|
|
|
<!-- <Button>导出</Button>-->
|
|
|
<Button type="warning" @click="exportList">导出</Button>
|
|
|
</div>
|
|
|
</filter-item>
|
|
|
</layout-filter>
|
|
|
<layout-list>
|
|
|
<Table border :columns="tableCols" :data="tableData"></Table>
|
|
|
<Table border :columns="summaryColumn" :data="summaryInfo" :show-header="false"></Table>
|
|
|
<Page
|
|
|
:total="pageData.total"
|
|
|
:current="pageData.current"
|
...
|
...
|
@@ -107,7 +91,8 @@ import _ from 'lodash'; |
|
|
import moment from 'moment';
|
|
|
import { ServiceList } from './store';
|
|
|
import FinanceService from 'services/finance/finance-service';
|
|
|
|
|
|
import baseExportApi from 'util/excel';
|
|
|
import qs from 'querystringify';
|
|
|
export default {
|
|
|
data() {
|
|
|
return ServiceList.call(this);
|
...
|
...
|
@@ -117,54 +102,48 @@ export default { |
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
//组织当前的搜索条件
|
|
|
filterValues() {
|
|
|
const values = {
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
};
|
|
|
const fields = this.filters;
|
|
|
const keysMap = {
|
|
|
beginTime: 'beginTime',
|
|
|
endTime: 'endTime',
|
|
|
timeFlag: 'timeFlag',
|
|
|
status: 'status',
|
|
|
orderCode: 'orderCode',
|
|
|
productSku: 'productSku',
|
|
|
targetAccount: 'targetAccount',
|
|
|
clearingType: 'clearingType',
|
|
|
subClearingType: 'subClearingType',
|
|
|
// statementSn: 'statementSn',
|
|
|
};
|
|
|
|
|
|
if (this.enableFilter) {
|
|
|
_.each(keysMap, (val, key) => {
|
|
|
values[key] = fields[val].model;
|
|
|
});
|
|
|
}
|
|
|
return values;
|
|
|
const _this = this;
|
|
|
_.each(this.filters, (value, key) => {
|
|
|
_this.currentSearchParams[key] = value.model;
|
|
|
});
|
|
|
const { current, pageSize } = this.pageData;
|
|
|
this.currentSearchParams.pageNo = current;
|
|
|
this.currentSearchParams.pageSize = pageSize;
|
|
|
},
|
|
|
//重置筛选条件
|
|
|
resetFilter() {
|
|
|
//重置筛选框中的数据
|
|
|
_.each(this.filters, value => {
|
|
|
if (value.hasOwnProperty('model')) {
|
|
|
value.model = '';
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
//点击搜索按钮动作
|
|
|
search() {
|
|
|
let params = {};
|
|
|
this.enableFilter = true;
|
|
|
params = this.filterValues();
|
|
|
this.list(params);
|
|
|
this.filters.timeFlag.model = '';
|
|
|
this.pageData.current = 1;
|
|
|
this.filterValues();
|
|
|
this.list();
|
|
|
},
|
|
|
//点击全部操作
|
|
|
reset() {
|
|
|
let params = {};
|
|
|
this.enableFilter = false;
|
|
|
params = this.filterValues();
|
|
|
this.list(params);
|
|
|
this.pageData.current = 1;
|
|
|
this.resetFilter();
|
|
|
this.filterValues();
|
|
|
this.list();
|
|
|
},
|
|
|
//点击快速查询操作
|
|
|
timeFlag(flag) {
|
|
|
let params = {};
|
|
|
this.enableFilter = false;
|
|
|
params = this.filterValues();
|
|
|
params.timeFlag = flag;
|
|
|
this.list(params);
|
|
|
this.resetFilter();
|
|
|
this.filters.timeFlag.model = flag;
|
|
|
this.pageData.current = 1;
|
|
|
this.filterValues();
|
|
|
this.list();
|
|
|
},
|
|
|
//格式化时间
|
|
|
createTimeChange(time) {
|
|
|
if (!_.isArray(time)) {
|
|
|
time = time.split(' - ');
|
...
|
...
|
@@ -177,19 +156,33 @@ export default { |
|
|
this.filters.endTime.model = '';
|
|
|
}
|
|
|
},
|
|
|
//点击分页
|
|
|
pageChange(page) {
|
|
|
const params = this.filterValues();
|
|
|
params.pageNo = page;
|
|
|
this.pageData.current = page;
|
|
|
this.list(params);
|
|
|
this.currentSearchParams.pageNo = page;
|
|
|
this.list();
|
|
|
},
|
|
|
list(params) {
|
|
|
this.financeService.shopWithdrawServiceList(params).then(ret => {
|
|
|
this.tableData = _.get(ret, 'data.records', []);
|
|
|
this.pageData.total = _.get(ret, 'data.totalCount', 0);
|
|
|
this.pageData.current = _.get(ret, 'data.pageNo', 1);
|
|
|
//获取列表数据
|
|
|
list() {
|
|
|
Promise.all([
|
|
|
this.financeService.shopWithdrawServiceList(this.currentSearchParams),
|
|
|
this.financeService.queryBillSummary(this.currentSearchParams),
|
|
|
]).then(result => {
|
|
|
this.tableData = _.get(result[0], 'data.records', []);
|
|
|
this.pageData.total = _.get(result[0], 'data.totalCount', 0);
|
|
|
this.pageData.current = _.get(result[0], 'data.pageNo', 1);
|
|
|
const summaryInfo = _.get(result[1], 'data', {});
|
|
|
this.summaryInfo = [];
|
|
|
this.summaryInfo.push({ ...summaryInfo, summaryName: '汇总' });
|
|
|
});
|
|
|
},
|
|
|
//导出列表
|
|
|
exportList() {
|
|
|
const queryString = { ...this.currentSearchParams, excelConf: 'shopServiceList' };
|
|
|
const params = qs.stringify(queryString, true);
|
|
|
const href = `${baseExportApi}${params}`;
|
|
|
window.open(href, '_blank');
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
...
|
...
|
|