Browse Source

commit 信息 客户资料 审核

xkwg 4 years ago
parent
commit
a1edcd2057

+ 16 - 0
public/proto/mtp.proto

@@ -896,6 +896,22 @@ message ErmcpHedgePlanRsp {
 	optional string RetDesc = 3; // string 描述信息
 }
 
+// 客户信息审核通过请求 0 29 122
+message UserInfoCheckMangeReq {
+	optional MessageHead Header = 1; // MessageHead
+	optional uint64 auditflag = 2; // uint64 1审核通过2审核拒绝
+	optional uint64 userid = 3; // uint64 客户userid
+	optional uint64 audituserid = 4; // uint64 审核操作人userid
+	optional string remark = 5; // string 备注
+}
+
+// 客户信息审核通过请求响应 0 29 123
+message UserInfoCheckMangeRsp {
+	optional MessageHead Header = 1; // MessageHead 消息头
+	optional int32 RetCode = 2; // int32 返回码
+	optional string RetDesc = 3; // string 描述信息
+	optional uint64 userid = 4; // uint64 客户userid
+}
 
 
 

+ 4 - 0
src/services/funcode/index.ts

@@ -84,4 +84,8 @@ export const funCode: Code = {
     // 套保计划 -- 新增套保计划
     ErmcpHedgePlanReq: 1900708,  /// 套保计划操作请求(1179650)
     ErmcpHedgePlanRsp: 1900709,  /// 套保计划操作响应(1179651)
+
+    // 信息 - 客户资料 - 审核
+    UserInfoCheckMangeReq: 1900666,    /// 客户信息审核通过请求
+    UserInfoCheckMangeRsp: 1900667,   /// 客户信息审核通过请求响应
 };

+ 5 - 0
src/services/go/ermcp/customInfo/index.ts

@@ -44,6 +44,11 @@ export function QueryModifyUserInfoApply(userInfoApply: ModifyUserInfoApplyReq):
     });
 }
 
