yu jie 4 lat temu
rodzic
commit
8766d2e8f7

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

@@ -68,10 +68,10 @@ export interface  GoodsPickupConfirmRsp {
 export interface QHJAgreementConfigOperateReq {
     operatetype: number // uint32 操作类型-1:新增 2:修改
     agreementid?: number // uint64 协议ID(操作类型为2时必填)
-    agreementno: string // string 协议编号
-    agreementname: string // string 协议名称
-    agreementtype: number // uint32 协议类型 - 1:注册 2:登录 3:交易
-    agreementcontent: string // string 协议内容
+    agreementno?: string // string 协议编号
+    agreementname?: string // string 协议名称
+    agreementtype?: number // uint32 协议类型 - 1:注册 2:登录 3:交易
+    agreementcontent?: string // string 协议内容
     operatesrc: number // uint32 操作来源 - 1:管理端 2:终端
     operateid: number // uint64 操作人
 }

+ 16 - 5
src/views/platinum/platinum_agreement/compoments/modify/index.vue

@@ -68,6 +68,10 @@ import { mergeTwoObj } from '@/utils/objHandle';
 import { validateAction } from '@/common/setup/form';
 import { QhjAgreementConfig } from '@/services/go/ermcp/qhj/interface';
 import { handleArgreementType } from '../../setup';
+import {QHJAgreementConfigOperateReq} from "@/services/proto/manager/interface";
+import {getUserId} from "@/services/bus/account";
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
+import {agreementConfigOperate} from "@/services/proto/manager";
 
 export default defineComponent({
     name: 'modify-custom',
@@ -93,11 +97,18 @@ export default defineComponent({
         });
         function submit() {
             validateAction<FormState>(formRef, formState).then((param) => {
-                // const reqParam: QHJAgreementConfigOperateReq = {};
-                // requestResultLoadingAndInfo(agreementConfigOperate, reqParam, loading, ['新增协议成功', '新增协议失败:']).then(() => {
-                //     cancel();
-                //     context.emit('refresh');
-                // });
+                const reqParam: QHJAgreementConfigOperateReq = {
+                    operatetype: 2, // uint32 操作类型-1:新增 2:修改
+                    agreementid: props.selectedRow.agreementid,
+                    agreementname: param.agreementname, // string 协议名称
+                    agreementcontent: param.agreementcontent, // string 协议内容
+                    operatesrc: 1, // uint32 操作来源 - 1:管理端 2:终端
+                    operateid: getUserId(), // uint64 操作人
+                };
+                requestResultLoadingAndInfo(agreementConfigOperate, reqParam, loading, ['修改协议成功', '修改协议失败:']).then(() => {
+                    cancel();
+                    context.emit('refresh');
+                });
             });
         }
         return {