Handy_Cao 7 месяцев назад
Родитель
Сommit
7cf8bbc168

+ 21 - 4
src/packages/pc/views/member/institution/broker/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
                 <el-form-item label="营销中心" prop="userid">
                     <app-select-member2 v-model="formData.userid" />
@@ -39,7 +39,7 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { i18n } from '@/stores'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppSelectMember2 from '@pc/components/modules/select-member2/index.vue'
@@ -51,6 +51,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 7
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -71,8 +75,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 7
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -101,6 +111,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 21 - 4
src/packages/pc/views/member/institution/industry/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--vertical">
@@ -36,7 +36,7 @@ import { shallowRef, PropType, onMounted, ref, defineAsyncComponent } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { i18n } from '@/stores'
 import { useComponent } from '@/hooks/component'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
@@ -53,6 +53,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 9
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -67,8 +71,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 9
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -97,6 +107,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 19 - 2
src/packages/pc/views/member/institution/marketer/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
                 <el-form-item label="客户类别" prop="customertype">
                     <el-select v-model="formData.customertype" :placeholder="t('common.pleasechoice')" @change="run">
@@ -40,7 +40,7 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted, computed }
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { i18n } from '@/stores'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useEnum } from '@/hooks/enum'
 import { getCustomerTypeList } from '@/constants/member'
 import { useRequest } from '@/hooks/request'
