disable
This commit is contained in:
@@ -178,7 +178,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="ADD_disable" type="primary" @click="submit('form')">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--货位表单-->
|
||||
@@ -242,6 +242,7 @@ import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ADD_disable: false,
|
||||
Contactpeople: [], // 联系人
|
||||
count2: 0, // 清表单验证计数器
|
||||
tableData: [],
|
||||
@@ -372,10 +373,16 @@ export default {
|
||||
},
|
||||
// 点击增加仓库
|
||||
ADD() {
|
||||
this.form = []
|
||||
this.WarehouseNumber = ''
|
||||
this.WarehouseName = ''
|
||||
this.WarehouseDescription = ''
|
||||
this.Address = ''
|
||||
this.ContactpeopleValue = ''
|
||||
this.Note = ''
|
||||
if (this.$refs['form'] !== undefined) {
|
||||
this.$refs['form'].resetFields()
|
||||
}
|
||||
this.ADD_disable = false
|
||||
this.dialogFormVisible = true
|
||||
this.temp = 1
|
||||
},
|
||||
@@ -383,6 +390,7 @@ export default {
|
||||
submit(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
this.ADD_disable = true
|
||||
if (this.temp === 1) {
|
||||
this.addTableData()
|
||||
this.form.WarehouseNumber = ''
|
||||
@@ -402,16 +410,9 @@ export default {
|
||||
// 执行增加仓库
|
||||
addTableData() {
|
||||
addWarehouse(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note).then(response => {
|
||||
console.log(this.form.WarehouseNumber, this.form.WarehouseName, this.form.WarehouseDescription, this.form.Address, this.form.ContactpeopleValue, this.form.Note)
|
||||
this.dialogFormVisible = false
|
||||
if (response.data[0].result === '1') {
|
||||
this.$message.success('添加成功')
|
||||
this.form.WarehouseNumber = ''
|
||||
this.form.WarehouseName = ''
|
||||
this.form.WarehouseDescription = ''
|
||||
this.form.Address = ''
|
||||
this.form.ContactpeopleValue = ''
|
||||
this.form.Note = ''
|
||||
} else {
|
||||
this.$message.error('添加失败')
|
||||
}
|
||||
@@ -432,6 +433,7 @@ export default {
|
||||
}
|
||||
this.form.Note = row.备注
|
||||
this.HouseNumber = row.仓库流水号
|
||||
this.ADD_disable = false
|
||||
this.dialogFormVisible = true
|
||||
},
|
||||
// 执行修改
|
||||
|
||||
Reference in New Issue
Block a user