+/**
+ * 撤回
+ * @param req
+ * @constructor
+ */
 export function QueryModifyUserInfo(req: ModifyUserInfoReq): Promise<BaseResponse> {
     return commonUpdate_go('/Erms3/ModifyUserInfoApply', req).catch((err) => {
         throw new Error(`修改客户申请状态: ${err.message}`);

+ 36 - 1
src/services/proto/accountinfo/index.ts

@@ -1 +1,36 @@
-//
+import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
+import APP from "@/services";
+import {Callback} from "@/utils/websocket";
+import {UserInfoCheckMangeReq, UserInfoCheckMangeRsp} from "@/services/proto/accountinfo/interface";
+import {getSelectedAccount} from "@/services/bus/account";
+
+/**
+ * 客户资料审核
+ * @param param
+ */
+export const userInfoCheck = (param: UserInfoCheckMangeReq): Promise<UserInfoCheckMangeRsp> => {
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'UserInfoCheckMangeReq',
+            funCodeName: 'UserInfoCheckMangeReq',
+            reqParams:  param,
+            msgHeadParams: {
+                AccountID: getSelectedAccount(),
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'UserInfoCheckMangeRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

+ 12 - 0
src/services/proto/accountinfo/interface.ts

@@ -0,0 +1,12 @@
+// 客户信息审核通过请求 0 29 122
+export interface UserInfoCheckMangeReq{
+    auditflag: number // uint64 1审核通过2审核拒绝
+    userid: number // uint64 客户userid
+    audituserid: number // uint64 审核操作人userid
+    remark: string // string 备注
+}
+// 客户信息审核通过请求响应 0 29 123
+export interface UserInfoCheckMangeRsp {
+    RetCode: number // int32 返回码
+    RetDesc: string // string 描述信息
+}

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

@@ -74,10 +74,10 @@ export const setServiceURL = (config: URL): void => {
     console.log('URL', config);
     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';
-    }
+    // // 外网环境(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';
+    // }
 };

+ 131 - 9
src/views/information/custom/compoments/check/index.vue

@@ -6,36 +6,158 @@
            @cancel="cancel"
            width="890px">
     <template #footer>
+        <a-button key="submit"
+                  type="primary"
+                  @click="cancel">取消</a-button>
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">完成</a-button>
+                @click="submit">审核通过</a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="refuseSubmit">审核拒绝</a-button>
     </template>
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <a-row :gutter="24">
+              <a-col :span="12">
+                  <a-form-item label="客户类型">
+                      <span class="white">{{ selectedRow.userinfotype === '2' ? '企业' : '个人' }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="企业名称">
+                      <span class="white">{{ formatValue(selectedRow.customername)}}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="12">
+                  <a-form-item label="企业简称">
+                      <span class="white">{{ formatValue(selectedRow.nickname) }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="证件类型">
+                      <span class="white">{{ formatValue(selectedRow.cardtypename) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="12">
+                  <a-form-item label="法定代表人">
+                      <span class="white">{{ formatValue(selectedRow.legalpersonname) }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="证件号码">
+                      <span class="white">{{ formatValue(selectedRow.cardnum) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="12">
+                  <a-form-item label="纳税人识别号">
+                      <span class="white">{{ formatValue(selectedRow.taxpayernum) }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="营业执照">
+                      <div class="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="联系人">
+                      <span class="white">{{ formatValue(selectedRow.contactname) }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="联系人手机号">
+                      <span class="white">{{ formatValue(selectedRow.mobile) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="12">
+                  <a-form-item label="联系电话">
+                      <span class="white">{{ formatValue(selectedRow.telphone) }}</span>
+                  </a-form-item>
+              </a-col>
+              <a-col :span="12">
+                  <a-form-item label="状态">
+                      <span class="green">{{ formatValue(getStatusName(selectedRow.status)) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="24">
+                  <a-form-item label="通讯地址">
+                      <span class="white">{{ formatValue(selectedRow.address) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+          <a-row :gutter="24">
+              <a-col :span="24">
+                  <a-form-item label="备注">
+                      <span class="white">{{ formatValue(selectedRow.remark) }}</span>
+                  </a-form-item>
+              </a-col>
+          </a-row>
+      </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, ref } from 'vue';
+import {defineComponent, PropType, ref} from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
+import {ModifyUserInfoReq, QueryCustomInfoType} from "@/services/go/ermcp/customInfo/interface";
+import {formatValue} from "@/common/methods";
+import {getStatusName} from "@/views/information/custom/setup";
+import {cancelCustomInfo, checkCustomInfo} from "@/views/information/custom/compoments/setup";
+import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
+import {getSelectedAccount, getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'custom_info_btn_check',
     components: {},
-    setup() {
+    props: {
+        selectedRow: {
+            type: Object as PropType<QueryCustomInfoType>,
+            default: {},
+        },
+    },
+    setup(props) {
+        const {loading, checkCustomerInfo} = checkCustomInfo()
         const { visible, cancel } = closeModal('custom_info_btn_check');
-        const loading = ref<boolean>(false);
+        const req : UserInfoCheckMangeReq = {
+            audituserid: getUserId(),
+            userid : props.selectedRow.userid,
+            auditflag: 1,
+            remark: ''}
         function submit() {
-            loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
+            req.auditflag = 1
+            req.userid = props.selectedRow.userid
+            checkCustomerInfo(req, cancel)
+        }
+        function refuseSubmit(){
+            req.auditflag = 2
+            req.userid = props.selectedRow.userid
+            checkCustomerInfo(req, cancel)
         }
         return {
             visible,
             cancel,
             submit,
             loading,
+            refuseSubmit,
+            formatValue,
+            getStatusName,
         };
     },
 });

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

@@ -2,6 +2,8 @@ import {QueryModifyUserInfo } from "@/services/go/ermcp/customInfo";
 import { ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
 import {ref} from "vue";
 import { message } from 'ant-design-vue';
+import {userInfoCheck} from "@/services/proto/accountinfo";
+import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
 /**
  *  撤销客户资料 撤销后的数据会进入草稿(未提交)
  */
@@ -19,7 +21,7 @@ export function cancelCustomInfo(){
                     message.error("撤销失败:" + res.message)
                 }
             })
-            .catch((err) => {
+            .catch((err) => {cancelCustomInfo
                 message.error("撤销失败")
             }).finally(() => {
                 loading.value = false
@@ -27,3 +29,31 @@ export function cancelCustomInfo(){
     }
     return {loading, ModifyUserInfo}
 }
+
+/**
+ * 审核客户资料 这里是走proto接口
+ */
+export function checkCustomInfo(){
+    const loading = ref<boolean>(false);
+    // 这里调用的是修改客户申请接口
+    function checkCustomerInfo(req: UserInfoCheckMangeReq, callback: Function){
+        userInfoCheck(req)
+            .then((res) => {
+                if(res.RetCode == 200){
+                    message.success("审核成功")
+                    console.log('审核客户资料成功');
+                    callback()
+                }else{
+                    message.error("审核成功:" + res.RetDesc)
+                }
+            })
+            .catch((err) => {
+                message.error("提交失败")
+            }).finally(() => {
+            loading.value = false
+        })
+    }
+    return {loading, checkCustomerInfo}
+}
+
+

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

@@ -33,7 +33,7 @@
     <!-- 撤销 -->
     <Cancel :selectedRow="selectedRow" />
     <!-- 审核客户资料 -->
-    <Check />
+    <Check :selectedRow="selectedRow" />
   </div>
 </template>