Authored by gexuhui

skn router

... ... @@ -42,9 +42,14 @@
export default {
created() {
this.tableFalse = false;
this.inventoryService = new InventoryService();
this.noFilteredDataText = '请输入查询条件,进行数据筛选展示!';
if (this.$route.query.productSkn) {
this.getInventory();
} else {
this.tableFalse = false;
this.noFilteredDataText = '请输入查询条件,进行数据筛选展示!';
}
},
data() {
return store.call(this);
... ... @@ -70,6 +75,7 @@
this.filters.productSku.model = null;
this.filters.factoryCode.model = null;
this.filters.upmCode.model = null;
this.$route.query.productSkn = null;
this.pageData.current = 1;
this.tableData = [];
... ... @@ -84,6 +90,7 @@
let productSku = this.filters.productSku.model || null;
let factoryCode = this.filters.factoryCode.model || null;
let upmCode = this.filters.upmCode.model || null;
let productSkn = this.$route.query.productSkn || null;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
... ... @@ -98,11 +105,13 @@
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
params.productSkn = productSkn;
return Promise.resolve({
productSku,
factoryCode,
upmCode,
productSkn,
pageNo,
pageSize
});
... ... @@ -113,7 +122,7 @@
},
getInventory() {
return this.filtersParams().then((params) => {
if (params.productSku || params.factoryCode || params.upmCode) {
if (params.productSku || params.factoryCode || params.upmCode || params.productSkn) {
this.noFilteredDataText = '暂无数据';
this.$Loading.start();
return this.inventoryService.list(params).then((result) => {
... ...
... ... @@ -17,7 +17,7 @@
<Button type="primary" @click="filterSearch">筛选</Button>
<Button type="warning" @click="showImportStore">导入库存</Button>
<Button @click="clearFilter">清空条件</Button>
<filter-tips type="warning" show-icon closable>编辑或导入的库存,会自动加上有货仓库中商品可售货位的库存,有货仓库商品库存详情可到【仓库管理-仓库剩余库存】中查询</filter-tips>
<filter-tips type="warning" show-icon closable>如果该商品在有货仓库中有库存,会包含在可售库存中进行展示。可以点击【库存分布】查询商品库存详情</filter-tips>
</filter-item>
</layout-filter>
... ...
... ... @@ -67,6 +67,12 @@ export default function() {
return (
<action-group>
<i-button type="primary" size="small" onClick={() => this.editStore(params.row)}>库存编辑</i-button>
<i-button type="success" size="small" onClick={() => this.$router.push({
name: 'repository.inventory',
query: {
productSkn: params.row.productSkn
}
})}>库存分布</i-button>
</action-group>
);
}
... ...