huangbin há 4 anos atrás
pai
commit
d9b4554136

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

@@ -43,7 +43,7 @@ export default defineComponent({
             const { attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
             switch (label) {
                 case '营业执照':
-                    previewImg(attachment1);
+                    previewImg(cardfrontphotourl);
                     break;
                 case '身份证正面照':
                     previewImg(cardfrontphotourl);
@@ -55,38 +55,38 @@ export default defineComponent({
         }
         watchEffect(() => {
             // if (props.selectedRow.customername) {
-                const data = props.selectedRow;
-                // 个人
-                const person = [
-                    { label: '客户类型', value: '个人' },
-                    { label: '姓名', value: formatValue(data.username) },
-                    { label: '身份证号码', value: formatValue(data.cardnum) },
-                    { label: '手机号码', value: formatValue(data.mobile) },
-                    { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
-                    { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue'  },
-                    { label: '邮箱', value: formatValue(data.email) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '通讯地址', value: formatValue(data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                // 企业
-                const company = [
-                    { label: '客户类型', value: '企业' },
-                    { label: '企业名称', value: data.customername },
-                    { label: '企业简称', value: formatValue(data.nickname) },
-                    { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
-                    { label: '法定代表人', value: formatValue(data.legalpersonname) },
-                    { label: '证件号码', value: formatValue(data.cardnum) },
-                    { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
-                    { label: '营业执照', value: formatValue(getImgName(data.attachment1)), className: 'blue'  },
-                    { label: '联系人', value: formatValue(data.contactname) },
-                    { label: '联系人手机号', value: formatValue(data.mobile) },
-                    { label: '联系电话', value: formatValue(data.telphone) },
-                    { label: '状态', value: getStatusName(data.status), className: 'green' },
-                    { label: '通讯地址', value: formatValue(data.address) },
-                    { label: '备注', value: formatValue(data.remark) },
-                ];
-                getDesList(isPersonal() ? person : company);
+            const data = props.selectedRow;
+            // 个人
+            const person = [
+                { label: '客户类型', value: '个人' },
+                { label: '姓名', value: formatValue(data.username) },
+                { label: '身份证号码', value: formatValue(data.cardnum) },
+                { label: '手机号码', value: formatValue(data.mobile) },
+                { label: '身份证正面照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+                { label: '身份证反面照', value: formatValue(getImgName(data.cardbackphotourl)), className: 'blue' },
+                { label: '邮箱', value: formatValue(data.email) },
+                { label: '联系电话', value: formatValue(data.telphone) },
+                { label: '通讯地址', value: formatValue(data.address) },
+                { label: '备注', value: formatValue(data.remark) },
+            ];
+            // 企业
+            const company = [
+                { label: '客户类型', value: '企业' },
+                { label: '企业名称', value: data.customername },
+                { label: '企业简称', value: formatValue(data.nickname) },
+                { label: '证件类型', value: getCardTypeEnumItemName(data.cardtype) },
+                { label: '法定代表人', value: formatValue(data.legalpersonname) },
+                { label: '证件号码', value: formatValue(data.cardnum) },
+                { label: '纳税人识别号', value: formatValue(data.taxpayernum) },
+                { label: '营业执照', value: formatValue(getImgName(data.cardfrontphotourl)), className: 'blue' },
+                { label: '联系人', value: formatValue(data.contactname) },
+                { label: '联系人手机号', value: formatValue(data.mobile) },
+                { label: '联系电话', value: formatValue(data.telphone) },
+                { label: '状态', value: getStatusName(data.status), className: 'green' },
+                { label: '通讯地址', value: formatValue(data.address) },
+                { label: '备注', value: formatValue(data.remark) },
+            ];
+            getDesList(isPersonal() ? person : company);
             // }
         });
         return {

+ 9 - 9
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>
@@ -278,8 +278,8 @@ import { validateAction } from '@/common/setup/form';
 import { delAddress } from '@/services/socket/address';
 import UploadImg from '@/common/components/uploadImg/index.vue';
 import { getUploadImg } from '@/common/setup/upload';
-import {addCustomerInfoOperate} from "@/services/proto/accountinfo";
-import {CustomerInfoOperateReq} from "@/services/proto/accountinfo/interface";
+import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
+import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
 
 export default defineComponent({
     name: 'modify-custom',
@@ -317,10 +317,10 @@ export default defineComponent({
                 userid.value = props.selectedRow.userid;
                 countryid.value = props.selectedRow.countryid;
                 mergeTwoObj(formState, props.selectedRow);
-                formState.userinfotype = formState.userinfotype.toString()
+                formState.userinfotype = formState.userinfotype.toString();
                 if (isPersonal()) {
                     formState.username = props.selectedRow.customername;
-                }else{
+                } else {
                     formState.username = props.selectedRow.username;
                 }
                 const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
@@ -328,9 +328,9 @@ export default defineComponent({
                 formState.mobilephone = mobile;
                 provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
                 cityid ? getDistrictList(cityid) : ((formState.cityid = undefined), (formState.districtid = undefined));
-                if (attachment1) {
+                if (cardfrontphotourl) {
                     // 营业执照
-                    attachmentImgList.value = attachmentHandle(attachment1);
+                    attachmentImgList.value = attachmentHandle(cardfrontphotourl);
                 }
                 if (cardbackphotourl) {
                     // 背面证件照地址
@@ -345,7 +345,7 @@ export default defineComponent({
         function submit(OperateType: 1 | 2) {
             validateAction<FormState>(formRef, formState).then((param) => {
                 const reqParam: CustomerInfoOperateReq = {
-                    operatetype: 2,   // 1: 新增 2:修改
+                    operatetype: 2, // 1: 新增 2:修改
                     username: param.userinfotype === '1' ? param.username : param.customername,
                     userid: userid.value,
                     areaid: getUserId(),