From bab64d0b2147a3e619e53d7417e40b5bd45fcfdb Mon Sep 17 00:00:00 2001 From: lyh <925863403@qq.com> Date: 星期三, 19 三月 2025 13:43:47 +0800 Subject: [PATCH] 修改产品结构树 增加流程修改 --- src/views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue | 77 ++++++++++++++++++++++++++++++++++++++ 1 files changed, 77 insertions(+), 0 deletions(-) diff --git a/src/views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue new file mode 100644 index 0000000..2503b1c --- /dev/null +++ b/src/views/dnc/base/modules/ProductStructure/Cutter/CutterModal.vue @@ -0,0 +1,77 @@ +<template> + <j-modal + :title="title" + :width="width" + :visible="visible" + switchFullscreen + :maskClosable="false" + @ok="handleOk" + @cancel="handleCancel" + :okButtonProps="{ class:{'jee-hidden': disableSubmit} }" + cancelText="鍏抽棴"> + <CutterModalForm ref="realForm" @ok="submitCallback" :disableSubmit="disableSubmit"/> + </j-modal> +</template> + +<script> +import CutterModalForm from './CutterModalForm.vue' + +export default { + name: 'CutterModal', + components: { + CutterModalForm + }, + props: { + currentTreeNodeInfo: { + type: Object + } + }, + data() { + return { + title: '', + width: 700, + visible: false, + disableSubmit: false + } + }, + methods: { + // 娣诲姞鎵�鐢ㄥ垁鍏� + handleCutterAdd() { + const { id, type } = this.currentTreeNodeInfo + this.visible = true + this.$nextTick(() => { + if (this.$refs.realForm) { + this.$refs.realForm.add({ + attributionId: id, + attributionType: type + }) + } + }) + }, + + // 缂栬緫鍒�鍏蜂俊鎭� + handleCutterEdit(record) { + this.visible = true + this.$nextTick(() => { + if (this.$refs.realForm) { + this.$refs.realForm.edit({ ...record }) + } + }) + }, + + handleOk() { + this.$refs.realForm.submitForm() + }, + + submitCallback() { + this.$emit('submitSuccess') + this.visible = false + }, + + handleCancel() { + this.$emit('close') + this.visible = false + } + } +} +</script> \ No newline at end of file -- Gitblit v1.9.3