소스 검색

修改交易员

huangbin 4 년 전
부모
커밋
f60969aeb9

+ 1 - 0
src/views/information/account_info/compoments/cancel-trader/index.vue

@@ -122,6 +122,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 1 - 0
src/views/information/account_info/compoments/detail-trader/index.vue

@@ -109,6 +109,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         return {

+ 1 - 0
src/views/information/account_info/compoments/locked-trader/index.vue

@@ -116,6 +116,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 1 - 9
src/views/information/account_info/compoments/modify-traders/index.vue

@@ -43,15 +43,6 @@
           </a-form-item>
         </a-col>
         <a-col :span="12">
-          <a-form-item label="登录密码"
-                       name="password">
-            <a-input-password class="dialogInput"
-                              style="width: 200px"
-                              v-model:value="formState.password"
-                              placeholder="请输入登录密码" />
-          </a-form-item>
-        </a-col>
-        <a-col :span="24">
           <a-form-item label="手机号码"
                        name="mobile">
             <a-input class="dialogInput"
@@ -121,6 +112,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 1 - 1
src/views/information/account_info/compoments/reset-business/index.vue

@@ -87,7 +87,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         watchEffect(() => {
             if (visible.value) {
-                formState.accountname = props.selectedData.accountname;
+                formState.accountname = props.selectedData.loginname;
             }
         });
 

+ 127 - 0
src/views/information/account_info/compoments/reset-managers/index.vue

@@ -0,0 +1,127 @@
+<template>
+  <!-- 重置管理员账户密码 -->
+  <a-modal class="add-custom"
+           title="重置管理员账户密码"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           :maskClosable="false"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">完成
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <a-row :gutter="24">
+        <a-col :span="12">
+          <a-form-item label="登录账号"
+                       name="accountname">
+            <a-input class="dialogInput"
+                     style="width: 200px"
+                     readonly
+                     v-model:value="formState.accountname"
+                     placeholder="请输入登录账号" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="原密码"
+                       name="oldPassword">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.oldPassword"
+                              placeholder="请输入原密码" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="新密码"
+                       name="password">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.password"
+                              placeholder="请输入8到20个字符的新密码" />
+          </a-form-item>
+        </a-col>
+        <a-col :span="12">
+          <a-form-item label="确认新密码"
+                       name="comfirePassword">
+            <a-input-password class="dialogInput"
+                              style="width: 200px"
+                              v-model:value="formState.comfirePassword"
+                              placeholder="请再次确认新密码" />
+          </a-form-item>
+        </a-col>
+      </a-row>
+    </a-form>
+  </a-modal>
+</template>
+
+<script lang="ts">
+import { closeModal } from '@/common/setup/modal/index';
+import { defineComponent, ref, PropType, watchEffect } from 'vue';
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
+import { ResetPasswordFormState } from '../interface';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { loginAccountOperate } from '@/services/proto/accountinfo';
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
+import { validateAction } from '@/common/setup/form';
+import { handlePasswordForm } from '../setup';
+
+export default defineComponent({
+    name: 'account_info_manager_btn_reset',
+    props: {
+        selectedData: {
+            default: {},
+            type: Object as PropType<ErmcpLoginUser>,
+        },
+    },
+    setup(props, context) {
+        // 控制关闭弹窗
+        const { visible, cancel } = closeModal('account_info_manager_btn_reset');
+        const { rules, formState, formRef } = handlePasswordForm();
+        const loading = ref<boolean>(false);
+        watchEffect(() => {
+            if (visible.value) {
+                formState.accountname = props.selectedData.loginname;
+            }
+        });
+
+        function submit() {
+            validateAction<ResetPasswordFormState>(formRef, formState).then((res) => {
+                let reqParam: LoginaccountOperateReq = {
+                    userid: props.selectedData.userid,
+                    loginid: props.selectedData.loginid,
+                    operatetype: 7, // 5: 锁定 6:解锁
+                    logintaaccounts: [],
+                    password: res.password,
+                };
+                requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['重置登录账户密码成功', '重置登录账户密码失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
+            });
+        }
+
+        return {
+            formState,
+            rules,
+            formRef,
+            visible,
+            cancel,
+            submit,
+            loading,
+        };
+    },
+});
+</script>
+
+<style lang="less">
+.add-custom {
+}
+</style
+>;

+ 1 - 1
src/views/information/account_info/compoments/reset-trader/index.vue

@@ -87,7 +87,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         watchEffect(() => {
             if (visible.value) {
-                formState.accountname = props.selectedData.accountname;
+                formState.accountname = props.selectedData.loginname;
             }
         });
 

+ 1 - 0
src/views/information/account_info/compoments/unlocked-trader/index.vue

@@ -116,6 +116,7 @@ export default defineComponent({
                 mergeTwoObj(formState, selectedData);
                 getRoleName(tableList, selectedData);
                 formState.logintaaccounts = selectedData.acclist.map((e) => e.accountid);
+                formState.accountname = props.selectedData.loginname;
             }
         });
         function submit() {

+ 4 - 0
src/views/information/account_info/list/account_info_manager/index.vue

@@ -68,6 +68,8 @@
             :selectedData="moreModelData" />
     <Unlocked @refresh="handleBtnAction"
               :selectedData="moreModelData" />
+    <Reset @refresh="handleBtnAction"
+           :selectedData="moreModelData" />
     <Detail :selectedData="moreModelData" />
   </div>
 </template>
@@ -85,6 +87,7 @@ import Detail from '../../compoments/detail-managers/index.vue';
 import Cancel from '../../compoments/cancel-managers/index.vue';
 import Locked from '../../compoments/locked-managers/index.vue';
 import Unlocked from '../../compoments/unlocked-managers/index.vue';
+import Reset from '../../compoments/reset-managers/index.vue';
 import { ErmcpLoginUser, ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
 
 export default defineComponent({
@@ -99,6 +102,7 @@ export default defineComponent({
         Cancel,
         Locked,
         Unlocked,
+        Reset,
     },
     setup() {
         const { loading, tableList, queryTable } = queryTableList();

+ 1 - 1
src/views/information/account_info/list/account_info_trade/index.vue

@@ -49,7 +49,7 @@
           <a-collapse-panel :show-arrow="false">
             <template #header>
               <a-row class="contRow">
-                <a-col :span="12">{{sub.rolename}}</a-col>
+                <a-col :span="12">{{sub.loginname}}-{{sub.logincode}}</a-col>
                 <a-col :span="12">{{getRoleTypeName(sub.rolestatus)}}</a-col>
               </a-row>
             </template>