|
|
@@ -11,78 +11,136 @@
|
|
|
<a-button key="submit"
|
|
|
type="primary"
|
|
|
:loading="loading"
|
|
|
- @click="submit">注销
|
|
|
+ @click="cancel">取消
|
|
|
</a-button>
|
|
|
<a-button key="submit"
|
|
|
type="primary"
|
|
|
:loading="loading"
|
|
|
- @click="cancel">关闭
|
|
|
+ @click="submit">注销
|
|
|
</a-button>
|
|
|
</template>
|
|
|
-
|
|
|
+ <a-form class="inlineForm"
|
|
|
+ :model="formState">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="登录账号"
|
|
|
+ name="">
|
|
|
+ <span class="white">{{formState.accountname}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="账户名称"
|
|
|
+ name="">
|
|
|
+ <span class="white">{{formState.logincode}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="登录密码"
|
|
|
+ name="">
|
|
|
+ <a-input-password class="dialogInput"
|
|
|
+ style="width: 200px"
|
|
|
+ value="2323423"
|
|
|
+ v-model:value="formState.password"
|
|
|
+ readonly />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="手机号码"
|
|
|
+ name="">
|
|
|
+ <span class="white">{{formState.mobile}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="账户角色"
|
|
|
+ name="userinfotype">
|
|
|
+ <a-checkbox-group class="commonCheckboxGroup"
|
|
|
+ v-model:value="formState.roleids">
|
|
|
+ <a-row>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-checkbox :value="22">业务员</a-checkbox>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-checkbox :value="23">跟单员</a-checkbox>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-checkbox-group>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
</a-modal>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
-import {closeModal} from '@/common/setup/modal/index';
|
|
|
-import {initData} from '@/common/methods/index';
|
|
|
-import {defineComponent, ref, reactive, toRaw, UnwrapRef, PropType} from 'vue';
|
|
|
-import {AllEnums} from '@/services/go/commonService/interface';
|
|
|
-import {RuleObject, ValidateErrorEntity} from 'ant-design-vue/es/form/interface';
|
|
|
-import {Modal} from 'ant-design-vue';
|
|
|
-import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
|
|
|
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
-import {loginAccountOperate} from "@/services/proto/accountinfo";
|
|
|
-import {ErmcpLoginUser} from "@/services/go/ermcp/account/interface";
|
|
|
+import { closeModal } from '@/common/setup/modal/index';
|
|
|
+import { initData } from '@/common/methods/index';
|
|
|
+import { defineComponent, ref, reactive, toRaw, UnwrapRef, PropType, watchEffect } from 'vue';
|
|
|
+import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
+import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
+import { Modal } from 'ant-design-vue';
|
|
|
+import { LoginaccountOperateReq } from '@/services/proto/accountinfo/interface';
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
+import { loginAccountOperate } from '@/services/proto/accountinfo';
|
|
|
+import { ErmcpLoginUser } from '@/services/go/ermcp/account/interface';
|
|
|
+import { handleBusinessForm } from '../setup';
|
|
|
+import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'add-custom',
|
|
|
- components: {},
|
|
|
- props: {
|
|
|
- selectedData: {
|
|
|
- default: {},
|
|
|
- type: Object as PropType<ErmcpLoginUser>,
|
|
|
- },
|
|
|
- },
|
|
|
- setup(props, context) {
|
|
|
- // 控制关闭弹窗
|
|
|
- const {visible, cancel} = closeModal('account_info_business_btn_cancel');
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- function submit() {
|
|
|
- Modal.confirm({
|
|
|
- title: '是否确认注销该账户',
|
|
|
- okText: '确认注销',
|
|
|
- cancelText: '取消',
|
|
|
- onOk() {
|
|
|
- let reqParam: LoginaccountOperateReq = {
|
|
|
- userid: props.selectedData.userid,
|
|
|
- loginid: props.selectedData.loginid,
|
|
|
- operatetype: 7, // 5: 锁定 6:解锁
|
|
|
- logintaaccounts: [],
|
|
|
- }
|
|
|
- requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
|
|
|
- cancel();
|
|
|
- context.emit('refresh');
|
|
|
- });
|
|
|
+ name: 'account_info_business_btn_cancel',
|
|
|
+ components: {},
|
|
|
+ props: {
|
|
|
+ selectedData: {
|
|
|
+ default: {},
|
|
|
+ type: Object as PropType<ErmcpLoginUser>,
|
|
|
},
|
|
|
- onCancel() {
|
|
|
- console.log('Cancel');
|
|
|
- },
|
|
|
- });
|
|
|
- }
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ // 控制关闭弹窗
|
|
|
+ const { visible, cancel } = closeModal('account_info_business_btn_cancel');
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ const { formState } = handleBusinessForm();
|
|
|
+ watchEffect(() => {
|
|
|
+ if (visible.value) {
|
|
|
+ mergeTwoObj(formState, props.selectedData);
|
|
|
+ // roletype :string;//角色类型(逗号隔开,如22,23), 22:业务员 23:跟单员 24:交易员
|
|
|
+ formState.roleids = props.selectedData.roletype.split(',').map((e) => +e);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ function submit() {
|
|
|
+ Modal.confirm({
|
|
|
+ title: '是否确认注销该账户',
|
|
|
+ okText: '确认注销',
|
|
|
+ cancelText: '取消',
|
|
|
+ onOk() {
|
|
|
+ let reqParam: LoginaccountOperateReq = {
|
|
|
+ userid: props.selectedData.userid,
|
|
|
+ loginid: props.selectedData.loginid,
|
|
|
+ operatetype: 7, // 5: 锁定 6:解锁
|
|
|
+ logintaaccounts: [],
|
|
|
+ };
|
|
|
+ requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
|
|
|
+ cancel();
|
|
|
+ context.emit('refresh');
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel() {
|
|
|
+ console.log('Cancel');
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- return {
|
|
|
- // formState,
|
|
|
- // rules,
|
|
|
- // formRef,
|
|
|
- // cardTypeList,
|
|
|
- // isPersonal,
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- submit,
|
|
|
- // loading,
|
|
|
- };
|
|
|
- },
|
|
|
+ return {
|
|
|
+ formState,
|
|
|
+ // rules,
|
|
|
+ // formRef,
|
|
|
+ // cardTypeList,
|
|
|
+ // isPersonal,
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|