huangbin пре 4 година
родитељ
комит
f120ed6ad7
1 измењених фајлова са 11 додато и 10 уклоњено
  1. 11 10
      src/views/information/custom/compoments/modify/index.vue

+ 11 - 10
src/views/information/custom/compoments/modify/index.vue

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