<template>
  <!-- 撤销点价登记-->
  <a-modal class="add-custom custom-detail"
           title="撤销点价登记"
           v-model:visible="visible"
           centered
           :maskClosable="maskClosableFlag"
           @cancel="cancel"
           width="890px">
    <template #footer>
      <a-button key="submit"
                type="primary"
                :loading="loading"
                @click="submit">关闭
      </a-button>
    </template>
    <a-form class="inlineForm"
            :form="form"
            @submit="handleSearch">
      <fieldset class="formFieldSet">
        <legend>合同基本信息</legend>
        <a-row :gutter="24">
          <a-col :span="12">
            <a-form-item label="合同编号">
              <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="点价类型">
              <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</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.sellusername) }}</span>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="现货品种">
              <span class="white">{{ formatValue(selectedRow.buyusername) }}</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.deliverygoodsname) }}</span>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="点价价格">
              <span class="white">{{ formatValue(selectedRow.wrstandardname) }}</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.sellusername) }}</span>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="点价数量">
              <span class="white">{{ formatValue(selectedRow.pricedQty) }}</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.pricedPrice) }}</span>
            </a-form-item>
          </a-col>
          <a-col :span="12">
            <a-form-item label="登记时间">
              <span class="white">{{ formatValue(selectedRow.applytime) }}</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.auditname) }}</span>
            </a-form-item>
          </a-col>
        </a-row>
      </fieldset>
    </a-form>
  </a-modal>
</template>

<script lang="ts">
import {defineComponent, PropType, reactive, ref, watchEffect} from 'vue';
import {closeModal} from '@/common/setup/modal/index';
import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
import {mergeObj} from '@/utils/objHandle';
import {getStatusName} from '@/views/information/custom/setup';
import {formatValue, formatTime} from '@/common/methods';
import {getPriceTypeName} from "@/views/information/spot-contract/setup";
import {QryBusinessDjRsp} from "@/services/go/ermcp/business-review/interface";

export default defineComponent({
  name: 'business_review_someprice_cancel',
  components: {},
  props: {
    selectedRow: {
      type: Object as PropType<QryBusinessDjRsp>,
      default: {},
    },
  },
  setup(props) {
    const {visible, cancel} = closeModal('business_review_someprice_cancel');
    const loading = ref<boolean>(false);
    const maskClosableFlag = ref<boolean>(false);

    function submit() {

    }

    return {
      visible,
      cancel,
      submit,
      loading,
      formatValue,
      getStatusName,
      maskClosableFlag,
      getPriceTypeName,
    };
  },
});
</script>

<style lang="less">
.business_review_someprice_cancel {
  .ant-form.inlineForm {
    margin-top: 20px;
  }
}
</style>;
