This commit is contained in:
Vergil
2020-04-08 14:10:48 +08:00
parent 0d0e0dcb6f
commit 2aac78cda4
4 changed files with 33 additions and 9 deletions

View File

@@ -144,7 +144,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="callOff('form')">取消</el-button>
<el-button type="primary" @click="submit('form')">确定</el-button>
<el-button :disabled="handleAdd_disable" type="primary" @click="submit('form')">确定</el-button>
</div>
</el-dialog>
</div>
@@ -161,6 +161,7 @@ export default {
},
data() {
return {
handleAdd_disable: false,
工艺计划流水号: [],
isChecked: false,
bianliang: [],
@@ -393,6 +394,7 @@ export default {
})
this.form.运费 = 0
this.form.外协厂家 = ''
this.handleAdd_disable = false
this.dialogFormVisible = true
},
// 编辑外协任务单
@@ -401,10 +403,9 @@ export default {
this.$refs['form'].resetFields()
}
this.title = '编辑外协任务单'
this.dialogFormVisible = true
this.form.表单号 = row.表单号
this.form.运费 = row.运费
this.form.外协厂家 = row.外协厂家
this.form.外协厂家 = parseInt(row.外协厂家流水号)
this.form.下达任务日期 = row.任务下达日期
this.ManufactorNumber1 = row.外协厂家流水号
this.Number = row.外协加工任务单流水号
@@ -416,6 +417,8 @@ export default {
} else {
this.documentStatus = 2
}
this.handleAdd_disable = false
this.dialogFormVisible = true
},
// 提交
submit(formName) {
@@ -441,6 +444,7 @@ export default {
this.form.运费 = ''
this.$message.error('请输入数字')
} else {
this.handleAdd_disable = true
addTable(this.form.表单号, this.id, this.form.外协厂家, this.form.下达任务日期, this.form.运费).then(response => {
if (response.data[0].result === '1') {
this.$notify({
@@ -453,6 +457,7 @@ export default {
this.fetchData()
this.dialogFormVisible = false
} else {
this.handleAdd_disable = false
this.$message.error('信息添加失败')
}
})
@@ -460,13 +465,17 @@ export default {
},
// 提交编辑
submitEdit() {
this.handleAdd_disable = true
editData(this.Number, this.form.外协厂家, this.form.运费, this.Explain).then(response => {
if (response.data[0].result === '1') {
this.$message.success('编辑成功')
this.dialogFormVisible = false
this.title = ''
this.fetchData()
} else { this.$message.error('编辑失败') }
} else {
this.handleAdd_disable = false
this.$message.error('编辑失败')
}
})
},
// 删除任务单