Authored by 陈峰

Merge branch 'feature/sknJit' into 'master'

Feature/skn jit

jit skn search

See merge request !78
... ... @@ -6,14 +6,18 @@
<Input v-model.trim="filters.productSku.model"
:placeholder="filters.productSku.holder" :maxlength="9"></Input>
</filter-item>
<filter-item :label="filters.productSkn.label">
<Input v-model.trim="filters.productSkn.model"
:placeholder="filters.productSkn.holder" :maxlength="9" ></Input>
</filter-item>
<filter-item :label="filters.factoryCode.label">
<Input v-model.trim="filters.factoryCode.model"
:placeholder="filters.factoryCode.holder" :maxlength="100" ></Input>
</filter-item>
<filter-item :label="filters.upmCode.label">
<Input v-model.trim="filters.upmCode.model"
:placeholder="filters.upmCode.holder" :maxlength="100" ></Input>
</filter-item>
<!--<filter-item :label="filters.upmCode.label">-->
<!--<Input v-model.trim="filters.upmCode.model"-->
<!--:placeholder="filters.upmCode.holder" :maxlength="100" ></Input>-->
<!--</filter-item>-->
<filter-item>
<Button type="primary" @click="filterSearch">筛选</Button>
... ... @@ -42,9 +46,13 @@
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);
... ... @@ -52,8 +60,10 @@
watch: {
data() {
this.filters.productSku.model = null;
this.filters.productSkn.model = null;
this.filters.factoryCode.model = null;
this.filters.upmCode.model = null;
// this.filters.upmCode.model = null;
this.pageData.current = 1;
}
... ... @@ -68,8 +78,11 @@
},
clearFilters() {
this.filters.productSku.model = null;
this.filters.productSkn.model = null;
this.filters.factoryCode.model = null;
this.filters.upmCode.model = null;
// this.filters.upmCode.model = null;
this.$route.query.productSkn = null;
this.pageData.current = 1;
this.tableData = [];
... ... @@ -82,8 +95,10 @@
filtersParams() {
let params = {};
let productSku = this.filters.productSku.model || null;
let productSkn = this.filters.productSkn.model || null;
let factoryCode = this.filters.factoryCode.model || null;
let upmCode = this.filters.upmCode.model || null;
// let upmCode = this.filters.upmCode.model || null;
let pageNo = this.pageData.current;
let pageSize = this.pageData.pageSize;
... ... @@ -96,13 +111,29 @@
}
}
if (this.filters.productSkn.model) {
if (this.isNumber(this.filters.productSkn.model)) {
params.productSkn = this.filters.productSkn.model;
} else {
return Promise.reject('skn必须是数字');
}
}
if (this.$route.query.productSkn && !productSkn) {
productSkn = this.$route.query.productSkn;
params.productSkn = productSkn;
} else {
productSkn = this.filters.productSkn.model;
}
params.pageSize = this.pageData.pageSize;
params.pageNo = this.pageData.current;
return Promise.resolve({
productSku,
productSkn,
factoryCode,
upmCode,
// upmCode,
pageNo,
pageSize
});
... ... @@ -113,7 +144,7 @@
},
getInventory() {
return this.filtersParams().then((params) => {
if (params.productSku || params.factoryCode || params.upmCode) {
if (params.productSku || params.productSkn || params.factoryCode || params.upmCode) {
this.noFilteredDataText = '暂无数据';
this.$Loading.start();
return this.inventoryService.list(params).then((result) => {
... ... @@ -144,8 +175,10 @@
exportList() {
const keysMap = {
productSku: 'productSku',
productSkn: 'productSkn',
factoryCode: 'factoryCode',
upmCode: 'upmCode',
// upmCode: 'upmCode',
};
const fields = this.filters;
... ...
... ... @@ -83,20 +83,28 @@ export default function() {
holder: '',
fieldSpan: 18
},
factoryCode: {
label: '商家编码',
productSkn: {
label: 'SKN编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
},
upmCode: {
label: '入库识别码',
factoryCode: {
label: '商家编码',
labelSpan: 6,
model: '',
holder: '',
fieldSpan: 18
}
},
// upmCode: {
// label: '入库识别码',
// labelSpan: 6,
// model: '',
// holder: '',
// fieldSpan: 18
// }
}
};
... ...
... ... @@ -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>
);
}
... ...