制造禁用

This commit is contained in:
Vergil
2020-04-09 09:59:46 +08:00
parent dc0b9cc5d9
commit 639935bae1

View File

@@ -188,7 +188,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>
</div>
@@ -201,6 +201,7 @@ import { getNowTime } from '@/utils/tool'
export default {
data() {
return {
ADD_disable: false,
equipmentName: '', // 设备名称
List: [],
check: 0,
@@ -296,7 +297,6 @@ export default {
this.$refs['form'].resetFields()
}
this.title = '编辑设备'
this.dialogFormVisible = true
this.form.设备名称 = row.设备名称
this.form.设备编号 = row.设备编号
this.form.设备型号 = row.设备型号
@@ -308,6 +308,8 @@ export default {
this.form.整改工时系数 = row.整改工时比例
this.form.预留工时系数 = row.设备预留工时系数
this.equipmentSerialNumber = row.设备流水号
this.ADD_disable = false
this.dialogFormVisible = true
},
submit(formName) {
this.$refs[formName].validate((valid) => {
@@ -321,6 +323,7 @@ export default {
})
},
submitAdd() {
this.ADD_disable = true
for (let i = 0; i < this.processingName.length; i++) {
if (this.form.设备加工工艺 === this.processingName[i].value) {
this.processing1 = this.processingName[i].processing
@@ -336,19 +339,21 @@ export default {
this.dialogFormVisible = false
this.fetchData()
} else {
this.ADD_disable = false
this.$message.error('信息添加失败')
}
})
},
ADD() {
this.addForm('form')
this.dialogFormVisible = true
this.form.contractSigningDate = getNowTime()// new Date()
this.temp = 1
this.title = '增加'
this.title = '新增设备'
this.ADD_disable = false
this.dialogFormVisible = true
},
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 => {
if (response.data[0].result === '1') {
this.$notify({
@@ -360,6 +365,7 @@ export default {
this.title = ''
this.fetchData()
} else {
this.ADD_disable = false
this.$message.error('信息编辑失败')
}
})