Browse Source

1230

master
lichong 4 months ago
parent
commit
48d2b6f252
  1. 8
      src/renderer/src/App.vue
  2. 4
      src/renderer/src/views/chima.vue
  3. 20
      src/renderer/src/views/shujuchuli.vue
  4. 4
      src/renderer/src/views/ziliao.vue

8
src/renderer/src/App.vue

@ -1,15 +1,15 @@
<template>
<div class="appClass" v-if="isVip">
<el-tabs tab-position="left" class="appClassLeft" v-model="tabName">
<el-tab-pane label="数据处理" name="shujuchuli">
<shujuchuliComponent></shujuchuliComponent>
</el-tab-pane>
<el-tab-pane label="尺码统计" name="chima">
<chimaComponent></chimaComponent>
</el-tab-pane>
<el-tab-pane label="资料信息" name="ziliao">
<ziliaoComponent></ziliaoComponent>
</el-tab-pane>
<el-tab-pane label="数据处理" name="shujuchuli">
<shujuchuliComponent></shujuchuliComponent>
</el-tab-pane>
</el-tabs>
</div>
<div v-else class="noVip">
@ -36,7 +36,7 @@ export default {
isVip: false,
jihuoma: "",
zhucema: "",
tabName: "chima"
tabName: "shujuchuli"
}
},
watch: {},

4
src/renderer/src/views/chima.vue

@ -150,7 +150,9 @@ export default {
let collection = myDatabase.chima
this.pageVO.total = await collection.count()
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
},
//

20
src/renderer/src/views/shujuchuli.vue

@ -32,6 +32,15 @@
<span>上传txt</span>
</el-button>
</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-row>
</div>
@ -101,6 +110,9 @@ export default {
loading: false,
fileOriData: null,
count: 0,
shujuchuliObj: {
sku: ""
}
}
},
methods: {
@ -142,9 +154,15 @@ export default {
async updateSeach() {
this.loading = true
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.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
},
//

4
src/renderer/src/views/ziliao.vue

@ -150,7 +150,9 @@ export default {
let collection = myDatabase.ziliao
this.pageVO.total = await collection.count()
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
},
//

Loading…
Cancel
Save