|
@@ -12,18 +12,48 @@
|
|
|
<el-button @click="openComponent('Roles')">查看</el-button>
|
|
<el-button @click="openComponent('Roles')">查看</el-button>
|
|
|
<span>{{ manger }}</span>
|
|
<span>{{ manger }}</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
- <el-form-item label="营销中心" prop="userid">
|
|
|
|
|
- <app-select-member2 v-model="formData.userid" />
|
|
|
|
|
|
|
+ <el-form-item label="营销中心" prop="parentuserid">
|
|
|
|
|
+ <app-select-member2 v-model="formData.parentuserid" :placeholder="t('investor.custom.riskcfg.edit.tips1')" :params="{ roles: '3' }"/>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
- <fieldset class="g-fieldset el-form--vertical">
|
|
|
|
|
|
|
+ <fieldset class="g-fieldset el-form--horizontal">
|
|
|
<legend class="g-fieldset__legend">权限信息</legend>
|
|
<legend class="g-fieldset__legend">权限信息</legend>
|
|
|
- <el-form-item label="会员市场:" prop="marketid" >
|
|
|
|
|
- <el-checkbox-group v-model="formData.marketids">
|
|
|
|
|
- <el-checkbox v-for="item in data?.markets" v-bind:key="item.marketid"
|
|
|
|
|
- :label="item.marketname" :value="item.marketid"/>
|
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
|
+ <el-table ref="tableRef" :data="formData.dtype" style="width: 100%;" @selection-change="handleSelectionChange" border>
|
|
|
|
|
+ <el-table-column type="selection" width="55" />
|
|
|
|
|
+ <el-table-column prop="marketName" label="市场" />
|
|
|
|
|
+ <el-table-column prop="tradeMode" label="买大厅权限"
|
|
|
|
|
+ v-if="multipleSelection.some((e) => e.tradeProperty === 4 || e.tradeMode === 79)">
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <span v-if="row.tradeMode === 79">买大厅权限:可挂</span>
|
|
|
|
|
+ <template v-else-if="row.tradeMode === 17 && row.tradeProperty === 4">
|
|
|
|
|
+ <el-select v-model="row.dtype">
|
|
|
|
|
+ <template v-for="item in marketbstype" :key="item.value">
|
|
|
|
|
+ <el-option :label="item.label" :value="item.value" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ {{ handleNoneValue() }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="tradeMode" label="卖大厅权限"
|
|
|
|
|
+ v-if="multipleSelection.some((e) => e.tradeProperty === 4 || [77, 78].includes(e.tradeMode))" >
|
|
|
|
|
+ <template #default="{ row }">
|
|
|
|
|
+ <span v-if="[77, 78].includes(row.tradeMode)">卖大厅权限:可挂</span>
|
|
|
|
|
+ <template v-else-if="row.tradeProperty === 4">
|
|
|
|
|
+ <el-select v-model="row.spotRightType">
|
|
|
|
|
+ <template v-for="item in marketbstype" :key="item.value">
|
|
|
|
|
+ <el-option :label="item.label" :value="item.value" />
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-select>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ {{ handleNoneValue() }}
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -39,7 +69,8 @@ import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
|
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { i18n } from '@/stores'
|
|
import { i18n } from '@/stores'
|
|
|
-import { roleadd, initAdd, getOragnDefaultManager } from '@/services/api/member'
|
|
|
|
|
|
|
+import { handleNoneValue } from '@/filters'
|
|
|
|
|
+import { roleadd, initAdd, getOragnDefaultManager, queryRoleDetail } from '@/services/api/member'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
import AppSelectMember2 from '@pc/components/modules/select-member2/index.vue'
|
|
import AppSelectMember2 from '@pc/components/modules/select-member2/index.vue'
|
|
@@ -66,11 +97,27 @@ const formRef = ref<FormInstance>()
|
|
|
const show = shallowRef(true)
|
|
const show = shallowRef(true)
|
|
|
const refresh = shallowRef(false)
|
|
const refresh = shallowRef(false)
|
|
|
const organSelect = ref<Model.OrganSelectRsp>()
|
|
const organSelect = ref<Model.OrganSelectRsp>()
|
|
|
|
|
+const multipleSelection = ref<Model.UpdateTaAccountReq['dtype']>([]) // 已选中的市场数据
|
|
|
|
|
+const marketbstype = [{value: 0, label: "无"}, {value:1, label: "可挂可摘"}, {value:2, label: "可挂"}, {value:3, label: "可摘"}]
|
|
|
|
|
|
|
|
-const { data, loading } = useRequest(initAdd, {
|
|
|
|
|
|
|
+const { loading } = useRequest(initAdd, {
|
|
|
params: {
|
|
params: {
|
|
|
role: 'broker'
|
|
role: 'broker'
|
|
|
},
|
|
},
|
|
|
|
|
+ onSuccess: (res) => {
|
|
|
|
|
+ // 赋值数据
|
|
|
|
|
+ formData.value.dtype = res.data.markets.map(e => ({
|
|
|
|
|
+ checked: 0,
|
|
|
|
|
+ dtype: 0,
|
|
|
|
|
+ fdType: 0,
|
|
|
|
|
+ fspotRightType: 0,
|
|
|
|
|
+ marketId: e.marketid,
|
|
|
|
|
+ marketName: e.marketname,
|
|
|
|
|
+ spotRightType: 0,
|
|
|
|
|
+ tradeMode: e.trademode,
|
|
|
|
|
+ tradeProperty: e.tradeproperty,
|
|
|
|
|
+ })) ?? []
|
|
|
|
|
+ },
|
|
|
onError: (err) => {
|
|
onError: (err) => {
|
|
|
ElMessage.error(err)
|
|
ElMessage.error(err)
|
|
|
}
|
|
}
|
|
@@ -91,8 +138,13 @@ const formRules: FormRules = {
|
|
|
userid: [{ required: true }]
|
|
userid: [{ required: true }]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const handleSelectionChange = (selection: Model.UpdateTaAccountReq['dtype']) => {
|
|
|
|
|
+ multipleSelection.value = selection
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
const onSubmit = () => {
|
|
const onSubmit = () => {
|
|
|
- formData.value.type = props.record ? 2 : 1
|
|
|
|
|
|
|
+ const rawData = { ...formData.value }
|
|
|
|
|
+ rawData.dtype = multipleSelection.value
|
|
|
formRef.value?.validate((valid) => {
|
|
formRef.value?.validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
loading.value = true
|
|
loading.value = true
|