From 9eea7e049a7aa3e6ebaf5983db2dbe6cf922cc90 Mon Sep 17 00:00:00 2001 From: helloDy <1615073571@qq.com> Date: Fri, 24 Nov 2023 19:01:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/base/coreProductionLine/index.vue | 4 +-- .../base/coreWorkOrder/add-or-updata.vue | 13 ++++--- src/views/base/coreWorkOrder/addWorkOrder.vue | 4 +-- src/views/base/coreWorker/add-or-updata.vue | 35 +++++++++++-------- .../base/inspection/Record/addRecord.vue | 4 +-- .../base/inspection/Record/index.vue | 6 ++-- .../inspection/Settings/add-or-updata.vue | 15 ++++---- .../base/inspection/Settings/index.vue | 9 +++-- .../equipment/base/maintain/Record/index.vue | 5 +++ .../base/spareParts/Config/addSparts.vue | 3 -- .../base/spareParts/Config/attr-add.vue | 21 ++++------- .../equipment/base/spareParts/List/index.vue | 6 ++++ .../base/spareParts/Monitor/addSparts.vue | 9 ++--- .../base/spareParts/Monitor/attr-add.vue | 34 +++++++++++++++--- 14 files changed, 102 insertions(+), 66 deletions(-) diff --git a/src/views/base/coreProductionLine/index.vue b/src/views/base/coreProductionLine/index.vue index b8b4e9fa..cbcfd3db 100644 --- a/src/views/base/coreProductionLine/index.vue +++ b/src/views/base/coreProductionLine/index.vue @@ -144,8 +144,8 @@ export default { getDataList() { this.dataListLoading = true; this.urlOptions.getDataListURL(this.listQuery).then(response => { - this.tableData = response.data.list; - // this.getStatus(response.data.list) + // this.tableData = response.data.list; + this.getStatus(response.data.list) this.listQuery.total = response.data.total; this.dataListLoading = false; }); diff --git a/src/views/base/coreWorkOrder/add-or-updata.vue b/src/views/base/coreWorkOrder/add-or-updata.vue index 98f4de45..621469d4 100644 --- a/src/views/base/coreWorkOrder/add-or-updata.vue +++ b/src/views/base/coreWorkOrder/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-20 16:51:24 + * @LastEditTime: 2023-11-24 18:20:26 * @Description: --> { if (val === item.id) { - this.dataForm.productSpec = item.specifications + this.dataForm.specifications = item.specifications } }) } else { - this.dataForm.productSpec = '' + this.dataForm.specifications = '' } } } diff --git a/src/views/base/coreWorker/add-or-updata.vue b/src/views/base/coreWorker/add-or-updata.vue index 38ea5154..3cc522c4 100644 --- a/src/views/base/coreWorker/add-or-updata.vue +++ b/src/views/base/coreWorker/add-or-updata.vue @@ -2,7 +2,7 @@ * @Author: zwq * @Date: 2021-11-18 14:16:25 * @LastEditors: DY - * @LastEditTime: 2023-11-22 10:26:58 + * @LastEditTime: 2023-11-24 18:13:02 * @Description: --> diff --git a/src/views/equipment/base/spareParts/Config/addSparts.vue b/src/views/equipment/base/spareParts/Config/addSparts.vue index be7aee17..85975edd 100644 --- a/src/views/equipment/base/spareParts/Config/addSparts.vue +++ b/src/views/equipment/base/spareParts/Config/addSparts.vue @@ -75,9 +75,6 @@ - 取消 + 取消 确定 @@ -79,21 +79,13 @@ export default { this.partList = res.data.list; }) }, + cancel() { + this.$refs['dataForm'].resetFields() + this.visible = false + }, init(id) { - this.dataForm.id = id || ''; + // this.dataForm.id = id || ''; this.visible = true; - // this.$nextTick(() => { - // this.$refs['dataForm'].resetFields(); - // if (this.dataForm.id) { - // getCoreProductAttr({ - // id: this.dataForm.id - // }).then((res) => { - // const { name, value } = res.data; - // this.dataForm.name = name; - // this.dataForm.value = value; - // }); - // } - // }); }, // 表单提交 dataFormSubmit() { @@ -117,6 +109,7 @@ export default { configId: this.configId, }).then((response) => { this.$modal.msgSuccess('新增成功'); + this.$refs['dataForm'].resetFields() this.visible = false; this.$emit('refreshDataList'); }); diff --git a/src/views/equipment/base/spareParts/List/index.vue b/src/views/equipment/base/spareParts/List/index.vue index 473160be..10bd5dcc 100644 --- a/src/views/equipment/base/spareParts/List/index.vue +++ b/src/views/equipment/base/spareParts/List/index.vue @@ -301,6 +301,12 @@ export default { const id = row.id; this.info({ id }).then((response) => { this.form = response.data; + if (this.form.unit !== undefined) { + this.form.unit = String(this.form.unit) + } + if (this.form.type !== undefined) { + this.form.type = String(this.form.type) + } this.open = true; this.title = '修改备品备件'; }); diff --git a/src/views/equipment/base/spareParts/Monitor/addSparts.vue b/src/views/equipment/base/spareParts/Monitor/addSparts.vue index eb3fd801..a39a8dc5 100644 --- a/src/views/equipment/base/spareParts/Monitor/addSparts.vue +++ b/src/views/equipment/base/spareParts/Monitor/addSparts.vue @@ -310,7 +310,8 @@ export default { handleClick(raw) { if (raw.type === 'change') { // 更换 - this.addNew(); + console.log(raw) + this.addNew(raw.data.sparePartId); } else {} }, getList() { @@ -320,7 +321,7 @@ export default { configId: this.dataForm.id, }).then((response) => { this.list = response.data; - this.listQuery.total = response.data.total; + this.listQuery.total = response.data.length; }); }, getList1() { @@ -334,10 +335,10 @@ export default { }); }, // 新增 / 修改 - addNew(id) { + addNew(sparePartId) { this.addOrUpdateVisible = true; this.$nextTick(() => { - this.$refs.addOrUpdate.init(id); + this.$refs.addOrUpdate.init(sparePartId); }); }, /** 导出按钮操作 */ diff --git a/src/views/equipment/base/spareParts/Monitor/attr-add.vue b/src/views/equipment/base/spareParts/Monitor/attr-add.vue index ba092618..d4cb5219 100644 --- a/src/views/equipment/base/spareParts/Monitor/attr-add.vue +++ b/src/views/equipment/base/spareParts/Monitor/attr-add.vue @@ -25,10 +25,27 @@ clearable placeholder="请输入操作人" /> + + + + + + - 取消 + 取消 确定 @@ -49,11 +66,15 @@ export default { visible: false, dataForm: { id: undefined, - responsible: '' + responsible: '', + timeUsed: 0, + sparePartId: '', + replacementTime: undefined }, partList: [], dataRule: { - responsible: [{ required: true, message: '操作人不能为空', trigger: 'blur' }] + responsible: [{ required: true, message: '操作人不能为空', trigger: 'blur' }], + replacementTime: [{ required: true, message: '更换时间不能为空', trigger: 'blur' }] }, }; }, @@ -66,9 +87,13 @@ export default { // this.partList = res.data // }, init(id) { - this.dataForm.id = id || ''; + this.dataForm.sparePartId = id || undefined; this.visible = true; }, + cancel() { + this.$refs['dataForm'].resetFields(); + this.visible = false; + }, // 表单提交 dataFormSubmit() { this.$refs['dataForm'].validate((valid) => { @@ -91,6 +116,7 @@ export default { configId: this.configId, }).then((response) => { this.$modal.msgSuccess('新增成功'); + this.$refs['dataForm'].resetFields(); this.visible = false; this.$emit('refreshDataList'); }); -- 2.45.2