Ver Fonte

commit 新增账户 修改账户 详情 代码修改

yu jie há 4 anos atrás
pai
commit
adb82a8aff

+ 1 - 1
src/services/go/ermcp/customInfo/interface.ts

@@ -26,7 +26,7 @@ export interface QueryCustomInfoType {
     taxpayernum: string;//纳税人识别号
     telphone: string;//联系电话
     userid: number;//用户ID
-    userinfotype: string;//客户类型
+    userinfotype: number;//客户类型
     username: string;
 }
 

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

@@ -297,7 +297,7 @@ export default defineComponent({
         // 正面证件照地址
         const { getFirstImg: getFrontImg, uploadImgAction: cardfrontphotourlUpLoad } = getUploadImg();
         function isPersonal(): boolean {
-            return formState.userinfotype === 1;
+            return formState.userinfotype === '1';
         }
 
         function submit(OperateType: 1 | 2) {

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

@@ -1,5 +1,5 @@
 export interface FormState {
-    userinfotype: number; //客户类型
+    userinfotype: string; //客户类型
     customername: string; //客户名称(企业名称)
     nickname: string; //企业简称
     cardtype: number | undefined; //证件类型

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

@@ -39,7 +39,7 @@ export function handleForm() {
  */
 export function initFormState(): FormState {
     return {
-        userinfotype: 2,
+        userinfotype: '2',
         customername: '',
         nickname: '',
         cardtype: undefined,

+ 4 - 4
src/views/information/custom/compoments/common-detail/index.vue

@@ -33,7 +33,7 @@ export default defineComponent({
     },
     setup(props) {
         function isPersonal() {
-            return props.selectedRow.userinfotype === '1';
+            return props.selectedRow.userinfotype === 1;
         }
         const { desList, getDesList } = handleDesList();
         // 预览附件
@@ -54,12 +54,12 @@ export default defineComponent({
             }
         }
         watchEffect(() => {
-            if (props.selectedRow.customername) {
+            // if (props.selectedRow.customername) {
                 const data = props.selectedRow;
                 // 个人
                 const person = [
                     { label: '客户类型', value: '个人' },
-                    { label: '姓名', value: data.customername },
+                    { label: '姓名', value: formatValue(data.username) },
                     { label: '身份证号码', value: formatValue(data.cardnum) },
                     { label: '手机号码', value: formatValue(data.mobile) },
                     { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
@@ -87,7 +87,7 @@ export default defineComponent({
                     { label: '备注', value: formatValue(data.remark) },
                 ];
                 getDesList(isPersonal() ? person : company);
-            }
+            // }
         });
         return {
             desList,

+ 5 - 4
src/views/information/custom/compoments/modify/index.vue

@@ -30,10 +30,10 @@
                       style="width: 200px"
                       v-model:value="formState.userinfotype"
                       placeholder="请选择客户类型">
-              <a-select-option value="1">
+              <a-select-option value = "1">
                 个人
               </a-select-option>
-              <a-select-option value="2">
+              <a-select-option value = "2">
                 企业
               </a-select-option>
             </a-select>
@@ -307,7 +307,7 @@ export default defineComponent({
         const { uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
 
         function isPersonal(): boolean {
-            return formState.userinfotype === 1;
+            return formState.userinfotype === '1';
         }
 
         const userid = ref<number>(0);
@@ -317,6 +317,7 @@ export default defineComponent({
                 userid.value = props.selectedRow.userid;
                 countryid.value = props.selectedRow.countryid;
                 mergeTwoObj(formState, props.selectedRow);
+                formState.userinfotype = formState.userinfotype.toString()
                 if (isPersonal()) {
                     formState.username = props.selectedRow.customername;
                 }else{
@@ -345,7 +346,7 @@ export default defineComponent({
             validateAction<FormState>(formRef, formState).then((param) => {
                 const reqParam: CustomerInfoOperateReq = {
                     operatetype: 2,   // 1: 新增 2:修改
-                    username: Number(param.userinfotype) === 1 ? param.username : param.customername,
+                    username: param.userinfotype === '1' ? param.username : param.customername,
                     userid: userid.value,
                     areaid: getUserId(),
                     userinfotype: Number(param.userinfotype),