Handy_Cao 11 månader sedan
förälder
incheckning
1e0f9d55a1

+ 1 - 1
src/packages/pc/views/member/institution/broker/index.vue

@@ -43,7 +43,7 @@ const { global: { t } } = i18n
 // 状态
 const areastatusEnum = useEnum('areastatus')
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleRsp>({
     onClose: () => onSearch()
 })
 

+ 39 - 4
src/packages/pc/views/member/institution/goodscfg/components/delete/index.vue

@@ -1,17 +1,52 @@
 <!-- 会员机构管理-机构管理-商品限制设置-删除 -->
 <template>
-    <app-drawer title="删除" width="900" v-model:show="show" :loading="loading" :refresh="refresh">
+    <app-drawer :title="t('common.alert')" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">确认删除该配置?</div>
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
+            <el-button type="primary" @click="onSubmit">{{ t('operation.confirm') }}</el-button>
+        </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType, defineAsyncComponent } from 'vue'
-import { i18n } from '@/stores'
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { delLimit } from '@/services/api/member'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
+import { i18n } from '@/stores'
 
-const { global: { t } } = i18n
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.MemberGoodsLimitRsp>,
+        required: true
+    }
+})
 
+const { global: { t } } = i18n
 const show = shallowRef(true)
 const refresh = shallowRef(false)
 const loading = shallowRef(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    loading.value = true
+    delLimit({
+        data: {
+            autoid: props.record.autoid
+        }
+    }).then(() => {
+        ElMessage.success(t('common.tips5'))
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error(t('common.tips6') + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
 </script>

+ 1 - 1
src/packages/pc/views/member/institution/goodscfg/index.vue

@@ -54,7 +54,7 @@ import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 const { getMarketOptions } = useMarket()
 const { global: { t } } = i18n
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.MemberGoodsLimitReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.MemberGoodsLimitRsp>({
     onClose: () => onSearch()
 })
 

+ 1 - 1
src/packages/pc/views/member/institution/industry/index.vue

@@ -43,7 +43,7 @@ const { global: { t } } = i18n
 // 状态
 const areastatusEnum = useEnum('areastatus')
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleRsp>({
     onClose: () => onSearch()
 })
 

+ 1 - 1
src/packages/pc/views/member/institution/marketer/index.vue

@@ -43,7 +43,7 @@ const { global: { t } } = i18n
 // 状态
 const areastatusEnum = useEnum('areastatus')
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleRsp>({
     onClose: () => onSearch()
 })
 

+ 1 - 1
src/packages/pc/views/member/institution/marketing/index.vue

@@ -43,7 +43,7 @@ const { global: { t } } = i18n
 // 状态
 const areastatusEnum = useEnum('areastatus')
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleRsp>({
     onClose: () => onSearch()
 })
 

+ 1 - 1
src/packages/pc/views/member/institution/operation/index.vue

@@ -43,7 +43,7 @@ const { global: { t } } = i18n
 // 状态
 const areastatusEnum = useEnum('areastatus')
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.OrganRoleRsp>({
     onClose: () => onSearch()
 })
 

+ 39 - 4
src/packages/pc/views/member/institution/riskcfg/components/delete/index.vue

@@ -1,17 +1,52 @@
 <!-- 会员机构管理-机构管理-风控个性化设置-删除 -->
 <template>
-    <app-drawer title="删除" width="900" v-model:show="show" :loading="loading" :refresh="refresh">
+    <app-drawer :title="t('common.alert')" v-model:show="show" :loading="loading" :refresh="refresh">
+        <div class="g-text-message">确认删除该配置?</div>
+        <template #footer>
+            <el-button @click="onCancel(false)">{{ t('operation.cancel') }}</el-button>
+            <el-button type="primary" @click="onSubmit">{{ t('operation.confirm') }}</el-button>
+        </template>
     </app-drawer>
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, PropType, defineAsyncComponent } from 'vue'
-import { i18n } from '@/stores'
+import { shallowRef, PropType } from 'vue'
+import { ElMessage } from 'element-plus'
+import { deleteAccountRiskConfig } from '@/services/api/member'
 import AppDrawer from '@pc/components/base/drawer/index.vue'
+import { i18n } from '@/stores'
 
-const { global: { t } } = i18n
+const props = defineProps({
+    record: {
+        type: Object as PropType<Model.AccountRiskConfigRsp>,
+        required: true
+    }
+})
 
+const { global: { t } } = i18n
 const show = shallowRef(true)
 const refresh = shallowRef(false)
 const loading = shallowRef(false)
+
+const onCancel = (isRefresh = false) => {
+    show.value = false
+    refresh.value = isRefresh
+}
+
+const onSubmit = () => {
+    loading.value = true
+    deleteAccountRiskConfig({
+        data: {
+            accountid: props.record.accountid
+        }
+    }).then(() => {
+        ElMessage.success(t('common.tips5'))
+        onCancel(true)
+    }).catch((err) => {
+        ElMessage.error(t('common.tips6') + err)
+        onCancel()
+    }).finally(() => {
+        loading.value = false
+    })
+}
 </script>

+ 1 - 1
src/packages/pc/views/member/institution/riskcfg/index.vue

@@ -46,7 +46,7 @@ import AppSelectMember from '@pc/components/modules/select-member/index.vue'
 
 const { global: { t } } = i18n
 
-const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.AccountRiskConfigReq>({
+const { componentMap, componentId, record, openComponent, closeComponent, getActionButtons } = useOperation<Model.AccountRiskConfigRsp>({
     onClose: () => onSearch()
 })
 

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

@@ -181,4 +181,11 @@ export function queryRoleDetail(options: CommonFetchOptions<{ request: Model.Org
  */
 export function deleteOrganRole(options: CommonFetchOptions<{ request: Model.OrganRoleDeleteReq; }>) {
     return httpClient.commonRequest('/organDetail/del', 'get', options)
+}
+
+/**
+ * 会员机构管理-->机构管理-->风控个性化设置--> 删除
+ */
+export function deleteAccountRiskConfig(options: CommonFetchOptions<{ request: Model.DeleteAccountRiskConfigReq; }>) {
+    return httpClient.commonRequest('/organDetail/delaccountriskconfig', 'get', options)
 }

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

@@ -732,18 +732,19 @@ declare namespace Model {
 
     /** 会员机构管理-->机构管理-->商品限制设置--> 删除 请求 */
     interface DelLimitReq {
-        goodsid?: number; // 商品
-        marketid?: number; // 市场
-        roletype?: number; // 角色类型
-        userid?: number; // 经纪会员
+        autoid?: number; // autoid
     }
 
     /** 会员机构管理-->机构管理-->商品限制设置--> 新增、修改 请求 */
     interface AddLimitReq {
+        autoid?: number; // autoid
         goodsid?: number; // 商品
         marketid?: number; // 市场
         roletype?: number; // 角色类型
         userid?: number; // 经纪会员
+        iscannotbuy?: number; // iscannotbuy
+        iscannotsell?: number; // iscannotsell
+        isnodisplay?: number; // isnodisplay
     }
 
     /** 会员机构管理-->机构管理-->风控个性化设置-->获取列表 请求 */
@@ -1467,4 +1468,9 @@ declare namespace Model {
         areaid?: number; // areaid
         role?: number; // role
     }
+
+    /** 会员机构管理-->机构管理-->风控个性化设置--> 删除 请求 */
+    interface DeleteAccountRiskConfigReq {
+        accountid?: number; // accountid
+    }
 }