Browse Source

修改客户资料

huangbin 4 years ago
parent
commit
7a0b0b8997

+ 19 - 0
src/goServiceAPI/commonService/index.ts

@@ -90,3 +90,22 @@ export function GetPCMenus(): Promise<string> {
             throw new Error(`获取PC交易端菜单失败:${err.message}`);
         });
 }
+
+/**
+ * 查询交易端列表头信息
+ * @returns 
+ */
+export function QueryTableDefine(): Promise<string> {
+    const param = {
+        tableType: 2, // 列表类型 - 1:管理端 2:H5终端 3:移动终端
+    };
+    return commonSearch_go('/Common/QueryTableDefine', param)
+        .then((res) => {
+            console.log('查询交易端列表头信息', res);
+            return 'ok';
+        })
+        .catch((err: Error) => {
+            throw new Error(`查询交易端列表头信息:${err.message}`);
+        });
+}
+

+ 19 - 0
src/goServiceAPI/ermcp/customInfo/index.ts

@@ -0,0 +1,19 @@
+/** ================================= 客户资料 ================================**/
+
+import { commonSearch_go } from '@/goServiceAPI/index';
+import APP from '@/services';
+import * as type from './interface';
+import { QueryCustomInfoType } from './type';
+
+/**
+ * 查询客户资料
+ * @param MemberUserID  所属机构用户ID
+ * @param queryType 查询类型(1:未提交 2:待审核 3:正常 4:停用)
+ * @returns 
+ */
+export function QueryCustomInfo(queryType: QueryCustomInfoType): Promise<type.QueryCustomInfoType[]> {
+    const MemberUserID = APP.get('userAccount').memberuserid;
+    return commonSearch_go('/Ermcp/QueryUserInfo', { MemberUserID, queryType }).catch(err => {
+        throw new Error(`查询客户资料: ${err.message}`);
+    })
+}

+ 30 - 0
src/goServiceAPI/ermcp/customInfo/interface.ts

@@ -0,0 +1,30 @@
+export interface QueryCustomInfoType {
+    address: string;//通讯地址
+    attachment1: string;//附件1
+    audittime: string;//审核时间
+    cardbackphotourl: string;//证件反面图片地址
+    cardfrontphotourl: string;//证件正面图片地址
+    cardnum: string;//证件号码
+    cardtype: number;//证件类型
+    cardtypename: string;//证件类型名称
+    cityid: number;//市
+    contactname: string;//联系人
+    countryid: number;//国家
+    createtime: string;//创建时间
+    customername: string;//企业名称
+    districtid: number;//区域
+    email: string;//邮件
+    legalpersonname: string;//法人姓名(企业)
+    memberuserid: number;//所属机构ID
+    mobile: string;//手机号码
+    modifytime: string;//修改时间
+    nickname: string;//昵称
+    provinceid: number;//省
+    remark: string;//备注
+    status: number;//账户状态 - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+    statusdesc: string;//账户状态中文描述
+    taxpayernum: string;//纳税人识别号
+    telphone: string;//联系电话
+    userid: number;//用户ID
+    userinfotype: string;//客户类型
+}

+ 1 - 0
src/goServiceAPI/ermcp/customInfo/type.ts

@@ -0,0 +1 @@
+export type QueryCustomInfoType = 1 | 2 | 3 | 4;

+ 16 - 18
src/services/bus/index.ts

@@ -1,23 +1,20 @@
+import { GetPCMenus, QueryTableDefine } from '@/goServiceAPI/commonService/index';
+import { LoginQuery } from '@/goServiceAPI/useInfo/index';
 import APP from '@/services';
-import Router from '@/router';
-import { queryAllMyColloct } from '@/services/http/mine/colloct';
+import { getAccoutIdList } from '@/services/bus/account';
 import { isLogin } from '@/services/bus/login';
-import { queryGoodsList } from '@/services/bus/goods';
-import { handleTokenCheck, checkTokenLoop } from '@/services/bus/token';
-import ProtobufCtr from '@/services/socket/protobuf/index';
+import { checkTokenLoop, handleTokenCheck } from '@/services/bus/token';
 import { getAppConfig, getCommonApiUrl } from '@/services/http/getconf';
-import { setServiceURL } from '@/utils/request/serviceURL';
-import { message } from 'ant-design-vue';
-import { queryAccountInfo } from '@/services/socket/account/index';
+import { queryAllMyColloct } from '@/services/http/mine/colloct';
 import { queryHsbyMyGoods } from '@/services/http/mine/index';
-import { getAccoutIdList } from '@/services/bus/account';
-import { queryAreaRoleMarket, queryTaAccountMarket, queryTradeDate } from '@/services/socket/account/index';
-import { querySystemParam } from '@/services/socket/error/index';
-import { pollingNotice } from '../http/notice';
 import { getServerTime, queryErrorInfos } from '@/services/http/system/index';
