更新
This commit is contained in:
@@ -250,17 +250,32 @@ export default {
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
console.log(res)
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res[0].result === '2') {
|
||||
this.$notify.error(`${drawingNum}导入重复`)
|
||||
if (res.hasOwnProperty('output') === false) {
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
if (res.hasOwnProperty('output') === false) {
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -414,22 +414,34 @@ export default {
|
||||
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
console.log(res, 11111111)
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
if (res.hasOwnProperty('output') === false) {
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(drawingNum, 1111111111)
|
||||
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, totalNum, pageNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
|
||||
const res = response.data
|
||||
console.log(res, 222222)
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
if (res.hasOwnProperty('output') === false) {
|
||||
if (res[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
} else {
|
||||
if (res.result[0].result === '0') {
|
||||
this.$notify.error(`${drawingNum}导入失败`)
|
||||
}
|
||||
if (res.output[0].导入类型 === '2') {
|
||||
this.$notify.warning(`存在重复数据`)
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user