huangbin 4 лет назад
Родитель
Сommit
4c7ac5db70

+ 80 - 0
src/views/information/account_info/compoments/modify-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_modify');
+        // 证件类型
+        // 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

@@ -83,6 +83,7 @@
       </a-collapse-panel>
     </a-collapse>
     <Add />
+    <Modify />
   </div>
 </template>
 
@@ -93,6 +94,7 @@ import { ref } from 'vue';
 import { handleAccountManager } from '../setup';
 import { getLoginStatusEnumItemName } from '@/common/constants/enumsName';
 import Add from '../../compoments/add-business/index.vue';
+import Modify from '../../compoments/modify-business/index.vue';
 
 export default defineComponent({
     name: 'account_info_business',
@@ -101,6 +103,7 @@ export default defineComponent({
         BtnList,
         filterCustomTable,
         Add,
+        Modify,
     },
     setup() {
         const { businesserList, merchandiserList, getBusinesserList } = handleAccountManager();