Forráskód Böngészése

修改平安期货客户资料

huangbin 4 éve
szülő
commit
b4ee2d608f

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

@@ -1,6 +1,88 @@
 <template>
-  <!-- 新增客户资料 -->
+  <!-- 平安客户资料 -->
+  <a-modal class="add-custom "
+           title="新增客户资料"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           v-if="isOemByEnum(OemType.pingan)"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                :loading="loading"
+                :disabled="loading"
+                @click="submit(1)">完成
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="客户类型"
+                       name="userinfotype">
+            <a-select class="typeSelect"
+                      style="width: 200px"
+                      v-model:value="formState.userinfotype"
+                      placeholder="请选择客户类型">
+              <a-select-option value="1">
+                个人
+              </a-select-option>
+              <a-select-option value="2">
+                企业
+              </a-select-option>
+            </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>
+        </template>
+        <template v-else>
+          <a-col :span="12">
+            <a-form-item label="姓名"
+                         name="username">
+              <a-input class="dialogInput"
+                       style="width: 200px"
+                       v-model:value="formState.username"
+                       placeholder="请输入姓名" />
+            </a-form-item>
+          </a-col>
+        </template>
+        <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>
+        <a-col :span="12">
+          <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-form>
+  </a-modal>
+  <!-- 其他项目客户资料 -->
   <a-modal class="add-custom"
+           v-else
            title="新增客户资料"
            v-model:visible="visible"
            @cancel="cancel"
@@ -279,6 +361,7 @@ import { getUploadImg } from '@/common/setup/upload';
 import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
 import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
 import { getAreaUserId } from '@/services/bus/user';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'add-custom',
@@ -357,6 +440,8 @@ export default defineComponent({
             attachmentUpLoad,
             cardbackphotourlUpLoad,
             cardfrontphotourlUpLoad,
+            isOemByEnum,
+            OemType,
         };
     },
 });

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

@@ -21,6 +21,7 @@ import { formatValue } from '@/common/methods';
 import { getCardTypeEnumItemName } from '@/common/constants/enumsName';
 import { Des, DescriptionsList, handleDesList } from '@/common/components/commonDes';
 import { handlePreviewImg } from '@/common/setup/upload';
+import { isOemByEnum, OemType } from '@/common/config/projectName';
 
 export default defineComponent({
     name: 'custom-detail-desc',
@@ -57,38 +58,56 @@ 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.provincename + data.cityname + data.districtname + 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.provincename + data.cityname + data.districtname + data.address) },
-                { label: '备注', value: formatValue(data.remark) },
-            ];
-            getDesList(isPersonal() ? person : company);
-            // }
+            if (isOemByEnum(OemType.pingan)) {
+                const person = [
+                    { label: '客户类型', value: '个人' },
+                    { label: '姓名', value: formatValue(data.username) },
+                    { label: '点价联系人', value: formatValue(data.contactname) },
+                    { label: '联系人手机号', value: formatValue(data.mobile) },
+                    { label: '状态', value: getStatusName(data.status), className: 'green' },
+                ];
+                const company = [
+                    { label: '客户类型', value: '企业' },
+                    { label: '企业名称', value: formatValue(data.customername) },
+                    { label: '点价联系人', value: formatValue(data.contactname) },
+                    { label: '联系人手机号', value: formatValue(data.mobile) },
+                    { label: '状态', value: getStatusName(data.status), className: 'green' },
+                ];
+                getDesList(isPersonal() ? person : company);
+            } else {
+                // 个人
+                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.provincename + data.cityname + data.districtname + 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.provincename + data.cityname + data.districtname + data.address) },
+                    { label: '备注', value: formatValue(data.remark) },
+                ];
+                getDesList(isPersonal() ? person : company);
+                // }
+            }
         });
         return {
             desList,