From 9be2e2f91332ed341406acf9739d8912dddbf6fe Mon Sep 17 00:00:00 2001
From: zhaowei <zhaowei>
Date: 星期二, 22 七月 2025 20:43:43 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue |  156 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 156 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue b/src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue
new file mode 100644
index 0000000..d9aa27e
--- /dev/null
+++ b/src/views/eam/technical/modules/EamThirdMaintenanceChangeModal.vue
@@ -0,0 +1,156 @@
+<template>
+  <j-modal :title="title" :width="1300" :visible="visible" :confirmLoading="confirmLoading" switchFullscreen
+           @ok="handleOk" @cancel="handleCancel" cancelText="鍏抽棴">
+    <a-spin :spinning="confirmLoading">
+      <a-form-model ref="form" :model="model" :rules="validatorRules" :labelCol="labelCol" :wrapperCol="wrapperCol">
+        <a-row>
+          <a-col :span="8">
+            <a-form-model-item label="宸ュ崟鍙�">
+              <a-input placeholder="閫夋嫨璁惧鍚庤嚜鍔ㄥ甫鍑�" disabled v-model="model.orderId"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item label="鍙樻洿鍗曞彿">
+              <a-input placeholder="绯荤粺鑷姩鐢熸垚" disabled v-model="model.changeOrderNum"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item prop="equipmentId" label="缁熶竴缂栫爜">
+              <maintenance-equipment-select placeholder="璇疯緭鍏ョ粺涓�缂栫爜鎴栧悕绉版悳绱�" v-model="model.equipmentId"
+                                            maintenanceCategory="THIRD_MAINTENANCE" @autocompleteForm="autocompleteForm"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item prop="deferredMaintenanceDate" label="寤惰繜淇濆吇鏃ユ湡">
+              <a-date-picker v-model="model.deferredMaintenanceDate" value-format="YYYY-MM-DD" style="width: 100%"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item prop="applyCategory" label="鐢宠绫诲瀷">
+              <j-dict-select-tag v-model="model.applyCategory" placeholder="璇烽�夋嫨鐢宠绫诲瀷"
+                                 dict-code="third_maintenance_change_category"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="8">
+            <a-form-model-item prop="applyReasonType" label="鍙樻洿鍘熷洜绫诲瀷">
+              <j-dict-select-tag v-model="model.applyReasonType" placeholder="璇烽�夋嫨鍙樻洿鍘熷洜绫诲瀷"
+                                 dict-code="third_maintenance_change_reason"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="鍙樻洿鍘熷洜" :labelCol="{span:2}" :wrapperCol="{span:21}">
+              <a-textarea v-model="model.applyReason" placeholder="璇疯緭鍏ュ彉鏇村師鍥�"/>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item label="澶囨敞" :labelCol="{span:2}" :wrapperCol="{span:21}">
+              <a-textarea v-model="model.remark" placeholder="璇疯緭鍏ュ娉�"/>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </j-modal>
+</template>
+
+<script>
+import { postAction } from '@/api/manage'
+import MaintenanceEquipmentSelect from '@views/eam/equipment/modules/MaintenanceEquipmentSelect.vue'
+
+export default {
+  name: 'EamThirdMaintenanceChangeModal',
+  components: {
+    MaintenanceEquipmentSelect
+
+  },
+  data() {
+    return {
+      title: '鎿嶄綔',
+      visible: false,
+      model: {},
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 6 }
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 15 }
+      },
+      confirmLoading: false,
+      validatorRules: {
+        deferredMaintenanceDate: [{ required: true, message: '璇烽�夋嫨鏃ユ湡', trigger: 'change' }],
+        applyCategory: [{ required: true, message: '璇烽�夋嫨鐢宠绫诲瀷', trigger: 'change' }],
+        applyReasonType: [{ required: true, message: '璇烽�夋嫨鍙樻洿鍘熷洜', trigger: 'change' }],
+      },
+      url: {
+        add: '/eam/eamThirdMaintenanceChange/add',
+        edit: '/eam/eamThirdMaintenanceChange/edit'
+      }
+    }
+  },
+  methods: {
+    add({ id, equipmentId }) {
+      this.model = Object.assign({ orderId: id, equipmentId })
+      this.visible = true
+    },
+
+    edit(record) {
+      this.model = Object.assign({}, record)
+      this.visible = true
+    },
+
+    handleOk() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      this.$refs.form.validate(valid => {
+        if (valid) {
+          that.confirmLoading = true
+
+          let httpUrl
+          if (!that.model.id) {
+            httpUrl = that.url.add
+          } else {
+            httpUrl = that.url.edit
+          }
+
+          postAction(httpUrl, that.model)
+            .then((res) => {
+              if (res.success) {
+                that.$notification.success({
+                  message: '娑堟伅',
+                  description: res.message
+                })
+                if (!that.model.id) {
+                  that.$router.push('/eam/maintenance/EamThirdMaintenanceChangeList')
+                  return
+                }
+                that.close()
+                that.$emit('ok')
+              } else {
+                that.$notification.warning({
+                  message: '娑堟伅',
+                  description: res.message
+                })
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+            })
+        } else {
+          return false
+        }
+      })
+    },
+
+    handleCancel() {
+      this.close()
+    },
+
+    close() {
+      this.$emit('close')
+      this.visible = false
+      this.$refs.form.clearValidate()
+    }
+  }
+}
+</script>
\ No newline at end of file

--
Gitblit v1.9.3