外协任务执行
This commit is contained in:
@@ -768,10 +768,8 @@ export default {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.title === '增加') {
|
if (this.title === '增加') {
|
||||||
this.submitAdd()
|
this.submitAdd()
|
||||||
this.title = ''
|
|
||||||
} else if (this.title === '编辑') {
|
} else if (this.title === '编辑') {
|
||||||
this.submitEdit()
|
this.submitEdit()
|
||||||
this.title = ''
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -781,7 +779,6 @@ export default {
|
|||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
}
|
}
|
||||||
this.title = '增加'
|
this.title = '增加'
|
||||||
this.dialogFormVisible = true
|
|
||||||
var time = new Date()
|
var time = new Date()
|
||||||
var month = time.getMonth() + 1
|
var month = time.getMonth() + 1
|
||||||
var day = time.getDate()
|
var day = time.getDate()
|
||||||
@@ -797,21 +794,29 @@ export default {
|
|||||||
})
|
})
|
||||||
this.form.运费 = null
|
this.form.运费 = null
|
||||||
this.form.外协厂家 = ''
|
this.form.外协厂家 = ''
|
||||||
|
this.dialogFormVisible = true
|
||||||
},
|
},
|
||||||
submitAdd() {
|
submitAdd() {
|
||||||
addTable(this.form.表单号, this.id, this.ManufactorNumber1, this.form.下达任务日期, this.form.运费).then(response => {
|
this.form.运费 = parseInt(this.form.运费)
|
||||||
if (response.data[0].result === '1') {
|
if (isNaN(this.form.运费)) {
|
||||||
this.$notify({
|
this.form.运费 = ''
|
||||||
title: '成功',
|
this.$message.error('请输入数字')
|
||||||
message: '信息添加成功',
|
} else {
|
||||||
type: 'success'
|
addTable(this.form.表单号, this.id, this.ManufactorNumber1, this.form.下达任务日期, this.form.运费).then(response => {
|
||||||
})
|
if (response.data[0].result === '1') {
|
||||||
this.dialogFormVisible = false
|
this.$notify({
|
||||||
this.fetchData()
|
title: '成功',
|
||||||
} else {
|
message: '信息添加成功',
|
||||||
this.$message.error('信息添加失败')
|
type: 'success'
|
||||||
}
|
})
|
||||||
})
|
this.dialogFormVisible = false
|
||||||
|
this.title = ''
|
||||||
|
this.fetchData()
|
||||||
|
} else {
|
||||||
|
this.$message.error('信息添加失败')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
if (this.partNumber !== '') {
|
if (this.partNumber !== '') {
|
||||||
@@ -1247,6 +1252,7 @@ export default {
|
|||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$message.success('编辑成功')
|
this.$message.success('编辑成功')
|
||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
|
this.title = ''
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
} else { this.$message.error('编辑失败') }
|
} else { this.$message.error('编辑失败') }
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user