From 1d79d3950a3d8c489ca9ee2c88a50b01e2b5ab6e Mon Sep 17 00:00:00 2001
From: zhuzhuanzhuan
Date: 星期四, 09 五月 2024 14:54:32 +0800
Subject: [PATCH] 新增首页看板点击图表出现的弹窗组件
---
src/views/eam/modules/equipmentNew/EquipmentModal.vue | 742 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 462 insertions(+), 280 deletions(-)
diff --git a/src/views/eam/modules/equipmentNew/EquipmentModal.vue b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
index a9b5db4..b6d611e 100644
--- a/src/views/eam/modules/equipmentNew/EquipmentModal.vue
+++ b/src/views/eam/modules/equipmentNew/EquipmentModal.vue
@@ -32,8 +32,9 @@
placeholder="璇烽�夋嫨璁惧鎵�灞炲垎绫�"
:disabled="formDisabled"
:triggerChange="true"
- dictCode="mom_eam_equipment_category,name,id"
+ :dictCode="caytegoryParam==='all'?'mom_eam_equipment_category,name,id':'mom_eam_equipment_category,name,id,equipment_category_uda1 = '+'\''+caytegoryParam+'\''"
v-model="model.equipmentCategoryId"
+ @change="categoryChange"
/>
</a-form-model-item>
</a-col>
@@ -46,7 +47,7 @@
>
<a-input
v-model="model.num"
- placeholder="璇疯緭鍏ヨ澶囩紪鍙�"
+ placeholder="璇疯緭鍏ョ粺涓� 缂栧彿"
:disabled="formDisabled"
></a-input>
</a-form-model-item>
@@ -111,6 +112,60 @@
</a-col>
<a-col :span="6">
<a-form-model-item
+ label="浣跨敤閮ㄩ棬"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="useId"
+ >
+
+ <j-dict-select-tag
+ allow-clear
+ :disabled="formDisabled"
+ placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
+ :triggerChange="true"
+ dictCode="sys_depart,depart_name,id,del_flag!='1'"
+ v-model="model.useId"
+ />
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ <a-row>
+ <a-col :span="6">
+ <a-form-model-item
+ label="鏄惁鐢熶骇绾胯澶�"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="isLineEquip"
+ >
+ <j-dict-select-tag
+ allow-clear
+ placeholder="璇烽�夋嫨"
+ :triggerChange="true"
+ :disabled="false"
+ dictCode="is_product"
+ v-model="model.isLineEquip"
+ />
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="6">
+ <a-form-model-item
+ label="鏄惁鐢熶骇绾�"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="isLine"
+ >
+ <j-dict-select-tag
+ allow-clear
+ placeholder="璇烽�夋嫨"
+ :triggerChange="true"
+ :disabled="false"
+ dictCode="is_product"
+ v-model="model.isLine"
+ />
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="6">
+ <a-form-model-item
label="璁惧鍥剧墖"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
@@ -124,9 +179,66 @@
</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"
+ @change="workCenterChange"
+ dictCode="mom_base_area,name,id,del_flag!='1' and type='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="factoryModelId"
+ >
+ <j-dict-select-tag
+ allow-clear
+ :disabled="formDisabled"
+ placeholder="璇烽�夋嫨宸ュ尯"
+ :triggerChange="true"
+ @change="factoryModelChange"
+ :dictCode="'mom_base_area,name,id,del_flag!=\'1\' and type=\'2\' and parent_id = ' +'\''+ model.workCenterId+'\''"
+ v-model="model.factoryModelId"
+ />
+ </a-form-model-item>
+ </a-col>
+ <!-- 宸ユ -->
+ <a-col :span="6">
+ <a-form-model-item
+ label="宸ユ"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="areaId"
+ >
+ <j-dict-select-tag
+ allow-clear
+ :disabled="formDisabled"
+ placeholder="璇烽�夋嫨宸ユ"
+ :triggerChange="true"
+ :dictCode="'mom_base_area,name,id,del_flag!=\'1\' and type=\'3\' and parent_id = '+'\''+model.factoryModelId+'\''"
+ v-model="model.areaId"
+ />
+ </a-form-model-item>
+ </a-col>
+ </a-row>
+ <a-row>
<a-divider
orientation="center"
- style="font-size: large;font-style: italic;color: #66aeed;"
+ style="font-size: large;font-style: italic;color: #f20707;"
>缁存姢鍙婁娇鐢ㄤ俊鎭�</a-divider>
<a-col :span="6">
<a-form-model-item
@@ -135,7 +247,7 @@
:wrapperCol="wrapperCol"
prop="manageId"
>
- <a-tree-select
+ <!-- <a-tree-select
:disabled="formDisabled"
style="width: 100%"
:dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
@@ -143,24 +255,14 @@
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%"
+ /> -->
+ <j-dict-select-tag
+ allow-clear
:disabled="formDisabled"
- :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }"
- :tree-data="treeData"
- placeholder="璇烽�夋嫨浣跨敤閮ㄩ棬"
- tree-default-expand-all
- v-model="model.useId"
+ placeholder="璇烽�夋嫨缁存姢閮ㄩ棬"
+ :triggerChange="true"
+ dictCode="sys_depart,depart_name,id,del_flag!='1'"
+ v-model="model.manageId"
/>
</a-form-model-item>
</a-col>
@@ -183,18 +285,39 @@
</a-col>
<a-col :span="6">
<a-form-model-item
- label="杞﹂棿"
+ label="ABC鏍囪瘑"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
- prop="factoryModelId"
+ prop="equipmentImportanceId"
>
<j-dict-select-tag
allow-clear
:disabled="formDisabled"
- placeholder="璇烽�夋嫨璧勮溅闂�"
+ placeholder="璇烽�夋嫨ABC鏍囪瘑"
:triggerChange="true"
- dictCode="mom_base_factory_model,name,id,del_flag!='1'"
- v-model="model.factoryModelId"
+ 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>
@@ -202,21 +325,130 @@
<a-row>
<a-col :span="6">
<a-form-model-item
- label="浜х嚎"
+ label="瀹夊叏閰嶇疆"
:labelCol="labelCol"
:wrapperCol="wrapperCol"
- prop="workCenterId"
+ 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"
>
<j-dict-select-tag
allow-clear
+ v-model="model.coolingSystem"
:disabled="formDisabled"
- placeholder="璇烽�夋嫨浜х嚎"
+ placeholder="璇疯緭鍏ュ喎鍗寸郴缁�"
:triggerChange="true"
- dictCode="mom_base_work_center,name,id,del_flag!='1'"
- v-model="model.workCenterId"
+ dictCode="cooling_system"
/>
</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-row>
+ <a-row>
+ <a-col :span="6">
+ <a-form-model-item
+ label="鎿嶄綔绯荤粺"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="operatingSystem"
+ >
+ <j-dict-select-tag
+ allow-clear
+ placeholder="鏄惁鏈夋搷浣滅郴缁�"
+ :disabled="formDisabled"
+ :triggerChange="true"
+ dictCode="operation_flag"
+ v-model="model.operatingSystem"
+ />
+ </a-form-model-item>
+ </a-col>
+ <a-col
+ :span="6"
+ v-if="model.operatingSystem=='yes'"
+ >
+ <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-row>
+ <a-row>
<a-col :span="6">
<a-form-model-item
label="璧勪骇鍒堕�犲晢"
@@ -232,6 +464,55 @@
dictCode="mom_base_constructor,name,id,status!='0' and del_flag!='1'"
v-model="model.constructorId"
/>
+ </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"
+ @change="dateChange"
+ />
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="6">
+ <a-form-model-item
+ label="鎶�鏈姸鎬佹瀹氬懆鏈�"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="checkPeriod"
+ >
+ <j-dict-select-tag
+ allow-clear
+ placeholder="璇烽�夋嫨鎶�鏈姸鎬佹瀹氬懆鏈� "
+ :triggerChange="true"
+ dictCode="check_period"
+ v-model="model.checkPeriod"
+ @change="dateChange"
+ />
+ </a-form-model-item>
+ </a-col>
+ <a-col :span="6">
+ <a-form-model-item
+ label="涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�"
+ :labelCol="labelCol"
+ :wrapperCol="wrapperCol"
+ prop="nextTechnologyStatusQualificationTime"
+ >
+ <j-date
+ :disabled="true"
+ style="width: 100%;"
+ placeholder="璇烽�夋嫨鏃ユ湡"
+ class="query-group-cust"
+ v-model="model.nextTechnologyStatusQualificationTime"
+ ></j-date>
</a-form-model-item>
</a-col>
</a-row>
@@ -304,7 +585,13 @@
:wrapperCol="wrapperCol"
prop="warrantyStart"
>
- <j-date :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨寮�濮嬫棩鏈�" class="query-group-cust" v-model="model.warrantyStart"></j-date>
+ <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">
@@ -314,7 +601,13 @@
:wrapperCol="wrapperCol"
prop="warrantyEnd"
>
- <j-date :disabled="formDisabled" style="width: 100%;" placeholder="璇烽�夋嫨缁撴潫鏃ユ湡" class="query-group-cust" v-model="model.warrantyEnd"></j-date>
+ <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>
@@ -352,22 +645,6 @@
/>
</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="绔嬮」鍗″彿"
@@ -384,7 +661,7 @@
</a-col>
</a-row>
<a-row>
- <a-col :span="6">
+ <!-- <a-col :span="6">
<a-form-model-item
label="宸ュ尯"
:labelCol="labelCol"
@@ -397,7 +674,7 @@
:disabled="formDisabled"
></a-input>
</a-form-model-item>
- </a-col>
+ </a-col> -->
<a-col :span="6">
<a-form-model-item
label="閲嶉噺"
@@ -412,7 +689,7 @@
></a-input>
</a-form-model-item>
</a-col>
-
+
<a-col :span="6">
<a-form-model-item
label="閲嶉噺璁¢噺鍗曚綅"
@@ -441,8 +718,6 @@
></a-input>
</a-form-model-item>
</a-col>
- </a-row>
- <a-row>
<a-col :span="6">
<a-form-model-item
label="鍔熻兘浣嶇疆"
@@ -457,6 +732,8 @@
></a-input>
</a-form-model-item>
</a-col>
+ </a-row>
+ <a-row>
<a-col :span="6">
<a-form-model-item
label="璧勯噾鏉ユ簮"
@@ -471,7 +748,6 @@
></a-input>
</a-form-model-item>
</a-col>
-
<a-col :span="6">
<a-form-model-item
label="璧勪骇鏉ユ簮鍥藉"
@@ -488,121 +764,6 @@
</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"
@@ -615,12 +776,8 @@
></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-row hidden>
<a-col :span="6">
<a-form-model-item
label="骞冲潎浣跨敤鐜�"
@@ -639,6 +796,8 @@
/>
</a-form-model-item>
</a-col>
+ </a-row>
+ <a-row hidden>
<a-col :span="6">
<a-form-model-item
label="鍙浛鎹㈡��"
@@ -693,26 +852,6 @@
/>
</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="璁惧浠峰��"
@@ -728,41 +867,6 @@
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>
@@ -852,6 +956,7 @@
></process-parameters-template-list>
<precision-parameters-template-list
ref="PrecisionParametersTemplateList"
+ :num="model.num"
@sendPrecisionParametersTemplateRecord='sendPrecisionParametersTemplateRecord'
></precision-parameters-template-list>
</a-spin>
@@ -882,6 +987,11 @@
default: false,
required: false
},
+ caytegoryParam: {
+ type: String,
+ default: '',
+ required: false
+ }
},
data() {
return {
@@ -892,24 +1002,24 @@
},
labelCol: {
xs: { span: 24 },
- sm: { span: 8 },
+ sm: { span: 10 },
},
wrapperCol: {
xs: { span: 24 },
- sm: { span: 16 },
+ sm: { span: 14 },
},
confirmLoading: false,
validatorRules: {
num: [
{ required: true, message: '璇疯緭鍏ヨ澶囩紪鍙�!' },
- { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' },
+ // { 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 },
+ // { min: 2, max: 30, message: '闀垮害鍦� 2 鍒� 30 涓瓧绗�', trigger: 'blur' },
+ // { validator: this.validateName },
],
teamId: [
{ required: true, message: '璇烽�夋嫨璐d换鐝粍!' },
@@ -926,53 +1036,66 @@
equipmentCategoryId: [
{ required: true, message: '璇烽�夊垯璁惧绫诲埆!' },
],
- specification:[
- { required: true, message: '璇烽�夊垯璁惧瑙勬牸!' },
+ specification: [
+ { required: true, message: '璇烽�夊垯璁惧瑙勬牸!' },
],
- model:[
- { required: true, message: '璇烽�夊垯璁惧鍨嬪彿!' },
+ model: [
+ { required: true, message: '璇烽�夊垯璁惧鍨嬪彿!' },
],
- equipmentImportanceId:[
- { required: true, message: '璇烽�夊垯璁惧ABC鏍囪瘑!' },
+ equipmentImportanceId: [
+ { required: true, message: '璇烽�夊垯璁惧ABC鏍囪瘑!' },
],
- manageId:[
- { required: true, message: '璇烽�夋嫨缁存姢閮ㄩ棬!' },
+ manageId: [
+ { required: true, message: '璇烽�夋嫨缁存姢閮ㄩ棬!' },
],
- useId:[
- { required: true, message: '璇烽�夋嫨浣跨敤閮ㄩ棬閮ㄩ棬!' },
+ useId: [
+ { required: true, message: '璇烽�夋嫨浣跨敤閮ㄩ棬!' },
],
- specificEquipment:[
- { required: true, message: '璇烽�夋嫨鍏抽敭璁惧鏍囪瘑!' },
+ specificEquipment: [
+ { required: true, message: '璇烽�夋嫨鍏抽敭璁惧鏍囪瘑!' },
],
- equipmentStatus:[
- { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
+ equipmentStatus: [
+ { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
],
- technologyStatus:[
- { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
+ technologyStatus: [
+ { required: true, message: '璇烽�夋嫨璁惧鐘舵��!' },
],
- workCenterId:[
- { required: true, message: '璇烽�夋嫨璁惧浜х嚎!' },
+ workCenterId: [
+ { required: false, message: '璇烽�夋嫨涓績!' },
],
- factoryModelId:[
- { required: true, message: '璇烽�夋嫨璁惧杞﹂棿!' },
+ factoryModelId: [
+ { required: false, message: '璇烽�夋嫨宸ュ尯!' },
],
- warrantyStart:[
- { required: true, message: '璇烽�夋嫨寮�濮嬫棩鏈�!' },
+ warrantyStart: [
+ { required: true, message: '璇烽�夋嫨寮�濮嬫棩鏈�!' },
],
- warrantyEnd:[
- { required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡!' },
+ warrantyEnd: [
+ { required: true, message: '璇烽�夋嫨缁撴潫鏃ユ湡!' },
],
- propertyStatus:[
- { required: true, message: '璇烽�夋嫨璧勪骇鐘舵��!' },
+ propertyStatus: [
+ { required: true, message: '璇烽�夋嫨璧勪骇鐘舵��!' },
+ ],
+ system: [
+ { required: true, message: '璇疯緭鍏ョ郴缁�!' },
+ ],
+ acceptanceCheckDate: [
+ { required: true, message: '璇烽�夋嫨楠屾敹鏃ユ湡!' },
+ ],
+ checkPeriod: [
+ { required: true, message: '璇烽�夋嫨鎶�鏈姸鎬佹瀹氬懆鏈�!' },
+ ],
+ areaId: [
+ { required: false, message: '璇烽�夋嫨宸ユ!' },
],
},
url: {
add: "/eam/equipment/add",
edit: "/eam/equipment/edit",
loadOptions: '/sys/sysDepart/loadDepartTreeOptions',
+ getCategoryFlag: "/eam/equipmentCategory/queryById"
},
treeData: [],
- needSpecific:false,
+ needSpecific: false,
}
},
@@ -983,12 +1106,16 @@
},
methods: {
add() {
- this
this.edit(this.modelDefault);
},
edit(record) {
console.log(this.disabled)
this.model = Object.assign({}, record);
+ if (!this.model.id) {
+ this.model.equipmentStatus = '1'
+ this.model.isLineEquip = 'no'
+ this.model.isLine = 'no'
+ }
this.visible = true;
},
close() {
@@ -1135,13 +1262,17 @@
},
onSearchPrecisionParametersTemplate() {
+ if (this.model.num == '' || this.model.num == undefined || this.model.num == null) {
+ this.$message.warn("璇峰厛濉啓缁熶竴缂栫爜")
+ return false;
+ }
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.precisionParametersTemplateId_dictText = record.name
this.model = Object.assign({}, this.model);
},
standardResultCompute() {
@@ -1165,25 +1296,76 @@
this.model = Object.assign({}, this.model);
},
- changeNeedSpecific(val){
- if(val=='A'){
- this.needSpecific=true;
- }else{
+ 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;
- }
+ title: '鎻愮ず',
+ content: '闈濧绫昏澶囷紝鏄惁瑕佹坊鍔犲叧閿澶囨爣璇嗭紒',
+ okText: '纭',
+ cancelText: '鍙栨秷',
+ onOk() {
+ that.needSpecific = true;
+ },
+ onCancel() {
+ that.needSpecific = false;
+ }
})
- }
- }
+ }
+ //鏀瑰彉鎶�鏈姸鎬侀壌瀹氬懆鏈�
+ if (this.model.equipmentCategoryId !== null && this.model.equipmentCategoryId != '') {
+ var value = this.model.equipmentCategoryId;
+ getAction(this.url.getCategoryFlag, { id: value }).then(res => {
+ if (res.result.equipmentCategoryUda1 !== 'weldingMachine' && res.result.equipmentCategoryUda11 !== 'filesCarousel' && res.result.equipmentCategoryUda1 !== 'tester') {
+ if (val === 'A') {
+ this.model.checkPeriod = 365 * 3 + '';
+ }
+ if (val === 'B' || val === 'C' || val === 'D') {
+ this.model.checkPeriod = 365 * 4 + '';
+ }
+ }
+ this.model = Object.assign({}, this.model);
+ })
+ }
+ },
+ //璁$畻涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂达紝涓嬫鎶�鏈姸鎬侀壌瀹氭椂闂�=楠屾敹鏃ユ湡+鎶�鏈姸鎬佹瀹氬懆鏈�
+ dateChange() {
+ var acceptanceCheckDate = this.model.acceptanceCheckDate;
+ var checkPeriod = this.model.checkPeriod;
+ if (acceptanceCheckDate !== null && acceptanceCheckDate !== '' && checkPeriod !== null && checkPeriod !== '') {
+ var nextTechnologyStatusQualificationTime = moment(acceptanceCheckDate).add(checkPeriod, 'days').format('YYYY-MM-DD');
+ this.model.nextTechnologyStatusQualificationTime = nextTechnologyStatusQualificationTime;
+ this.model = Object.assign({}, this.model);
+ } else {
+ this.model.nextTechnologyStatusQualificationTime = '';
+ this.model = Object.assign({}, this.model);
+ }
+ },
+ categoryChange(value) {
+ getAction(this.url.getCategoryFlag, { id: value }).then(res => {
+ if (res.result.equipmentCategoryUda1 === 'weldingMachine') {
+ this.model.checkPeriod = 365 * 3 + '';
+ } else if (res.result.equipmentCategoryUda1 === 'filesCarousel') {
+ this.model.checkPeriod = 365 * 4 + '';
+ } else if (res.result.equipmentCategoryUda1 === 'tester') {
+ this.model.checkPeriod = 365 * 1 + '';
+ }
+ this.model = Object.assign({}, this.model);
+ })
+ },
+ //褰撲腑蹇冩敼鍙樻椂锛屾竻绌哄伐鍖哄拰宸ユ
+ workCenterChange() {
+ this.model.factoryModelId = '';
+ this.model.areaId = '';
+ this.model = Object.assign({}, this.model);
+ },
+ //褰撳伐鍖烘敼鍙樻椂锛屾竻绌哄伐娈�
+ factoryModelChange() {
+ this.model.areaId = '';
+ this.model = Object.assign({}, this.model);
+ },
},
computed: {
formDisabled() {
--
Gitblit v1.9.3