This commit is contained in:
liushuai
2020-01-04 09:47:22 +08:00
parent 293aef4215
commit 72b3a537e8
5 changed files with 34 additions and 6 deletions

View File

@@ -226,7 +226,7 @@ export default {
} else {
if (machineNum && groupNum) {
await sleep(50)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
await this.insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, 1, 1, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
} else {
this.loading = false
this.disabled = false
@@ -253,10 +253,10 @@ export default {
console.log(`导入数据错误${e}`)
}
},
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
async insertToSQL(establishment, proofread, review, date, machineName, machineNum, componentName, componentNum, groupNum, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode) {
try {
if (groupNum.indexOf('MX') > -1) {
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const response = await importBasics(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
console.log(res)
if (res.hasOwnProperty('output') === false) {
@@ -272,7 +272,7 @@ export default {
}
}
} else {
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const response = await importPurcharse(establishment, proofread, review, date, this.projectName, machineNum, machineName, componentName, componentNum, this.group, contractNum, pageNum, totalNum, drawingNum, name, type, material, spareNum, useNum, manufacturer, remarks, classificationCode)
const res = response.data
if (res.hasOwnProperty('output') === false) {
if (res[0].result === '0') {