This commit is contained in:
liushuai
2019-12-02 17:15:01 +08:00
parent f8b5751a21
commit f6ef7676e2
5 changed files with 37 additions and 21 deletions

View File

@@ -515,35 +515,34 @@ export default {
submitChangeType(row) {
this.Number = row.id
this.Type = row.整改类型
if (row.整改类型 === 1) {
if (this.groupName.indexOf('MX') > -1) {
if (this.groupName.indexOf('MX') > -1) {
if (row.整改类型 === 1) {
update(this.projectName, this.machineValue, row.id, row.整改类型).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
}
})
} else {
update1(row.id, row.整改类型).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
}
})
}
} else {
if (row.整改类型 === 2) {
} else if (row.整改类型 === 2) {
this.title1 = '替换'
this.oldPartsValue = row.图号或者型号.split('-')[0] + '-' + row.图号或者型号.split('-')[1].substring(2, 7)
searchOldParts(this.projectName, this.machineValue, this.oldPartsValue).then(response => {
this.PartsValueNum = response.data[0].图号或者型号
})
this.dialogParts = true
} else {
this.title1 = '补充加工'
this.oldPartsValue = row.图号或者型号.split('-')[0] + '-' + row.图号或者型号.split('-')[1].substring(2, 7)
searchOldParts(this.projectName, this.machineValue, this.oldPartsValue).then(response => {
this.PartsValueNum = response.data[0].图号或者型号
})
this.dialogParts = true
}
this.dialogParts = true
} else {
update1(row.id, row.整改类型).then(response => {
if (response.data[0].result === '1') {
this.fetchData()
}
})
}
},
searchMaterial1(row) {