|
@@ -115,39 +115,101 @@
|
|
|
placeholder="请输入联系人" />
|
|
placeholder="请输入联系人" />
|
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
</a-col>
|
|
</a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="联系人手机号"
|
|
|
|
|
+ name="mobilephone">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.mobilephone"
|
|
|
|
|
+ placeholder="请输入联系人手机号" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="联系电话"
|
|
|
|
|
+ name="telphone">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.telphone"
|
|
|
|
|
+ placeholder="请输入联系电话" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="姓名"
|
|
|
|
|
+ name="username">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.username"
|
|
|
|
|
+ placeholder="请输入姓名" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="身份证号码"
|
|
|
|
|
+ name="cardnum">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.cardnum"
|
|
|
|
|
+ placeholder="请输入身份证号码" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="手机号码"
|
|
|
|
|
+ name="mobilephone">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.mobilephone"
|
|
|
|
|
+ placeholder="请输入手机号码" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="身份证正面照"
|
|
|
|
|
+ name="cardbackphotourl">
|
|
|
|
|
+ <div class="upload">
|
|
|
|
|
+ <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
|
|
+ :transform-file="transformFile">
|
|
|
|
|
+ <a-button class="uploadBtn">上传</a-button>
|
|
|
|
|
+ </a-upload>
|
|
|
|
|
+ <div class="look">查看附件</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="邮箱"
|
|
|
|
|
+ name="email">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.email"
|
|
|
|
|
+ placeholder="请输入邮箱" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="24">
|
|
|
|
|
+ <a-form-item label="身份证反面照"
|
|
|
|
|
+ name="cardfrontphotourl">
|
|
|
|
|
+ <div class="upload">
|
|
|
|
|
+ <a-upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
|
|
|
|
|
+ :transform-file="transformFile">
|
|
|
|
|
+ <a-button class="uploadBtn">上传</a-button>
|
|
|
|
|
+ </a-upload>
|
|
|
|
|
+ <div class="look">查看附件</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item label="联系电话"
|
|
|
|
|
+ name="telphone">
|
|
|
|
|
+ <a-input class="dialogInput"
|
|
|
|
|
+ style="width: 200px"
|
|
|
|
|
+ v-model:value="formState.telphone"
|
|
|
|
|
+ placeholder="请输入联系电话" />
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
|
|
+ <a-col :span="12">
|
|
|
|
|
+ <a-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ </a-form-item>
|
|
|
|
|
+ </a-col>
|
|
|
</template>
|
|
</template>
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="姓名"
|
|
|
|
|
- name="mobilephone">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.mobilephone"
|
|
|
|
|
- placeholder="请输入姓名" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="联系人手机号"
|
|
|
|
|
- name="mobilephone">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.mobilephone"
|
|
|
|
|
- placeholder="请输入联系人手机号" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item label="联系电话"
|
|
|
|
|
- name="telphone">
|
|
|
|
|
- <a-input class="dialogInput"
|
|
|
|
|
- style="width: 200px"
|
|
|
|
|
- v-model:value="formState.telphone"
|
|
|
|
|
- placeholder="请输入联系电话" />
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
- <a-col :span="12">
|
|
|
|
|
- <a-form-item>
|
|
|
|
|
-
|
|
|
|
|
- </a-form-item>
|
|
|
|
|
- </a-col>
|
|
|
|
|
<a-col :span="24">
|
|
<a-col :span="24">
|
|
|
<a-form-item label="通讯地址">
|
|
<a-form-item label="通讯地址">
|
|
|
<a-select class="inlineFormSelect"
|
|
<a-select class="inlineFormSelect"
|
|
@@ -209,7 +271,7 @@
|
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
import { closeModal } from '@/common/setup/modal/index';
|
|
|
import { initData } from '@/common/methods/index';
|
|
import { initData } from '@/common/methods/index';
|
|
|
import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
|
|
import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
|
|
|
-import { getCardType } from './setup';
|
|
|
|
|
|
|
+import { getCardType, initFormState, handleApply } from './setup';
|
|
|
import { AllEnums } from '@/services/go/commonService/interface';
|
|
import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
import { FormState } from './interface';
|
|
import { FormState } from './interface';
|
|
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
@@ -221,49 +283,27 @@ export default defineComponent({
|
|
|
const { visible, cancel } = closeModal('custom_info_btn_add');
|
|
const { visible, cancel } = closeModal('custom_info_btn_add');
|
|
|
const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
|
const formRef = ref();
|
|
const formRef = ref();
|
|
|
- const formState: UnwrapRef<FormState> = reactive({
|
|
|
|
|
- userinfotype: '2',
|
|
|
|
|
- customername: '',
|
|
|
|
|
- nickname: '',
|
|
|
|
|
- cardtype: undefined,
|
|
|
|
|
- cardnum: '',
|
|
|
|
|
- legalpersonname: '',
|
|
|
|
|
- taxpayernum: '',
|
|
|
|
|
- attachment1: '',
|
|
|
|
|
- attachment2: '',
|
|
|
|
|
- attachment3: '',
|
|
|
|
|
- attachment4: '',
|
|
|
|
|
- attachment5: '',
|
|
|
|
|
- contactname: '',
|
|
|
|
|
- mobilephone: '',
|
|
|
|
|
- telphone: '',
|
|
|
|
|
- provinceid: 0,
|
|
|
|
|
- cityid: 0,
|
|
|
|
|
- districtid: 0,
|
|
|
|
|
- cardaddress: '',
|
|
|
|
|
- remark: '',
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const formState: UnwrapRef<FormState> = reactive(initFormState());
|
|
|
const rules = {
|
|
const rules = {
|
|
|
userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
|
|
userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
|
|
|
customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
|
|
|
nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
|
|
nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
|
|
|
cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
|
cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
|
|
|
};
|
|
};
|
|
|
- const loading = ref<boolean>(false);
|
|
|
|
|
|
|
+ const { loading, applyAction } = handleApply();
|
|
|
function isPersonal(): boolean {
|
|
function isPersonal(): boolean {
|
|
|
return formState.userinfotype === '1';
|
|
return formState.userinfotype === '1';
|
|
|
}
|
|
}
|
|
|
function submit() {
|
|
function submit() {
|
|
|
- loading.value = true;
|
|
|
|
|
formRef.value
|
|
formRef.value
|
|
|
.validate()
|
|
.validate()
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
- console.log('values', formState, toRaw(formState));
|
|
|
|
|
- loading.value = false;
|
|
|
|
|
|
|
+ const param = toRaw(formState);
|
|
|
|
|
+ applyAction(param);
|
|
|
|
|
+ console.log('values', formState);
|
|
|
})
|
|
})
|
|
|
.catch((error: ValidateErrorEntity<FormState>) => {
|
|
.catch((error: ValidateErrorEntity<FormState>) => {
|
|
|
console.log('error', error);
|
|
console.log('error', error);
|
|
|
- loading.value = false;
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
initData(() => {});
|
|
initData(() => {});
|