Przeglądaj źródła

新增 现货合同 新增页面

huangbin 4 lat temu
rodzic
commit
dce3373ff2

+ 3 - 0
src/setup/controlModal/interface.ts

@@ -3,10 +3,13 @@ export interface ModalName {
     notice: string; // 消息
     logout: string; // 退出登录
     drawer: string; // 下单通用界面
+
     addCustomInfo: string; // 新增客户资料
     modifyCustomInfo: string; // 修改客户资料
     disableCustomInfo: string; // 停用客户资料
     deleteCustomInfo: string; // 删除客户资料
     recoverCustomInfo: string; // 恢复客户资料
     customDetail: string; // 客户资料详情
+
+    addSpotContract: string; // 新增现货合同
 }

+ 49 - 0
src/views/information/spot-contract/components/add/index.vue

@@ -0,0 +1,49 @@
+<template>
+  <!-- 新增客户资料 -->
+  <a-modal class="add-spot-contract"
+           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 '@/setup/controlModal/index';
+import { initData } from '@/setup/methods/index';
+
+export default defineComponent({
+    name: 'add-spot-contract',
+    components: {},
+    setup() {
+        const { visible, cancel } = closeModal('addSpotContract');
+        const loading = ref<boolean>(false);
+        function submit() {
+            loading.value = true;
+            setTimeout(() => {
+                loading.value = false;
+                cancel();
+            }, 2000);
+        }
+        initData(() => {});
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-spot-contract {
+}
+</style>;

+ 6 - 2
src/views/information/spot-contract/list/not-commit/index.vue

@@ -18,6 +18,8 @@
         </template> -->
       </a-table>
     </contextMenu>
+    <!-- 新增现货合同 -->
+    <AddSpotContract />
   </div>
 </template>
 
@@ -29,23 +31,25 @@ import { getCustomList } from '../setup';
 import { openModal } from '@/setup/controlModal/index';
 import contextMenu from '@/components/contextMenu/index.vue';
 import { MenuItem } from '@/components/contextMenu/interface';
+import AddSpotContract from '@/views/information/spot-contract/components/add/index.vue';
 
 export default defineComponent({
     name: 'spot-contract-not-commit',
     components: {
         filterCustomTable,
         contextMenu,
+        AddSpotContract,
     },
     setup() {
         const { spotContractList, actionQuery, columns, getColumns, search, loading, handlePermission } = getCustomList();
         const { hasPermission } = handlePermission('spot_contract_unsubmitted');
-        const { openAction } = openModal('addCustomInfo');
+        const { openAction } = openModal('addSpotContract');
         const contextMenuList = ref<MenuItem[]>([]);
         initData(() => {
             actionQuery(2);
             getColumns();
         });
-        return { spotContractList, columns, search, contextMenuList, loading, hasPermission };
+        return { spotContractList, columns, search, contextMenuList, openAction, loading, hasPermission };
     },
 });
 </script>