From b4edf6ce42debe4edcc85414d9f6c0d41f480587 Mon Sep 17 00:00:00 2001
From: cuilei <ray_tsu1@163.com>
Date: 星期五, 20 六月 2025 11:36:06 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 src/views/eam/purchase/modules/EamEquipmentPurchasePlanAuditModal.vue |   82 +++++++++++++++++++++++++++++++++++++++++
 1 files changed, 82 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/purchase/modules/EamEquipmentPurchasePlanAuditModal.vue b/src/views/eam/purchase/modules/EamEquipmentPurchasePlanAuditModal.vue
new file mode 100644
index 0000000..e95c76d
--- /dev/null
+++ b/src/views/eam/purchase/modules/EamEquipmentPurchasePlanAuditModal.vue
@@ -0,0 +1,82 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    cancelText="鍏抽棴">
+
+    <template slot="footer">
+      <a-button type="primary" @click="audit('COMPLETED')">閫氳繃</a-button>
+      <a-button type="danger" @click="audit('REJECT')">椹冲洖</a-button>
+    </template>
+
+    <eam-equipment-purchase-plan-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></eam-equipment-purchase-plan-form>
+  </j-modal>
+</template>
+
+<script>
+
+  import EamEquipmentPurchasePlanForm from './EamEquipmentPurchasePlanForm'
+  import { postAction } from '../../../../api/manage'
+  export default {
+    name: 'EamEquipmentPurchasePlanModal',
+    components: {
+      EamEquipmentPurchasePlanForm
+    },
+    data () {
+      return {
+        title:'',
+        width:1200,
+        visible: false,
+        disableSubmit: false,
+        url: {
+          audit: "/eam/eamEquipmentPurchasePlan/audit"
+        }
+      }
+    },
+    methods: {
+      audit (status) {
+        console.log(status)
+        const id = this.$refs.realForm.model.id
+        postAction(this.url.audit,{ id: id, planStatus: status }).then((res)=>{
+          if (res.success) {
+            this.$message.success(res.message)
+            this.submitCallback()
+          } else {
+            this.$message.warning(res.message)
+          }
+        })
+      },
+      add () {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.add();
+        })
+      },
+      edit (record) {
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.edit(record);
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      }
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3