+import { queryAccountInfo, queryAreaRoleMarket, queryTaAccountMarket, queryTradeDate } from '@/services/socket/account/index';
+import { querySystemParam } from '@/services/socket/error/index';
+import ProtobufCtr from '@/services/socket/protobuf/index';
+import { setServiceURL } from '@/utils/request/serviceURL';
 import { localStorageUtil } from '@/utils/tool/storage';
-import { GetLoginID, LoginQuery } from '@/goServiceAPI/useInfo/index'
-import { GetPCMenus } from '@/goServiceAPI/commonService/index'
+import { message } from 'ant-design-vue';
+import { pollingNotice } from '../http/notice';
 
 /**
  * 全局数据刷新
@@ -48,6 +45,7 @@ export async function globalDataRefresh(): Promise<string> {
                 // await queryAfterLogin();
                 await queryAllMyColloct();
                 await GetPCMenus();
+                await QueryTableDefine();
             }
         } else {
             // 重置数据中心数据
@@ -105,11 +103,11 @@ export async function queryAfterLogin(): Promise<string> {
             }),
             isArea()
                 ? queryAreaRoleMarket().catch((err: string) => {
-                      throw '投资者查根据经纪会员查市场权限 查询失败: ' + err;
-                  })
+                    throw '投资者查根据经纪会员查市场权限 查询失败: ' + err;
+                })
                 : queryTaAccountMarket().catch((err: string) => {
-                      throw '非投资者查资金市场权限 查询失败: ' + err;
-                  }),
+                    throw '非投资者查资金市场权限 查询失败: ' + err;
+                }),
             querySystemParam().catch(() => {
                 throw '查询系统参数 查询失败';
             }),

+ 66 - 2
src/views/information/custom/list/normal-use/index.vue

@@ -2,22 +2,86 @@
   <!-- 客户信息: 正常 -->
   <div class="custom-normal">
     客户信息: 正常
+    <!-- <div class="table-operations">
+      <a-button @click="setAgeSort">Sort age</a-button>
+      <a-button @click="clearFilters">Clear filters</a-button>
+      <a-button @click="clearAll">Clear filters and sorters</a-button>
+    </div>
+    <a-table :columns="columns"
+             :data-source="data"
+             @change="handleChange" /> -->
   </div>
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
+import { computed, defineComponent, ref } from 'vue';
 
 import { initData } from '@/setup/methods/index';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
+
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(3)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
 
 export default defineComponent({
     name: 'custom-normal',
     components: {},
     setup() {
+        const { customList, actionQuery } = getCustomList();
         initData(() => {
+            actionQuery();
             // 加载数据在这里
         });
-        return {};
+        return { customList };
     },
 });
 </script>

+ 58 - 3
src/views/information/custom/list/stop-use/index.vue

@@ -6,18 +6,73 @@
 </template>
 
 <script lang="ts">
-import { defineComponent } from 'vue';
-
+import { defineComponent, ref } from 'vue';
+import { QueryCustomInfo } from '@/goServiceAPI/ermcp/customInfo/index';
+import { QueryCustomInfoType } from '@/goServiceAPI/ermcp/customInfo/interface';
+import { message } from 'ant-design-vue';
 import { initData } from '@/setup/methods/index';
 
+// 查询客户资料列表
+function getCustomList() {
+    // const filteredInfo = ref();
+    // const sortedInfo = ref();
+    // const columns = computed(() => {
+    //     const filtered = filteredInfo.value || {};
+    //     const sorted = sortedInfo.value || {};
+    //     return [
+    //         {
+    //             title: '序号',
+    //             dataIndex: 'index',
+    //             key: 'index',
+    //             align: 'center',
+    //             width: 50,
+    //             customRender: (param: any) => `${param.index + 1}`,
+    //         },
+    //         {
+    //             title: 'Age',
+    //             dataIndex: 'age',
+    //             key: 'age',
+    //             sorter: (a: DataItem, b: DataItem) => a.age - b.age,
+    //             sortOrder: sorted.columnKey === 'age' && sorted.order,
+    //         },
+    //         {
+    //             title: 'Address',
+    //             dataIndex: 'address',
+    //             key: 'address',
+    //             filters: [
+    //                 { text: 'London', value: 'London' },
+    //                 { text: 'New York', value: 'New York' },
+    //             ],
+    //             filteredValue: filtered.address || null,
+    //             onFilter: (value: string, record: DataItem) => record.address.includes(value),
+    //             sorter: (a: DataItem, b: DataItem) => a.address.length - b.address.length,
+    //             sortOrder: sorted.columnKey === 'address' && sorted.order,
+    //             ellipsis: true,
+    //         },
+    //     ];
+    // });
+    const customList = ref<QueryCustomInfoType[]>([]);
+    function actionQuery() {
+        QueryCustomInfo(4)
+            .then((res) => {
+                console.log('L', res);
+            })
+            .catch((err) => message.error(err));
+    }
+
+    return { customList, actionQuery };
+}
+
 export default defineComponent({
     name: 'custom-stop',
     components: {},
     setup() {
+        const { customList, actionQuery } = getCustomList();
         initData(() => {
+            actionQuery();
             // 加载数据在这里
         });
-        return {};
+        return { customList };
     },
 });
 </script>

+ 3 - 4
swagger-to-ts/server.js

@@ -28,8 +28,8 @@ fs.readFile(path, (err, data) => {
 		let newValue;
 		if (oldValue.indexOf('optional') === -1) {
 			newValue =
-				'interface HttpRespone {code: number;msg: string;page: number;pagesize: number;total: number;}' +
-				'export interface Enum' +
+				// 'interface HttpRespone {code: number;msg: string;page: number;pagesize: number;total: number;}' +
+				'export interface Name' +
 				oldValue
 					.replace(/\*/g, '')
 					.replace(/number/g, ':number;\n//')
