|
@@ -278,6 +278,8 @@ import { validateAction } from '@/common/setup/form';
|
|
|
import { delAddress } from '@/services/socket/address';
|
|
import { delAddress } from '@/services/socket/address';
|
|
|
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";
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'modify-custom',
|
|
name: 'modify-custom',
|
|
@@ -305,7 +307,7 @@ export default defineComponent({
|
|
|
const { uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
|
|
const { uploadImgAction: cardfrontUpload, uploadImgList: cardfrontImgList, handleImg: cardfrontHandle } = getUploadImg();
|
|
|
|
|
|
|
|
function isPersonal(): boolean {
|
|
function isPersonal(): boolean {
|
|
|
- return formState.userinfotype === '1';
|
|
|
|
|
|
|
+ return formState.userinfotype === 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const userid = ref<number>(0);
|
|
const userid = ref<number>(0);
|
|
@@ -317,6 +319,8 @@ export default defineComponent({
|
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
|
if (isPersonal()) {
|
|
if (isPersonal()) {
|
|
|
formState.username = props.selectedRow.customername;
|
|
formState.username = props.selectedRow.customername;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ formState.username = props.selectedRow.username;
|
|
|
}
|
|
}
|
|
|
const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
|
|
const { provinceid, cityid, address, mobile, attachment1, cardfrontphotourl, cardbackphotourl } = props.selectedRow;
|
|
|
formState.cardaddress = address;
|
|
formState.cardaddress = address;
|
|
@@ -339,31 +343,33 @@ 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: ModifyUserInfoApplyReq = {
|
|
|
|
|
- customername: Number(param.userinfotype) === 1 ? param.username : param.customername, // 必填
|
|
|
|
|
- username: param.username,
|
|
|
|
|
|
|
+ const reqParam: CustomerInfoOperateReq = {
|
|
|
|
|
+ operatetype: 2, // 1: 新增 2:修改
|
|
|
|
|
+ username: Number(param.userinfotype) === 1 ? param.username : param.customername,
|
|
|
userid: userid.value,
|
|
userid: userid.value,
|
|
|
- memberareaid: getUserId(),
|
|
|
|
|
|
|
+ areaid: getUserId(),
|
|
|
userinfotype: Number(param.userinfotype),
|
|
userinfotype: Number(param.userinfotype),
|
|
|
userstate: OperateType, // 1: 保存草稿 2: 新增
|
|
userstate: OperateType, // 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: param.cardfrontphotourl, // 正面照片
|
|
cardfrontphotourl: param.cardfrontphotourl, // 正面照片
|
|
|
- cardaddress: param.cardaddress, // 证件地址
|
|
|
|
|
- cityid: param.cityid, //
|
|
|
|
|
- districtid: param.districtid, // 地区
|
|
|
|
|
- countryid: countryid.value,
|
|
|
|
|
- provinceid: param.provinceid, //省
|
|
|
|
|
|
|
+ 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
|
|
|
|
|
+ provinceid: (param.provinceid as number) !== undefined ? (param.provinceid as number) : 0, //省
|
|
|
|
|
+ // countryid: countryid.value,
|
|
|
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
|
|
|
|
|
+ proxystatementurl: '',
|
|
|
};
|
|
};
|
|
|
- requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
|
|
|
|
+ requestResultLoadingAndInfo(addCustomerInfoOperate, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
cancel();
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|
|
|
});
|
|
});
|