|
@@ -13,12 +13,19 @@
|
|
|
<span>{{ organSelect?.accountname }}</span>
|
|
<span>{{ organSelect?.accountname }}</span>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item label="客户类别" prop="customertype">
|
|
<el-form-item label="客户类别" prop="customertype">
|
|
|
- <el-select v-model="formData.customertype" :placeholder="t('common.pleasechoice')">
|
|
|
|
|
|
|
+ <el-select v-model="formData.customertype" :placeholder="t('common.pleasechoice')" @change="run">
|
|
|
<el-option v-for="item in getCustomerTypeList()" :key="item.value" :label="item.label"
|
|
<el-option v-for="item in getCustomerTypeList()" :key="item.value" :label="item.label"
|
|
|
:value="item.value" />
|
|
:value="item.value" />
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</fieldset>
|
|
</fieldset>
|
|
|
|
|
+ <fieldset class="g-fieldset el-form--horizontal">
|
|
|
|
|
+ <legend class="g-fieldset__legend">默认做市商资金账户</legend>
|
|
|
|
|
+ </fieldset>
|
|
|
|
|
+ <fieldset class="g-fieldset el-form--horizontal">
|
|
|
|
|
+ <legend class="g-fieldset__legend">风险率信息</legend>
|
|
|
|
|
+ <app-table-details title="风险率信息" :data="marker" :label-width="160" :cell-props="detailProps3" :column="2" v-if="marker" />
|
|
|
|
|
+ </fieldset>
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
|
|
<el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
|
|
@@ -29,15 +36,22 @@
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
-import { shallowRef, PropType, ref, defineAsyncComponent, onMounted } from 'vue'
|
|
|
|
|
|
|
+import { shallowRef, PropType, ref, defineAsyncComponent, onMounted, computed } 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 } from '@/services/api/member'
|
|
import { roleadd, initAdd } from '@/services/api/member'
|
|
|
|
|
+import { useEnum } from '@/hooks/enum'
|
|
|
import { getCustomerTypeList } from '@/constants/member'
|
|
import { getCustomerTypeList } from '@/constants/member'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
import { useRequest } from '@/hooks/request'
|
|
|
|
|
+import { getRiskRatioTypeForMarketer } from '@/services/api/investor'
|
|
|
|
|
+import { CellProp } from '@pc/components/base/table-details/types'
|
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
|
|
+import AppTableDetails from '@pc/components/base/table-details/index.vue'
|
|
|
|
|
+
|
|
|
|
|
+const flagEnum = useEnum('flag') // 确认状态
|
|
|
|
|
+const marketerTypeEnum = useEnum('marketerType') // 风险率类型
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
record: {
|
|
record: {
|
|
@@ -56,6 +70,10 @@ const show = shallowRef(true)
|
|
|
const refresh = shallowRef(false)
|
|
const refresh = shallowRef(false)
|
|
|
const organSelect = ref<Model.OrganSelectRsp>()
|
|
const organSelect = ref<Model.OrganSelectRsp>()
|
|
|
|
|
|
|
|
|
|
+const formData = ref<Partial<Member.RoleAddReq>>({
|
|
|
|
|
+ roleid: 8
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const { data, loading } = useRequest(initAdd, {
|
|
const { data, loading } = useRequest(initAdd, {
|
|
|
params: {
|
|
params: {
|
|
|
role: 'marketer'
|
|
role: 'marketer'
|
|
@@ -65,8 +83,14 @@ const { data, loading } = useRequest(initAdd, {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-const formData = ref<Partial<Member.RoleAddReq>>({
|
|
|
|
|
- roleid: 8
|
|
|
|
|
|
|
+const { data: marker, run } = useRequest(getRiskRatioTypeForMarketer, {
|
|
|
|
|
+ params: {
|
|
|
|
|
+ riskcontrolmode: 2,
|
|
|
|
|
+ customertype: formData.value.customertype ?? 1
|
|
|
|
|
+ },
|
|
|
|
|
+ onError: (err) => {
|
|
|
|
|
+ ElMessage.error(err)
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
// 表单验证规则
|
|
// 表单验证规则
|
|
@@ -93,6 +117,25 @@ const onSubmit = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const detailProps3 = computed<CellProp[]>(() => {
|
|
|
|
|
+ const { notesaferatio } = marker.value ?? {}
|
|
|
|
|
+ return [
|
|
|
|
|
+ { prop: 'riskcontrolmode', label: 'member.institution.marketer.details.riskcontrolmode', formatValue: (val) => val === 1 ? t('member.institution.marketer.details.riskcontrolmode1') : t('member.institution.marketer.details.riskcontrolmode2') },
|
|
|
|
|
+ { prop: 'customertype', label: 'member.institution.marketer.details.customertype1', formatValue: (val) => marketerTypeEnum.getEnumTypeName(val) },
|
|
|
|
|
+ { prop: 'riskratiocalcmode', label: 'member.institution.marketer.details.riskratiocalcmode', formatValue: (val) => val === 1 ? t('member.institution.marketer.details.riskratiocalcmode1') : t('member.institution.marketer.details.riskratiocalcmode2') },
|
|
|
|
|
+ { prop: 'notemarginriskratio', label: 'member.institution.marketer.details.notemarginriskratio', formatValue: (val) => val + '%', show: !notesaferatio },
|
|
|
|
|
+ { prop: 'addmarginriskratio', label: 'member.institution.marketer.details.addmarginriskratio', formatValue: (val) => val + '%', show: !notesaferatio },
|
|
|
|
|
+ { prop: 'cutriskratio', label: 'member.institution.marketer.details.cutriskratio', formatValue: (val) => val + '%', show: !notesaferatio },
|
|
|
|
|
+ { prop: 'cutbackriskratio', label: 'member.institution.marketer.details.cutbackriskratio', formatValue: (val) => val + '%', show: !notesaferatio },
|
|
|
|
|
+ { prop: 'notesaferatio', label: 'member.institution.marketer.details.notesaferatio', formatValue: (val) => val + '%', show: !!notesaferatio },
|
|
|
|
|
+ { prop: 'addsaferatio', label: 'member.institution.marketer.details.addsaferatio', formatValue: (val) => val + '%', show: !!notesaferatio },
|
|
|
|
|
+ { prop: 'recoversaferatio', label: 'member.institution.marketer.details.recoversaferatio', formatValue: (val) => val + '%', show: !!notesaferatio },
|
|
|
|
|
+ { prop: 'cutsaferatio', label: 'member.institution.marketer.details.cutsaferatio', formatValue: (val) => val + '%', show: !!notesaferatio },
|
|
|
|
|
+ { prop: 'isdefault', label: 'member.institution.marketer.details.isdefault', formatValue: (val) => flagEnum.getEnumTypeName(val) },
|
|
|
|
|
+ { prop: 'markets', label: 'member.institution.marketer.details.markets' },
|
|
|
|
|
+ ]
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
const onMemberChange = (item?: Model.OrganSelectRsp) => {
|
|
const onMemberChange = (item?: Model.OrganSelectRsp) => {
|
|
|
organSelect.value = item
|
|
organSelect.value = item
|
|
|
}
|
|
}
|