|
@@ -9,7 +9,7 @@
|
|
|
@cancel="cancel"
|
|
@cancel="cancel"
|
|
|
width="890px">
|
|
width="890px">
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
- <a-button key="submit"
|
|
|
|
|
|
|
+ <a-button key="submit"
|
|
|
class="cancelBtn"
|
|
class="cancelBtn"
|
|
|
@click="submit(1)">保存草稿
|
|
@click="submit(1)">保存草稿
|
|
|
</a-button>
|
|
</a-button>
|
|
@@ -282,12 +282,11 @@ import { AllEnums } from '@/services/go/commonService/interface';
|
|
|
import { FormState } from '../add/interface';
|
|
import { FormState } from '../add/interface';
|
|
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
import { ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
|
|
|
import { getAddress } from '@/services/go/adress';
|
|
import { getAddress } from '@/services/go/adress';
|
|
|
-import {AddUserInfoApplyReq, ModifyUserInfoApplyReq} from '@/services/go/ermcp/customInfo/interface';
|
|
|
|
|
|
|
+import { ModifyUserInfoApplyReq, QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
|
|
|
import { getUserId } from '@/services/bus/account';
|
|
import { getUserId } from '@/services/bus/account';
|
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
-import {QueryAddUserInfoApply, QueryModifyUserInfoApply} from '@/services/go/ermcp/customInfo';
|
|
|
|
|
|
|
+import { QueryModifyUserInfoApply } from '@/services/go/ermcp/customInfo';
|
|
|
import { mergeTwoObj } from '@/utils/objHandle';
|
|
import { mergeTwoObj } from '@/utils/objHandle';
|
|
|
-import {modifyUserInfo} from "@/views/information/custom/compoments/setup";
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
|
name: 'modify-custom',
|
|
name: 'modify-custom',
|
|
@@ -295,7 +294,7 @@ export default defineComponent({
|
|
|
props: {
|
|
props: {
|
|
|
selectedRow: {
|
|
selectedRow: {
|
|
|
default: initFormState,
|
|
default: initFormState,
|
|
|
- type: Object as PropType<FormState>,
|
|
|
|
|
|
|
+ type: Object as PropType<QueryCustomInfoType>,
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
setup(props, context) {
|
|
setup(props, context) {
|
|
@@ -311,8 +310,13 @@ export default defineComponent({
|
|
|
function isPersonal(): boolean {
|
|
function isPersonal(): boolean {
|
|
|
return formState.userinfotype === '1';
|
|
return formState.userinfotype === '1';
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ const userid = ref<number>(0)
|
|
|
|
|
+ const countryid = ref<number>(0)
|
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
|
if (visible.value) {
|
|
if (visible.value) {
|
|
|
|
|
+ userid.value = props.selectedRow.userid
|
|
|
|
|
+ countryid.value = props.selectedRow.countryid
|
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
mergeTwoObj(formState, props.selectedRow);
|
|
|
const { provinceid, cityid } = props.selectedRow;
|
|
const { provinceid, cityid } = props.selectedRow;
|
|
|
provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
|
|
provinceid ? getCityList(provinceid) : (formState.provinceid = undefined);
|
|
@@ -326,8 +330,7 @@ export default defineComponent({
|
|
|
const param = toRaw(formState);
|
|
const param = toRaw(formState);
|
|
|
const reqParam: ModifyUserInfoApplyReq = {
|
|
const reqParam: ModifyUserInfoApplyReq = {
|
|
|
customername: param.customername, // 必填
|
|
customername: param.customername, // 必填
|
|
|
- // userid: param.userid, // 写死 必填
|
|
|
|
|
- userid: 12312,
|
|
|
|
|
|
|
+ userid: userid.value,
|
|
|
memberareaid: getUserId(),
|
|
memberareaid: getUserId(),
|
|
|
userinfotype: Number(param.userinfotype),
|
|
userinfotype: Number(param.userinfotype),
|
|
|
username: param.customername,
|
|
username: param.customername,
|
|
@@ -342,15 +345,13 @@ export default defineComponent({
|
|
|
cardaddress: param.cardaddress, // 证件地址
|
|
cardaddress: param.cardaddress, // 证件地址
|
|
|
cityid: param.cityid, //
|
|
cityid: param.cityid, //
|
|
|
districtid: param.districtid, // 地区
|
|
districtid: param.districtid, // 地区
|
|
|
- countryid: 0,
|
|
|
|
|
- // countryid: param.,9
|
|
|
|
|
|
|
+ countryid: countryid.value,
|
|
|
provinceid: param.provinceid, //省
|
|
provinceid: param.provinceid, //省
|
|
|
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
|
|
|
};
|
|
};
|
|
|
- debugger
|
|
|
|
|
requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
requestResultLoadingAndInfo(QueryModifyUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
|
|
|
cancel();
|
|
cancel();
|
|
|
context.emit('refresh');
|
|
context.emit('refresh');
|