|
|
@@ -1,89 +1,98 @@
|
|
|
<template>
|
|
|
- <!-- 回购仓单 -->
|
|
|
- <Drawer :title="'回购仓单'"
|
|
|
- :placement="'right'"
|
|
|
- :visible="visible"
|
|
|
- class="delistingBottom"
|
|
|
- @cancel="cancel">
|
|
|
- <div class="listed">
|
|
|
- <div class="formBar">
|
|
|
- <a-form class="inlineForm dialogForm"
|
|
|
- ref="formRef"
|
|
|
- :model="formState"
|
|
|
- :rules="rules">
|
|
|
- <a-row :gutter="24">
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="品种">
|
|
|
- <span class="white ml10">{{selectedRow.deliverygoodsname}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="仓库">
|
|
|
- <span class="white ml10">{{selectedRow.warehousename}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item label="履约商品">
|
|
|
- <span class="white ml10">{{selectedRow.wrtypename}}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="购买数量">
|
|
|
- <span class="white ml10">{{ selectedRow.wrqty + " " + selectedRow.enumdicname }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="已回购数量">
|
|
|
- <span class="white ml10">{{ selectedRow.buybackwrpositionqty + " " + selectedRow.enumdicname }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="待回购数量">
|
|
|
- <span class="white ml10">{{ selectedRow.remainwrpositionqty + " " + selectedRow.enumdicname }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="本次回购数量"
|
|
|
- name="num"
|
|
|
- class="relative">
|
|
|
- <a-input-number class="commonInput ml10"
|
|
|
- :min="1"
|
|
|
- v-model:value="formState.num"
|
|
|
- style="width: 200px" />
|
|
|
+ <!-- 回购仓单 -->
|
|
|
+ <Drawer
|
|
|
+ :title="'回购仓单'"
|
|
|
+ :placement="'right'"
|
|
|
+ :visible="visible"
|
|
|
+ class="delistingBottom"
|
|
|
+ @cancel="cancel"
|
|
|
+ >
|
|
|
+ <div class="listed">
|
|
|
+ <a-form class="inlineForm dialogForm" ref="formRef" :model="formState" :rules="rules">
|
|
|
+ <div class="formBar">
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="品种">
|
|
|
+ <span class="white ml10">{{selectedRow.deliverygoodsname}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="仓库">
|
|
|
+ <span class="white ml10">{{selectedRow.warehousename}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="24">
|
|
|
+ <a-form-item label="履约商品">
|
|
|
+ <span class="white ml10">{{selectedRow.wrtypename}}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="购买数量">
|
|
|
+ <span
|
|
|
+ class="white ml10"
|
|
|
+ >{{ selectedRow.wrqty + " " + selectedRow.enumdicname }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="已回购数量">
|
|
|
+ <span
|
|
|
+ class="white ml10"
|
|
|
+ >{{ selectedRow.buybackwrpositionqty + " " + selectedRow.enumdicname }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="待回购数量">
|
|
|
+ <span
|
|
|
+ class="white ml10"
|
|
|
+ >{{ selectedRow.remainwrpositionqty + " " + selectedRow.enumdicname }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="本次回购数量" name="num" class="relative">
|
|
|
+ <a-input-number
|
|
|
+ class="commonInput ml10"
|
|
|
+ :min="1"
|
|
|
+ v-model:value="formState.num"
|
|
|
+ style="width: 200px"
|
|
|
+ />
|
|
|
|
|
|
- <div class="day">吨</div>
|
|
|
- <!-- 本次可回购数量=min{资金方对应仓单头寸可用数量,融资合同剩余待回购数量} -->
|
|
|
- <div class="tip">{{ "本次可回购数量" + selectedRow.remainwrpositionqty + " " + selectedRow.enumdicname }}</div>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <!--(回购数量/合同剩余数量) * 合同剩余金额 -->
|
|
|
- <a-form-item label="本次回购金额">
|
|
|
- <span class="white ml10">{{ (((formState.num === 0 ? 1 : formState.num) * selectedRow.remainamount) / selectedRow.remainwrpositionqty).toFixed(2) + " 元" }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :span="12">
|
|
|
- <a-form-item label="剩余保证金">
|
|
|
- <span class="white ml10">{{ selectedRow.initmargin + " 元" }}</span>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <a-row :gutter="24"
|
|
|
- type="flex"
|
|
|
- justify="center">
|
|
|
- <a-col :span="24">
|
|
|
- <a-form-item class="tc">
|
|
|
- <a-button class="listedBtn"
|
|
|
- :loading="loading"
|
|
|
- :disabled="loading"
|
|
|
- @click="submit">提交</a-button>
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </Drawer>
|
|
|
+ <span class="input-enumdicname">吨</span>
|
|
|
+ <!-- 本次可回购数量=min{资金方对应仓单头寸可用数量,融资合同剩余待回购数量} -->
|
|
|
+ <div
|
|
|
+ class="tip"
|
|
|
+ >{{ "本次可回购数量" + selectedRow.remainwrpositionqty + " " + selectedRow.enumdicname }}</div>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <!--(回购数量/合同剩余数量) * 合同剩余金额 -->
|
|
|
+ <a-form-item label="本次回购金额">
|
|
|
+ <span
|
|
|
+ class="white ml10"
|
|
|
+ >{{ (((formState.num === 0 ? 1 : formState.num) * selectedRow.remainamount) / selectedRow.remainwrpositionqty).toFixed(2) + " 元" }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="12">
|
|
|
+ <a-form-item label="剩余保证金">
|
|
|
+ <span class="white ml10">{{ selectedRow.initmargin + " 元" }}</span>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+ <a-row :gutter="24">
|
|
|
+ <a-col :span="24" class="fixedBtns">
|
|
|
+ <a-form-item class="btnCenter">
|
|
|
+ <a-button
|
|
|
+ class="listedBtn"
|
|
|
+ :loading="loading"
|
|
|
+ :disabled="loading"
|
|
|
+ @click="submit"
|
|
|
+ >提交</a-button>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ </Drawer>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
@@ -95,11 +104,11 @@ import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
import { handleForm } from './setup';
|
|
|
import { validateAction } from '@/common/setup/form';
|
|
|
import { FormState } from './interface';
|
|
|
-import {WarehouseRepurchase} from "@/services/proto/warehousetrade";
|
|
|
-import {requestResultLoadingAndInfo} from "@/common/methods/request/resultInfo";
|
|
|
-import {WarehouseRepurchaseReq} from "@/services/proto/warehousetrade/interface";
|
|
|
-import {getTimeValue} from "@/utils/time";
|
|
|
-import Long from "long";
|
|
|
+import { WarehouseRepurchase } from '@/services/proto/warehousetrade';
|
|
|
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
|
|
|
+import { WarehouseRepurchaseReq } from '@/services/proto/warehousetrade/interface';
|
|
|
+import { getTimeValue } from '@/utils/time';
|
|
|
+import Long from 'long';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: ModalEnum.financing_manager_contract_repurchase_warrant,
|
|
|
@@ -121,7 +130,7 @@ export default defineComponent({
|
|
|
ExtBusinessID: getTimeValue(), // uint64 外部业务流水号
|
|
|
SCFContractID: Long.fromString(props.selectedRow.scfcontractid), // uint64 SCF合同ID
|
|
|
SCFContractType: props.selectedRow.scfcontracttype, // int32 合同类型
|
|
|
- WRPositionQty: param.num // uint64 仓单头寸数量
|
|
|
+ WRPositionQty: param.num, // uint64 仓单头寸数量
|
|
|
};
|
|
|
requestResultLoadingAndInfo(WarehouseRepurchase, paramReq, loading, ['回购仓单成功', '回购仓单失败:']).then(() => {
|
|
|
cancel(true);
|