| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- <template>
- <div class="rightSpot">
- <div class="title">
- <div class="tltLeft">
- <span class="blue">
- <svg class="icon svg-icon"
- aria-hidden="true">
- <use xlink:href="#icon-shuzhuangtu"></use>
- </svg>
- {{selctedMG.mg.middlegoodsname}}({{getGoodsUnit(selctedMG.mg.goodsunitid)}})
- </span>
- <span class="green ml10">{{selctedMG.mg.isvalid ? '正常' : '停用'}}</span>
- </div>
- <div class="tltBtns">
- <template v-if="isNormal">
- <BtnList :btnList="forDataBtn" />
- </template>
- <template>
- <a-button class="blueBtn">恢复</a-button>
- </template>
- </div>
- </div>
- <div class="spotCont">
- <a-collapse class="spotCollapse"
- :bordered="false">
- <template #expandIcon="props">
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-if="props.isActive == 0">
- <use xlink:href="#icon-shouqi1"></use>
- </svg>
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-else>
- <use xlink:href="#icon-shouqi2"></use>
- </svg>
- </template>
- <a-collapse-panel key="1">
- <template #header>
- <a-row class="headRow">
- <a-col :span="8">期货品种({{selctedMG.gplist.length}})</a-col>
- <a-col :span="8">单位</a-col>
- <a-col :span="8">品种系数</a-col>
- </a-row>
- </template>
- <template v-for="(item, i) in selctedMG.gplist"
- :key="i + '1111'">
- <a-row class="contRow">
- <a-col :span="8">{{item.goodsgroupname}}</a-col>
- <a-col :span="8">{{item.enumdicname}}</a-col>
- <a-col :span="8">{{item.convertratio}}</a-col>
- </a-row>
- <a-collapse>
- <template #expandIcon="props">
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-if="props.isActive == 0">
- <use xlink:href="#icon-shouqi1"></use>
- </svg>
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-else>
- <use xlink:href="#icon-shouqi2"></use>
- </svg>
- </template>
- <a-collapse-panel>
- <template #header>
- <a-row class="headRow">
- <a-col :span="8">期货合约({{item.glist.length}})</a-col>
- <a-col :span="8">单位</a-col>
- <a-col :span="8">合约系数</a-col>
- </a-row>
- </template>
- <a-row class="contRow"
- v-for="sub in item.glist"
- :key="sub.goodsid">
- <a-col :span="8">{{sub.goodsname}}</a-col>
- <a-col :span="8">{{sub.enumdicname}}</a-col>
- <a-col :span="8">{{sub.agreeunit}}</a-col>
- </a-row>
- </a-collapse-panel>
- </a-collapse>
- </template>
- </a-collapse-panel>
- <a-collapse-panel key="2">
- <template #header>
- <a-row class="headRow">
- <a-col :span="8">现货品种({{selctedMG.dglist.length}})</a-col>
- <a-col :span="8">单位</a-col>
- <a-col :span="8">品种系数</a-col>
- </a-row>
- </template>
- <template v-for="(item, i) in selctedMG.dglist"
- :key="i + '33'">
- <a-row class="contRow">
- <a-col :span="8">{{item.data.deliverygoodsname}}</a-col>
- <a-col :span="8">{{item.data.agreeunit}}</a-col>
- <a-col :span="8">{{item.data.enumdicname}}</a-col>
- </a-row>
- <a-collapse>
- <template #expandIcon="props">
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-if="props.isActive == 0">
- <use xlink:href="#icon-shouqi1"></use>
- </svg>
- <svg class="icon svg-icon"
- aria-hidden="true"
- v-else>
- <use xlink:href="#icon-shouqi2"></use>
- </svg>
- </template>
- <a-collapse-panel>
- <template #header>
- <a-row class="headRow">
- <a-col :span="8">品类({{item.gmlist.length}})</a-col>
- <a-col :span="8">单位</a-col>
- <a-col :span="8">标仓系数</a-col>
- </a-row>
- </template>
- <a-row class="contRow"
- v-for="(sub) in item.gmlist"
- :key="sub.goodsid">
- <a-col :span="8">{{sub.wrstandardname}}</a-col>
- <a-col :span="8">{{sub.enumdicname}}</a-col>
- <a-col :span="8">{{sub.convertfactor}}</a-col>
- </a-row>
- </a-collapse-panel>
- </a-collapse>
- </template>
- </a-collapse-panel>
- </a-collapse>
- </div>
- <HedgingDetail />
- <HedgingModify />
- </div>
- </template>
- <script lang="ts">
- import { defineComponent, PropType } from 'vue';
- import { getGoodsUnit } from '@/views/information/goods/list/spot-variety/setup';
- import { initMG } from '@/views/information/goods/list/hedging-variety/setup';
- import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
- import { initData } from '@/common/methods';
- import HedgingModify from '../hedgingModify/index.vue';
- import HedgingDetail from '../spotDetail/index.vue';
- import { BtnList } from '@/common/export/table';
- import { getThirdMenuData, handleBtnList } from '@/common/setup/table/button';
- export default defineComponent({
- name: 'rightHedging',
- props: {
- selctedMG: {
- default: initMG,
- type: Object as PropType<ErmcpDeliveryGoodsDetailEx>,
- },
- isNormal: {
- default: true,
- type: Boolean,
- },
- },
- components: {
- BtnList,
- HedgingDetail,
- HedgingModify,
- },
- setup(props, context) {
- const menuList = getThirdMenuData();
- const temp = menuList.find((e) => e.code === 'goods_info_hedge');
- let list = undefined;
- if (temp) {
- list = temp.children.find((e) => e.code === 'goods_info_hedge_normal');
- }
- const { forDataBtn } = handleBtnList(list, 'goods_info_hedge_normal', true);
- initData(() => {});
- return { getGoodsUnit, forDataBtn };
- },
- });
- </script>
- <style lang="less">
- .rightSpot {
- width: 100%;
- height: 100%;
- padding: 10px 12px;
- .flex;
- flex-direction: column;
- .title {
- width: 100%;
- height: 35px;
- .flex;
- justify-content: space-between;
- div {
- align-self: center;
- align-items: center;
- }
- .tltLeft {
- font-size: 16px;
- .icon {
- font-size: 20px;
- fill: @m-blue0;
- margin-right: 10px;
- }
- }
- .tltBtns {
- .ant-btn + .ant-btn {
- margin-left: 10px;
- }
- }
- }
- .spotCont {
- width: 100%;
- padding: 0 30px;
- }
- }
- .blue {
- color: @m-blue0;
- }
- .green {
- color: @m-green0;
- }
- .ml10 {
- margin-left: 10px;
- }
- .blueBtn {
- width: 80px;
- height: 26px;
- text-align: center;
- background: linear-gradient(0deg, @m-blue2, @m-blue0);
- box-shadow: -1px 0px 0px 0px #121618;
- .rounded-corners(3px);
- border: 0;
- color: @m-white0;
- font-size: 14px;
- &:hover,
- &:focus {
- background: linear-gradient(0deg, @m-blue2-hover, @m-blue0-hover);
- color: @m-white0-hover;
- }
- }
- .redBtn {
- width: 80px;
- height: 26px;
- background: linear-gradient(0deg, @m-red0, @m-red1);
- .rounded-corners(3px);
- border: 0;
- color: @m-white0;
- font-size: 14px;
- &:hover,
- &:focus {
- background: linear-gradient(0deg, @m-red0-hover, @m-red1-hover);
- color: @m-white0-hover;
- }
- }
- .ant-collapse {
- background-color: transparent;
- border: 0;
- .ant-collapse-item {
- border: 0;
- .ant-collapse-header {
- background-color: transparent;
- border-bottom: 0;
- }
- .ant-collapse-content {
- background-color: transparent;
- border-top: 0;
- }
- }
- }
- // .ant-collapse.spotCollapse.ant-collapse-borderless {
- // margin-top: 10px;
- // background-color: transparent;
- // .ant-collapse-item {
- // border-bottom: 0;
- // .ant-collapse-header {
- // color: @m-grey17;
- // font-size: 14px;
- // border-bottom: 1px solid @m-grey18;
- // padding: 10px 8px 10px 44px;
- // height: 43px;
- // .ant-collapse-arrow {
- // fill: @m-grey17;
- // width: 16px;
- // height: 16px;
- // font-size: 16px;
- // left: 0;
- // }
- // }
- // .ant-collapse-content {
- // .ant-collapse-content-box {
- // padding: 0 0 0 30px;
- // background-color: transparent;
- // .ant-row.contRow {
- // width: 100%;
- // height: 40px;
- // line-height: 40px;
- // font-size: 16px;
- // color: @m-white1;
- // margin-bottom: 10px;
- // background: #0f161c;
- // border: 1px solid #172b56;
- // border-radius: 3px;
- // padding-left: 14px;
- // padding-right: 12px;
- // .ant-col:last-child {
- // text-align: right;
- // }
- // .ant-col:first-child {
- // text-align: left;
- // }
- // }
- // .contRow:first-child {
- // margin-top: 9px;
- // }
- // .contRow:last-child {
- // margin-bottom: 20px;
- // }
- // }
- // }
- // }
- // }
- </style>;
|