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

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

@ -150,7 +150,9 @@ export default {
let collection = myDatabase.chima let collection = myDatabase.chima
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
}, },
// //

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

@ -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
}, },
// //

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

@ -150,7 +150,9 @@ export default {
let collection = myDatabase.ziliao let collection = myDatabase.ziliao
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
}, },
// //

Loading…
Cancel
Save