制造禁用
This commit is contained in:
@@ -188,7 +188,7 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button @click="callOff('form')">取消</el-button>
|
<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>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
@@ -201,6 +201,7 @@ import { getNowTime } from '@/utils/tool'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
ADD_disable: false,
|
||||||
equipmentName: '', // 设备名称
|
equipmentName: '', // 设备名称
|
||||||
List: [],
|
List: [],
|
||||||
check: 0,
|
check: 0,
|
||||||
@@ -296,7 +297,6 @@ export default {
|
|||||||
this.$refs['form'].resetFields()
|
this.$refs['form'].resetFields()
|
||||||
}
|
}
|
||||||
this.title = '编辑设备'
|
this.title = '编辑设备'
|
||||||
this.dialogFormVisible = true
|
|
||||||
this.form.设备名称 = row.设备名称
|
this.form.设备名称 = row.设备名称
|
||||||
this.form.设备编号 = row.设备编号
|
this.form.设备编号 = row.设备编号
|
||||||
this.form.设备型号 = row.设备型号
|
this.form.设备型号 = row.设备型号
|
||||||
@@ -308,6 +308,8 @@ export default {
|
|||||||
this.form.整改工时系数 = row.整改工时比例
|
this.form.整改工时系数 = row.整改工时比例
|
||||||
this.form.预留工时系数 = row.设备预留工时系数
|
this.form.预留工时系数 = row.设备预留工时系数
|
||||||
this.equipmentSerialNumber = row.设备流水号
|
this.equipmentSerialNumber = row.设备流水号
|
||||||
|
this.ADD_disable = false
|
||||||
|
this.dialogFormVisible = true
|
||||||
},
|
},
|
||||||
submit(formName) {
|
submit(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
@@ -321,6 +323,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
submitAdd() {
|
submitAdd() {
|
||||||
|
this.ADD_disable = true
|
||||||
for (let i = 0; i < this.processingName.length; i++) {
|
for (let i = 0; i < this.processingName.length; i++) {
|
||||||
if (this.form.设备加工工艺 === this.processingName[i].value) {
|
if (this.form.设备加工工艺 === this.processingName[i].value) {
|
||||||
this.processing1 = this.processingName[i].processing
|
this.processing1 = this.processingName[i].processing
|
||||||
@@ -336,19 +339,21 @@ export default {
|
|||||||
this.dialogFormVisible = false
|
this.dialogFormVisible = false
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
} else {
|
} else {
|
||||||
|
this.ADD_disable = false
|
||||||
this.$message.error('信息添加失败')
|
this.$message.error('信息添加失败')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
ADD() {
|
ADD() {
|
||||||
this.addForm('form')
|
this.addForm('form')
|
||||||
this.dialogFormVisible = true
|
|
||||||
this.form.contractSigningDate = getNowTime()// new Date()
|
this.form.contractSigningDate = getNowTime()// new Date()
|
||||||
this.temp = 1
|
this.temp = 1
|
||||||
this.title = '增加'
|
this.title = '新增设备'
|
||||||
|
this.ADD_disable = false
|
||||||
|
this.dialogFormVisible = true
|
||||||
},
|
},
|
||||||
submitEdit() {
|
submitEdit() {
|
||||||
console.log(2323)
|
this.ADD_disable = true
|
||||||
editTable(this.equipmentSerialNumber, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备加工能力, this.form.设备工时系数, this.form.班次类型, this.form.设备加工工艺, this.form.整改工时系数, this.form.设备编号, this.form.预留工时系数).then(response => {
|
editTable(this.equipmentSerialNumber, this.form.设备名称, this.form.设备型号, this.form.设备性能指标, this.form.设备加工能力, this.form.设备工时系数, this.form.班次类型, this.form.设备加工工艺, this.form.整改工时系数, this.form.设备编号, this.form.预留工时系数).then(response => {
|
||||||
if (response.data[0].result === '1') {
|
if (response.data[0].result === '1') {
|
||||||
this.$notify({
|
this.$notify({
|
||||||
@@ -360,6 +365,7 @@ export default {
|
|||||||
this.title = ''
|
this.title = ''
|
||||||
this.fetchData()
|
this.fetchData()
|
||||||
} else {
|
} else {
|
||||||
|
this.ADD_disable = false
|
||||||
this.$message.error('信息编辑失败')
|
this.$message.error('信息编辑失败')
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user