|
@@ -11,77 +11,78 @@
|
|
|
<a-button key="submit"
|
|
<a-button key="submit"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
:loading="loading"
|
|
:loading="loading"
|
|
|
- @click="submit">完成</a-button>
|
|
|
|
|
|
|
+ @click="submit">注销
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button key="submit"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ @click="cancel">关闭
|
|
|
|
|
+ </a-button>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
</a-modal>
|
|
</a-modal>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<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';
|
|
|
|
|
-import { Modal} from 'ant-design-vue';
|
|
|
|
|
|
|
+import {closeModal} from '@/common/setup/modal/index';
|
|
|
|
|
+import {initData} from '@/common/methods/index';
|
|
|
|
|
+import {defineComponent, ref, reactive, toRaw, UnwrapRef, PropType} from 'vue';
|
|
|
|
|
+import {AllEnums} from '@/services/go/commonService/interface';
|
|
|
|
|
+import {RuleObject, ValidateErrorEntity} from 'ant-design-vue/es/form/interface';
|
|
|
|
|
+import {Modal} from 'ant-design-vue';
|
|
|
|
|
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
|
|
|
|
|
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
|
|
+import {loginAccountOperate} from "@/services/proto/accountinfo";
|
|
|
|
|
+import {ErmcpLoginUser} from "@/services/go/ermcp/account/interface";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'add-custom',
|
|
|
|
|
- components: {},
|
|
|
|
|
- setup() {
|
|
|
|
|
- // 控制关闭弹窗
|
|
|
|
|
- const { visible, cancel } = closeModal('account_info_business_btn_cancel');
|
|
|
|
|
- // 证件类型
|
|
|
|
|
- // 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);
|
|
|
|
|
- // });
|
|
|
|
|
- Modal.confirm({
|
|
|
|
|
- title: '是否确认注销该账户',
|
|
|
|
|
- okText: '确认注销',
|
|
|
|
|
- cancelText: '取消',
|
|
|
|
|
- onOk() {
|
|
|
|
|
-
|
|
|
|
|
- },
|
|
|
|
|
- onCancel() {
|
|
|
|
|
- console.log('Cancel');
|
|
|
|
|
- },
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- return {
|
|
|
|
|
- // formState,
|
|
|
|
|
- // rules,
|
|
|
|
|
- // formRef,
|
|
|
|
|
- // cardTypeList,
|
|
|
|
|
- // isPersonal,
|
|
|
|
|
- visible,
|
|
|
|
|
- cancel,
|
|
|
|
|
- submit,
|
|
|
|
|
- // loading,
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ name: 'add-custom',
|
|
|
|
|
+ components: {},
|
|
|
|
|
+ props: {
|
|
|
|
|
+ selectedData: {
|
|
|
|
|
+ default: {},
|
|
|
|
|
+ type: Object as PropType<ErmcpLoginUser>,
|
|
|
},
|
|
},
|
|
|
|
|
+ },
|
|
|
|
|
+ setup(props, context) {
|
|
|
|
|
+ // 控制关闭弹窗
|
|
|
|
|
+ const {visible, cancel} = closeModal('account_info_business_btn_cancel');
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
+ function submit() {
|
|
|
|
|
+ Modal.confirm({
|
|
|
|
|
+ title: '是否确认注销该账户',
|
|
|
|
|
+ okText: '确认注销',
|
|
|
|
|
+ cancelText: '取消',
|
|
|
|
|
+ onOk() {
|
|
|
|
|
+ let reqParam: LoginaccountOperateReq = {
|
|
|
|
|
+ userid: props.selectedData.userid,
|
|
|
|
|
+ loginid: props.selectedData.loginid,
|
|
|
|
|
+ operatetype: 7, // 5: 锁定 6:解锁
|
|
|
|
|
+ logintaaccounts: [],
|
|
|
|
|
+ }
|
|
|
|
|
+ requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
|
|
|
|
|
+ cancel();
|
|
|
|
|
+ context.emit('refresh');
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ onCancel() {
|
|
|
|
|
+ console.log('Cancel');
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return {
|
|
|
|
|
+ // formState,
|
|
|
|
|
+ // rules,
|
|
|
|
|
+ // formRef,
|
|
|
|
|
+ // cardTypeList,
|
|
|
|
|
+ // isPersonal,
|
|
|
|
|
+ visible,
|
|
|
|
|
+ cancel,
|
|
|
|
|
+ submit,
|
|
|
|
|
+ // loading,
|
|
|
|
|
+ };
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|