Explorar el Código

新增 现货合同 为提交 弹窗页面

huangbin hace 4 años
padre
commit
8e7275d716

+ 48 - 0
src/views/information/spot-contract/components/delete/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 删除现货合同--->
+  <a-modal class="recover-custom"
+           title="删除现货合同"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'delete-spot-contract',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('deleteSpotContract');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.recover-custom {
+}
+</style
+>;

+ 1 - 1
src/views/information/spot-contract/components/detail/index.vue

@@ -111,7 +111,7 @@ import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 
 export default defineComponent({
-    name: 'custom-detail',
+    name: 'spot-contract-detail',
     components: {},
     setup() {
         const { visible, cancel } = closeModal('spotContractDetail');

+ 48 - 0
src/views/information/spot-contract/components/modify/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 修改现货合同-->
+  <a-modal class="modify-custom"
+           title="修改现货合同"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'modify-spot-contract',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('modifySpotContract');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+}
+</style
+>;

+ 48 - 0
src/views/information/spot-contract/components/resubmit/index.vue

@@ -0,0 +1,48 @@
+<template>
+  <!-- 重新提交现货合同-->
+  <a-modal class="modify-custom"
+           title="重新提交现货合同"
+           v-model:visible="visible"
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, ref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+
+export default defineComponent({
+    name: 'resubmit-spot-contract',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('resubmitSpotContract');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.modify-custom {
+}
+</style
+>;

+ 12 - 0
src/views/information/spot-contract/list/not-commit/index.vue

@@ -22,6 +22,12 @@
     <AddSpotContract />
     <!-- 现货合同: 详情 -->
     <SpotContractDeatil />
+    <!-- 现货合同: 修改 -->
+    <ModifySpotContract />
+    <!-- 现货合同: 删除 -->
+    <DeleteSpotContract />
+    <!-- 现货合同: 重新提交 -->
+    <ResubmitSpotContract />
   </div>
 </template>
 
@@ -36,6 +42,9 @@ import { MenuItem } from '@/common/components/contextMenu/interface';
 import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
 import { detailButton, permissionButton, handlePermission } from '@/common/setup/buttonPermission/index';
 import SpotContractDeatil from '@/views/information/spot-contract/components/detail/index.vue';
+import ModifySpotContract from '@/views/information/spot-contract/components/modify/index.vue';
+import DeleteSpotContract from '@/views/information/spot-contract/components/delete/index.vue';
+import ResubmitSpotContract from '@/views/information/spot-contract/components/resubmit/index.vue';
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
@@ -44,6 +53,9 @@ export default defineComponent({
         contextMenu,
         AddSpotContract,
         SpotContractDeatil,
+        ModifySpotContract,
+        DeleteSpotContract,
+        ResubmitSpotContract,
     },
     setup() {
         const contextMenuList = ref<MenuItem[]>([]);