فهرست منبع

提交账户新增以及修改接口相关

yu.jie 4 سال پیش
والد
کامیت
c73197e91d

+ 2 - 1
src/services/go/ermcp/customInfo/interface.ts

@@ -99,9 +99,10 @@ export interface AddUserInfoApplyReq {
     signedstatus?: number;//账户一号签签约状态
     signpdfurl?: string;//签约pdf文件
     subbranch?: string;//开户支行
+    taxpayernum?: string;  //纳税人识别号
     telphone?: string;//联系电话(加密存储)
     userid?: number;//用户ID(自增ID)
-
+    userinfotype?: number;   // 	   用户信息类型 - 1:个人 2:企业
     username?: string;//用户姓名
     userstate?: number;//开户状态 - 1:未提交 2: 待初审 3:初审拒绝 4:待复审 5:复审拒绝 6:测评不通过
     usertype?: number;//用户类型 - 1:投资者 2:机构

+ 2 - 2
src/views/business/purchase/components/storage/index.vue

@@ -192,13 +192,13 @@ export default defineComponent({
             const wrapEl = unref(formRef);
             wrapEl.validate().then(() => {
                 const params: ERMCPAreaInOutStockApplyReq = {
-                    InOutType: 1, //  1:采购入库 2:销售出库 3:生产入库 4:生产出库
+                    InOutType: 5, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
                     WRStandardID: props.selectedRow.wrstandardid, //品类ID
                     SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
                     DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
                     SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
                     WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
-                    Qty: formState.Qty || 0, // double 数量
+                    Qty: formState.Qty || 0, // double 数量t
                     ApplyRemark: '', // string 申请备注
                 };
                 // 入库

+ 30 - 1
src/views/information/account_info/compoments/add/index.vue

@@ -82,6 +82,8 @@ import { getCardType, initFormState, handleApply } from './setup';
 import { AllEnums } from '@/services/go/commonService/interface';
 import { FormState } from './interface';
 import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
+import {AddUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
+import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'add-custom',
@@ -110,7 +112,34 @@ export default defineComponent({
                 .validate()
                 .then(() => {
                     const param = toRaw(formState);
-                    applyAction(param);
+
+                    const paramReq: AddUserInfoApplyReq = {
+                        customername: param.customername,   // 必填
+                        userid: 1,  // 写死 必填
+                        memberareaid: getUserId(),
+                        userinfotype: Number(param.userinfotype),
+                        username: param.customername,
+                        userstate: 1, // 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.,
+                        provinceid: param.provinceid, //省
+                        contactname: param.contactname,  // 联系人
+                        legalpersonname: param.legalpersonname,  // 法人姓名(企业)
+                        taxpayernum: param.taxpayernum, // 纳税人识别号
+                        email: param.email,  // email
+                    }
+                    applyAction(paramReq);
                     console.log('values', formState);
                 })
                 .catch((error: ValidateErrorEntity<FormState>) => {

+ 7 - 0
src/views/information/account_info/setup.ts

@@ -0,0 +1,7 @@
+// 更新用户状态 4:正常 6:注销(停用)
+import {ResultInfo} from "@/common/methods/request";
+
+export const addCustomInfoSign = new Map<number, ResultInfo>([
+    [2, ['新增客户资料成功', '新增客户资料失败:']],
+    [1, ['保存草稿成功', '保存草稿失败:']],
+])

+ 35 - 8
src/views/information/custom/compoments/add/index.vue

@@ -8,10 +8,14 @@
            :maskClosable="false"
            width="890px">
     <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>
     <a-form class="inlineForm"
             ref="formRef"
@@ -280,6 +284,7 @@ import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interfac
 import { getAddress } from '@/services/go/adress';
 import {addUserInfo} from "@/views/information/custom/compoments/setup";
 import {AddUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
+import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'add-custom',
@@ -287,28 +292,50 @@ export default defineComponent({
     setup(name, context) {
         // 控制关闭弹窗
         const { visible, cancel } = closeModal('custom_info_btn_add');
+        const loading = ref<boolean>(false);
         // 证件类型
         const cardTypeList = ref<AllEnums[]>(getCardType());
         // 表单
         const { formRef, formState, rules } = handleForm();
-        // 下单方法
-        const { loading, addCustomerInfo } = addUserInfo();
         // 地址
         const { cityList, districtList, provinceList, getCityList, getDistrictList } = getAddress();
         function isPersonal(): boolean {
             return formState.userinfotype === '1';
         }
-        function submit() {
+        function submit(OperateType: 1 | 2) {
             formRef.value
                 .validate()
                 .then(() => {
                     const param = toRaw(formState);
 
                     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 => {
                             cancel()
                             context.emit('refresh')

+ 46 - 6
src/views/information/custom/compoments/modify/index.vue

@@ -9,10 +9,14 @@
            @cancel="cancel"
            width="890px">
     <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>
     <a-form class="inlineForm"
             :form="form"
@@ -191,6 +195,9 @@
 import { defineComponent, ref } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
 import { initData } from '@/common/methods/index';
+import {AddUserInfoApplyReq} from "@/services/go/ermcp/customInfo/interface";
+import {getUserId} from "@/services/bus/account";
+import {addUserInfo, modifyUserInfo} from "@/views/information/custom/compoments/setup";
 
 export default defineComponent({
     name: 'modify-custom',
@@ -200,14 +207,47 @@ export default defineComponent({
         //   type:
         // }
     },
-    setup() {
+    setup(name,context) {
         // const { visible, cancel } = closeModal('modifyCustomInfo');
         const { visible, cancel } = closeModal('custom_info_btn_modify');
 
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
-        function submit() {
+        function submit(OperateType: 1 | 2) {
             cancel();
+            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
+            }
+
+            modifyUserInfo(OperateType, reqParam, loading)
+                .then(res => {
+                    cancel()
+                    context.emit('refresh')
+                })
+
         }
         initData(() => {});
         return {

+ 23 - 23
src/views/information/custom/compoments/setup.ts

@@ -1,18 +1,20 @@
 import {
     QueryAddUserInfoApply,
     QueryDeleteUserInfoApply,
-    QueryModifyUserInfo,
+    QueryModifyUserInfo, QueryModifyUserInfoApply,
     UpdateUserAccountStatus
 } from "@/services/go/ermcp/customInfo";
-import {AddUserInfoApplyReq, ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
+import {AddUserInfoApplyReq, ModifyUserInfoApplyReq, ModifyUserInfoReq} from "@/services/go/ermcp/customInfo/interface";
 import {userInfoCheck} from "@/services/proto/accountinfo";
 import {UserInfoCheckMangeReq} from "@/services/proto/accountinfo/interface";
 import {message} from 'ant-design-vue';
-import {ref} from "vue";
+import {Ref, ref} from "vue";
 import {BaseResponse} from "@/services/go";
-import {getRequestResultInfo} from "@/common/methods/request";
+import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
 import {GldContractStateSign} from "@/views/information/spot-contract/setup";
-import {ModifyUserInfoSign} from "@/views/information/custom/setup";
+import {addCustomInfoSign, ChangeCustomInfoSign, ModifyUserInfoSign} from "@/views/information/custom/setup";
+import {deletePlanSign} from "@/views/business/plan/setup";
+import {oldHedgePlanReq} from "@/services/proto/hedgeplan";
 
 /**
  *  撤销客户资料 撤销后的数据会进入草稿(未提交)
@@ -107,24 +109,22 @@ export function deleteUserInfo() {
 
 /**
  * 新增用户申请
+ * @param type: 2新 增, type: 1保存草稿
  */
-export function addUserInfo(){
-    const loading = ref<boolean>(false);
-
-    function addCustomerInfo(userInfoApply: AddUserInfoApplyReq): Promise<string> {
-        loading.value = true
-        return QueryAddUserInfoApply(userInfoApply)
-            .then((res) => {
-                return Promise.resolve("新增成功")
-            })
-            .catch((err) => {
-                return Promise.reject("新增失败:" + err)
-            }).finally(() => {
-                loading.value = false
-            })
-    }
-
-    return {loading, addCustomerInfo}
+export function addUserInfo(type: number, userInfoApply: AddUserInfoApplyReq, loading: Ref<boolean>): Promise<string>{
+    loading.value = true;
+    const sign = getRequestResultInfo(addCustomInfoSign, type)  // 接口请求后的返回提示 这里统一进行管理
+    const result = QueryAddUserInfoApply(userInfoApply)
+    return commonResultInfo(result, sign, loading)
 }
 
-
+/**
+ * 修改用户申请
+ * @param type: 2新 增, type: 1保存草稿
+ */
+export function modifyUserInfo(type: number, userInfoApply: ModifyUserInfoApplyReq, loading: Ref<boolean>): Promise<string>{
+    loading.value = true;
+    const sign = getRequestResultInfo(ChangeCustomInfoSign, type)  // 接口请求后的返回提示 这里统一进行管理
+    const result = QueryModifyUserInfoApply(userInfoApply)
+    return commonResultInfo(result, sign, loading)
+}

+ 10 - 0
src/views/information/custom/setup.ts

@@ -37,3 +37,13 @@ export const ModifyUserInfoSign = new Map<number, ResultInfo>([
     [4, ['恢复成功', '恢复失败:']],
     [6, ['停用成功', '停用失败:']],
 ])
+
+export const addCustomInfoSign = new Map<number, ResultInfo>([
+    [2, ['新增客户资料成功', '新增客户资料失败:']],
+    [1, ['保存草稿成功', '保存草稿失败:']],
+])
+
+export const ChangeCustomInfoSign = new Map<number, ResultInfo>([
+    [1, ['修改客户资料草稿成功', '修改客户资料草稿失败:']],
+    [2, ['修改客户资料成功', '修改客户资料失败:']],
+])

+ 0 - 1
src/views/manage/finance-review/components/invoiceDetail/index.vue

@@ -111,7 +111,6 @@ export default defineComponent({
 
         function submit() {
             console.log(props)
-            debugger
             context.emit('refresh');
             cancel()
         }