| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <!-- 计划撤销-->
- <a-modal class="commonModal custom-detail" title="计划撤销" v-model:visible="visible" centered :maskClosable="false" @cancel="cancel" width="890px">
- <template #footer>
- <a-button key="submit" class="cancelBtn" @click="cancel">取消 </a-button>
- <a-button key="submit" type="primary" :loading="loading" @click="submit">确认撤销 </a-button>
- </template>
- <a-form class="inlineForm">
- <fieldset class="formFieldSet">
- <legend>基本信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="计划类型">
- <span class="white">{{ getPlanContractType(selectedRow.contracttype) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="计划名称">
- <span class="white">{{ formatValue(selectedRow.hedgeplanno) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="现货品种">
- <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="计划量">
- <span class="white">{{ formatValue(selectedRow.planqty) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- <fieldset class="formFieldSet">
- <legend>其它信息</legend>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="交易用户">
- <span class="white">{{ formatValue(selectedRow.tradeusername) }}</span>
- </a-form-item>
- </a-col>
- <a-col :span="12">
- <a-form-item label="结算币种">
- <span class="white">{{ formatValue(selectedRow.currencyname) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- <a-row :gutter="24">
- <a-col :span="12">
- <a-form-item label="备注">
- <span class="white">{{ formatValue(selectedRow.remark) }}</span>
- </a-form-item>
- </a-col>
- </a-row>
- </fieldset>
- </a-form>
- </a-modal>
- </template>
- <script lang="ts">
- import { defineComponent, PropType, ref } from 'vue';
- import { Ermcp3HedgePlan } from '@/services/go/ermcp/plan/interface';
- import { formatValue } from '@/common/methods';
- import { getPlanContractType } from '@/views/business/plan/setup';
- import { Modal } from 'ant-design-vue';
- import { HedgePlanOperateReq } from '@/services/proto/hedgeplan/interface';
- import * as Long from 'long';
- import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
- import { oldHedgePlanReq } from '@/services/proto/hedgeplan';
- import { getPayCurrencyTypeEnumList } from '@/common/constants/enumsList';
- import { _closeModal } from '@/common/setup/modal/modal';
- export default defineComponent({
- name: 'plan_audit_cancel',
- emits: ['cancel', 'update'],
- props: {
- selectedRow: {
- type: Object as PropType<Ermcp3HedgePlan>,
- default: {},
- },
- },
- setup(props, context) {
- const { visible, cancel } = _closeModal(context);
- const maskClosableFlag = ref<boolean>(false);
- const loading = ref<boolean>(false);
- function submit() {
- Modal.confirm({
- title: '是否确认撤销',
- okText: '确认撤销',
- cancelText: '取消',
- onOk() {
- const { hedgeplanid, hedgeplanno, contracttype, areauserid, deliverygoodsid, wrstandardid, producttype, spotgoodsdesc, planqty, convertfactor, plantime } = props.selectedRow;
- const params: HedgePlanOperateReq = {
- HedgePlanID: Long.fromString(hedgeplanid),
- OperateType: 5,
- Info: {
- HedgePlanNo: hedgeplanno, // string 套保计划编号
- ContractType: contracttype, // int32 计划类型-1:采购-1:销售
- AreaUserID: areauserid, // uint32 机构ID
- DeliveryGoodsID: deliverygoodsid, // uint32 现货品种ID
- WrStandardID: wrstandardid, // uint32 现货商品ID
- ProductType: producttype, // uint32 产品类型-1:标准仓单2:等标3:非标
- SpotGoodsDesc: spotgoodsdesc, // string 商品型号
- PlanQty: planqty, // double 计划数量
- ConvertFactor: convertfactor, // double 标仓系数
- PlanTime: plantime, // string 计划时间
- },
- };
- requestResultLoadingAndInfo(oldHedgePlanReq, params, loading, ['撤销成功', '撤销失败:']).then(() => {
- cancel(true);
- });
- },
- onCancel() { },
- });
- }
- return {
- visible,
- cancel,
- submit,
- maskClosableFlag,
- formatValue,
- getPlanContractType,
- getPayCurrencyTypeEnumList,
- };
- },
- });
- </script>
|