|
@@ -8,10 +8,14 @@
|
|
|
:maskClosable="false"
|
|
:maskClosable="false"
|
|
|
width="890px">
|
|
width="890px">
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <a-button key="submit"
|
|
|
|
|
- type="primary"
|
|
|
|
|
- :loading="loading"
|
|
|
|
|
- @click="submit">完成</a-button>
|
|
|
|
|
|
|
+ <a-button key="submit"
|
|
|
|
|
+ class="cancelBtn"
|
|
|
|
|
+ @click="submit(1)">保存草稿
|
|
|
|
|
+ </a-button>
|
|
|
|
|
+ <a-button key="submit"
|
|
|
|
|
+ type="primary"
|
|
|
|
|
+ :loading="loading"
|
|
|
|
|
+ @click="submit(2)">提交审核</a-button>
|
|
|
</template>
|
|
</template>
|
|
|
<a-form class="inlineForm"
|
|
<a-form class="inlineForm"
|
|
|
ref="formRef"
|
|
ref="formRef"
|
|
@@ -280,6 +284,7 @@ import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interfac
|
|
|
import { getAddress } from '@/services/go/adress';
|
|
import { getAddress } from '@/services/go/adress';
|
|
|
import {addUserInfo} from "@/views/information/custom/compoments/setup";
|
|
import {addUserInfo} from "@/views/information/custom/compoments/setup";
|
|
|
import {AddUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
|
|
import {AddUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
|
|
|
|
|
+import {getUserId} from "@/services/bus/account";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'add-custom',
|
|
name: 'add-custom',
|
|
@@ -287,28 +292,50 @@ export default defineComponent({
|
|
|
setup(name, context) {
|
|
setup(name, context) {
|
|
|
// 控制关闭弹窗
|
|
// 控制关闭弹窗
|
|
|
const { visible, cancel } = closeModal('custom_info_btn_add');
|
|
const { visible, cancel } = closeModal('custom_info_btn_add');
|
|
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
// 证件类型
|
|
// 证件类型
|
|
|
const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
const cardTypeList = ref<AllEnums[]>(getCardType());
|
|
|
// 表单
|
|
// 表单
|
|
|
const { formRef, formState, rules } = handleForm();
|
|
const { formRef, formState, rules } = handleForm();
|
|
|
- // 下单方法
|
|
|
|
|
- const { loading, addCustomerInfo } = addUserInfo();
|
|
|
|
|
// 地址
|
|
// 地址
|
|
|
const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
|
|
const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
|
|
|
function isPersonal(): boolean {
|
|
function isPersonal(): boolean {
|
|
|
return formState.userinfotype === '1';
|
|
return formState.userinfotype === '1';
|
|
|
}
|
|
}
|
|
|
- function submit() {
|
|
|
|
|
|
|
+ function submit(OperateType: 1 | 2) {
|
|
|
formRef.value
|
|
formRef.value
|
|
|
.validate()
|
|
.validate()
|
|
|
.then(() => {
|
|
.then(() => {
|
|
|
const param = toRaw(formState);
|
|
const param = toRaw(formState);
|
|
|
|
|
|
|
|
const reqParam :AddUserInfoApplyReq = {
|
|
const reqParam :AddUserInfoApplyReq = {
|
|
|
|
|
+ customername: param.customername, // 必填
|
|
|
|
|
+ userid: 1, // 写死 必填
|
|
|
|
|
+ memberareaid: getUserId(),
|
|
|
|
|
+ userinfotype: Number(param.userinfotype),
|
|
|
|
|
+ username: param.customername,
|
|
|
|
|
+ userstate: OperateType, // 1: 保存草稿 2: 新增
|
|
|
|
|
|
|
|
|
|
+ // 以上必填
|
|
|
|
|
+ cardtype: param.cardtype, // 证件类型
|
|
|
|
|
+ cardnum: param.cardnum, // 证件号码
|
|
|
|
|
+ nickname: param.nickname, // 昵称
|
|
|
|
|
+ remark: param.remark, // 备注
|
|
|
|
|
+ mobilephone: param.mobilephone, // 手机号码
|
|
|
|
|
+ telphone: param.telphone, // 电话
|
|
|
|
|
+ cardfrontphotourl: param.cardfrontphotourl, // 正面照片
|
|
|
|
|
+ cardaddress: param.cardaddress, // 证件地址
|
|
|
|
|
+ cityid: param.cityid, //
|
|
|
|
|
+ districtid: param.districtid, // 地区
|
|
|
|
|
+ // countryid: param.,9
|
|
|
|
|
+ provinceid: param.provinceid, //省
|
|
|
|
|
+ contactname: param.contactname, // 联系人
|
|
|
|
|
+ legalpersonname: param.legalpersonname, // 法人姓名(企业)
|
|
|
|
|
+ taxpayernum: param.taxpayernum, // 纳税人识别号
|
|
|
|
|
+ email: param.email, // email
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- addCustomerInfo(reqParam)
|
|
|
|
|
|
|
+ addUserInfo(OperateType, reqParam, loading)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
cancel()
|
|
cancel()
|
|
|
context.emit('refresh')
|
|
context.emit('refresh')
|