瀏覽代碼

commit 客户资料代码

yu jie 4 年之前
父節點
當前提交
6b3e94ee8a

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

@@ -27,6 +27,7 @@ export interface QueryCustomInfoType {
     telphone: string;//联系电话
     userid: number;//用户ID
     userinfotype: string;//客户类型
+    username: string;
 }
 
 // 新增用户申请

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

@@ -297,19 +297,19 @@ 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) {
             validateAction<FormState>(formRef, formState).then((param) => {
                 const reqParam: CustomerInfoOperateReq = {
-                    operatetype: OperateType,
+                    operatetype: 1,   // 1: 新增
                     // userid: 1, // 写死 必填
                     userid: getUserId(), // 写死 必填
-                    areaid: getAreaUserId(),
+                    areaid: getUserId(),
                     userinfotype: Number(param.userinfotype),
-                    username: param.username,
-                    userstate: 2, // 1: 保存草稿 2: 新增
+                    username: Number(param.userinfotype) === 1 ? param.username : param.customername,
+                    userstate: OperateType, // 1: 保存草稿 2: 新增
                     // 以上必填
                     cardtype: (param.cardtype as number) !== undefined ? (param.cardtype as number) : 0, // 证件类型
                     cardnum: param.cardnum, // 证件号码

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

@@ -1,5 +1,5 @@
 export interface FormState {
-    userinfotype: string; //客户类型
+    userinfotype: number; //客户类型
     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,

+ 18 - 12
src/views/information/custom/compoments/modify/index.vue

@@ -278,6 +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";
 
 export default defineComponent({
     name: 'modify-custom',
@@ -305,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 +319,8 @@ export default defineComponent({
                 mergeTwoObj(formState, props.selectedRow);
                 if (isPersonal()) {
                     formState.username = props.selectedRow.customername;
+                }else{
+                    formState.username = props.selectedRow.username;
                 }
                 const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
                 formState.cardaddress = address;
@@ -339,31 +343,33 @@ export default defineComponent({
         });
         function submit(OperateType: 1 | 2) {
             validateAction<FormState>(formRef, formState).then((param) => {
-                const reqParam: ModifyUserInfoApplyReq = {
-                    customername: Number(param.userinfotype) === 1 ? param.username : param.customername, // 必填
-                    username: param.username,
+                const reqParam: CustomerInfoOperateReq = {
+                    operatetype: 2,   // 1: 新增 2:修改
+                    username: Number(param.userinfotype) === 1 ? param.username : param.customername,
                     userid: userid.value,
-                    memberareaid: getUserId(),
+                    areaid: getUserId(),
                     userinfotype: Number(param.userinfotype),
                     userstate: OperateType, // 1: 保存草稿 2: 新增
-                    cardtype: param.cardtype, // 证件类型
+                    cardtype: (param.cardtype as number) !== undefined ? (param.cardtype as number) : 0, // 证件类型
                     cardnum: param.cardnum, // 证件号码
                     nickname: param.nickname, // 昵称
                     remark: param.remark, // 备注
                     mobilephone: param.mobilephone, //  手机号码
                     telphone: param.telphone, // 电话
                     cardfrontphotourl: param.cardfrontphotourl, // 正面照片
-                    cardaddress: param.cardaddress, // 证件地址
-                    cityid: param.cityid, //
-                    districtid: param.districtid, // 地区
-                    countryid: countryid.value,
-                    provinceid: param.provinceid, //省
+                    ipaddress: param.cardaddress, // 证件地址
+                    cityid: (param.cityid as number) !== undefined ? (param.cityid as number) : 0, //城市
+                    districtid: (param.districtid as number) !== undefined ? (param.districtid as number) : 0, // 地区
+                    // countryid: param.,9
+                    provinceid: (param.provinceid as number) !== undefined ? (param.provinceid as number) : 0, //省
+                    // countryid: countryid.value,
                     contactname: param.contactname, // 联系人
                     legalpersonname: param.legalpersonname, // 法人姓名(企业)
                     taxpayernum: param.taxpayernum, // 纳税人识别号
                     email: param.email, // email
+                    proxystatementurl: '',
                 };
-                requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
+                requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
                     cancel();
                     context.emit('refresh');
                 });

+ 6 - 1
src/views/information/custom/list/checkpending/index.vue

@@ -18,8 +18,13 @@
           <BtnList :btnList="forDataBtn" />
         </template>
         <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
+          <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
+          <!-- 客户名称 -->
+          <template #customername="{ record }">
+              <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
+          </template>
+
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
         </template>

+ 5 - 1
src/views/information/custom/list/normal-use/index.vue

@@ -18,8 +18,12 @@
           <BtnList :btnList="forDataBtn" />
         </template>
         <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
+          <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
+          <!-- 客户名称 -->
+          <template #customername="{ record }">
+              <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
+          </template>
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
         </template>

+ 5 - 1
src/views/information/custom/list/stop-use/index.vue

@@ -18,8 +18,12 @@
           <BtnList :btnList="forDataBtn" />
         </template>
         <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
+            <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
+          <!-- 客户名称 -->
+          <template #customername="{ record }">
+              <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
+          </template>
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
         </template>

+ 5 - 1
src/views/information/custom/list/unsubmit/index.vue

@@ -18,8 +18,12 @@
           <BtnList :btnList="forDataBtn" />
         </template>
         <template #userinfotype="{ text }">
-          <a>{{ text === '2' ? '企业' : '个人' }}</a>
+            <a>{{ text === 2 ? '企业' : '个人' }}</a>
         </template>
+          <!-- 客户名称 -->
+          <template #customername="{ record }">
+              <a>{{ record.userinfotype === 2 ? record.customername :  record.username }}</a>
+          </template>
         <template #status="{ text }">
           <a>{{ getStatusName(text) }}</a>
         </template>

+ 7 - 0
src/views/order/spot_warran/components/spot_warrant_deal/index.vue

@@ -16,6 +16,13 @@
                  :record="record"
                  @click="openComponent" />
       </template>
+
+        <!-- 成交金额 -->
+        <template #amount="{ record }">
+            <a>{{ record.tradeqty * record.tradeprice }}</a>
+        </template>
+
+
     </a-table>
     <component :is="componentId"
                v-if="componentId"