Jelajahi Sumber

新增业务账户

huangbin 4 tahun lalu
induk
melakukan
8a9da8304e

+ 15 - 0
src/common/constants/buttonType.ts

@@ -24,6 +24,21 @@ export interface ButtonType {
     spot_contract_btn_check: string; // 现货合同 审核
     spot_contract_btn_cancel: string; // 现货合同 撤销
 
+    account_info_business_btn_add: string; // 业务账户 新增
+    account_info_business_btn_modify: string; // 业务账户 修改
+    account_info_business_btn_reset: string; // 业务账户 重置密码
+    account_info_business_btn_locked: string; // 业务账户 锁定
+    account_info_business_btn_cancel: string; // 业务账户 注销
+
+    account_info_trade_btn_add: string; // 交易账户 新增
+    account_info_trade_btn_modify: string; // 交易账户 修改
+
+    account_info_manager_btn_add: string; // 管理账户 新增
+    account_info_manager_btn_modify: string; // 管理账户 修改
+
+    account_info_futures_btn_add: string; // 期货账户 新增
+    account_info_futures_btn_modify: string; // 期货账户 修改
+
     warehouse_info_btn_add: string; // 仓库信息 新增
     warehouse_info_btn_modify: string; // 现货合同 修改
     warehouse_info_btn_disable: string; // 现货合同 停用

+ 80 - 0
src/views/information/account_info/compoments/add-business/index.vue

@@ -0,0 +1,80 @@
+<template>
+  <!-- 新增账户 -->
+  <a-modal class="add-custom"
+           title="新增业务账户"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成</a-button>
+    </template>
+
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { initData } from '@/common/methods/index';
+import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
+import { AllEnums } from '@/services/go/commonService/interface';
+import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+
+export default defineComponent({
+    name: 'add-custom',
+    components: {},
+    setup() {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_business_btn_add');
+        // 证件类型
+        // const cardTypeList = ref<AllEnums[]>(getCardType());
+        // // 表单
+        // const formRef = ref();
+        // const formState: UnwrapRef<FormState> = reactive(initFormState());
+        // const rules = {
+        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
+        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
+        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
+        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
+        // };
+        // // 下单方法
+        // const { loading, applyAction } = handleApply();
+        // function isPersonal(): boolean {
+        //     return formState.userinfotype === '1';
+        // }
+        // function submit() {
+        //     formRef.value
+        //         .validate()
+        //         .then(() => {
+        //             const param = toRaw(formState);
+        //             applyAction(param);
+        //             console.log('values', formState);
+        //         })
+        //         .catch((error: ValidateErrorEntity<FormState>) => {
+        //             console.log('error', error);
+        //         });
+        // }
+        return {
+            // formState,
+            // rules,
+            // formRef,
+            // cardTypeList,
+            // isPersonal,
+            visible,
+            cancel,
+            // submit,
+            // loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style
+>;

+ 3 - 0
src/views/information/account_info/list/account_info_business/index.vue

@@ -82,6 +82,7 @@
         </a-collapse>
       </a-collapse-panel>
     </a-collapse>
+    <Add />
   </div>
 </template>
 
@@ -91,6 +92,7 @@ import filterCustomTable from '@/views/information/goods/components/filterTable/
 import { ref } from 'vue';
 import { handleAccountManager } from '../setup';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
+import Add from '../../compoments/add-business/index.vue';
 
 export default defineComponent({
     name: 'account_info_business',
@@ -98,6 +100,7 @@ export default defineComponent({
         contextMenu,
         BtnList,
         filterCustomTable,
+        Add,
     },
     setup() {
         const { businesserList, merchandiserList, getBusinesserList } = handleAccountManager();

+ 1 - 1
src/views/information/custom/compoments/add/index.vue

@@ -301,7 +301,7 @@ export default defineComponent({
                 .validate()
                 .then(() => {
                     const param = toRaw(formState);
-                    applyAction(param);
+                    // applyAction(param);
                     console.log('values', formState);
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {