|
@ -32,6 +32,15 @@ |
|
|
<span>上传txt</span> |
|
|
<span>上传txt</span> |
|
|
</el-button> |
|
|
</el-button> |
|
|
</el-upload> |
|
|
</el-upload> |
|
|
|
|
|
<el-input v-model="shujuchuliObj.sku" size="large" |
|
|
|
|
|
style="width: 200px;display: inline-block;margin-right: 16px;" placeholder="请输入SKU" clearable> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
<el-button type="primary" @click="updateSeach" size="large"> |
|
|
|
|
|
<el-icon> |
|
|
|
|
|
<Delete /> |
|
|
|
|
|
</el-icon> |
|
|
|
|
|
<span>搜索</span> |
|
|
|
|
|
</el-button> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</div> |
|
|
</div> |
|
@ -101,6 +110,9 @@ export default { |
|
|
loading: false, |
|
|
loading: false, |
|
|
fileOriData: null, |
|
|
fileOriData: null, |
|
|
count: 0, |
|
|
count: 0, |
|
|
|
|
|
shujuchuliObj: { |
|
|
|
|
|
sku: "" |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
@ -142,9 +154,15 @@ export default { |
|
|
async updateSeach() { |
|
|
async updateSeach() { |
|
|
this.loading = true |
|
|
this.loading = true |
|
|
let collection = myDatabase.shujuchuli |
|
|
let collection = myDatabase.shujuchuli |
|
|
|
|
|
if (this.shujuchuliObj.sku) { |
|
|
|
|
|
let reg = new RegExp(this.shujuchuliObj.sku, "i") |
|
|
|
|
|
collection = collection.filter((equip) => reg.test(equip.SKU)) |
|
|
|
|
|
} |
|
|
this.pageVO.total = await collection.count() |
|
|
this.pageVO.total = await collection.count() |
|
|
this.tableData = await collection.offset((this.pageVO.currentPage - 1) * this.pageVO.pageSize).limit(this.pageVO.pageSize).toArray() |
|
|
this.tableData = await collection.offset((this.pageVO.currentPage - 1) * this.pageVO.pageSize).limit(this.pageVO.pageSize).toArray() |
|
|
this.pageVO.pageSizes[5] = this.pageVO.total |
|
|
if (this.pageVO.total > this.pageVO.pageSizes[3]) { |
|
|
|
|
|
this.pageVO.pageSizes[4] = this.pageVO.total |
|
|
|
|
|
} |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
}, |
|
|
}, |
|
|
//选中数据 |
|
|
//选中数据 |
|
|