Pārlūkot izejas kodu

commit 信息 - 账户管理 删除

xkwg 4 gadi atpakaļ
vecāks
revīzija
74a5b08054

+ 5 - 1
src/services/go/ermcp/customInfo/index.ts

@@ -31,7 +31,11 @@ export function QueryAddUserInfoApply(userInfoApply: AddUserInfoApplyReq): Promi
 
 /**
  * 修改客户申请 /Erms3/ModifyUserInfoApply
- * @param userInfoApply
+ * @param userInfoApply.userid: number;//用户ID(自增ID) (必填)
+ * @param userInfoApply.userinfotype: number;//用户信息类型 - 1:个人 2:企业 (必填)
+ * @param userInfoApply.username: string;//用户姓名 (必填)
+ * @param userInfoApply.userstate: number;//开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 (必填)
+ * @param userInfoApply.customername: string;//客户名称(企业名称)  (必填)
  * @constructor
  */
 export function QueryModifyUserInfoApply(userInfoApply: ModifyUserInfoApplyReq): Promise<BaseResponse> {

+ 7 - 5
src/services/go/ermcp/customInfo/interface.ts

@@ -111,6 +111,11 @@ export interface AddUserInfoApplyReq {
 
 // 修改客户申请
 export interface ModifyUserInfoApplyReq {
+    userid: number;//用户ID(自增ID) (必填)
+    userinfotype: number;//用户信息类型 - 1:个人 2:企业 (必填)
+    username: string;//用户姓名 (必填)
+    userstate: number;//开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 (必填)
+    customername: string;//客户名称(企业名称)  (必填)
     accountid?: number;//交易系统帐号Id (加密存储)
     areacode?: string;//机构代码
     areaid?: number;//机构Id
@@ -146,7 +151,7 @@ export interface ModifyUserInfoApplyReq {
     createtime?: string;//开户申请时间
     cusbankid?: string;//签约类型
     cusbankname?: string;//签约类型名称
-    customername: string;//客户名称(企业名称)  (必填)
+
     districtid?: number;//地区
     email?: string;//Email地址(加密存储)
     halfbodyphotourl?: string;//半身照地址
@@ -179,10 +184,7 @@ export interface ModifyUserInfoApplyReq {
     signpdfurl?: string;//签约pdf文件
     subbranch?: string;//开户支行
     telphone?: string;//联系电话(加密存储)
-    userid: number;//用户ID(自增ID) (必填)
-    userinfotype: number;//用户信息类型 - 1:个人 2:企业 (必填)
-    username: string;//用户姓名 (必填)
-    userstate: number;//开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 (必填)
+
     usertype?: number;//用户类型 - 1:投资者 2:机构
     videourl?: string;//视频地址
     wechat?: string;//微信号 (加密存储)

+ 16 - 4
src/views/information/custom/compoments/cancel/index.vue

@@ -113,9 +113,11 @@
 import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { Modal } from 'ant-design-vue';
-import {QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
+import {ModifyUserInfoApplyReq, QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
 import {formatValue} from "@/common/methods";
 import {getStatusName} from "@/views/information/custom/setup";
+import {cancelCustomInfo} from "@/views/information/custom/compoments/setup";
+import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'custom_info_btn_cancel',
@@ -126,11 +128,11 @@ export default defineComponent({
             default: {},
         },
     },
-    setup() {
+    setup(props) {
         const { visible, cancel } = closeModal('custom_info_btn_cancel');
-        const loading = ref<boolean>(false);
+        const {loading, ModifyUserInfo} = cancelCustomInfo()
         function submit() {
-            // loading.value = true;
+            loading.value = true;
             Modal.confirm({
                 title: '是否确认撤销客户资料',
                 content: '是否撤销',
@@ -138,9 +140,18 @@ export default defineComponent({
                 cancelText: '取消',
                 onOk() {
                     console.log('OK');
+                    const req : ModifyUserInfoApplyReq = {
+                        userid: getUserId(),//用户ID
+                        userinfotype: Number(props.selectedRow.userinfotype), //用户信息类型 - 1:个人 2:企业 (必填)
+                        username: props.selectedRow.customername,         //用户姓名 (必填) 用的企业名称
+                        userstate: 1,       //开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过 (必填)
+                        customername: props.selectedRow.customername, //客户名称(企业名称)  (必填)
+                    }
+                    ModifyUserInfo(req)
                 },
                 onCancel() {
                     console.log('Cancel');
+                    loading.value = false;
                 },
                 class: 'test',
             });
@@ -150,6 +161,7 @@ export default defineComponent({
             // }, 2000);
         }
 
+
         return {
             visible,
             cancel,

+ 29 - 0
src/views/information/custom/compoments/setup.ts

@@ -0,0 +1,29 @@
+import {QueryModifyUserInfoApply} from "@/services/go/ermcp/customInfo";
+import {ModifyUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
+import {ref} from "vue";
+import { message } from 'ant-design-vue';
+
+/**
+ *  撤销客户资料 撤销后的数据会进入草稿(未提交)
+ */
+export function cancelCustomInfo(){
+    const loading = ref<boolean>(false);
+    // 这里调用的是修改客户申请接口
+    function ModifyUserInfo(req: ModifyUserInfoApplyReq){
+        QueryModifyUserInfoApply(req)
+            .then((res) => {
+                loading.value = false
+                if(res.result){
+                    message.success("撤销成功")
+                    console.log('撤销客户资料成功');
+                }else{
+                    message.error("撤销失败:" + res.message)
+                }
+            })
+            .catch((err) => {
+                loading.value = false
+                message.error("撤销失败")
+            });
+    }
+    return {loading, ModifyUserInfo}
+}