|
@@ -273,6 +273,9 @@ import { QueryAddUserInfoApply } from '@/services/go/ermcp/customInfo';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
import UploadImg from '@/common/components/uploadImg/index.vue';
|
|
|
import { getUploadImg } from '@/common/setup/upload';
|
|
import { getUploadImg } from '@/common/setup/upload';
|
|
|
|
|
+import { addCustomerInfoOperate } from '@/services/proto/accountinfo';
|
|
|
|
|
+import { CustomerInfoOperateReq } from '@/services/proto/accountinfo/interface';
|
|
|
|
|
+import { getAreaUserId } from '@/services/bus/user';
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'add-custom',
|
|
name: 'add-custom',
|
|
@@ -299,34 +302,35 @@ export default defineComponent({
|
|
|
|
|
|
|
|
function submit(OperateType: 1 | 2) {
|
|
function submit(OperateType: 1 | 2) {
|
|
|
validateAction<FormState>(formRef, formState).then((param) => {
|
|
validateAction<FormState>(formRef, formState).then((param) => {
|
|
|
- const reqParam: AddUserInfoApplyReq = {
|
|
|
|
|
- customername: Number(param.userinfotype) === 1 ? param.username : param.customername, // 必填
|
|
|
|
|
- userid: 1, // 写死 必填
|
|
|
|
|
- memberareaid: getUserId(),
|
|
|
|
|
|
|
+ const reqParam: CustomerInfoOperateReq = {
|
|
|
|
|
+ operatetype: OperateType,
|
|
|
|
|
+ // userid: 1, // 写死 必填
|
|
|
|
|
+ userid: getUserId(), // 写死 必填
|
|
|
|
|
+ areaid: getAreaUserId(),
|
|
|
userinfotype: Number(param.userinfotype),
|
|
userinfotype: Number(param.userinfotype),
|
|
|
username: param.username,
|
|
username: param.username,
|
|
|
- userstate: OperateType, // 1: 保存草稿 2: 新增
|
|
|
|
|
|
|
+ userstate: 2, // 1: 保存草稿 2: 新增
|
|
|
// 以上必填
|
|
// 以上必填
|
|
|
- cardtype: param.cardtype, // 证件类型
|
|
|
|
|
|
|
+ cardtype: (param.cardtype as number) !== undefined ? (param.cardtype as number) : 0, // 证件类型
|
|
|
cardnum: param.cardnum, // 证件号码
|
|
cardnum: param.cardnum, // 证件号码
|
|
|
nickname: param.nickname, // 昵称
|
|
nickname: param.nickname, // 昵称
|
|
|
remark: param.remark, // 备注
|
|
remark: param.remark, // 备注
|
|
|
mobilephone: param.mobilephone, // 手机号码
|
|
mobilephone: param.mobilephone, // 手机号码
|
|
|
telphone: param.telphone, // 电话
|
|
telphone: param.telphone, // 电话
|
|
|
- cardfrontphotourl: getFrontImg(), // 正面照片
|
|
|
|
|
- cardbackphotourl: getBackImg(), // 背面证件照地址
|
|
|
|
|
- cardaddress: param.cardaddress, // 证件地址
|
|
|
|
|
- cityid: param.cityid, //
|
|
|
|
|
- districtid: param.districtid, // 地区
|
|
|
|
|
|
|
+ cardfrontphotourl: isPersonal() ? getFrontImg() : getAttachmentImg(), // 正面照片
|
|
|
|
|
+ cardbackphotourl: isPersonal() ? getBackImg() : '', // 背面证件照地址
|
|
|
|
|
+ ipaddress: param.cardaddress, // 证件地址
|
|
|
|
|
+ cityid: (param.cityid as number) !== undefined ? (param.cityid as number) : 0, //城市
|
|
|
|
|
+ districtid: (param.districtid as number) !== undefined ? (param.districtid as number) : 0, // 地区
|
|
|
// countryid: param.,9
|
|
// countryid: param.,9
|
|
|
- provinceid: param.provinceid, //省
|
|
|
|
|
|
|
+ provinceid: (param.provinceid as number) !== undefined ? (param.provinceid as number) : 0, //省
|
|
|
contactname: param.contactname, // 联系人
|
|
contactname: param.contactname, // 联系人
|
|
|
legalpersonname: param.legalpersonname, // 法人姓名(企业)
|
|
legalpersonname: param.legalpersonname, // 法人姓名(企业)
|
|
|
taxpayernum: param.taxpayernum, // 纳税人识别号
|
|
taxpayernum: param.taxpayernum, // 纳税人识别号
|
|
|
email: param.email, // email
|
|
email: param.email, // email
|
|
|
- attachment1: getAttachmentImg(), // 营业执照
|
|
|
|
|
|
|
+ proxystatementurl: '',
|
|
|
};
|
|
};
|
|
|
- requestResultLoadingAndInfo(QueryAddUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
|
|
|
|
+ requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
cancel();
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|
|
|
});
|
|
});
|