零件导入、整改件导入

This commit is contained in:
liushuai
2018-12-07 18:58:24 +08:00
parent e0a43ab773
commit 3fed67dec1
10 changed files with 962 additions and 10 deletions

View File

@@ -191,6 +191,7 @@ export default {
manufacturer = this.worksheet[j][`O${attr}`] ? this.worksheet[j][`O${attr}`].v : ''
remarks = this.worksheet[j][`Q${attr}`] ? this.worksheet[j][`Q${attr}`].v : ''
classificationCode = this.worksheet[j][`R${attr}`] ? this.worksheet[j][`R${attr}`].v : ''
console.log(drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode, 2222222222)
if (!drawingNum && !name && !type && !material && !spareNum && !useNum && !manufacturer && !remarks && !classificationCode) { // 当图号、名称、规格、材料、备件数量、装机数量、制造商、备注、分类码都为空时,循环终止,防止向数据库中插入多余且无用的数据
break
} else {
@@ -216,6 +217,7 @@ export default {
this.err === 0 ? this.$message.success(`导入完成`) : this.$message.error(`导入失败零件个数为${this.err},请检查文件是否正确`)
this.projectChange(this.projectName) // 调用查询机床方法通过watch属性检测变化会自动得到下面表格的值。
} catch (e) {
console.log(e)
this.err++
this.$notify.error(`导入数据错误,请检查导入文件是否正确`)
console.log(`导入数据错误${e}`)
@@ -237,7 +239,6 @@ export default {
}
}
} catch (e) {
alert(3)
this.err++
this.$message.error(`导入数据错误`)
console.log(`导入数据错误${e}`)

View File

@@ -360,6 +360,7 @@ export default {
},
methods: {
async fetchData() {
this.pageCurrent = 1
try {
this.listLoading = true
this.total = 0