From 529061167e2cc6e67c7ee60a9355cdc0a7702502 Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 15 七月 2025 15:08:22 +0800
Subject: [PATCH] 1、技术鉴定工单审批维修室主人确认单项检查流程增加展示以及限制条件 2、设备台账页面新增真空热处理炉字段

---
 src/views/eam/equipment/modules/EamEquipmentModal.vue |  185 ++++++++++++++++++++++++++--------------------
 1 files changed, 104 insertions(+), 81 deletions(-)

diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue
index 49a8cd4..6609f5a 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">
@@ -33,21 +33,26 @@
                   </a-form-model-item>
                 </a-col>
                 <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"
-                                   :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
-                                   placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" allow-clear treeNodeFilterProp="title"
-                                   :replaceFields="{key:'orgCode',value:'orgCode'}"
-                                   searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" tree-default-expand-all/>
+                  <a-form-model-item label="鍨嬪彿">
+                    <a-input placeholder="璇疯緭鍏ュ瀷鍙�" v-model="model.equipmentModel"/>
                   </a-form-model-item>
                 </a-col>
               </a-row>
 
               <a-row>
                 <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" :disabled="!editable"
+                                   :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                                   placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬" allow-clear treeNodeFilterProp="title"
+                                   :replaceFields="{key:'orgCode',value:'orgCode'}"
+                                   searchPlaceholder="璇疯緭鍏ュ叧閿瓧鎼滅储" tree-default-expand-all/>
+                  </a-form-model-item>
+                </a-col>
+                <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>
@@ -65,14 +70,14 @@
                                    allow-clear tree-default-expand-all/>
                   </a-form-model-item>
                 </a-col>
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="瀹夊叏閰嶇疆">
                     <a-input placeholder="璇疯緭鍏ュ畨鍏ㄩ厤缃�" v-model="model.securityConfiguration"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鍐峰嵈绯荤粺">
                     <j-dict-select-tag dict-code="cooling_system" placeholder="璇烽�夋嫨鍐峰嵈绯荤粺" v-model="model.coolSystem"/>
@@ -80,7 +85,8 @@
                 </a-col>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鐏伀鍣�">
-                    <j-dict-select-tag dict-code="yn" type="radio" v-model="model.fireExtinguisher"/>
+                    <j-dict-select-tag dict-code="yn" type="radio" v-model="model.fireExtinguisher"
+                                       @change="handleRadioChange($event,'fireExtinguisherExpirationDate')"/>
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
@@ -89,17 +95,24 @@
                              v-model="model.fireExtinguisherExpirationDate" placeholder="璇疯緭鍏ョ伃鐏櫒鏈夋晥鏈�"/>
                   </a-form-model-item>
                 </a-col>
-                <a-col :span="customSpan">
-                  <a-form-model-item label="鎿嶄綔绯荤粺">
-                    <j-dict-select-tag dict-code="yn " type="radio" v-model="model.operationSystem"/>
-                  </a-form-model-item>
-                </a-col>
+
               </a-row>
 
               <a-row>
                 <a-col :span="customSpan">
+                  <a-form-model-item label="鎿嶄綔绯荤粺">
+                    <j-dict-select-tag dict-code="yn " type="radio" v-model="model.operationSystem"
+                                       @change="handleRadioChange($event,'system')"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span="customSpan">
                   <a-form-model-item label="绯荤粺">
-                    <a-input placeholder="璇疯緭鍏ョ郴缁�" :disabled="Boolean(+model.operationSystem)" v-model="model.system"/>
+                    <a-input placeholder="璇疯緭鍏ョ郴缁�" :disabled="!Boolean(+model.operationSystem)" v-model="model.system"/>
+                  </a-form-model-item>
+                </a-col>
+                <a-col :span="customSpan">
+                  <a-form-model-item label="鐪熺┖鐑鐞嗙倝">
+                    <j-dict-select-tag dict-code="yn " type="radio" v-model="model.trueHeatTreatment"/>
                   </a-form-model-item>
                 </a-col>
                 <a-col :span="customSpan">
@@ -107,6 +120,9 @@
                     <a-input placeholder="璇疯緭鍏ヨ澶囩鍙�" v-model="model.equipmentPort"/>
                   </a-form-model-item>
                 </a-col>
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鍧愭爣鏁伴噺">
                     <a-input-number placeholder="璇疯緭鍏ュ潗鏍囨暟閲�" v-model="model.coordinateNum" :min="0" :max="12"
@@ -118,9 +134,6 @@
                     <a-input-number placeholder="璇疯緭鍏ラ噸閲�" v-model="model.equipmentWeight" :min="0" style="width: 100%"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="閲嶉噺璁¢噺鍗曚綅">
                     <a-input placeholder="璇疯緭鍏ラ噸閲忚閲忓崟浣�" v-model="model.weightUnit"/>
