From 639935bae16b98f6629d9d016c707361a46e5262 Mon Sep 17 00:00:00 2001 From: Vergil <974548713@qq.com> Date: Thu, 9 Apr 2020 09:59:46 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=B6=E9=80=A0=E7=A6=81=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkshopEquipmentManagement/index.vue | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/views/ManufacturingCenter/WorkshopEquipmentManagement/index.vue b/src/views/ManufacturingCenter/WorkshopEquipmentManagement/index.vue index 8eb0bbf8..74c66678 100644 --- a/src/views/ManufacturingCenter/WorkshopEquipmentManagement/index.vue +++ b/src/views/ManufacturingCenter/WorkshopEquipmentManagement/index.vue @@ -188,7 +188,7 @@ @@ -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('信息编辑失败') } })