Authored by jiran.zhao

修改

... ... @@ -23,129 +23,129 @@
</template>
<script>
import moment from "moment";
import {ServiceList} from './store';
import FinanceService from 'services/finance/finance-service';
import moment from "moment";
import {ServiceList} from './store';
import FinanceService from 'services/finance/finance-service';
export default {
data(){
return ServiceList.call(this);
export default {
data(){
return ServiceList.call(this);
},
created() {
this.financeService = new FinanceService();
},
mounted() {
this.loadData();
},
watch: {
date() {
this.loadData();
},
created() {
this.financeService = new FinanceService();
day(newDay) {
let curDay = moment().format('YYYY-MM-DD');
if (newDay === this.beginTime || !newDay) {
return;
}
this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
},
mounted() {
this.loadData();
dateRange(newDate) {
this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
this.pageData.current = 1;
this.list();
},
watch: {
date() {
this.loadData();
},
day(newDay) {
let curDay = moment().format('YYYY-MM-DD');
if (newDay === this.beginTime || !newDay) {
return;
}
this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
},
dateRange(newDate) {
this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
this.pageData.current = 1;
this.list();
},
},
methods: {
loadData() {
this.list();
},
methods: {
loadData() {
this.list();
},
changeLimit(limit) {
if (limit > 1) {
this.dateRange = [this[`day${limit}`], this.today];
} else if (limit === 1) {
this.dateRange = [this.yesterday, this.today];
} else {
this.dateRange = [this.today, this.today];
}
this.pageData.current = 1;
},
pageChange() {
this.pageData.current = page;
this.list();
},
filtersParams() {
let params = {};
let fts = this.filters;
let withdrawStatus = fts.withdrawStatus.model,
statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
null : fts.statementSn.model;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
changeLimit(limit) {
if (limit > 1) {
this.dateRange = [this[`day${limit}`], this.today];
} else if (limit === 1) {
this.dateRange = [this.yesterday, this.today];
} else {
this.dateRange = [this.today, this.today];
}
this.pageData.current = 1;
},
pageChange() {
this.pageData.current = page;
this.list();
},
filtersParams() {
let params = {};
let fts = this.filters;
let withdrawStatus = fts.withdrawStatus.model,
statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
null : fts.statementSn.model;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
if (this.filters.withdrawStatus.model) {
if (this.isNumber(this.filters.withdrawStatus.mode)) {
params.withdrawStatus = this.filters.withdrawStatus.model;
}
if (this.filters.withdrawStatus.model) {
if (this.isNumber(this.filters.withdrawStatus.mode)) {
params.withdrawStatus = this.filters.withdrawStatus.model;
}
if (this.filters.statementSn.model) {
if (this.isString(this.filters.statementSn.mode)) {
params.statementSn = this.filters.statementSn.model;
}
}
if (this.filters.statementSn.model) {
if (this.isString(this.filters.statementSn.mode)) {
params.statementSn = this.filters.statementSn.model;
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
return Promise.resolve({
params,
withdrawStatus,
statementSn,
pageNo,
pageSize
});
},
list() {
this.$Loading.start();
return this.filtersParams().then((params) => {
let filter = {
beginTime: this.beginDate,
endTime: this.endDate,
pageNo: params.pageNo,
};
if (this.withdrawStatus && this.withdrawStatus !== '-1') {
filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
}
return this.FinanceService.shopWithdrawServiceList(filter);
}).then(result => {
if (!result.data) {
result.data = {
pageNo: 1,
pageSize: 1,
totalCount: 1,
totalPage: 1,
records: []
}
return Promise.resolve({
params,
withdrawStatus,
statementSn,
pageNo,
pageSize
});
},
list() {
this.$Loading.start();
return this.filtersParams().then((params) => {
let filter = {
beginTime: this.beginDate,
endTime: this.endDate,
pageNo: params.pageNo,
};
if (this.withdrawStatus && this.withdrawStatus !== '-1') {
filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
}
return this.FinanceService.shopWithdrawServiceList(filter);
}).then(result => {
if (!result.data) {
result.data = {
pageNo: 1,
pageSize: 1,
totalCount: 1,
totalPage: 1,
records: []
}
this.pageData.total = result.data.totalCount;
this.pageData.current = result.data.pageNo;
this.tableData = result.data.records;
this.$Loading.finish();
}).catch(() => {
this.$Loading.finish();
});
},
reset() {
this.filters.withdrawStatus.model = null;
this.filters.statementSn.model = null;
this.filters.timeFlag.model = null;
this.filters.beginTime.model = null;
this.filters.endTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.list();
}
}
this.pageData.total = result.data.totalCount;
this.pageData.current = result.data.pageNo;
this.tableData = result.data.records;
this.$Loading.finish();
}).catch(() => {
this.$Loading.finish();
});
},
reset() {
this.filters.withdrawStatus.model = null;
this.filters.statementSn.model = null;
this.filters.timeFlag.model = null;
this.filters.beginTime.model = null;
this.filters.endTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.list();
}
};
}
};
</script>
<style lang="scss">
... ...
... ... @@ -21,19 +21,19 @@ export default function() {
timeLimit: true,
tableCols: [
{
title: 'ID',
key: 'id',
title: '提现时间',
key: 'withdrawTime',
width: 60,
align: 'center'
},
{
title: '申请时间',
key: 'createTime',
title: '账务ID',
key: 'id',
width: 90,
align: 'center'
}, {
title: '结算类型',
key: 'clearingType',
title: '商家名称',
key: 'productName',
width: 90,
align: 'center'
}, {
... ... @@ -42,18 +42,41 @@ export default function() {
width: 90,
align: 'center'
}, {
title: '申请金额(元)',
title: '订单号',
key: 'orderCode',
width: 90,
align: 'center'
}, {
title: 'sku',
key: 'productSku',
width: 90,
align: 'center'
}, {
title: '商品名称',
key: 'productName',
width: 90,
align: 'center'
}, {
title: '业务单据号',
key: 'targetAccount',
width: 90,
align: 'center'
}, {
title: '账务类型',
key: 'clearingType',
width: 90,
align: 'center'
}, {
title: '子账务类型',
key: 'applyAmount',
width: 90,
align: 'center'
}, {
title: '服务费(元)',
title: '服务费金额(元)',
key: 'serviceAmount',
width: 90,
align: 'center'
}, {
title: '成功金额(元)',
}, {
title: '提现状态',
key: 'status',
align: 'center',
... ... @@ -62,40 +85,14 @@ export default function() {
const as = row.status;
const asText = as === 2 ? `${withdrawStatus[row.status]}(${row.rejectReason})` : withdrawStatus[as];
ow.lineIndex = params.index;
return (
<p class={{'high-light': as === 2}}>{asText}</p>
);
return (<p class={{'high-light': as === 2}}>{asText}</p>);
},
className: 'status-column'
}, {
title: '业务单据号',
key: 'statementSn',
width: 90,
align: 'center'
}, {
title: '说明',
}, {
title: '操作人',
key: 'applyPid',
title: '入账时间',
key: 'createTime',
width: 90,
align: 'center'
}, {
title: '操作',
key: 'action',
width: 180,
align: 'center',
render: (h, params) => {
const row = params.row;
return (
<div><div class="cell-action-row">
<i-button type="primary" size="small" onClick={() => this.getDetailById(row.id)}>提现明细</i-button>
</div>
<div class="cell-action-row">
<i-button type="primary" size="small" onClick={() => this.getInfoById(row.id)}>结算明细</i-button>
</div></div>
);
},
className: 'action-column'
}
],
tableData: [],
... ...
... ... @@ -50,148 +50,148 @@
</template>
<script>
import moment from "moment";
import {Withdraw} from './store';
import FinanceService from 'services/finance/finance-service';
import _ from "lodash";
import moment from "moment";
import {Withdraw} from './store';
import FinanceService from 'services/finance/finance-service';
import _ from "lodash";
export default {
data() {
return Withdraw.call(this);
export default {
data() {
return Withdraw.call(this);
},
created() {
this.financeService = new FinanceService();
},
mounted() {
this.loadData();
},
watch: {
date() {
this.loadData();
},
created() {
this.financeService = new FinanceService();
day(newDay) {
let curDay = moment().format('YYYY-MM-DD');
if (newDay === this.beginTime || !newDay) {
return;
}
this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
},
mounted() {
this.loadData();
dateRange(newDate) {
this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
this.pageData.current = 1;
this.list();
},
watch: {
date() {
this.loadData();
},
day(newDay) {
let curDay = moment().format('YYYY-MM-DD');
if (newDay === this.beginTime || !newDay) {
return;
}
this.dateRange = newDay !== this.curDay ? [newDay, curDay] : [newDay, newDay];
},
dateRange(newDate) {
this.beginTime = moment(Array.isArray(newDate) ? newDate[0] : newDate).format('YYYY-MM-DD');
this.endTime = moment(Array.isArray(newDate) ? newDate[1] : newDate).format('YYYY-MM-DD');
this.day = this.beginTime === this.endTime === this.today ? '' : this.beginTime;
this.pageData.current = 1;
this.list();
},
},
methods: {
loadData() {
this.list();
},
methods: {
loadData() {
this.list();
},
changeLimit(limit) {
if(limit > 1) {
this.dateRange = [this[`day${limit}`], this.today];
}else if(limit===1){
this.dateRange = [this.yesterday, this.today];
}else{
this.dateRange = [this.today, this.today];
}
this.pageData.current = 1;
},
pageChange() {
this.pageData.current = page;
this.list();
},
filtersParams() {
let params = {};
let fts = this.filters;
let withdrawStatus = fts.withdrawStatus.model,
statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
null : fts.statementSn.model;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
changeLimit(limit) {
if(limit > 1) {
this.dateRange = [this[`day${limit}`], this.today];
}else if(limit===1){
this.dateRange = [this.yesterday, this.today];
}else{
this.dateRange = [this.today, this.today];
}
this.pageData.current = 1;
},
pageChange() {
this.pageData.current = page;
this.list();
},
filtersParams() {
let params = {};
let fts = this.filters;
let withdrawStatus = fts.withdrawStatus.model,
statementSn = fts.statementSn.model === '' || fts.brand.model === null ?
null : fts.statementSn.model;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
if(this.filters.withdrawStatus.model){
if (this.isNumber(this.filters.withdrawStatus.mode)) {
params.withdrawStatus = this.filters.withdrawStatus.model;
}
if(this.filters.withdrawStatus.model){
if (this.isNumber(this.filters.withdrawStatus.mode)) {
params.withdrawStatus = this.filters.withdrawStatus.model;
}
if(this.filters.statementSn.model){
if (this.isString(this.filters.statementSn.mode)) {
params.statementSn = this.filters.statementSn.model;
}
}
if(this.filters.statementSn.model){
if (this.isString(this.filters.statementSn.mode)) {
params.statementSn = this.filters.statementSn.model;
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
return Promise.resolve({
params,
withdrawStatus,
statementSn,
pageNo,
pageSize
});
},
list() {
this.$Loading.start();
return this.filtersParams().then((params) => {
let filter = {
beginTime: this.beginDate,
endTime: this.endDate,
pageNo: params.pageNo,
};
if (this.withdrawStatus && this.withdrawStatus !== '-1') {
filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
}
return this.FinanceService.shopWithdrawList(filter);
}).then(result => {
if (!result.data) {
result.data = {
pageNo: 1,
pageSize: 1,
totalCount: 1,
totalPage: 1,
records: []
}
return Promise.resolve({
params,
withdrawStatus,
statementSn,
pageNo,
pageSize
});
},
list() {
this.$Loading.start();
return this.filtersParams().then((params) => {
let filter = {
beginTime: this.beginDate,
endTime: this.endDate,
pageNo: params.pageNo,
};
if (this.withdrawStatus && this.withdrawStatus !== '-1') {
filter = Object.assign({}, filter, {withdrawStatus: this.withdrawStatus});
}
return this.FinanceService.shopWithdrawList(filter);
}).then(result => {
if (!result.data) {
result.data = {
pageNo: 1,
pageSize: 1,
totalCount: 1,
totalPage: 1,
records: []
}
this.pageData.total = result.data.totalCount;
this.pageData.current = result.data.pageNo;
this.tableData = result.data.records;
this.$Loading.finish();
}).catch(() => {
this.$Loading.finish();
});
},
reset() {
this.filters.withdrawStatus.model = null;
this.filters.statementSn.model = null;
this.filters.timeFlag.model = null;
this.filters.beginTime.model = null;
this.filters.endTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.list();
},
exportFile() {
let param = {};
param.beginTime = this.beginTime;
param.endTime = this.endTime;
// param.timeFlag = '1,2,3,4';
if (this.withdrawStatus && this.withdrawStatus !== '0') {
param.withdrawStatus = this.withdrawStatus;
}
this.pageData.total = result.data.totalCount;
this.pageData.current = result.data.pageNo;
this.tableData = result.data.records;
this.$Loading.finish();
}).catch(() => {
this.$Loading.finish();
});
},
reset() {
this.filters.withdrawStatus.model = null;
this.filters.statementSn.model = null;
this.filters.timeFlag.model = null;
this.filters.beginTime.model = null;
this.filters.endTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.list();
},
exportFile() {
let param = {};
const href = '/Api/erp/exportShopWithdrawList?queryConf=' +
JSON.stringify(param);
param.beginTime = this.beginTime;
param.endTime = this.endTime;
// param.timeFlag = '1,2,3,4';
if (this.withdrawStatus && this.withdrawStatus !== '0') {
param.withdrawStatus = this.withdrawStatus;
}
window.open(href, '_blank');
},
getDetailById() {
const href = '/Api/erp/exportShopWithdrawList?queryConf=' +
JSON.stringify(param);
window.open(href, '_blank');
},
getDetailById() {
}
}
};
}
};
</script>
<style lang="scss">
... ...