From 96f4f79d2f3cf2aca5de27eefe5203679ba78d90 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期五, 04 七月 2025 19:49:30 +0800
Subject: [PATCH] 1、保养规范页面按照新需求进行调整并开发 2、点检工单页面调整字段展示名称

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue |   66 +++++++++++++++++---------------
 1 files changed, 35 insertions(+), 31 deletions(-)

diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 49a8cd4..4db5113 100644
--- a/src/views/eam/equipment/modules/EamEquipmentModal.vue
+++ b/src/views/eam/equipment/modules/EamEquipmentModal.vue
@@ -24,7 +24,7 @@
                 </a-col>
                 <a-col :span="customSpan">
                   <a-form-model-item prop="equipmentCode" label="缁熶竴缂栫爜">
-                    <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜" v-model="model.equipmentCode"/>
+                    <a-input placeholder="璇疯緭鍏ョ粺涓�缂栫爜" v-model="model.equipmentCode" :disabled="!editable"/>
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
@@ -35,7 +35,7 @@
                 <a-col :span="customSpan">
                   <a-form-model-item prop="factoryOrgCode" label="浣跨敤閮ㄩ棬">
                     <a-tree-select v-model="model.factoryOrgCode" style="width: 100%" show-search
-                                   :tree-data="productionTreeData"
+                                   :tree-data="productionTreeData" :disabled="!editable"
                                    :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
                                    placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" allow-clear treeNodeFilterProp="title"
                                    :replaceFields="{key:'orgCode',value:'orgCode'}"
@@ -47,7 +47,7 @@
               <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item prop="equipmentCategory" label="鎵�灞炲垎绫�">
-                    <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨鎵�灞炲垎绫�"
+                    <j-dict-select-tag dict-code="equipment_category" placeholder="璇烽�夋嫨鎵�灞炲垎绫�" :disabled="!editable"
                                        v-model="model.equipmentCategory"/>
                   </a-form-model-item>
                 </a-col>
@@ -216,7 +216,8 @@
               <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鏈涓変繚鏃ユ湡">
-                    <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD" style="width:100%"/>
+                    <a-date-picker v-model="model.latestThirdMaintenance" value-format="YYYY-MM-DD"
+                                   :disabled="!editable" style="width:100%"/>
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
@@ -225,14 +226,15 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
-                  <a-form-model-item label="涓変繚鍛ㄦ湡">
-                    <a-input-number placeholder="璇疯緭鍏ヤ笁淇濆懆鏈�" v-model="model.thirdMaintenancePeriod" :min="0"
+                  <a-form-model-item label="涓変繚鍛ㄦ湡锛堝勾锛�">
+                    <a-input-number placeholder="璇疯緭鍏ヤ笁淇濆懆鏈燂紙骞达級" v-model="model.thirdMaintenancePeriod" :min="1"
                                     style="width: 100%"/>
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鏈鎶�鏈壌瀹氭棩鏈�">
-                    <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" style="width:100%"/>
+                    <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD"
+                                   :disabled="!editable" style="width:100%"/>
                   </a-form-model-item>
                 </a-col>
               </a-row>
@@ -244,8 +246,8 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
-                  <a-form-model-item label="鎶�鏈壌瀹氬懆鏈�">
-                    <a-input-number placeholder="璇疯緭鍏ユ妧鏈壌瀹氬懆鏈�" v-model="model.technologyCheckPeriod" :min="0"
+                  <a-form-model-item label="鎶�鏈壌瀹氬懆鏈燂紙骞达級">
+                    <a-input-number placeholder="璇疯緭鍏ユ妧鏈壌瀹氬懆鏈燂紙骞达級" v-model="model.technologyCheckPeriod" :min="1"
                                     style="width: 100%"/>
                   </a-form-model-item>
                 </a-col>
@@ -355,7 +357,7 @@
     },
     methods: {
       add() {
-        this.editable = false
+        this.editable = true
         //鍒濆鍖栭粯璁ゅ��
         this.model = {
           operationSystem: 1,
@@ -365,7 +367,7 @@
       },
 
       edit(record) {
-        this.editable = true
+        this.editable = false
         this.model = Object.assign({}, record)
         this.visible = true
       },
@@ -376,32 +378,34 @@
         this.$refs.form.validate(valid => {
           if (valid) {
             that.confirmLoading = true
-            let httpurl = ''
+            let httpUrl = ''
             let method = ''
             if (!this.model.id) {
-              httpurl += this.url.add
+              httpUrl += this.url.add
               method = 'post'
             } else {
-              httpurl += this.url.edit
+              httpUrl += this.url.edit
               method = 'put'
             }
-            httpAction(httpurl, this.model, method).then((res) => {
-              if (res.success) {
-                that.$notification.success({
-                  message: '娑堟伅',
-                  description: res.message
-                })
-                that.$emit('ok')
-                that.close()
-              } else {
-                that.$notification.warning({
-                  message: '娑堟伅',
-                  description: res.message
-                })
-              }
-            }).finally(() => {
-              that.confirmLoading = false
-            })
+            httpAction(httpUrl, this.model, method)
+              .then((res) => {
+                if (res.success) {
+                  that.$notification.success({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                  that.$emit('ok')
+                  that.close()
+                } else {
+                  that.$notification.warning({
+                    message: '娑堟伅',
+                    description: res.message
+                  })
+                }
+              })
+              .finally(() => {
+                that.confirmLoading = false
+              })
           } else {
             return false
           }

--
Gitblit v1.9.3