From 56148970959b7016cfe1c54ffa39dbd9bb9921ff Mon Sep 17 00:00:00 2001 From: zhaowei <zhaowei> Date: 星期五, 11 七月 2025 21:10:28 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- src/views/eam/equipment/modules/EamEquipmentModal.vue | 133 +++++++++++++++++++++++-------------------- 1 files changed, 71 insertions(+), 62 deletions(-) diff --git a/src/views/eam/equipment/modules/EamEquipmentModal.vue b/src/views/eam/equipment/modules/EamEquipmentModal.vue index 49a8cd4..8df1c99 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"/> @@ -89,17 +94,18 @@ v-model="model.fireExtinguisherExpirationDate" placeholder="璇疯緭鍏ョ伃鐏櫒鏈夋晥鏈�"/> </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"/> </a-form-model-item> </a-col> - </a-row> - - <a-row> <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"> @@ -113,14 +119,15 @@ style="width: 100%"/> </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.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"/> @@ -136,14 +143,14 @@ <a-input placeholder="璇疯緭鍏ュ畨瑁呬綅缃�" v-model="model.installationPosition"/> </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.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"/> @@ -159,14 +166,14 @@ <a-date-picker v-model="model.acceptanceCheckDate" 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.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"/> @@ -175,11 +182,6 @@ <a-col :span="customSpan"> <a-form-model-item label="璧勪骇鏉ユ簮鍥藉"> <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-col :span="customSpan"> @@ -216,7 +218,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,27 +228,34 @@ </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-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-row> <a-row> <a-col :span="customSpan"> + <a-form-model-item label="鏈鎶�鏈壌瀹氭棩鏈�"> + <a-date-picker v-model="model.latestTechnologyCheck" value-format="YYYY-MM-DD" + :disabled="!editable" style="width:100%"/> + </a-form-model-item> + </a-col> + <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> @@ -350,12 +360,9 @@ } } }, - created() { - this.loadAllProductionTree() - }, methods: { add() { - this.editable = false + this.editable = true //鍒濆鍖栭粯璁ゅ�� this.model = { operationSystem: 1, @@ -365,7 +372,7 @@ }, edit(record) { - this.editable = true + this.editable = false this.model = Object.assign({}, record) this.visible = true }, @@ -376,32 +383,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