Authored by shuiling.wang@yoho.cn

财务管理库存

... ... @@ -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>
... ...
... ... @@ -24,12 +24,13 @@
</Select>
</filter-item>
<filter-item>
<Button @click="returnPage">返回对账单列表</Button>
<Button type="primary" @click="search">筛选</Button>
<Button type="warning" @click="exportData">导出</Button>
<Button @click="reset">清空条件</Button>
</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>
... ... @@ -39,11 +40,29 @@
<script>
import detail from './store/detail';
import filter from './store/filter';
import FinanceService from 'services/finance/finance-service';
export default {
data() {
return detail.call(this);
filter.filters = _.assign({
orderCode: {
label: '订单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}, filter.filters);
return _.assign(detail.call(this), filter);
},
created() {
this.FinanceService = new FinanceService();
... ... @@ -54,12 +73,10 @@ export default {
computed: {
},
methods: {
search() {
// 在这里实现异步查询的方法,建议在service中做
filterValues() {
let params = {
supplierId: 128,
balanceId: +this.filters.balanceId.model,
brandId: this.filters.brandId.model,
brandId: +this.filters.brandId.model,
orderCode: +this.filters.orderCode.model,
status: this.filters.status.model,
productSku: +this.filters.sku.model,
... ... @@ -67,12 +84,13 @@ export default {
pageNo: this.pageData.pageNo
};
params = _.pickBy(params, val => val);
this.FinanceService.balanceDetail(params).then(ret => {
return _.pickBy(params, val => val);
},
search() {
this.FinanceService.balanceDetail(this.filterValues()).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
this.pageData.total = ret.data.totalCount;
this.pageData.pageNo = ret.data.pageNo;
this.pageData.total = _.get(ret, 'data.totalCount', 0);
this.pageData.pageNo = _.get(ret, 'data.pageNo', 1);
});
},
reset() {
... ... @@ -83,16 +101,31 @@ export default {
this.filters.sku.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.search();
},
pageChange(val) {
this.pageData.pageNo = val;
this.search();
},
exportData() {
console.log('导出');
let params = {};
let temp = [];
_.assign(params, this.filterValues());
_.each(params, (val, key) => {
temp.push(`${key}=${val}`);
});
const href = `/Api/erp/exportBalanceDetail?${temp.join('&')}`;
window.open(href, '_blank');
},
onClickInfo() {},
onClickStock() {}
returnPage() {
this.$router.push({
name: 'finance.clearing'
});
}
}
};
</script>
... ... @@ -101,4 +134,8 @@ export default {
.ivu-date-picker .ivu-select-dropdown {
left: -284px !important;
}
.table-btn {
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -12,4 +12,11 @@ export default [{
meta: {
pageName: '对账单明细'
}
}, {
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '对账单库存'
}
}];
\ No newline at end of file
... ...
<template>
<layout-body>
<layout-filter>
<filter-item :label="filters.brandId.label">
<select-brand v-model="filters.brandId.model"></select-brand>
</filter-item>
<filter-item :label="filters.createTime.label">
<Date-picker v-model="filters.createTime.model"
type="datetimerange" format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期和时间">
</Date-picker>
</filter-item>
<filter-item>
<Button @click="returnPage">返回对账单列表</Button>
<Button type="primary" @click="search">筛选</Button>
<Button @click="reset">清空条件</Button>
</filter-item>
</layout-filter>
<layout-list>
<Button type="success" @click="print" 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>
</layout-list>
</layout-body>
</template>
<script>
import stock from './store/stock';
import filter from './store/filter';
import FinanceService from 'services/finance/finance-service';
import _ from 'lodash';
export default {
data() {
return _.assign(stock.call(this), filter);
},
created() {
this.FinanceService = new FinanceService();
this.search();
},
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() {
let params = {
brandId: +this.filters.brandId.model,
beginTime: this.startTime || this.curDay,
endTime: this.endTime || this.curDay,
pageSize: this.pageData.pageSize,
pageNo: this.pageData.pageNo
};
params = _.pickBy(params, val => val);
this.FinanceService.inventoryLedgerList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
this.pageData.total = _.get(ret, 'data.totalCount', 0);
this.pageData.pageNo = _.get(ret, 'data.pageNo', 1);
});
},
reset() {
this.filters.brandId.model = null;
this.filters.createTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.search();
},
pageChange(val) {
this.pageData.pageNo = val;
this.search();
},
print() {
const href = `/finance/print/clearing/stock.html?brandId=${this.filters.brandId.model}&begin=${this.startTime}&end=${this.endTime}&page=${this.pageData.pageNo}`;
window.open(href, '_blank');
},
returnPage() {
this.$router.push({
name: 'finance.clearing'
});
}
}
};
</script>
<style lang="scss">
.ivu-date-picker .ivu-select-dropdown {
left: -284px !important;
}
.table-btn {
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -3,10 +3,6 @@
* @author: wsl <shuiling.wang@yoho.cn>
* @date: 2017/07/11
*/
import moment from 'moment';
export default function() {
return {
tableCols: [
... ... @@ -91,53 +87,6 @@ export default function() {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
orderCode: {
label: '订单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
balanceId: {
label: '对账单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
sku: {
label: 'SKU',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: +this.$route.query.status,
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
}
}
};
}
... ...
let date = new Date();
let agoMonthFirstDay = new Date(date.getFullYear(),date.getMonth()-1,1);
let agoMonthLastDay = new Date(date.getFullYear(),date.getMonth()-1,30);
export default {
filters: {
balanceId: {
label: '对账单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: [agoMonthFirstDay, agoMonthLastDay],
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
}
}
}
\ No newline at end of file
... ...
... ... @@ -81,46 +81,6 @@ export default function() {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
balanceId: {
label: '对账单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: 162,
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
status: {
label: '状态',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18,
options: [
{
value: 1,
label: '未结算'
},
{
value: 2,
label: '已结算'
}
]
}
}
};
}
... ...
/**
* on stock page store
* @author: wsl <shuiling.wang@yoho.cn>
* @date: 2017/07/13
*/
import moment from 'moment';
export default function() {
return {
tableCols: [
{
title: '商品编号',
key: 'productSkn',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'supplierSku',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center',
width: 150
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center',
width: 150
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
},
{
title: '库房',
key: 'supplierName',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
curDay: Math.round(new Date().getTime()/1000)
};
}
... ...
... ... @@ -13,13 +13,15 @@
<select-brand v-model="filters.brandId.model"></select-brand>
</filter-item>
<filter-item>
<Button @click="returnPage">返回结算单列表</Button>
<Button type="primary" @click="search">筛选</Button>
<Button type="warning" @click="exportData">导出</Button>
<Button type="success" @click="print">打印</Button>
<Button @click="reset">清空条件</Button>
</filter-item>
</layout-filter>
<layout-list>
<Button type="warning" @click="exportData" class="table-btn">导出</Button>
<Button type="success" @click="print" 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>
... ... @@ -29,21 +31,31 @@
<script>
import detail from './store/detail';
import filter from './store/filter';
import FinanceService from 'services/finance/finance-service';
import _ from 'lodash';
export default {
data() {
return detail.call(this);
filter.filters = _.assign({
sku: {
label: 'SKU',
labelSpan: 6,
model: this.$route.query.sku || '',
holder: '',
fieldSpan: 18
}
}, filter.filters);
return _.assign(detail.call(this), filter);
},
created() {
this.FinanceService = new FinanceService();
this.search();
},
methods: {
search() {
// 在这里实现异步查询的方法,建议在service中做
filterValues() {
let params = {
supplierId: 128,
balanceId: +this.filters.balanceId.model,
brandId: +this.filters.brandId.model,
productSku: +this.filters.sku.model,
... ... @@ -51,12 +63,13 @@ export default {
pageNo: this.pageData.pageNo
};
params = _.pickBy(params, val => val);
this.FinanceService.settlementList(params).then(ret => {
return _.pickBy(params, val => val);
},
search() {
this.FinanceService.settlementList(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() {
... ... @@ -67,18 +80,35 @@ export default {
this.filters.sku.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.search();
},
pageChange(val) {
this.pageData.pageNo = val;
this.search();
},
exportData() {
console.log('导出');
let params = {};
let temp = [];
_.assign(params, this.filterValues());
_.each(params, (val, key) => {
temp.push(`${key}=${val}`);
});
const href = `/Api/erp/exportSettlementDetail?${temp.join('&')}`;
window.open(href, '_blank');
},
print() {
const href = `/finance/print/payment/printDetail.html?balanceId=${this.filters.balanceId.model}&brandId=${this.filters.brandId.model}&sku=${this.filters.sku.model}&page=${this.pageData.pageNo}`;
const href = `/finance/print/payment/detail.html?balanceId=${this.filters.balanceId.model}&brandId=${this.filters.brandId.model}&sku=${this.filters.sku.model}&page=${this.pageData.pageNo}`;
window.open(href, '_blank');
},
returnPage() {
this.$router.push({
name: 'finance.payment'
});
}
}
};
... ... @@ -88,4 +118,8 @@ export default {
.ivu-date-picker .ivu-select-dropdown {
left: -284px !important;
}
.table-btn {
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -12,4 +12,11 @@ export default [{
meta: {
pageName: '结算单详情'
}
}, {
path: '/stock.html',
name: 'stock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock'),
meta: {
pageName: '库存'
}
}];
... ...
... ... @@ -10,7 +10,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>
... ... @@ -19,6 +19,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>
... ... @@ -28,14 +29,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() {
... ... @@ -58,35 +62,33 @@ export default {
}
},
methods: {
search() {
// 在这里实现异步查询的方法,建议在service中做
filterValues() {
let params = {
type: 2,
supplierId: 128,
balanceId: +this.filters.balanceId.model,
brandId: this.filters.brandId.model || 162,
// status: this.filters.status.model,
brandId: +this.filters.brandId.model,
beginTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageData.pageSize,
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() {
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;
this.search();
},
pageChange(val) {
this.pageData.pageNo = val;
... ... @@ -104,11 +106,25 @@ export default {
},
onClickStock(params) {
this.$router.push({
name: 'finance.stock',
name: 'finance.payment.stock',
params: {},
query: {
}
});
},
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');
}
}
};
... ... @@ -118,4 +134,8 @@ export default {
.ivu-date-picker .ivu-select-dropdown {
left: -284px !important;
}
.table-btn {
margin-bottom: 20px;
}
</style>
... ...
<template>
<layout-body>
<layout-filter>
<filter-item :label="filters.brandId.label">
<select-brand v-model="filters.brandId.model"></select-brand>
</filter-item>
<filter-item :label="filters.createTime.label">
<Date-picker v-model="filters.createTime.model"
type="datetimerange" format="yyyy-MM-dd HH:mm:ss" placeholder="选择日期和时间">
</Date-picker>
</filter-item>
<filter-item>
<Button @click="returnPage">返回结算单列表</Button>
<Button type="primary" @click="search">筛选</Button>
<Button @click="reset">清空条件</Button>
</filter-item>
</layout-filter>
<layout-list>
<Button type="success" @click="print" 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>
</layout-list>
</layout-body>
</template>
<script>
import stock from './store/stock';
import filter from './store/filter';
import FinanceService from 'services/finance/finance-service';
import _ from 'lodash';
export default {
data() {
return _.assign(stock.call(this), filter);
},
created() {
this.FinanceService = new FinanceService();
this.search();
},
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() {
let params = {
brandId: +this.filters.brandId.model,
beginTime: this.startTime,
endTime: this.endTime,
pageSize: this.pageData.pageSize,
pageNo: this.pageData.pageNo
};
params = _.pickBy(params, val => val);
this.FinanceService.inventoryLedgerList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
this.pageData.total = _.get(ret, 'data.totalCount', 0);
this.pageData.pageNo = _.get(ret, 'data.pageNo', 1);
});
},
reset() {
this.filters.brandId.model = null;
this.filters.createTime.model = null;
this.pageData.pageNo = 1;
this.pageData.total = 0;
this.search();
},
pageChange(val) {
this.pageData.pageNo = val;
this.search();
},
print() {
const href = `/finance/print/payment/stock.html?brandId=${this.filters.brandId.model}&begin=${this.startTime}&end=${this.endTime}&page=${this.pageData.pageNo}`;
window.open(href, '_blank');
},
returnPage() {
this.$router.push({
name: 'finance.payment'
});
}
}
};
</script>
<style lang="scss">
.ivu-date-picker .ivu-select-dropdown {
left: -284px !important;
}
.table-btn {
margin-bottom: 20px;
}
</style>
... ...
... ... @@ -3,9 +3,6 @@
* @author: wsl <shuiling.wang@yoho.cn>
* @date: 2017/07/11
*/
import moment from 'moment';
export default function() {
return {
tableCols: [
... ... @@ -70,29 +67,6 @@ export default function() {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
balanceId: {
label: '结算单号',
labelSpan: 6,
model: this.$route.query.balanceId,
holder: '',
fieldSpan: 18
},
sku: {
label: 'SKU',
labelSpan: 6,
model: this.$route.query.sku || '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: this.$route.query.brandId,
holder: '',
fieldSpan: 18
}
}
};
}
... ...
export default {
filters: {
balanceId: {
label: '结算单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '1111',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}
}
\ No newline at end of file
... ...
... ... @@ -76,29 +76,6 @@ export default function() {
total: 0,
pageNo: 1,
pageSize: 20
},
filters: {
balanceId: {
label: '对账单号',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '1111',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}
};
}
... ...
/**
* on stock page store
* @author: wsl <shuiling.wang@yoho.cn>
* @date: 2017/07/13
*/
export default function() {
return {
tableCols: [
{
title: '商品编号',
key: 'productSkn',
align: 'center'
},
{
title: '产品名称',
key: 'productName',
align: 'center'
},
{
title: '厂家编号',
key: 'supplierSku',
align: 'center',
},
{
title: '请购类型',
key: 'sellTypeName',
align: 'center',
},
{
title: '初期数量',
key: 'supplier90Sell',
align: 'center'
},
{
title: '进货数量',
key: 'supplier11Sell',
align: 'center'
},
{
title: '销售数量',
key: 'supplier30Sell',
align: 'center'
},
{
title: '销退数量',
key: 'supplier33Sell',
align: 'center'
},
{
title: '退供应商数量',
key: 'supplier10Sell',
align: 'center'
},
{
title: '其他出库数量',
key: 'supplier60Sell',
align: 'center'
},
{
title: '地面店出库数量',
key: 'supplier70Sell',
align: 'center',
width: 150
},
{
title: '地面店入库数量',
key: 'supplier71Sell',
align: 'center',
width: 150
},
{
title: '期末库存数量',
key: 'supplier100Sell',
align: 'center'
},
{
title: '库房',
key: 'supplierName',
align: 'center'
}
],
tableData: [],
pageData: {
total: 0,
pageNo: 1,
pageSize: 20
},
curDay: Math.round(new Date().getTime() / 1000)
};
}
... ...
<template>
<layout-print>
<h2>库存</h2>
<h2>对账单库存</h2>
<Table border :columns="tableCols" :data="tableData"></Table>
</layout-print>
</template>
<script>
import _ from 'lodash';
import stock from '../stock/store/stock';
import stock from '../clearing/store/stock';
import FinanceService from 'services/finance/finance-service';
... ... @@ -21,20 +21,19 @@
},
methods: {
search() {
// let params = {
// supplierId: 128,
// balanceId: +this.filters.balanceId.model,
// brandId: +this.filters.brandId.model,
// productSku: +this.filters.sku.model,
// pageSize: 20,
// pageNo: this.$route.query.page
// };
let params = {
brandId: +this.$route.query.brandId,
beginTime: +this.$route.query.begin,
endTime: +this.$route.query.end,
pageSize: 20,
pageNo: this.$route.query.page
};
// params = _.pickBy(params, val => val);
params = _.pickBy(params, val => val);
// this.FinanceService.settlementList(params).then(ret => {
// this.tableData = _.get(ret, 'data.records', []);
// });
this.FinanceService.inventoryLedgerList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
});
}
}
};
... ...
export default [{
path: '/payment/printDetail.html',
path: '/payment/detail.html',
name: 'printdetail',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-detail'),
meta: {
pageName: '结算单详情打印'
}
}, {
path: '/stock/printDetail.html',
name: 'printdetail',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./stock-print-detail'),
path: '/payment/stock.html',
name: 'printStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./payment-print-stock'),
meta: {
pageName: '结算单库存打印'
}
}, {
path: '/clearing/stock.html',
name: 'printStock',
component: () => import(/* webpackChunkName: "trade.printDetail" */'./clearing-print-stock'),
meta: {
pageName: '库存打印'
pageName: '对账单库存打印'
}
}];
... ...
... ... @@ -22,7 +22,6 @@
methods: {
search() {
let params = {
supplierId: 128,
balanceId: +this.filters.balanceId.model,
brandId: +this.filters.brandId.model,
productSku: +this.filters.sku.model,
... ...
<template>
<layout-print>
<h2>结算单库存</h2>
<Table border :columns="tableCols" :data="tableData"></Table>
</layout-print>
</template>
<script>
import _ from 'lodash';
import stock from '../payment/store/stock';
import FinanceService from 'services/finance/finance-service';
export default {
data() {
return stock.call(this);
},
created() {
this.FinanceService = new FinanceService();
this.search();
},
methods: {
search() {
let params = {
brandId: +this.$route.query.brandId,
beginTime: +this.$route.query.begin,
endTime: +this.$route.query.end,
pageSize: 20,
pageNo: this.$route.query.page
};
params = _.pickBy(params, val => val);
this.FinanceService.inventoryLedgerList(params).then(ret => {
this.tableData = _.get(ret, 'data.records', []);
});
}
}
};
</script>
<style lang="scss" scoped>
h2 {
line-height: 50px;
border-bottom: 1px solid #f2f2f2;
margin-bottom: 10px;
}
.print-detail {
margin-bottom: 20px;
color: #333;
}
</style>
... ...
... ... @@ -6,7 +6,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>
... ... @@ -25,15 +25,17 @@
<script>
import stock from './store/stock';
import filter from './store/filter';
import FinanceService from 'services/finance/finance-service';
import _ from 'lodash';
export default {
data() {
return stock.call(this);
return _.assign(stock.call(this), filter);
},
created() {
this.FinanceService = new FinanceService();
this.search();
},
computed: {
startTime() {
... ... @@ -57,15 +59,15 @@ export default {
},
methods: {
search() {
// 在这里实现异步查询的方法,建议在service中做
let params = {
shopId: 1,
supplierId: 128,
brandId: this.filters.brandId.model,
brandId: +this.filters.brandId.model,
productSkn: '',
productSku: '',
beginTime: this.startTime,
endTime: this.endTime,
beginTime: this.startTime || this.curDay,
endTime: this.endTime || this.curDay,
pageSize: this.pageData.pageSize,
pageNo: this.pageData.pageNo
};
... ... @@ -74,8 +76,8 @@ export default {
this.FinanceService.inventoryLedgerList(params).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() {
... ...
export default {
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}
}
\ No newline at end of file
... ...
... ... @@ -3,6 +3,7 @@
* @author: wsl <shuiling.wang@yoho.cn>
* @date: 2017/07/13
*/
import moment from 'moment';
export default function() {
return {
... ... @@ -86,21 +87,6 @@ export default function() {
pageNo: 1,
pageSize: 20
},
filters: {
brandId: {
label: '品牌',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
createTime: {
label: '创建时间',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
}
curDay: Math.round(new Date().getTime()/1000)
};
}
... ...
... ... @@ -4,7 +4,8 @@ let apiUrl = {
balanceList: '/erp/balanceList',
balanceDetail: '/erp/balanceDetail',
settlementList: '/erp/settlementList',
inventoryLedgerList: '/erp/inventoryLedgerList'
inventoryLedgerList: '/erp/inventoryLedgerList',
exportBalanceList: '/erp/exportBalanceList'
};
class FinanceService extends Service {
... ...
... ... @@ -44,7 +44,10 @@ let domainApis = {
balanceList: '/erp-shop-web/financeBill/balanceList',
balanceDetail: '/erp-shop-web/financeBill/balanceDetail',
settlementList: '/erp-shop-web/financeBill/settlementList',
inventoryLedgerList: '/erp-shop-web/inventoryLedger/list'
inventoryLedgerList: '/erp-shop-web/inventoryLedger/list',
exportBalanceList: '/erp-shop-web/export/exportBalanceList',
exportSettlementDetail: '/erp-shop-web/export/exportSettlementDetail',
exportBalanceDetail: '/erp-shop-web/export/exportBalanceDetail'
},
platform: {
queryShopsByAdminPid: '/SellerShopController/queryShopsByAdminPid',
... ...