|
@@ -20,42 +20,49 @@
|
|
|
<a-row :gutter="24">
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="账户权限"
|
|
<a-form-item label="账户权限"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="userid">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.userid"
|
|
|
placeholder="请选择账户权限">
|
|
placeholder="请选择账户权限">
|
|
|
- <a-select-option value="权限一">权限一</a-select-option>
|
|
|
|
|
|
|
+ <a-select-option v-for="(item, index) in tableList"
|
|
|
|
|
+ :key="index"
|
|
|
|
|
+ :value="item.roleid">{{item.rolename}}</a-select-option>
|
|
|
</a-select>
|
|
</a-select>
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="账户名称"
|
|
<a-form-item label="账户名称"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="logincode">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.logincode"
|
|
|
placeholder="请输入账户名称" />
|
|
placeholder="请输入账户名称" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="登录账号"
|
|
<a-form-item label="登录账号"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="accountname">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.accountname"
|
|
|
placeholder="请输入登录账号" />
|
|
placeholder="请输入登录账号" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
<a-col :span="12">
|
|
|
<a-form-item label="登录密码"
|
|
<a-form-item label="登录密码"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="password">
|
|
|
<a-input-password class="dialogInput"
|
|
<a-input-password class="dialogInput"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.password"
|
|
|
placeholder="请输入登录密码" />
|
|
placeholder="请输入登录密码" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-item label="手机号码"
|
|
<a-form-item label="手机号码"
|
|
|
- name="">
|
|
|
|
|
|
|
+ name="mobile">
|
|
|
<a-input class="dialogInput"
|
|
<a-input class="dialogInput"
|
|
|
|
|
+ v-model:value="formState.mobile"
|
|
|
style="width: 200px"
|
|
style="width: 200px"
|
|
|
placeholder="请输入手机号码" />
|
|
placeholder="请输入手机号码" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -67,55 +74,38 @@
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
<script lang="ts">
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
-import { initData } from '@/common/methods/index';
|
|
|
|
|
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
|
|
|
|
|
-import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
|
|
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
|
|
|
|
+import { defineComponent, ref, PropType } from 'vue';
|
|
|
|
|
+import { handleBusinessForm } from '../setup';
|
|
|
|
|
+import { ErmcpLoginUserEx } from '@/services/go/ermcp/account/interface';
|
|
|
|
|
+import { validateAction } from '@/common/setup/form';
|
|
|
|
|
+import { BusinessFormState } from '../interface';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
- name: 'add-custom',
|
|
|
|
|
|
|
+ name: 'account_info_manager_btn_add',
|
|
|
components: {},
|
|
components: {},
|
|
|
|
|
+ props: {
|
|
|
|
|
+ tableList: {
|
|
|
|
|
+ default: [],
|
|
|
|
|
+ type: Array as PropType<ErmcpLoginUserEx[]>,
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
setup() {
|
|
setup() {
|
|
|
// 控制关闭弹窗
|
|
// 控制关闭弹窗
|
|
|
const { visible, cancel } = closeModal('account_info_manager_btn_add');
|
|
const { visible, cancel } = closeModal('account_info_manager_btn_add');
|
|
|
- // 证件类型
|
|
|
|
|
- // const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
|
|
|
- // // 表单
|
|
|
|
|
- // const formRef = ref();
|
|
|
|
|
- // const formState: UnwrapRef<FormState> = reactive(initFormState());
|
|
|
|
|
- // const rules = {
|
|
|
|
|
- // userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
|
|
|
|
|
- // customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
|
|
|
- // nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
|
|
|
|
|
- // cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
|
|
|
|
- // };
|
|
|
|
|
- // // 下单方法
|
|
|
|
|
- // const { loading, applyAction } = handleApply();
|
|
|
|
|
- // function isPersonal(): boolean {
|
|
|
|
|
- // return formState.userinfotype === '1';
|
|
|
|
|
- // }
|
|
|
|
|
- // function submit() {
|
|
|
|
|
- // formRef.value
|
|
|
|
|
- // .validate()
|
|
|
|
|
- // .then(() => {
|
|
|
|
|
- // const param = toRaw(formState);
|
|
|
|
|
- // applyAction(param);
|
|
|
|
|
- // console.log('values', formState);
|
|
|
|
|
- // })
|
|
|
|
|
- // .catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
|
|
- // console.log('error', error);
|
|
|
|
|
- // });
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ const { rules, formState, formRef } = handleBusinessForm();
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
|
|
+
|
|
|
|
|
+ function submit() {
|
|
|
|
|
+ validateAction<BusinessFormState>(formRef, formState).then((res) => {});
|
|
|
|
|
+ }
|
|
|
return {
|
|
return {
|
|
|
- // formState,
|
|
|
|
|
- // rules,
|
|
|
|
|
- // formRef,
|
|
|
|
|
- // cardTypeList,
|
|
|
|
|
- // isPersonal,
|
|
|
|
|
|
|
+ formState,
|
|
|
|
|
+ rules,
|
|
|
|
|
+ formRef,
|
|
|
visible,
|
|
visible,
|
|
|
cancel,
|
|
cancel,
|
|
|
- // submit,
|
|
|
|
|
- // loading,
|
|
|
|
|
|
|
+ submit,
|
|
|
|
|
+ loading,
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|