@@ -42,8 +42,7 @@ fs.readFile(path, (err, data) => {
 					.replace(/\n\/\/\n/g, '//')
 					.replace(/\n(\n)*( )*(\n)*\n/g, '\n')
 					.trim() +
-				'\n' +
-				'export interface QueryMarketGoodsRespone extends HttpRespone{data: Enum[];}';
+				'\n';
 		} else {
 			const before = oldValue.split('{')[0].replace('message', 'export interface ') + '{';
 			const between = subStringMulti(oldValue, '{', '}')[0];

+ 29 - 11
swagger-to-ts/swagger.ts

@@ -1,12 +1,30 @@
-interface HttpRespone {code: number;msg: string;page: number;pagesize: number;total: number;}export interface Enum// 已签约信息
-message BankAccountSign {
-accountid	:number;//资金账号[外部母账户]
-fcname	:string;//期货公司名称
-handlestatus	:number;//处理状态 - 1:登陆Mhp成功 2:登陆Mhp失败 3:登出Mhp
-marketid	:number;//市场ID
-status	:number;//状态 - 1:待开市 2:开市 4:手工休市 5:闭市 1number;
-//:日终处理开始 11:日终处理成功 12:日终处理失败
-tradedate	:string;//交易日(yyyyMMdd)
-updatetime	:string;//更新时间
+export interface Name{
+address	:string;//通讯地址
+attachment1	:string;//附件1
+audittime	:string;//审核时间
+cardbackphotourl	:string;//证件反面图片地址
+cardfrontphotourl	:string;//证件正面图片地址
+cardnum	:string;//证件号码
+cardtype	:number;//证件类型
+cardtypename	:string;//证件类型名称
+cityid	:number;//市
+contactname	:string;//联系人
+countryid	:number;//国家
+createtime	:string;//创建时间
+customername	:string;//企业名称
+districtid	:number;//区域
+email	:string;//邮件
+legalpersonname	:string;//法人姓名(企业)
+memberuserid	:number;//所属机构ID
+mobile	:string;//手机号码
+modifytime	:string;//修改时间
+nickname	:string;//昵称
+provinceid	:number;//省
+remark	:string;//备注
+status	:number;//账户状态 - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+statusdesc	:string;//账户状态中文描述
+taxpayernum	:string;//纳税人识别号
+telphone	:string;//联系电话
+userid	:number;//用户ID
+userinfotype	:string;//客户类型
 }
-export interface QueryMarketGoodsRespone extends HttpRespone{data: Enum[];}

+ 77 - 15
swagger-to-ts/swagger.txt

@@ -1,23 +1,85 @@
-// 已签约信息
-message BankAccountSign {
-accountid*	integer
-资金账号[外部母账户]
+{
+address	string
+通讯地址
 
-fcname	string
-期货公司名称
+attachment1	string
+附件1
 
-handlestatus	integer
-处理状态 - 1:登陆Mhp成功 2:登陆Mhp失败 3:登出Mhp
+audittime	string
+审核时间
 
-marketid	integer
-市场ID
+cardbackphotourl	string
+证件反面图片地址
+
+cardfrontphotourl	string
+证件正面图片地址
+
+cardnum	string
+证件号码
+
+cardtype	integer
+证件类型
+
+cardtypename	string
+证件类型名称
+
+cityid	integer
+市
+
+contactname	string
+联系人
+
+countryid	integer
+国家
+
+createtime	string
+创建时间
+
+customername	string
+企业名称
+
+districtid	integer
+区域
+
+email	string
+邮件
+
+legalpersonname	string
+法人姓名(企业)
+
+memberuserid	integer
+所属机构ID
+
+mobile	string
+手机号码
+
+modifytime	string
+修改时间
+
+nickname	string
+昵称
+
+provinceid	integer
+省
+
+remark	string
+备注
 
 status	integer
-状态 - 1:待开市 2:开市 4:手工休市 5:闭市 10:日终处理开始 11:日终处理成功 12:日终处理失败
+账户状态 - 1:待激活 2:待审核 3:待复审 4:正常 5:审核拒绝 6:注销
+
+statusdesc	string
+账户状态中文描述
+
+taxpayernum	string
+纳税人识别号
+
+telphone	string
+联系电话
 
-tradedate	string
-交易日(yyyyMMdd)
+userid	integer
+用户ID
 
-updatetime	string
-更新时间
+userinfotype	string
+客户类型
 }