Explorar o código

合并代码,解决冲突

huangbin %!s(int64=4) %!d(string=hai) anos
pai
achega
94631c415d

+ 3 - 3
public/proto/mtp.proto

@@ -848,7 +848,7 @@ message GldSpotContractInfo {
 	optional double PricedAmount = 30; // double 已定价金额
 	optional uint64 SpotGoodsBrandID = 31; // uint64 现货品牌ID
 	optional string Remark = 32; // string 合同备注
-	optional uint64 SaleUserID = 33; // uint64 业务员IDSpotContractOperateReq
+	optional uint64 SaleUserID = 33; // uint64 业务员ID
 	optional uint64 AccountID = 34; // uint64 期货账户ID
 	optional uint32 BizType = 35; // uint32 业务类型 - 1:套保 2:套利
 	optional uint32 CurrencyID = 36; // uint32 结算币种ID
@@ -938,7 +938,7 @@ message SpotContractOperateReq {
 	optional uint64 SpotContractID = 2; // uint64 现货合同ID(602+Unix秒时间戳(10位)+xxxxxx)
 	optional uint32 OperateType = 3; // uint32 操作类型-1:保存草稿2:提交申请3:审核通过4:审核拒绝5:撤回6:正常完结7:异常终止
 	optional uint32 OperateSrc = 4; // uint32 操作来源-1:管理端2:终端
-	optional uint64 UserID = 5; // uint64 操作用户ID
+	optional uint64 OperatorID = 5; // uint64 操作用户ID
 	optional string Remark = 6; // string 操作备注
 	optional string ClientTicket = 7; // string 客户端流水号
 	optional SpotContractInfo Info = 8; // SpotContractInfo 现货合同信息
@@ -1038,7 +1038,7 @@ message ContractOperateApplyReq {
 	optional uint64 OperateApplyID = 2; // uint64 操作申请ID(603+Unix秒时间戳(10位)+xxxxxx)
 	optional uint32 OperateType = 3; // uint32 操作类型-1:登记2:确认3:拒绝4:撤销
 	optional uint32 OperateSrc = 4; // uint32 操作来源-1:管理端2:终端
-	optional uint64 UserID = 5; // uint64 操作用户ID
+	optional uint64 OperatorID = 5; // uint64 操作用户ID
 	optional string Remark = 6; // string 备注
 	optional string ClientTicket = 7; // string 客户端流水号
 	optional ContractOperateApplyInfo Info = 8; // ContractOperateApplyInfo 合同操作信息

+ 1 - 1
src/services/proto/contract/index.ts

@@ -27,7 +27,7 @@ export const operationContractReq = (param: ErmcpContractOperateApplyReq): Promi
  */
 export const contractOperateApply = (param: ContractOperateApplyReq): Promise<any> => {
     param.OperateSrc = 2
-    param.UserID = Number(getLongTypeLoginID())
+    param.OperatorID = Number(getLongTypeLoginID())
     param.ClientTicket = getUUID()
     param.OperateApplyID = getTimeValue()
     return protoMiddleware<ContractOperateApplyReq>(param , 'ContractOperateApplyReq', 'ContractOperateApplyRsp', 2)

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

@@ -36,7 +36,7 @@ export interface ContractOperateApplyReq {
     Info?: ContractOperateApplyInfo; // ContractOperateApplyInfo 合同操作信息
 
     OperateSrc?: number
-    UserID?: number
+    OperatorID?: number
     ClientTicket?: string
 }
 

+ 3 - 2
src/services/proto/spotcontract/index.ts

@@ -2,6 +2,7 @@ import {getUserId} from "@/services/bus/account";
 import {GldErmcpSpotContractOperateReq, SpotContractOperateReq} from "@/services/proto/spotcontract/interface";
 import {protoMiddleware} from "@/services/socket/protobuf/buildReq";
 import {v4 as uuidv4} from 'uuid';
+import {getLongTypeLoginID} from "@/services/bus/login";
 
 /**(重点提醒 这里属于管理端接口,仅用于新增)以上来自android代码  回头需要确认
  * 新增 / 修改采购合同报文 (很多修改合同操作也在这)
@@ -24,9 +25,9 @@ export const orderContract = (param: GldErmcpSpotContractOperateReq): Promise<an
 export const spotContractStatus = (param: SpotContractOperateReq): Promise<any> => {
     const OperateSrc = 2; // uint32 操作来源-1:管理端2:终端
     const ClientTicket: string = uuidv4();  // 客户端流水号
-    const UserID: number = getUserId(); // 用户id
+    const OperatorID: number = Number(getLongTypeLoginID()); // 用户id
     const reqParams = {
-        ...param, OperateSrc, ClientTicket, UserID
+        ...param, OperateSrc, ClientTicket, OperatorID
     }
     return protoMiddleware<SpotContractOperateReq>(reqParams, 'SpotContractOperateReq', 'SpotContractOperateRsp', 2)
 }

+ 3 - 3
src/views/business/purchase/components/funds/index.vue

@@ -34,7 +34,7 @@
         </a-row>
         <a-row :gutter="24">
           <a-col :span="12">
-            <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
+            <a-form-item label="销售方">
               <span class="white">{{ formatValue(selectedRow.accountname) }}</span>
             </a-form-item>
           </a-col>
@@ -91,7 +91,7 @@
           </a-col>
           <a-col :span="12">
             <a-form-item label="合计总额">
-              <span class="white">{{ formatValue(selectedRow.pricedavg) }}</span>
+              <span class="white">{{ formatValue(selectedRow.totalamount) }}</span>
             </a-form-item>
           </a-col>
         </a-row>
@@ -121,7 +121,7 @@
           <a-col :span="12">
             <a-form-item label="应付款额"
                          name="unpayamount">
-              <span class="white">10000000.00元</span>
+              <span class="white">{{selectedRow.unpayamount}}</span>
             </a-form-item>
           </a-col>
           <a-col :span="12">

+ 2 - 2
src/views/business/purchase/components/settlement/setup.ts

@@ -44,8 +44,8 @@ export function handleForm() {
         adjustMargin: 1,// 调整保证金
         adjustAmount: 1,// 调整金额
     })
-    const validateIsChecked = ()=>{
-        if (formState.ReckonAdjustAmount && Math.abs(formState.ReckonAdjustAmount)) {
+    const validateIsChecked = (rule:any,value:number)=>{
+        if (value && Math.abs(value)) {
             return Promise.resolve();
         } else {
             return Promise.reject('请输入正确的值');

+ 63 - 62
src/views/information/account_info/compoments/cancel-business/index.vue

@@ -11,77 +11,78 @@
       <a-button key="submit"
                 type="primary"
                 :loading="loading"
-                @click="submit">完成</a-button>
+                @click="submit">注销
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="cancel">关闭
+      </a-button>
     </template>
 
   </a-modal>
 </template>
 
 <script lang="ts">
-import { closeModal } from '@/common/setup/modal/index';
-import { initData } from '@/common/methods/index';
-import { defineComponent, ref, reactive, toRaw, UnwrapRef } from 'vue';
-import { AllEnums } from '@/services/go/commonService/interface';
-import { RuleObject, ValidateErrorEntity } from 'ant-design-vue/es/form/interface';
-import { Modal} from 'ant-design-vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {initData} from '@/common/methods/index';
+import {defineComponent, ref, reactive, toRaw, UnwrapRef, PropType} from 'vue';
+import {AllEnums} from '@/services/go/commonService/interface';
+import {RuleObject, ValidateErrorEntity} from 'ant-design-vue/es/form/interface';
+import {Modal} from 'ant-design-vue';
+import {LoginaccountOperateReq} from "@/services/proto/accountinfo/interface";
+import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
+import {loginAccountOperate} from "@/services/proto/accountinfo";
+import {ErmcpLoginUser} from "@/services/go/ermcp/account/interface";
 
 export default defineComponent({
-    name: 'add-custom',
-    components: {},
-    setup() {
-        // 控制关闭弹窗
-        const { visible, cancel } = closeModal('account_info_business_btn_cancel');
-        // 证件类型
-        // const cardTypeList = ref<AllEnums[]>(getCardType());
-        // // 表单
-        // const formRef = ref();
-        // const formState: UnwrapRef<FormState> = reactive(initFormState());
-        // const rules = {
-        //     userinfotype: [{ required: true, message: '请选择客户类型', trigger: 'change' }],
-        //     customername: [{ required: true, message: '请输入企业名称', trigger: 'blur' }],
-        //     nickname: [{ required: true, message: '请输入企业简称', trigger: 'blur' }],
-        //     cardtype: [{ required: true, message: '请选择证件类型', trigger: 'change' }],
-        // };
-        // // 下单方法
-        // const { loading, applyAction } = handleApply();
-        // function isPersonal(): boolean {
-        //     return formState.userinfotype === '1';
-        // }
-        function submit() {
-            // formRef.value
-            //     .validate()
-            //     .then(() => {
-            //         const param = toRaw(formState);
-            //         applyAction(param);
-            //         console.log('values', formState);
-            //     })
-            //     .catch((error: ValidateErrorEntity<FormState>) => {
-            //         console.log('error', error);
-            //     });
-             Modal.confirm({
-                title: '是否确认注销该账户',
-                okText: '确认注销',
-                cancelText: '取消',
-                onOk() {
-                    
-                },
-                onCancel() {
-                    console.log('Cancel');
-                },
-            });
-        }
-        return {
-            // formState,
-            // rules,
-            // formRef,
-            // cardTypeList,
-            // isPersonal,
-            visible,
-            cancel,
-            submit,
-            // loading,
-        };
+  name: 'add-custom',
+  components: {},
+  props: {
+    selectedData: {
+      default: {},
+      type: Object as PropType<ErmcpLoginUser>,
     },
+  },
+  setup(props, context) {
+    // 控制关闭弹窗
+    const {visible, cancel} = closeModal('account_info_business_btn_cancel');
+    const loading = ref<boolean>(false);
+    function submit() {
+      Modal.confirm({
+        title: '是否确认注销该账户',
+        okText: '确认注销',
+        cancelText: '取消',
+        onOk() {
+          let reqParam: LoginaccountOperateReq = {
+            userid: props.selectedData.userid,
+            loginid: props.selectedData.loginid,
+            operatetype: 7,  // 5: 锁定 6:解锁
+            logintaaccounts: [],
+          }
+          requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户注销成功', '账户注销失败:']).then(() => {
+            cancel();
+            context.emit('refresh');
+          });
+        },
+        onCancel() {
+          console.log('Cancel');
+        },
+      });
+    }
+
+    return {
+      // formState,
+      // rules,
+      // formRef,
+      // cardTypeList,
+      // isPersonal,
+      visible,
+      cancel,
+      submit,
+      // loading,
+    };
+  },
 });
 </script>
 

+ 11 - 12
src/views/information/account_info/compoments/locked-business/index.vue

@@ -41,23 +41,22 @@ export default defineComponent({
         const { visible, cancel } = closeModal('account_info_business_btn_locked');
         const loading = ref<boolean>(false);
         function submit() {
-            // let reqParam: LoginaccountOperateReq = {
-            //     userid: props.selectedData.userid,
-            //     loginid: props.selectedData.loginid,
-            //     operatetype: 5,  // 5: 锁定 6:解锁
-            //     logintaaccounts: [],
-            // }
-            // debugger
-            // requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户锁定成功', '账户锁定失败:']).then(() => {
-            //     cancel();
-            //     context.emit('refresh');
-            // });
+
             Modal.confirm({
                 title: '是否确认锁定该账户',
                 okText: '确认锁定',
                 cancelText: '取消',
                 onOk() {
-                    
+                    let reqParam: LoginaccountOperateReq = {
+                        userid: props.selectedData.userid,
+                        loginid: props.selectedData.loginid,
+                        operatetype: 5,  // 5: 锁定 6:解锁
+                        logintaaccounts: [],
+                    }
+                    requestResultLoadingAndInfo(loginAccountOperate, reqParam, loading, ['账户锁定成功', '账户锁定失败:']).then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    });
                 },
                 onCancel() {
                     console.log('Cancel');