a
This commit is contained in:
@@ -345,7 +345,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="cancel('form')">取消</el-button>
|
||||
<el-button v-show="title==='增加'" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='增加'" :disabled="handleAdd_disable" type="primary" @click="submitAdd('form')">确定</el-button>
|
||||
<el-button v-show="title==='编辑'" type="primary" @click="submitEdit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
@@ -566,6 +566,7 @@ export default {
|
||||
inject: ['reload'],
|
||||
data() {
|
||||
return {
|
||||
handleAdd_disable: false,
|
||||
dateRange: '',
|
||||
partNumber: '',
|
||||
dateRange1: '',
|
||||
@@ -1037,19 +1038,24 @@ export default {
|
||||
})
|
||||
},
|
||||
handleAdd() {
|
||||
this.handleAdd_disable = false
|
||||
this.addForm('form', [this.dialogFormVisible = true, this.title = '增加'])
|
||||
this.form.请购时间 = getNowShotTime()
|
||||
},
|
||||
submitAdd(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.handleAdd_disable = true
|
||||
addData(this.form.请购车间, this.name, this.id, this.form.请购时间, this.form.Remarks).then(response => {
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('增加成功')
|
||||
this.dialogFormVisible = false
|
||||
this.tableData6 = []
|
||||
this.searchTable1()
|
||||
} else { this.$message.error('增加失败') }
|
||||
} else {
|
||||
this.$message.error('增加失败')
|
||||
this.handleAdd_disable = false
|
||||
}
|
||||
})
|
||||
} else {
|
||||
console.log('error submit!!')
|
||||
|
||||
Reference in New Issue
Block a user