浏览代码

commit 履约接口相关

yu jie 4 年之前
父节点
当前提交
7c1c08822a

+ 67 - 61
src/services/go/wrtrade/interface.ts

@@ -403,65 +403,71 @@ export interface QueryPerformancePlanReq {
  * 查询履约信息返回
  */
 export interface WrPerformancePlan {
-    amount: number;//履约金额(总金额)
-    buyaccountid: number;//买方账号
-    buyerfreezeamount: number;//履约冻结(买履约)
-    buyerfreezeamountremain: number;//履约冻结剩余(买履约)
-    buyorsell: number;//买卖方向 number;
-    //-买 1-卖
-    buypaidamount: number;//买方已冻/已扣金额 (已付金额)
-    buyusername: string;//买方名字
-    contractid: number;//合同ID
-    createtime: string;//创建时间(开始时间)
-    creatorid: number;//创建人
-    curstepdeadline: string;//当前步骤到期时间
-    curstepid: number;//当前步骤ID
-    curstepname: string;//当前步骤名称
-    deliverygoodscode: string;//品种代码
-    deliverygoodsid: number;//品种ID
-    deliverygoodsname: string;//品种名称
-    enumdicname: string;//单位名称
-    expressfee: number;//运费
-    expressfeeconfirmed: number;//是否确认运费 - number;
-    //:无 1:买方确认 2:卖方确认
-    hasovershort: number;//是否确认溢短 - number;
-    //:没有 1:买方确认 2:卖方确认
-    haswr: number;//类型 number;
-    //-仓单预售 1-仓单贸易
-    marketid: number;//市场ID
-    middleaccountid: number;//中间商资金账号ID
-    middleuserid: number;//中间商用户ID
-    optioncompare: string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
-    overshortamount: number;//溢短金额
-    overshortqty: number;//溢短数量
-    paymenttype: number;//付款方式 - 1:冻结 2:扣款
-    performanceplanid: number;//履约计划ID(13number;
-    //+yyMMddHHmmss+xxxx)
-    performancestatus: number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
-    //:超时关闭
-    performancetype: number;//履约类型 - number;
-    //:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 1number;
-    //:法币C2C 11:报价系统 12:挂牌系统
-    qty: number;//履约数量
-    relatedorderid: string;//关联单号(履约类型的关联单号)
-    remark: string;//备注
-    sellaccountid: number;//卖方账号
-    sellerfreezeamount: number;//履约冻结(卖履约)
-    sellerfreezeamountremain: number;//履约冻结剩余(卖履约)
-    sellreceivedamount: number;//卖方已收金额
-    sellusername: string;//卖方名字
-    shipremark: string;//发货备注[物流单号]
-    userid: number;//用户id
-    warehouseid: number;//仓库ID
-    warehousename: string;//仓库名称
-    wrfactortypeid: number;//仓单要素类型ID(212+Unix秒时间戳(1number;
-    //位)+xxxxxx)
-    wrfactortypename: string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
-    wrstandardcode: string;//现货商品代码
-    wrstandardid: number;//现货商品ID
-    wrstandardname: string;//商品名称
-    wrtransferuserid: number;//仓单受让用户
-    wrtypename: string;//商品
+    amount	:number;//履约金额(总金额)
+    buyaccountid	:number;//买方账号
+    buyerfreezeamount	:number;//履约冻结(买履约)
+    buyerfreezeamountremain	:number;//履约冻结剩余(买履约)
+    buyorsell	:number;//买卖方向 number;
+//-买 1-卖
+    buypaidamount	:number;//买方已冻/已扣金额 (已付金额)
+    buyusername	:string;//买方名字
+    contractid	:number;//合同ID
+    createtime	:string;//创建时间
+    creatorid	:number;//创建人
+    curstepdeadline	:string;//当前步骤到期时间
+    curstepid	:string;//当前步骤ID
+    curstepname	:string;//当前步骤名称
+    deliverygoodscode	:string;//品种代码
+    deliverygoodsid	:number;//品种ID
+    deliverygoodsname	:string;//品种名称
+    enumdicname	:string;//单位名称
+    expressfee	:number;//运费
+    expressfeeconfirmed	:number;//是否确认运费 - number;
+//:无 1:买方确认 2:卖方确认
+    hasovershort	:number;//是否确认溢短 - number;
+//:没有 1:买方确认 2:卖方确认
+    haswr	:number;//类型 number;
+//-仓单预售 1-仓单贸易
+    marketid	:number;//市场ID
+    middleaccountid	:number;//中间商资金账号ID
+    middleuserid	:number;//中间商用户ID
+    minivalue	:number;//现货商品最小变动值
+    optioncompare	:string;//选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
+    overshortamount	:number;//溢短金额
+    overshortqty	:number;//溢短数量
+    paymenttype	:number;//付款方式 - 1:冻结 2:扣款
+    performanceplanid	:string;//履约计划ID(13number;
+//+yyMMddHHmmss+xxxx)
+    performancestatus	:number;//履约状态 - 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 1number;
+//:超时关闭
+    performancetype	:number;//履约类型 - number;
+//:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 1number;
+//:法币C2C 11:报价系统 12:挂牌系统
+    qty	:number;//履约数量
+    relatedorderid	:string;//关联单号(履约类型的关联单号)
+    remark	:string;//备注
+    sellaccountid	:number;//卖方账号
+    sellerfreezeamount	:number;//履约冻结(卖履约)
+    sellerfreezeamountremain	:number;//履约冻结剩余(卖履约)
+    sellreceivedamount	:number;//卖方已收金额
+    sellusername	:string;//卖方名字
+    shipremark	:string;//发货备注[物流单号]
+    starttime	:string;//开始时间
+    steptypeid	:number;//履约步骤类型ID - 1:买方支付 2:卖方收款 3:买方自提 4:卖方发货 5:买方确认货 6:卖方发票 7:买方确认票 8:仓单转移 9:释放卖方冻结 1number;
+//:货款溢短 11:生成合同[中江] 12:运费 9number;
+//:确认支付 91. 确认放行 92买方支付(直接扣款) 用于-1模板“
+    unpaidamount	:number;//剩余款(待支付金额)
+    userid	:number;//用户id
+    warehouseid	:number;//仓库ID
+    warehousename	:string;//仓库名称
+    wrfactortypeid	:string;//仓单要素类型ID(212+Unix秒时间戳(1number;
+//位)+xxxxxx)
+    wrfactortypename	:string;//仓单要素类型名称(选择项要素的名称合并显示,逗号分隔)
+    wrstandardcode	:string;//现货商品代码
+    wrstandardid	:number;//现货商品ID
+    wrstandardname	:string;//商品名称
+    wrtransferuserid	:number;//仓单受让用户
+    wrtypename	:string;//商品
 }
 
 /**
@@ -619,8 +625,8 @@ export interface WrStandardFactoryItemEx {
  * 查询履约信息详情
  */
 export interface QueryWrPerformancePlanStepReq {
-    planid: number
-    curstepid?: number
+    planid: string
+    curstepid?: string
 }
 
 /**

+ 19 - 17
src/views/order/performance_information/components/components/breach_contract/index.vue

@@ -28,22 +28,22 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="当前步骤">
-                <span class="white">{{selectedRow.curstepname}}(超期天数:331)</span>
+                <span class="white">{{selectedRow.curstepname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="关联单号">
-                <span class="white">86989565623</span>
-              </a-form-item>
-            </a-col>
-            <a-col :span="24">
-              <a-form-item label="附件"
-                           name="url">
-                <UploadImg :visible="visible"
-                           :imgList="uploadImgList"
-                           @upload="uploadImgAction" />
+                <span class="white">{{selectedRow.relatedorderid}}</span>
               </a-form-item>
             </a-col>
+<!--            <a-col :span="24">-->
+<!--              <a-form-item label="附件"-->
+<!--                           name="url">-->
+<!--                <UploadImg :visible="visible"-->
+<!--                           :imgList="uploadImgList"-->
+<!--                           @upload="uploadImgAction" />-->
+<!--              </a-form-item>-->
+<!--            </a-col>-->
             <a-col :span="24">
               <a-form-item label="备注"
                            name="remark">
@@ -82,12 +82,13 @@ import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
 import UploadImg from '@/common/components/uploadImg/index.vue';
 import { getUploadImg } from '@/common/setup/upload';
-import { PerformanceDelayApplyReq } from '@/services/proto/performance/interface';
-import { getUserId } from '@/services/bus/account';
+import {PerformanceContractedApplyReq, PerformanceDelayApplyReq} from '@/services/proto/performance/interface';
+import {getSelectedAccount, getSelectedAccountId, getUserId} from '@/services/bus/account';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
 import { performanceContractedApply, performanceDelayApply } from '@/services/proto/performance';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { handlePerformancePlanStep } from '../setup';
+import Long from "long";
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_breach_contract,
@@ -112,11 +113,12 @@ export default defineComponent({
         function submit() {
             validateAction<FormState>(formRef, formState).then((param) => {
                 // 违约申请
-                const paramReq: PerformanceDelayApplyReq = {
-                    PerformancePlanStepID: props.selectedRow.curstepid,
-                    delaydays: 2,
-                    applicant: getUserId(),
-                    applyremark: param.remark,
+                const paramReq: PerformanceContractedApplyReq = {
+                    PerformancePlanID: Long.fromString(props.selectedRow.performanceplanid), // uint64 履约计划ID
+                    BreachType: props.selectedRow.buyaccountid === getSelectedAccountId() ? 2: 1, // uint32 违约方类型 买履约是2 卖履约是1 (刘工说是黄工说的 )
+                    Applicant: getUserId(), // uint64 违约申请人
+                    ApplyRemark: param.remark, // string 申请备注
+                    Attachment: "" // string 附件
                 };
                 debugger;
                 requestResultLoadingAndInfo(performanceContractedApply, paramReq, loading, ['违约成功', '违约失败:']).then(() => {

+ 5 - 5
src/views/order/performance_information/components/components/extension/index.vue

@@ -29,12 +29,12 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="当前步骤">
-                <span class="white ml10">{{selectedRow.curstepname}}((超期天数:331)</span>
+                <span class="white ml10">{{selectedRow.curstepname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="关联单号">
-                <span class="white ml10">86989565623</span>
+                <span class="white ml10">{{selectedRow.relatedorderid}}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -90,6 +90,7 @@ import { performanceDelayApply, performanceManualConfirm } from '@/services/prot
 import { getUserId } from '@/services/bus/account';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { handlePerformancePlanStep } from '../setup';
+import Long from "long";
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_extension,
@@ -109,17 +110,16 @@ export default defineComponent({
         const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
         const { rules, formState, formRef } = handleForm();
-                const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
+        const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
         function submit() {
             validateAction<FormState>(formRef, formState).then((param) => {
                 // 延期申请
                 const paramReq: PerformanceDelayApplyReq = {
-                    PerformancePlanStepID: props.selectedRow.curstepid,
+                    PerformancePlanStepID: Long.fromString(props.selectedRow.curstepid),
                     delaydays: param.days as number,
                     applicant: getUserId(),
                     applyremark: param.remark,
                 };
-                debugger;
                 requestResultLoadingAndInfo(performanceDelayApply, paramReq, loading, ['延期成功', '延期失败:']).then(() => {
                     cancel(true);
                 });

+ 7 - 5
src/views/order/performance_information/components/components/pay/index.vue

@@ -32,12 +32,12 @@
             </a-col>
             <a-col :span="24">
               <a-form-item label="当前步骤">
-                <span class="white ml10">{{selectedRow.curstepname}}</span>
+                <span class="white ml10">{{selectedRow.curstepname}}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
               <a-form-item label="本次需支付">
-                <span class="white ml10">1000.00</span>
+                <span class="white ml10">{{ stepamount }}</span>
               </a-form-item>
             </a-col>
             <a-col :span="24">
@@ -76,6 +76,7 @@ import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo
 import { HdWRDealOrder } from '@/services/proto/warehousetrade';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { handlePerformancePlanStep } from '../setup';
+import * as Long from "long";
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_pay,
@@ -94,22 +95,23 @@ export default defineComponent({
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
         const loading = ref<boolean>(false);
-        const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
+        const { performancePlanStep, stepamount } = handlePerformancePlanStep(props.selectedRow);
         function submit() {
             const param: PerformanceManualConfirmReq = {
-                PerformancePlanStepID: props.selectedRow.curstepid,
+                PerformancePlanStepID: Long.fromString(props.selectedRow.curstepid),
                 PerformanceExecuteSide: 1,
             };
-            debugger;
             requestResultLoadingAndInfo(performanceManualConfirm, param, loading, ['付款成功', '付款失败:']).then(() => {
                 cancel(true);
             });
         }
+
         return {
             visible,
             cancel,
             submit,
             loading,
+            stepamount
         };
     },
 });

+ 2 - 3
src/views/order/performance_information/components/components/settlement/index.vue

@@ -42,12 +42,11 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         const { performancePlanStep } = handlePerformancePlanStep(props.selectedRow);
         function submit() {
-            // 激活接口
+            // 激活接口 (就是交收)
             const paramReq: PerformanceActivateReq = {
-                PerformancePlanID: props.selectedRow.performanceplanid, // uint64 履约计划ID
+                PerformancePlanID:  Number(props.selectedRow.performanceplanid), // uint64 履约计划ID
                 ApplyAccountID: getSelectedAccountId(), // uint64 发起方账号ID
             };
-            debugger;
             requestResultLoadingAndInfo(performanceActivate, paramReq, loading, ['交收成功', '交收失败:']).then(() => {
                 cancel(true);
             });

+ 5 - 1
src/views/order/performance_information/components/components/setup.ts

@@ -1,16 +1,20 @@
 import { queryWrPerformancePlanStep } from "@/services/go/wrtrade";
 import { QueryWrPerformancePlanStepReq, WrPerformancePlan, WrPerformancePlanStep } from "@/services/go/wrtrade/interface";
 import { ref } from "vue";
+import Long from "long";
 
 // 获取当前履约步骤
 export function handlePerformancePlanStep(selectedRow: WrPerformancePlan) {
     const performancePlanStep = ref<WrPerformancePlanStep>()
+
+    const stepamount = ref<string>('--')
     const param: QueryWrPerformancePlanStepReq = { planid: selectedRow.performanceplanid, curstepid: selectedRow.curstepid }
     queryWrPerformancePlanStep(param).then(res => {
         console.log('获取当前履约步骤', res)
         if (res.length) {
             performancePlanStep.value = res[0]
+            stepamount.value = res[0].stepamount.toFixed(2).toString()
         }
     })
-    return { performancePlanStep }
+    return { performancePlanStep , stepamount}
 }