@@ -131,6 +144,10 @@
                     <a-input placeholder="璇疯緭鍏ュ姛鑳戒綅缃�" v-model="model.functionalLocation"/>
                   </a-form-model-item>
                 </a-col>
+
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="瀹夎浣嶇疆">
                     <a-input placeholder="璇疯緭鍏ュ畨瑁呬綅缃�" v-model="model.installationPosition"/>
@@ -141,9 +158,6 @@
                     <a-date-picker v-model="model.leaveFactoryDate" value-format="YYYY-MM-DD" style="width:100%"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="绔嬮」鍗″彿">
                     <a-input placeholder="璇疯緭鍏ョ珛椤瑰崱鍙�" v-model="model.cardNumber"/>
@@ -154,6 +168,10 @@
                     <a-input placeholder="璇疯緭鍏ヨ祫閲戞潵婧�" v-model="model.fundingSource"/>
                   </a-form-model-item>
                 </a-col>
+
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="楠屾敹鏃ユ湡">
                     <a-date-picker v-model="model.acceptanceCheckDate" value-format="YYYY-MM-DD" style="width:100%"/>
@@ -164,9 +182,6 @@
                     <a-input placeholder="璇疯緭鍏ュ嚭鍘傜紪鍙�" v-model="model.factoryNumber"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="璧勪骇鍒堕�犲晢">
                     <a-input placeholder="璇疯緭鍏ヨ祫浜у埗閫犲晢" v-model="model.manufacturingEnterprise"/>
@@ -177,19 +192,15 @@
                     <a-input placeholder="璇疯緭鍏ヨ祫浜ф潵婧愬浗瀹�" v-model="model.originCountry"/>
                   </a-form-model-item>
                 </a-col>
-                <a-col :span="customSpan">
-                  <a-form-model-item label="鍨嬪彿">
-                    <a-input placeholder="璇疯緭鍏ュ瀷鍙�" v-model="model.equipmentModel"/>
-                  </a-form-model-item>
-                </a-col>
+
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="璁惧瑙勬牸">
                     <a-input placeholder="璇疯緭鍏ヨ澶囪鏍�" v-model="model.equipmentSpecification"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="鎬诲姛鐜�(KW)">
                     <a-input-number placeholder="璇疯緭鍏ユ�诲姛鐜�(KW)" v-model="model.equipmentPower" :min="0"
@@ -206,17 +217,19 @@
                     <a-date-picker v-model="model.warrantyEndDate" value-format="YYYY-MM-DD" style="width:100%"/>
                   </a-form-model-item>
                 </a-col>
+
+              </a-row>
+
+              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="璧勪骇鐘舵��">
                     <j-dict-select-tag dict-code="asset_status" placeholder="璇烽�夋嫨璧勪骇鐘舵��" v-model="model.assetStatus"/>
                   </a-form-model-item>
                 </a-col>
-              </a-row>
-
-              <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,27 +238,35 @@
                   </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-row>
+
+              <a-row>
+                <a-col :span="customSpan">
+                  <a-form-model-item label="鎶�鏈姸鎬�">
+                    <j-dict-select-tag placeholder="璇烽�夋嫨鎶�鏈姸鎬�" dict-code="equipment_technology_status"
+                                       v-model="model.technologyStatus"/>
                   </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>
-
-              <a-row>
                 <a-col :span="customSpan">
                   <a-form-model-item label="涓嬫鎶�鏈壌瀹氭棩鏈�">
                     <a-date-picker v-model="model.nextTechnologyCheck" value-format="YYYY-MM-DD" style="width:100%"/>
                   </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>
@@ -272,13 +293,6 @@
         </a-tab-pane>
 
         <a-tab-pane tab="淇濆吇鏍囧噯" :key="7">
-        </a-tab-pane>
-
-        <a-tab-pane tab="宸ヨ壓鍙傛暟" :key="8">
-        </a-tab-pane>
-
-        <a-tab-pane tab="璁惧绮惧害" :key="9">
-
         </a-tab-pane>
       </template>
     </a-tabs>
@@ -350,24 +364,31 @@
         }
       }
     },
-    created() {
-      this.loadAllProductionTree()
-    },
     methods: {
       add() {
-        this.editable = false
+        this.editable = true
         //鍒濆鍖栭粯璁ゅ��
         this.model = {
           operationSystem: 1,
-          fireExtinguisher: 0
+          fireExtinguisher: 0,
+          trueHeatTreatment: 0
         }
         this.visible = true
       },
 
       edit(record) {
-        this.editable = true
+        this.editable = false
         this.model = Object.assign({}, record)
         this.visible = true
+      },
+
+      /**\
+       * 鍗曢�夋鍊煎彂鐢熸敼鍙樻椂瑙﹀彂
+       * @param value 鍗曢�夋鍊�
+       * @param key 鍗曢�夋鍏宠仈瀛楁
+       */
+      handleRadioChange(value, key) {
+        if (value == '0') delete this.model[key]
       },
 
       handleOk() {
@@ -376,32 +397,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