yu jie il y a 4 ans
Parent
commit
43d8c3470b

+ 1 - 1
src/services/proto/manager/interface.ts

@@ -67,7 +67,7 @@ export interface  GoodsPickupConfirmRsp {
 // 协议操作请求 0 29 189
 export interface QHJAgreementConfigOperateReq {
     operatetype: number // uint32 操作类型-1:新增 2:修改
-    agreementid: number // uint64 协议ID(操作类型为2时必填)
+    agreementid?: number // uint64 协议ID(操作类型为2时必填)
     agreementno: string // string 协议编号
     agreementname: string // string 协议名称
     agreementtype: number // uint32 协议类型 - 1:注册 2:登录 3:交易

+ 18 - 5
src/views/platinum/platinum_agreement/compoments/add/index.vue

@@ -84,6 +84,11 @@ import { FormState } from './interface';
 import { validateAction } from '@/common/setup/form';
 import { AgreementType } from '@/common/constants/enumCommon';
 import { getAgreementTypeList } from '@/views/platinum/platinum_agreement/setup';
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
+import {addCustomerInfoOperate} from "@/services/proto/accountinfo";
+import {agreementConfigOperate} from "@/services/proto/manager";
+import {QHJAgreementConfigOperateReq} from "@/services/proto/manager/interface";
+import {getUserId} from "@/services/bus/account";
 
 export default defineComponent({
     name: 'add-custom',
@@ -104,11 +109,19 @@ export default defineComponent({
 
         function submit(OperateType: 1 | 2) {
             validateAction<FormState>(formRef, formState).then((param) => {
-                // const reqParam: QHJAgreementConfigOperateReq = {};
-                // requestResultLoadingAndInfo(agreementConfigOperate, reqParam, loading, ['新增协议成功', '新增协议失败:']).then(() => {
-                //     cancel();
-                //     context.emit('refresh');
-                // });
+                const reqParam: QHJAgreementConfigOperateReq = {
+                    operatetype: 1, // uint32 操作类型-1:新增 2:修改
+                    agreementno: param.agreementno, // string 协议编号
+                    agreementname: param.agreementname, // string 协议名称
+                    agreementtype: Number(param.agreementtype), // uint32 协议类型 - 1:注册 2:登录 3:交易
+                    agreementcontent: param.agreementcontent, // string 协议内容
+                    operatesrc: 1,// uint32 操作来源 - 1:管理端 2:终端
+                    operateid: getUserId() // uint64 操作人
+                };
+                requestResultLoadingAndInfo(agreementConfigOperate, reqParam, loading,  ['新增协议成功', '新增协议失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
             });
         }