@@ -83,6 +83,16 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
+})
+
 const { data: marker, run } = useRequest(getRiskRatioTypeForMarketer, {
     params: {
         riskcontrolmode: 2,
@@ -138,6 +148,13 @@ const detailProps3 = computed<CellProp[]>(() => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+    
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 21 - 4
src/packages/pc/views/member/institution/marketing/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
             </fieldset>
         </el-form>
@@ -27,7 +27,7 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { i18n } from '@/stores'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -38,6 +38,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 3
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -58,8 +62,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 3
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -88,6 +98,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 21 - 4
src/packages/pc/views/member/institution/operation/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--vertical">
@@ -36,7 +36,7 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { useComponent } from '@/hooks/component'
 import { i18n } from '@/stores'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -47,6 +47,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 2
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -67,8 +71,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 2
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -98,6 +108,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 21 - 4
src/packages/pc/views/member/institution/self/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
             </fieldset>
             <fieldset class="g-fieldset el-form--vertical">
@@ -36,7 +36,7 @@ import { shallowRef, PropType, ref, onMounted, defineAsyncComponent } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { i18n } from '@/stores'
 import { useComponent } from '@/hooks/component'
-import { initAdd, roleadd } from '@/services/api/member'
+import { initAdd, roleadd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -47,6 +47,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 6
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -67,8 +71,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 6
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -97,6 +107,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 21 - 4
src/packages/pc/views/member/institution/warehouse/components/edit/index.vue

@@ -10,7 +10,7 @@
                 </el-form-item>
                 <el-form-item label="角色权限信息:" prop="userid" v-if="!record" >
                     <el-button @click="openComponent('Roles')">查看</el-button>
-                    <span>{{ organSelect?.accountname }}</span>
+                    <span>{{ manger }}</span>
                 </el-form-item>
             </fieldset>
         </el-form>
@@ -27,7 +27,7 @@ import { shallowRef, PropType, defineAsyncComponent, ref, onMounted } from 'vue'
 import { ElMessage, FormInstance, FormRules } from 'element-plus'
 import { i18n } from '@/stores'
 import { useComponent } from '@/hooks/component'
-import { roleadd, initAdd } from '@/services/api/member'
+import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
 import { useRequest } from '@/hooks/request'
 import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
@@ -38,6 +38,10 @@ const props = defineProps({
     }
 })
 
+const formData = ref<Partial<Member.RoleAddReq>>({
+    roleid: 4
+})
+
 const componentMap = new Map<string, unknown>([
     ['Roles', defineAsyncComponent(() => import('@pc/components/modules/roles/index.vue'))], // 角色权限信息
 ])
@@ -58,8 +62,14 @@ const { data, loading } = useRequest(initAdd, {
     }
 })
 
-const formData = ref<Partial<Member.RoleAddReq>>({
-    roleid: 4
+const { data: manger, run: runDefaultManager } = useRequest(getOragnDefaultManager, {
+    manual: true,
+    params: {
+        userid: formData?.value.userid?.toString()
+    },
+    onError: (err) => {
+        ElMessage.error(err)
+    }
 })
 
 // 表单验证规则
@@ -88,6 +98,13 @@ const onSubmit = () => {
 
 const onMemberChange = (item?: Model.OrganSelectRsp) => {
     organSelect.value = item
+
+    const { userid } = formData.value
+    if (userid) {
+        runDefaultManager({
+            userid: userid.toString()
+        })
+    }
 }
 
 const onCancel = (isRefresh = false) => {

+ 14 - 0
src/services/api/common/index.ts

@@ -90,4 +90,18 @@ export function queryUserinfoByUserId(options: CommonFetchOptions<{ request: Mod
 
 export function queryConfig(options: CommonFetchOptions<{ request: Model.ConfigReq; response: Model.ConfigRsp; }>) {
     return httpClient.commonRequest('/common/queryConfig', 'get', options)
+}
+
+/**
+ * queryTAAccountList
+ */
+export function queryTAAccountList(options: CommonFetchOptions<{ request: Model.TAAccountListReq; response: Model.TAAccountListRsp; }>) {
+    return httpClient.commonRequest('/common/queryTAAccountList', 'get', options)
+}
+
+/**
+ * 获取资金账户信息
+ */
+export function queryAccountId(options: CommonFetchOptions<{ request: Model.AccountIdReq; response: Model.AccountIdRsp; }>) {
+    return httpClient.commonRequest('/common/queryAccountId', 'get', options)
 }

+ 7 - 0
src/services/api/member/index.ts

@@ -405,4 +405,11 @@ export function roleadd(options: CommonFetchOptions<{ request: Member.RoleAddReq
  */
 export function initAdd(options: CommonFetchOptions<{ request: Member.InitAddReq; response: Member.InitAddRsp; }>) {
     return httpClient.commonRequest('/organDetail/initAdd', 'get', options)
+}
+
+/**
+ * 会员机构管理-->机构管理-->获取角色权限信息
+ */
+export function getOragnDefaultManager(options: CommonFetchOptions<{ request: Member.OragnDefaultManagerReq; }>) {
+    return httpClient.commonRequest('/organDetail/getOragnDefaultManager', 'get', options)
 }

+ 118 - 0
src/types/model/common.d.ts

@@ -320,4 +320,122 @@ declare namespace Model {
         modifiedtime: string; // 修改时间
         remark: string; // 备注
     }
+
+    interface TAAccountListReq {
+        // 
+        accountId?: number
+        // 
+        accountName?: string
+        // 
+        changeFlag?: number
+        // 
+        subLevelPath?: string
+        // 
+        type?: number
+        // 
+        userId?: number
+        // 
+        userType?: string
+    }
+
+    interface TAAccountListRsp {
+        // 资金账号
+        accountId: number
+        // 所属用户
+        accountName: string
+        // 风险率
+        curRiskRate: number
+        // 币种
+        currency: string
+        // 账户类型 0 子账户,1 母账号
+        isMain: number
+        // 出金阈值
+        outThreshold: number
+        // 所属母账户
+        parentAccountId: number
+        // 
+        relatedAccountStatus: number
+        // 关联账户
+        relatedName: string
+        //
+        relatedUserId: number
+        // 是否展示修改按钮
+        selfsupport: number
+        // 内/外部 0 内部账户,1 外部账户
+        taAccountType: number
+        // 交易状态 code:traderstatus
+        tradeStatus: number
+        // 
+        userId: number
+    }
+
+    interface AccountIdReq {
+        userid?: number
+    }
+
+    interface AccountIdRsp {
+        accountflag: number; // 账户标识 - 0 (默认为0, 当上级账户与本账户的关联用户均为自己时更新为1)
+            accountid: number; // 资金账户ID
+            accountname: string; // 账户名称
+            avaiablemoney: number;
+            avaiableoutmoney: number;
+            balance: number; // 期初余额
+            capitalbalance: number; // 本金余额[外部子母账户实际出入金余额]
+            changeflag: number; // 变动标志(当前账户资金有任何变动更新为1系统结算时更新0;供清算时使用) 0:无变动 1:有变动
+            changetime: string; // 账户状态变更时间
+            children: [];
+            closepl: number; // 今日平仓盈亏
+            creditdecrease: number; // 今日授信减少
+            creditincrease: number; // 今日授信增加
+            cur_risk_rate: number;
+            curdebt: number; // 期末欠款
+            currencyid: number; // 货币ID
+            currentbalance: number; // 期末余额
+            floatnetvalue: number;
+            floatpl: number;
+            freezecharge: number; // 手续费冻结
+            freezemargin: number; // 冻结保证金
+            fromaccountid: number; // 所属上级账户
+            inamount: number; // 今日入金金额(包括三方入金)
+            ismain: number; // 是否母账号 0:不是母账户 1:是母账户
+            ismarketaccount: number; // 是否机构接单账号 0:不是 1:是
+            isreckonaccount: number; // 是否机构分润账号 0:不是 1:是
+            modifierid: number; // 修改人
+            modifysrc: number; // 修改来源 - 1:管理端 2:终端
+            modifytime: string; // 修改时间
+            mortgagecredit: number; // 授信金额
+            oridebt: number; // 期初欠款
+            orifreezecharge: number; // 期初手续费冻结
+            orifreezemargin: number; // 期初冻结保证金
+            orimortgagecredit: number; // 期初授信金额
+            oriothercredit: number; // 期初其它授信金额
+            oriotherfreezemargin: number; // 期初其他冻结保证金(出金冻结资金 交割买方冻结 申购冻结 全款买入 商城买入)
+            orioutamountfreeze: number; // 期初出金冻结
+            oriusedmargin: number; // 期初占用保证金
+            othercredit: number; // 其它授信金额
+            othercreditdecrease: number; // 今日其它授信减少
+            othercreditincrease: number; // 今日其它授信增加
+            otherfreezemargin: number; // 其他冻结保证金(交割买方冻结 申购冻结 全款买入 商城买入)
+            otherincome: number; // 其他收入(交割收款 申购收款 全款卖出 商城卖出 买家退货 会员手续费收入)
+            otherpay: number; // 其他支出(交割付款 申购付款 全款买入 商城买入 卖家退货)
+            outamount: number; // 今日出金金额(包括三方出金)
+            outamountfreeze: number; // 出金冻结
+            outthreshold: number; // 出金阈值
+            parentaccountid: number; // 所属根账号
+            password: string; // 资金密码
+            paycharge: number; // 今日手续费支出
+            relatedaccountstatus: number; // 关联用户交易权限状态 - 1:正常(可交易) 2:受限(可平仓,不可建仓) 3:冻结(不可交易)
+            relateduserid: number; // 关联用户
+            serivcegroup: number; // 服务分组
+            signstatus: number; // 签约状态 - 1:未签约 2:签约待审核 3:签约中 4:已签约 5:解约待审核 6:解约中 7:已解约 8:已解绑 9:绑卡中
+            sublevelpath: string; // 账号层级路径(逗号分隔,首尾加逗号)
+            taaccounttype: number; // 账号类型 - 1:外部账号 2:内部账号 3:内部做市自营账号 4:内部做市接单账号
+            thirdinamount: number; // 今日三方入金
+            thirdoutamount: number; // 今日三方出金
+            tradestatus: number; // 交易状态 - 1:正常 2:受限 3:冻结(停用) 4:禁止建仓(人工受限) 5:禁止交易(人工冻结) 6:待激活 7:已删除(注销)
+            tradestatuschangetime: string; // 激活时间
+            transferamount: number; // 今日划转金额(母子账号资金划转,从划入账号为正,从账号划出为负)
+            usedmargin: number; // 占用保证金
+            userid: number; // 用户ID
+    }
 }

+ 4 - 0
src/types/model/member.d.ts

@@ -2243,4 +2243,8 @@ declare namespace Member {
         roleid: number
         rolename: string
     }
+
+    interface OragnDefaultManagerReq {
+        userid?: string
+    }
 }