|
|
<template>
|
|
|
<layout-body>
|
|
|
<layout-filter v-if="!show" :inline="true">
|
|
|
<filter-item label="商品条码">
|
|
|
<Input v-model="skuFactoryCode" placeholder="请输入"></Input>
|
|
|
</filter-item>
|
|
|
<filter-item v-if="!show" :inline="true">
|
|
|
<Button type="primary" @click="search">筛选</Button>
|
|
|
<Button @click="clearFilters">清空条件</Button>
|
|
|
</filter-item>
|
|
|
</layout-filter>
|
|
|
<layout-list>
|
|
|
<Table ref="goodsList" border :columns="tableCols" :data="tableData"></Table>
|
|
|
<Page v-if="!selected" :total="pageData.total" :current="pageData.current"
|
...
|
...
|
@@ -39,7 +48,8 @@ |
|
|
total: 0,
|
|
|
current: 1,
|
|
|
pageSize: 20
|
|
|
}
|
|
|
},
|
|
|
skuFactoryCode: null
|
|
|
};
|
|
|
},
|
|
|
created() {
|
...
|
...
|
@@ -51,7 +61,8 @@ |
|
|
filterSearch() {
|
|
|
this.search();
|
|
|
},
|
|
|
clearFilter() {
|
|
|
clearFilters() {
|
|
|
this.skuFactoryCode = null;
|
|
|
this.pageData.current = 1;
|
|
|
|
|
|
this.search();
|
...
|
...
|
@@ -60,7 +71,8 @@ |
|
|
if (!this.selected) {
|
|
|
return this.invoiceService.listAvailableProduct({
|
|
|
proRequisitionFormId: this.oid,
|
|
|
brandId: this.brandId
|
|
|
brandId: this.brandId,
|
|
|
skuFactoryCode: this.skuFactoryCode
|
|
|
}).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.tableData = (res.data.records || []).map((i) => {
|
...
|
...
|
@@ -74,7 +86,8 @@ |
|
|
} else {
|
|
|
return this.invoiceService.listProduct({
|
|
|
proRequisitionFormId: this.oid,
|
|
|
brandId: this.brandId
|
|
|
brandId: this.brandId,
|
|
|
skuFactoryCode: this.skuFactoryCode
|
|
|
}).then((res) => {
|
|
|
if (res.code === 200) {
|
|
|
this.tableData = (res.data.goodsList || []).map((i) => {
|
...
|
...
|
|