From 92ff846fb659c62037a32b1d8c15eae9df9d9b54 Mon Sep 17 00:00:00 2001
From: zenglf <18502938215@163.com>
Date: 星期一, 18 九月 2023 13:24:30 +0800
Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430

---
 src/views/eam/modules/equipmentNew/EquipmentModal.vue | 1199 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 1,199 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
new file mode 100644
index 0000000..a9b5db4
--- /dev/null
+++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -0,0 +1,1199 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    :confirmLoading="confirmLoading"
+    switchFullscreen
+    @ok="handleOk"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴"
+  >
+    <a-spin :spinning="confirmLoading">
+      <a-form-model
+        ref="form"
+        :model="model"
+        :rules="validatorRules"
+      >
+        <a-row>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          > 璁惧鍩虹淇℃伅 </a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧鎵�灞炲垎绫�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentCategoryId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨璁惧鎵�灞炲垎绫�"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="mom_eam_equipment_category,name,id"
+                v-model="model.equipmentCategoryId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="缁熶竴缂栫爜"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="num"
+            >
+              <a-input
+                v-model="model.num"
+                placeholder="璇疯緭鍏ヨ澶囩紪鍙�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧鍚嶇О"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="name"
+            >
+              <a-input
+                v-model="model.name"
+                placeholder="璇疯緭鍏ヨ澶囧悕绉�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍨嬪彿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="model"
+            >
+              <a-input
+                v-model="model.model"
+                placeholder="璇疯緭鍏ュ瀷鍙�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="瑙勬牸"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="specification"
+            >
+              <a-input
+                v-model="model.specification"
+                placeholder="璇疯緭鍏ヨ鏍�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鎬诲姛鐜�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="gpo"
+            >
+              <a-input
+                v-model="model.gpo"
+                placeholder="璇疯緭鍏ユ�诲姛鐜�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧鍥剧墖"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentPhoto"
+            >
+              <j-image-upload
+                :isMultiple="false"
+                v-model="model.equipmentPhoto"
+              ></j-image-upload>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >缁存姢鍙婁娇鐢ㄤ俊鎭�</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="缁存姢閮ㄩ棬"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="manageId"
+            >
+              <a-tree-select
+                :disabled="formDisabled"
+                style="width: 100%"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="treeData"
+                placeholder="璇烽�夋嫨缁存姢閮ㄩ棬"
+                tree-default-expand-all
+                v-model="model.manageId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="浣跨敤閮ㄩ棬"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="useId"
+            >
+              <a-tree-select
+                style="width: 100%"
+                :disabled="formDisabled"
+                :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
+                :tree-data="treeData"
+                placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
+                tree-default-expand-all
+                v-model="model.useId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="缁翠慨鐝粍"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="teamId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璐d换鐝粍"
+                :triggerChange="true"
+                dictCode="mom_base_team,name,id,status='1' and del_flag='0'"
+                v-model="model.teamId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="杞﹂棿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="factoryModelId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璧勮溅闂�"
+                :triggerChange="true"
+                dictCode="mom_base_factory_model,name,id,del_flag!='1'"
+                v-model="model.factoryModelId"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="浜х嚎"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="workCenterId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨浜х嚎"
+                :triggerChange="true"
+                dictCode="mom_base_work_center,name,id,del_flag!='1'"
+                v-model="model.workCenterId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勪骇鍒堕�犲晢"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="constructorId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璧勪骇鍒堕�犲晢"
+                :triggerChange="true"
+                dictCode="mom_base_constructor,name,id,status!='0' and del_flag!='1'"
+                v-model="model.constructorId"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >鐘舵�佸強鏍囪瘑</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧鐘舵��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentStatus"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ澶囩姸鎬�"
+                :triggerChange="true"
+                dictCode="equipment_status"
+                v-model="model.equipmentStatus"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鎶�鏈姸鎬�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="technologyStatus"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨鎶�鏈姸鎬�"
+                :triggerChange="true"
+                dictCode="technology_status"
+                v-model="model.technologyStatus"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勪骇鐘舵��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="propertyStatus"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ祫浜х姸鎬�"
+                :triggerChange="true"
+                dictCode="property_status"
+                v-model="model.propertyStatus"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row v-if="model.propertyStatus=='warranty'">
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >璐ㄤ繚鏃ユ湡</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚寮�濮嬫棩鏈�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyStart"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="model.warrantyStart"></j-date>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璐ㄤ繚缁撴潫鏃ユ湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="warrantyEnd"
+            >
+            <j-date  :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >鍑哄巶鍙婂畨瑁呬俊鎭�</a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍑哄巶缂栧彿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="factoryNumber"
+            >
+              <a-input
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ嚭鍘傜紪鍙�"
+                v-model="model.factoryNumber"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍑哄巶鏃ユ湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="leaveFactoryDate"
+            >
+              <a-date-picker
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ嚭鍘傛棩鏈�"
+                style="width: 100%;"
+                v-model="model.leaveFactoryDate"
+              />
+            </a-form-model-item>
+          </a-col>
+       
+          <a-col :span="6">
+            <a-form-model-item
+              label="楠屾敹鏃ユ湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="acceptanceCheckDate"
+            >
+              <a-date-picker
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ラ獙鏀舵棩鏈�"
+                style="width: 100%;"
+                v-model="model.acceptanceCheckDate"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="绔嬮」鍗″彿"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="projectApprovalNo"
+            >
+              <a-input
+                v-model="model.projectApprovalNo"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ョ珛椤瑰崱鍙�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="宸ュ尯"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentUda1"
+            >
+              <a-input
+                v-model="model.equipmentUda1"
+                placeholder="璇疯緭鍏ュ伐鍖�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="閲嶉噺"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentUda3"
+            >
+              <a-input
+                v-model="model.equipmentUda3"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ラ噸閲�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+      
+          <a-col :span="6">
+            <a-form-model-item
+              label="閲嶉噺璁¢噺鍗曚綅"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentUda4"
+            >
+              <a-input
+                v-model="model.equipmentUda4"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ラ噸閲忚閲忓崟浣岻D"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="瀹夎浣嶇疆"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="location"
+            >
+              <a-input
+                v-model="model.location"
+                placeholder="璇疯緭鍏ュ畨瑁呬綅缃�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍔熻兘浣嶇疆"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentUda5"
+            >
+              <a-input
+                v-model="model.equipmentUda5"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ姛鑳戒綅缃�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勯噾鏉ユ簮"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="fundSource"
+            >
+              <a-input
+                v-model="model.fundSource"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ祫閲戞潵婧�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+      
+          <a-col :span="6">
+            <a-form-model-item
+              label="璧勪骇鏉ユ簮鍥藉"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="sourceCountry"
+            >
+              <a-input
+                v-model="model.sourceCountry"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ヨ祫浜ф潵婧愬浗瀹�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="瀹夊叏閰嶇疆"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="securityConfiguration"
+            >
+              <a-input
+                v-model="model.securityConfiguration"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ畨鍏ㄩ厤缃�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍐峰嵈绯荤粺"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="coolingSystem"
+            >
+              <a-input
+                v-model="model.coolingSystem"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ喎鍗寸郴缁�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鐏伀鍣�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="fireExtinguisher"
+            >
+              <a-input
+                v-model="model.fireExtinguisher"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ョ伃鐏櫒"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鐏伀鍣ㄦ湁鏁堟湡"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="fireExtinguisherValidityPeriod"
+            >
+              <a-input
+                v-model="model.fireExtinguisherValidityPeriod"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ョ伃鐏櫒鏈夋晥鏈�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鎿嶄綔绯荤粺"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="operatingSystem"
+            >
+              <a-input
+                v-model="model.operatingSystem"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ユ搷浣滅郴缁�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="绯荤粺"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="system"
+            >
+              <a-input
+                v-model="model.system"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ョ郴缁�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="绔彛"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="port"
+            >
+              <a-input
+                v-model="model.port"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ョ鍙�"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍧愭爣鏁伴噺"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="coordinateNum"
+            >
+              <a-input-number
+                v-model="model.coordinateNum"
+                :disabled="formDisabled"
+                placeholder="璇疯緭鍏ュ潗鏍囨暟閲�"
+                style="width: 100%"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="澶囨敞"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="remark"
+            >
+              <a-input
+                v-model="model.remark"
+                placeholder="璇疯緭鍏ュ娉�"
+                :disabled="formDisabled"
+              ></a-input>
+            </a-form-model-item>
+          </a-col>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          >ABC鏍囪瘑</a-divider>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="骞冲潎浣跨敤鐜�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardA"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨骞冲潎浣跨敤鐜�"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardA"
+                v-model="model.standardA"
+                @change="standardResultCompute"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鍙浛鎹㈡��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardB"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鍙浛鎹㈡��"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardB"
+                v-model="model.standardB"
+                @change="standardResultCompute"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鏁呴殰褰卞搷搴�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardC"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鏁呴殰褰卞搷搴�"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardC"
+                v-model="model.standardC"
+                @change="standardResultCompute"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鐢熶骇瓒呭樊搴�"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardD"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鐢熶骇瓒呭樊搴�"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardD"
+                v-model="model.standardD"
+                @change="standardResultCompute"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="6">
+            <a-form-model-item
+              label="鏁呴殰棰戠巼"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardE"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鏁呴殰棰戠巼"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardE"
+                @change="standardResultCompute"
+                v-model="model.standardE"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧浠峰��"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="standardF"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨璁惧浠峰��"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="ABC-standardF"
+                v-model="model.standardF"
+                @change="standardResultCompute"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="ABC鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="equipmentImportanceId"
+            >
+              <j-dict-select-tag
+                allow-clear
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨ABC鏍囪瘑"
+                :triggerChange="true"
+                dictCode="ABC-standard-result"
+                @change="changeNeedSpecific"
+                v-model="model.equipmentImportanceId"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6" v-if="needSpecific">
+            <a-form-model-item
+              label="鍏抽敭璁惧鏍囪瘑"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="specificEquipment"
+            >
+              <j-dict-select-tag
+                allow-clear
+                placeholder="璇烽�夋嫨鍏抽敭璁惧鏍囪瘑"
+                :disabled="formDisabled"
+                :triggerChange="true"
+                dictCode="specific_equipment"
+                v-model="model.specificEquipment"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-divider
+            orientation="center"
+            style="font-size: large;font-style: italic;color: #66aeed;"
+          > 绮惧害鍙婃ā鐗� </a-divider>
+          <a-col :span="6">
+            <a-form-model-item
+              label="璁惧绮惧害绠$悊"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="precisionParameters"
+            >
+              <a-switch
+                :disabled="formDisabled"
+                checked-children="鏄�"
+                un-checked-children="鍚�"
+                :checked="model.precisionParameters == '1'"
+                @change="handle2Switch(model.precisionParameters)"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col
+            :span="6"
+            v-if="model.precisionParameters == '1'"
+          >
+            <a-form-model-item
+              label="璁惧绮惧害妯$増"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="precisionParametersTemplateId"
+            >
+              <a-input-search
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璁惧绮惧害妯℃澘"
+                enter-button
+                @search="onSearchPrecisionParametersTemplate()"
+                :read-only="true"
+                v-model="model.precisionParametersTemplateId_dictText"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="6">
+            <a-form-model-item
+              label="宸ヨ壓妯$増绠$悊"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="processParameters"
+            >
+              <a-switch
+                :disabled="formDisabled"
+                checked-children="鏄�"
+                un-checked-children="鍚�"
+                :checked="model.processParameters == '1'"
+                @change="handleSwitch(model.processParameters)"
+              />
+            </a-form-model-item>
+          </a-col>
+          <a-col
+            :span="6"
+            v-if="model.processParameters == '1'"
+          >
+            <a-form-model-item
+              label="璁惧宸ヨ壓妯$増"
+              :labelCol="labelCol"
+              :wrapperCol="wrapperCol"
+              prop="precisionParametersTemplateId"
+            >
+              <a-input-search
+                :disabled="formDisabled"
+                placeholder="璇烽�夋嫨璁惧宸ヨ壓妯℃澘"
+                enter-button
+                @search="onSearchProcessParametersTemplate()"
+                :read-only="true"
+                v-model="model.processParametersTemplateId_dictText"
+              />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+      <process-parameters-template-list
+        ref="ProcessParametersTemplateList"
+        @sendProcessParametersTemplateRecord='sendProcessParametersTemplateRecord'
+      ></process-parameters-template-list>
+      <precision-parameters-template-list
+        ref="PrecisionParametersTemplateList"
+        @sendPrecisionParametersTemplateRecord='sendPrecisionParametersTemplateRecord'
+      ></precision-parameters-template-list>
+    </a-spin>
+  </j-modal>
+</template>
+<script>
+import { httpAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import pick from 'lodash.pick'
+import { postAction, requestPut, getAction } from '@/api/manage'
+import { duplicateCheck } from '@/api/api'
+import moment from 'moment'
+import ProcessParametersTemplateList from './serach/ProcessParametersTemplateList'
+import PrecisionParametersTemplateList from './serach/PrecisionParametersTemplateList'
+import { JVxeTableModelMixin } from '@/mixins/JVxeTableModelMixin.js'
+import { JVXETypes } from '@/components/jeecg/JVxeTable'
+export default {
+  name: "EquipmentModal",
+  mixins: [JVxeTableModelMixin],
+  components: {
+    validateDuplicateValue,
+    ProcessParametersTemplateList,
+    PrecisionParametersTemplateList,
+  },
+  props: {
+    disableSubmit: {
+      type: Boolean,
+      default: false,
+      required: false
+    },
+  },
+  data() {
+    return {
+      title: "鎿嶄綔",
+      width: 1500,
+      visible: false,
+      model: {
+      },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 8 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+
+      confirmLoading: false,
+      validatorRules: {
+        num: [
+          { required: true, message: '璇疯緭鍏ヨ澶囩紪鍙�!' },
+          { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' },
+          { validator: this.validateNum },
+        ],
+        name: [
+          { required: true, message: '璇疯緭鍏ヨ澶囧悕绉�!' },
+          { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' },
+          { validator: this.validateName },
+        ],
+        teamId: [
+          { required: true, message: '璇烽�夋嫨璐d换鐝粍!' },
+        ],
+        processParametersTemplateName: [
+          { required: true, message: '璇烽�夋嫨宸ヨ壓鍙傛暟妯℃澘!' },
+        ],
+        precisionParametersTemplateName: [
+          { required: true, message: '璇烽�夋嫨璁惧绮惧害妯℃澘!' },
+        ],
+        remark: [
+          { min: 0, max: 100, message: '闀垮害涓嶈秴杩� 100 涓瓧绗�', trigger: 'blur' },
+        ],
+        equipmentCategoryId: [
+          { required: true, message: '璇烽�夊垯璁惧绫诲埆!' },
+        ],
+        specification:[
+        { required: true, message: '璇烽�夊垯璁惧瑙勬牸!' },
+        ],
+        model:[
+        { required: true, message: '璇烽�夊垯璁惧鍨嬪彿!' },
+        ],
+        equipmentImportanceId:[
+        { required: true, message: '璇烽�夊垯璁惧ABC鏍囪瘑!' },
+        ],
+        manageId:[
+        { required: true, message: '璇烽�夋嫨缁存姢閮ㄩ棬!' },
+        ],
+        useId:[
+        { required: true, message: '璇烽�夋嫨浣跨敤閮ㄩ棬閮ㄩ棬!' },
+        ],
+        specificEquipment:[
+        { required: true, message: '璇烽�夋嫨鍏抽敭璁惧鏍囪瘑!' },
+        ],
+        equipmentStatus:[
+        { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
+        ],
+        technologyStatus:[
+        { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
+        ],
+        workCenterId:[
+        { required: true, message: '璇烽�夋嫨璁惧浜х嚎!' },
+        ],
+        factoryModelId:[
+        { required: true, message: '璇烽�夋嫨璁惧杞﹂棿!' },
+        ],
+        warrantyStart:[
+        { required: true, message: '璇烽�夋嫨寮�濮嬫棩鏈�!' },
+        ],
+        warrantyEnd:[
+        { required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡!' },
+        ],
+        propertyStatus:[
+        { required: true, message: '璇烽�夋嫨璧勪骇鐘舵��!' },
+        ],
+      },
+      url: {
+        add: "/eam/equipment/add",
+        edit: "/eam/equipment/edit",
+        loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
+      },
+      treeData: [],
+      needSpecific:false,
+
+    }
+  },
+  created() {
+    //澶囦唤model鍘熷鍊�
+    this.initOptions();
+    this.modelDefault = JSON.parse(JSON.stringify(this.model));
+  },
+  methods: {
+    add() {
+      this
+      this.edit(this.modelDefault);
+    },
+    edit(record) {
+      console.log(this.disabled)
+      this.model = Object.assign({}, record);
+      this.visible = true;
+    },
+    close() {
+      this.$emit('close');
+      this.visible = false;
+      this.$refs.form.clearValidate();
+    },
+    handleOk() {
+      const that = this;
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = true;
+          let httpurl = '';
+          let method = '';
+          if (!this.model.id) {
+            httpurl += this.url.add;
+            method = 'post';
+          } else {
+            httpurl += this.url.edit;
+            method = 'put';
+          }
+          httpAction(httpurl, this.model, method).then((res) => {
+            if (res.success) {
+              that.$message.success(res.message);
+              that.$emit('ok');
+            } else {
+              that.$message.warning(res.message);
+            }
+          }).finally(() => {
+            that.confirmLoading = false;
+            that.close();
+          })
+        } else {
+          return false
+        }
+      })
+    },
+    handleCancel() {
+      this.close()
+    },
+    validateNum(rule, value, callback) {
+      var params = {
+        tableName: 'mom_eam_equipment',
+        fieldName: 'num',
+        fieldVal: value,
+        dataId: this.model.id,
+        //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
+        delFlag: '0',
+      };
+      duplicateCheck(params).then((res) => {
+        if (res.success) {
+          callback();
+        } else {
+          callback("缂栧彿宸插瓨鍦�!");
+        }
+      })
+    },
+
+    //楠岃瘉 鍚嶇О
+    validateName(rule, value, callback) {
+      var params = {
+        tableName: 'mom_eam_equipment',
+        fieldName: 'name',
+        fieldVal: value,
+        dataId: this.model.id,
+        //鏁版嵁搴撲腑瀛樺湪瀛楁del_flag骞朵娇鐢ㄨ瀛楁浣滀负鏈垹闄ょ瓥鐣ワ紝鐪熷垹闄わ細false 鍋囧垹闄わ細true
+        delFlag: '0',
+      };
+      duplicateCheck(params).then((res) => {
+        if (res.success) {
+          callback();
+        } else {
+          callback("鍚嶇О宸插瓨鍦�!");
+        }
+      })
+    },
+
+    handleSwitch(processParameters) {
+      if ('1' == processParameters) {
+        this.model.processParameters = '0'
+      } else {
+        this.model.processParameters = '1'
+      }
+      this.model = Object.assign({}, this.model);
+    },
+    handle2Switch(precisionParameters) {
+      if ('1' == precisionParameters) {
+        this.model.precisionParameters = '0'
+      } else {
+        this.model.precisionParameters = '1'
+      }
+      this.model = Object.assign({}, this.model);
+    },
+    initOptions() {
+      getAction(this.url.loadOptions).then(res => {
+        if (res.success) {
+          this.treeData = res.result
+        } else {
+          this.$message.warning(res.message)
+        }
+      })
+    },
+
+    handle2Change(val) {
+      if (val === null) {
+        setTimeout(() => {
+          this.form.setFieldsValue({ useId: "" });
+        }, 100)
+      }
+    },
+    handle1Change(val) {
+      if (val === null) {
+        setTimeout(() => {
+          this.form.setFieldsValue({ affiliationId: "" });
+        }, 100)
+      }
+    },
+
+    handle3Change(val) {
+      if (val === null) {
+        setTimeout(() => {
+          this.form.setFieldsValue({ manageId: "" });
+        }, 100)
+      }
+    },
+
+    uploadOk(imgList) {
+      this.model.sysUploadList = imgList
+      this.equipmentPhoto = this.getSrc(imgList[0])
+      // this.$set(this.model, 'photo', res);
+      // this.$set(this.model, 'sysUploadList', imgList);
+    },
+
+    onSearchProcessParametersTemplate() {
+      this.$refs.ProcessParametersTemplateList.list();
+      this.$refs.ProcessParametersTemplateList.title = "閫夋嫨宸ヨ壓鍙傛暟妯℃澘";
+    },
+    sendProcessParametersTemplateRecord(data) {
+      let record = data.record;
+      this.model.processParametersTemplateId = record.id
+      this.model.processParametersTemplateId_dictText = record.name
+      this.model = Object.assign({}, this.model);
+    },
+
+    onSearchPrecisionParametersTemplate() {
+      this.$refs.PrecisionParametersTemplateList.list();
+      this.$refs.PrecisionParametersTemplateList.title = "閫夋嫨璁惧绮惧害妯℃澘";
+    },
+    sendPrecisionParametersTemplateRecord(data) {
+      let record = data.record;
+      this.model.precisionParametersTemplateId = record.id
+      this.model.precisionParametersTemplateId_dictText= record.name
+      this.model = Object.assign({}, this.model);
+    },
+    standardResultCompute() {
+
+      var standardA = this.model.standardA == null || this.model.standardA == undefined || this.model.standardA == '' ? 0 : parseInt(this.model.standardA);
+      var standardB = this.model.standardB == null || this.model.standardB == undefined || this.model.standardB == '' ? 0 : parseInt(this.model.standardB);
+      var standardC = this.model.standardA == null || this.model.standardC == undefined || this.model.standardC == '' ? 0 : parseInt(this.model.standardC);
+      var standardD = this.model.standardD == null || this.model.standardD == undefined || this.model.standardD == '' ? 0 : parseInt(this.model.standardD);
+      var standardE = this.model.standardE == null || this.model.standardE == undefined || this.model.standardE == '' ? 0 : parseInt(this.model.standardE);
+      var standardF = this.model.standardF == null || this.model.standardF == undefined || this.model.standardF == '' ? 0 : parseInt(this.model.standardF);
+
+      var sum = standardA + standardB + standardC + standardD + standardE + standardF;
+      console.log(sum)
+      if (sum >= 18) {
+        this.model.equipmentImportanceId = 'A'
+      } else if (sum >= 10 && sum <= 17) {
+        this.model.equipmentImportanceId = 'B'
+      } else {
+        this.model.equipmentImportanceId = 'C'
+      }
+      this.model = Object.assign({}, this.model);
+
+    },
+    changeNeedSpecific(val){
+       if(val=='A'){
+          this.needSpecific=true;
+       }else{
+        let that = this;
+        this.$confirm({
+            title: '鎻愮ず',
+            content: '闈濧绫昏澶囷紝鏄惁瑕佹坊鍔犲叧閿澶囨爣璇嗭紒',
+            okText: '纭',
+            cancelText: '鍙栨秷',
+            onOk() {
+              that.needSpecific = true;
+            },
+            onCancel(){
+              that.needSpecific = false;
+            }
+        })
+       }
+    }
+  },
+  computed: {
+    formDisabled() {
+      return this.disableSubmit
+    },
+  },
+  watch: {
+    alterFlag() {
+      this.$bus.$emit('queryTreeData');
+    },
+  },
+}
+</script>
\ No newline at end of file

--
Gitblit v1.9.3