ソースを参照

修改新增客户

huangbin 4 年 前
コミット
5b8da8d9d0

+ 77 - 79
src/services/go/ermcp/customInfo/interface.ts

@@ -30,86 +30,84 @@ export interface QueryCustomInfoType {
 }
 
 // 新增用户申请
-export interface AddUserInfoApplyReq{
-    accountid	:number;//交易系统帐号Id (加密存储)
-    areacode	:string;//机构代码
-    areaid	:number;//机构Id
-    attachment1	:string;//附件1
-    attachment2	:string;//附件2
-    attachment3	:string;//附件3
-    attachment4	:string;//附件4
-    attachment5	:string;//附件5
-    auditedby	:string;//审核人
-    auditime	:string;//审核时间
-    bankaccount	:string;//银行帐号 (加密存储)
-    bankaccountname	:string;//收款人名称
-    bankcardbackphotourl	:string;//银行卡背面照地址
-    bankcardfrontphotourl	:string;//银行卡正面照地址
-    bankid	:string;//银行编码
-    bankname	:string;//银行名称
-    bankpictureurl	:string;//银行卡正面地址
-    biznature	:number;//企业性质( 企业) - 1:国有控股企业 2:集体控股企业 3:私人控股企业 4:港澳台商控股企业 5:外商控股企业 6:其它
-    bizscope	:string;//企业经营范围(企业)
-    biztype	:number;//企业类型 - 1:进口/生产 2:销售 3:零售 4:运输 5:仓储
-    brokerid	:string;//经纪人ID(加密存储)
-    cardaddress	:string;//证件地址 (加密存储)
-    cardbackphotourl	:string;//背面证件照地址
-    cardfrontphotourl	:string;//正面证件照地址
-    cardnum	:string;//证件号码 (加密存储)
-    cardtype	:number;//证件类型
-    cityid	:number;//市
-    company	:string;//公司(个人)
-    contactcardbackphotourl	:string;//联系人证件背面图片地址
-    contactcardfrontphotourl	:string;//联系人证件正面图片地址
-    contactname	:string;//联系人
-    countryid	:number;//国家
-    createtime	:string;//开户申请时间
-    cusbankid	:string;//签约类型
-    cusbankname	:string;//签约类型名称
-    customername	:string;//客户名称(企业名称)
-    districtid	:number;//地区
-    email	:string;//Email地址(加密存储)
-    halfbodyphotourl	:string;//半身照地址
-    headurl	:string;//头像地址
-    ipaddress	:string;//IP地址
-    isvalidate	:string;//是否有效 (删除后标记为失效) - number;
-//:无效 1:有效
-    legalcardbackphotourl	:string;//法人身份证背面照地址
-    legalcardfrontphotourl	:string;//法人身份证正面照地址
-    legalpersonname	:string;//法人姓名(企业)
-    logincode	:string;//登录帐号 (加密存储)
-    memberareaid	:number;//所属会员ID
-    mobile2	:string;//手机号码[明文-尚志]
-    mobilephone	:string;//手机号码 (加密存储)
-    modifiedby	:number;//修改人帐号
-    modifiedtime	:string;//修改时间
-    nickname	:string;//昵称:默认为手机号脱敏(1399999) 或 名称脱敏(张)
-    openmode	:number;//开户方式 - 1:管理端开户 2:网上开户注册(会员官网-手机号) 3:微信开户 4:网页交易端注册 5:安卓手机端注册 6:苹果手机端注册 7:PC交易端注册 8:微信快速开户 9:支付宝快速开户 1number;
-//:手机号快速开户 11:网上开户注册(会员官网-微信认证) 12:网上开户注册(会员官网-支付宝认证)
-    otherurl	:string;//其它图片地址[使用分号分隔]
-    postalcode	:string;//邮政编码
-    provinceid	:number;//省
-    proxystatementurl	:string;//授权委托书
-    qq	:string;//QQ(加密存储
-    referral	:string;//推荐人编码
-    remark	:string;//备注
-    removebeforestatus	:number;//REMOVEBEFORESTATUS
-    sex	:number;//性别 - number;
-//:女 1:男
-    signedstatus	:number;//账户一号签签约状态
-    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;//微信号 (加密存储)
-}
-
+export interface AddUserInfoApplyReq {
+    accountid?: number;//交易系统帐号Id (加密存储)
+    areacode?: string;//机构代码
+    areaid?: number;//机构Id
+    attachment1?: string;//附件1
+    attachment2?: string;//附件2
+    attachment3?: string;//附件3
+    attachment4?: string;//附件4
+    attachment5?: string;//附件5
+    auditedby?: string;//审核人
+    auditime?: string;//审核时间
+    bankaccount?: string;//银行帐号 (加密存储)
+    bankaccountname?: string;//收款人名称
+    bankcardbackphotourl?: string;//银行卡背面照地址
+    bankcardfrontphotourl?: string;//银行卡正面照地址
+    bankid?: string;//银行编码
+    bankname?: string;//银行名称
+    bankpictureurl?: string;//银行卡正面地址
+    biznature?: number;//企业性质( 企业) - 1:国有控股企业 2:集体控股企业 3:私人控股企业 4:港澳台商控股企业 5:外商控股企业 6:其它
+    bizscope?: string;//企业经营范围(企业)
+    biztype?: number;//企业类型 - 1:进口/生产 2:销售 3:零售 4:运输 5:仓储
+    brokerid?: string;//经纪人ID(加密存储)
+    cardaddress?: string;//证件地址 (加密存储)
+    cardbackphotourl?: string;//背面证件照地址
+    cardfrontphotourl?: string;//正面证件照地址
+    cardnum?: string;//证件号码 (加密存储)
+    cardtype?: number;//证件类型
+    cityid?: number;//市
+    company?: string;//公司(个人)
+    contactcardbackphotourl?: string;//联系人证件背面图片地址
+    contactcardfrontphotourl?: string;//联系人证件正面图片地址
+    contactname?: string;//联系人
+    countryid?: number;//国家
+    createtime?: string;//开户申请时间
+    cusbankid?: string;//签约类型
+    cusbankname?: string;//签约类型名称
+    customername?: string;//客户名称(企业名称)
+    districtid?: number;//地区
+    email?: string;//Email地址(加密存储)
+    halfbodyphotourl?: string;//半身照地址
+    headurl?: string;//头像地址
+    ipaddress?: string;//IP地址
+    isvalidate?: string;//是否有效 (删除后标记为失效) - number;
+    //:无效 1:有效
+    legalcardbackphotourl?: string;//法人身份证背面照地址
+    legalcardfrontphotourl?: string;//法人身份证正面照地址
+    legalpersonname?: string;//法人姓名(企业)
+    logincode?: string;//登录帐号 (加密存储)
+    memberareaid?: number;//所属会员ID
+    mobile2?: string;//手机号码[明文-尚志]
+    mobilephone?: string;//手机号码 (加密存储)
+    modifiedby?: number;//修改人帐号
+    modifiedtime?: string;//修改时间
+    nickname?: string;//昵称:默认为手机号脱敏(1399999) 或 名称脱敏(张)
+    openmode?: number;//开户方式 - 1:管理端开户 2:网上开户注册(会员官网-手机号) 3:微信开户 4:网页交易端注册 5:安卓手机端注册 6:苹果手机端注册 7:PC交易端注册 8:微信快速开户 9:支付宝快速开户 1number;
+    //:手机号快速开户 11:网上开户注册(会员官网-微信认证) 12:网上开户注册(会员官网-支付宝认证)
+    otherurl?: string;//其它图片地址[使用分号分隔]
+    postalcode?: string;//邮政编码
+    provinceid?: number;//省
+    proxystatementurl?: string;//授权委托书
+    qq?: string;//QQ(加密存储
+    referral?: string;//推荐人编码
+    remark?: string;//备注
+    removebeforestatus?: number;//REMOVEBEFORESTATUS
+    sex?: number;//性别 - number;
+    //:女 1:男
+    signedstatus?: number;//账户一号签签约状态
+    signpdfurl?: string;//签约pdf文件
+    subbranch?: string;//开户支行
+    telphone?: string;//联系电话(加密存储)
+    userid?: number;//用户ID(自增ID)
 
+    username?: string;//用户姓名
+    userstate?: number;//开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过
+    usertype?: number;//用户类型 - 1:投资者 2:机构
+    videourl?: string;//视频地址
+    wechat?: string;//微信号 (加密存储)
+}
 
 // 修改客户申请
 export interface ModifyUserInfoApplyReq {

+ 5 - 5
src/services/request/serviceURL.ts

@@ -75,9 +75,9 @@ export const setServiceURL = (config: URL): void => {
     serviceURL = config;
 
     // 外网环境(175),外包同事使用
-    // if (process.env.NODE_ENV === 'development') {
-    //     serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
-    //     serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
-    //     serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
-    // }
+    if (process.env.NODE_ENV === 'development') {
+        serviceURL.goCommonSearchUrl = 'http://218.17.158.45:21001/api';
+        serviceURL.quoteUrl = 'ws://218.17.158.45:21004';
+        serviceURL.tradeUrl = 'ws://218.17.158.45:21005';
+    }
 };

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

@@ -5,7 +5,7 @@
            v-model:visible="visible"
            @cancel="cancel"
            centered
-           :maskClosable="maskClosableFlag"
+           :maskClosable="false"
            width="890px">
     <template #footer>
       <a-button key="submit"
@@ -14,11 +14,13 @@
                 @click="submit">完成</a-button>
     </template>
     <a-form class="inlineForm"
-            :form="form"
-            @submit="handleSearch">
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
       <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="客户类型">
+          <a-form-item label="客户类型"
+                       name="userinfotype">
             <a-select class="typeSelect"
                       style="width: 200px"
                       v-model:value="formState.userinfotype"
@@ -32,97 +34,112 @@
             </a-select>
           </a-form-item>
         </a-col>
+        <template v-if="!isPersonal()">
+          <a-col :span="12">
+            <a-form-item label="企业名称"
+                         name="customername">
+              <a-input class="dialogInput"
+                       v-model:value="formState.customername"
+                       style="width: 200px"
+                       placeholder="请输入企业名称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="企业简称"
+                         name="nickname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.nickname"
+                       placeholder="请输入企业简称" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件类型"
+                         name="cardtype">
+              <a-select class="inlineFormSelect"
+                        v-model:value="formState.cardtype"
+                        style="width: 200px"
+                        placeholder="请选择证件类型">
+                <a-select-option :value="item.enumitemname"
+                                 v-for="item in cardTypeList"
+                                 :key="item.autoid">
+                  {{item.enumdicname}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="法定代表人"
+                         name="legalpersonname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.legalpersonname"
+                       placeholder="请输入法定代表人" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="证件号码"
+                         name="cardnum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.cardnum"
+                       placeholder="请输入证件号码" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="纳税人识别号"
+                         name="taxpayernum">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.taxpayernum"
+                       placeholder="请输入纳税人识别号" />
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="营业执照">
+              <div class="upload">
+                <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
+                          :transform-file="transformFile">
+                  <a-button class="uploadBtn">上传</a-button>
+                </a-upload>
+                <div class="look">查看附件</div>
+              </div>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="联系人"
+                         name="contactname">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.contactname"
+                       placeholder="请输入联系人" />
+            </a-form-item>
+          </a-col>
+        </template>
         <a-col :span="12">
-          <a-form-item label="企业名称">
+          <a-form-item label="姓名"
+                       name="mobilephone">
             <a-input class="dialogInput"
-                     v-model:value="formState.customername"
                      style="width: 200px"
-                     placeholder="请输入企业名称" />
+                     v-model:value="formState.mobilephone"
+                     placeholder="请输入姓名" />
           </a-form-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="企业简称">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     v-model:value="formState.nickname"
-                     placeholder="请输入企业简称" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件类型">
-            <a-select class="inlineFormSelect"
-                      v-model:value="formState.cardtype"
-                      style="width: 200px"
-                      placeholder="请选择证件类型">
-              <a-select-option value="1">
-                客户一
-              </a-select-option>
-              <a-select-option value="2">
-                客户二
-              </a-select-option>
-            </a-select>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="法定代表人">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     placeholder="请输入法定代表人" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="证件号码">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     placeholder="请输入证件号码" />
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="纳税人识别号">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     placeholder="请输入纳税人识别号" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="营业执照">
-            <div class="upload">
-              <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
-                        :transform-file="transformFile">
-                <a-button class="uploadBtn">上传</a-button>
-              </a-upload>
-              <div class="look">查看附件</div>
-            </div>
-          </a-form-item>
-        </a-col>
-      </a-row>
-      <a-row :gutter="24">
-        <a-col :span="12">
-          <a-form-item label="联系人">
-            <a-input class="dialogInput"
-                     style="width: 200px"
-                     placeholder="请输入联系人" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="12">
-          <a-form-item label="联系人手机号">
+          <a-form-item label="联系人手机号"
+                       name="mobilephone">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.mobilephone"
                      placeholder="请输入联系人手机号" />
           </a-form-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="24">
         <a-col :span="12">
-          <a-form-item label="联系电话">
+          <a-form-item label="联系电话"
+                       name="telphone">
             <a-input class="dialogInput"
                      style="width: 200px"
+                     v-model:value="formState.telphone"
                      placeholder="请输入联系电话" />
           </a-form-item>
         </a-col>
@@ -131,8 +148,6 @@
             &nbsp;
           </a-form-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="24">
         <a-col :span="24">
           <a-form-item label="通讯地址">
             <a-select class="inlineFormSelect"
@@ -167,21 +182,21 @@
             </a-select>
           </a-form-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="24">
         <a-col :span="24">
-          <a-form-item label="&nbsp;">
+          <a-form-item label="&nbsp;"
+                       name="cardaddress">
             <a-input class="dialogInput"
                      style="width: 635px"
+                     v-model:value="formState.cardaddress"
                      placeholder="请输入详细地址" />
           </a-form-item>
         </a-col>
-      </a-row>
-      <a-row :gutter="24">
         <a-col :span="24">
-          <a-form-item label="备注">
+          <a-form-item label="备注"
+                       name="remark">
             <a-input class="dialogInput"
                      style="width: 635px"
+                     v-model:value="formState.remark"
                      placeholder="请输入备注" />
           </a-form-item>
         </a-col>
@@ -194,41 +209,26 @@
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
 import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
-
-interface FormState {
-    userinfotype: string; //客户类型
-    customername: string; //客户名称(企业名称)
-    nickname: string; //企业简称
-    cardtype: number; //证件类型
-    cardnum: string; //证件号码 (加密存储)
-    legalpersonname: string; //法人姓名(企业)
-    attachment1: string; //附件1
-    attachment2: string; //附件2
-    attachment3: string; //附件3
-    attachment4: string; //附件4
-    attachment5: string; //附件5
-    contactname: string; //联系人
-    mobilephone: string; //手机号码 (加密存储)
-    telphone: string; //联系电话(加密存储)
-    provinceid: number; //省
-    cityid: number; //市
-    districtid: number; //地区
-    remark: string; //备注
-    cardaddress: string; //证件地址 (加密存储)
-}
+import { getCardType } from './setup';
+import { AllEnums } from '@/services/go/commonService/interface';
+import { FormState } from './interface';
+import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
 
 export default defineComponent({
     name: 'add-custom',
     components: {},
     setup() {
         const { visible, cancel } = closeModal('custom_info_btn_add');
+        const cardTypeList = ref<AllEnums[]>(getCardType());
+        const formRef = ref();
         const formState: UnwrapRef<FormState> = reactive({
-            userinfotype: '',
+            userinfotype: '2',
             customername: '',
             nickname: '',
-            cardtype: 2,
+            cardtype: undefined,
             cardnum: '',
             legalpersonname: '',
+            taxpayernum: '',
             attachment1: '',
             attachment2: '',
             attachment3: '',
@@ -244,27 +244,39 @@ export default defineComponent({
             remark: '',
         });
         const rules = {
-            userinfotype: [{ type: 'array', required: true, message: '请选择客户类型', trigger: 'change' }],
+            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 = ref<boolean>(false);
-        const maskClosableFlag = ref<boolean>(false);
+        function isPersonal(): boolean {
+            return formState.userinfotype === '1';
+        }
         function submit() {
             loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            formRef.value
+                .validate()
+                .then(() => {
+                    console.log('values', formState, toRaw(formState));
+                    loading.value = false;
+                })
+                .catch((error: ValidateErrorEntity<FormState>) => {
+                    console.log('error', error);
+                    loading.value = false;
+                });
         }
         initData(() => {});
         return {
             formState,
+            rules,
+            formRef,
+            cardTypeList,
+            isPersonal,
             visible,
             cancel,
             submit,
             loading,
-            maskClosableFlag,
         };
     },
 });

+ 23 - 0
src/views/information/custom/compoments/add/interface.ts

@@ -0,0 +1,23 @@
+export interface FormState {
+    userinfotype: string; //客户类型
+    customername: string; //客户名称(企业名称)
+    nickname: string; //企业简称
+    cardtype: number | undefined; //证件类型
+
+    cardnum: string; //证件号码 (加密存储)
+    legalpersonname: string; //法人姓名(企业)
+    taxpayernum: string; //纳税人识别号
+    attachment1: string; //附件1
+    attachment2: string; //附件2
+    attachment3: string; //附件3
+    attachment4: string; //附件4
+    attachment5: string; //附件5
+    contactname: string; //联系人
+    mobilephone: string; //手机号码 (加密存储)
+    telphone: string; //联系电话(加密存储)
+    provinceid: number; //省
+    cityid: number; //市
+    districtid: number; //地区
+    remark: string; //备注
+    cardaddress: string; //证件地址 (加密存储)
+}

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

@@ -1,4 +1,18 @@
 
+import { getItemEnum } from '@/services/bus/allEnum';
+import { AddUserInfoApplyReq } from '@/services/go/ermcp/customInfo/interface';
+
+/**
+ * 获取证件类型
+ * @returns 
+ */
 export function getCardType() {
+    const arr = [2, 4, 18, 21];
+    console.log('getCardType', getItemEnum('certificatetype').filter(e => arr.includes(e.enumitemname)));
+
+    return getItemEnum('certificatetype').filter(e => arr.includes(e.enumitemname))
+}
+
+export function applyAction(param: AddUserInfoApplyReq) {
 
 }