huangbin 4 år sedan
förälder
incheckning
07b33c2a92

+ 13 - 13
src/common/constants/enumsName.ts

@@ -3,8 +3,8 @@ import * as EnumType from './enumCommon';
 
 /**
  * 获取证件类型枚举名称
- * @param enumdicid 
- * @returns 
+ * @param enumdicid
+ * @returns
  */
 export function getCardTypeEnumItemName(enumdicid: number): string {
     return getItemEnumName('certificatetype', enumdicid)
@@ -364,7 +364,7 @@ export function getContractName(type: number): string {
     return result
 }
 
-export function getFinancingStatus(status: number, price: String) : String{
+export function getFinancingStatus(status: number, price: String): String {
     let result = "--";
     switch (status) {
         case 1:
@@ -487,8 +487,8 @@ export function getWeekName(type: string): string {
 
 /**
  * 获取对应协议枚举对应名
- * @param type 
- * @returns 
+ * @param type
+ * @returns
  */
 export function getAgreementTypeName(type: EnumType.AgreementType): string {
     let result = '--'
@@ -562,7 +562,7 @@ export function getChangeLogType(changelogtype: number) {
 
 //仓单委托状态
 // 委托状态 - 1:委托请求 2:待冻结 3:委托成功 4:委托失败 5:配对成功 6:已撤 7:已成 8:成交失败 9:委托拒绝 10:挂牌部分成交 11:仓单生成失败 12:首付扣款失败 13:履约失败 14:撤单解冻贷款失败 15:部成部撤
-export function getWrTradeOrderStatusName(type: number){
+export function getWrTradeOrderStatusName(type: number) {
     let result = '--'
     switch (type) {
         case 1:
@@ -619,15 +619,15 @@ export function getWrTradeOrderStatusName(type: number){
  * @param buyOrSell 买卖 - 0:买 1:卖(挂牌类型 买为采购 卖为销售)
  * @param wrTradeType 1:挂牌 2:摘牌
  */
-export function getWrOrderTypeName(buyOrSell: number, wrTradeType: number){
+export function getWrOrderTypeName(buyOrSell: number, wrTradeType: number) {
     let result = '--'
-    if(buyOrSell === 0 && wrTradeType === 1){
+    if (buyOrSell === 0 && wrTradeType === 1) {
         result = "买入"
-    }else if(buyOrSell === 1 && wrTradeType === 1){
+    } else if (buyOrSell === 1 && wrTradeType === 1) {
         result = "卖出"
-    }else if(buyOrSell === 0 && wrTradeType === 2){
+    } else if (buyOrSell === 0 && wrTradeType === 2) {
         result = "买入"
-    }else if(buyOrSell === 1 && wrTradeType === 2){
+    } else if (buyOrSell === 1 && wrTradeType === 2) {
         result = "卖出"
     }
     return result
@@ -730,7 +730,7 @@ export function getPerformanceStatusName(type: number) {
 /**
  * 付款方式 - 1:冻结 2:扣款
  */
-export function getPaymentTypeName(type: number){
+export function getPaymentTypeName(type: number) {
     let result = '--'
     switch (type) {
         case 1:
@@ -754,7 +754,7 @@ export function getPaymentTypeName(type: number){
  * 904:商城收款 1001:期权冻结 1002:期权解冻 1003:期权权力金 1004:期权手续费冻结 1005:期权手续费解冻 1006:期权手续费 1007:期权盈亏 1101:营销扣款 1102:营销收款
  * @param type
  */
-export function getOperateTypeName(type: number){
+export function getOperateTypeName(type: number) {
     let result = '--'
     switch (type) {
         case 101:

+ 78 - 80
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/components/choose-finance/index.vue

@@ -1,89 +1,87 @@
 <template>
-    <!-- 仓单贸易&仓单预售 融资-->
+  <!-- 仓单贸易&仓单预售 融资-->
 
-    <Drawer
-        :title="'选择融资方案'"
-        :placement="'top'"
-        :visible="visible"
-        width="486px"
-        height="479px"
-        @cancel="update"
-        class="top financing"
-    >
-        <div class="financingCont">
-            <a-row class="f-t">
-                <a-col :span="7">融出方/名称</a-col>
-                <a-col :span="10">天数/保证金/利息</a-col>
-                <a-col :span="7">结息/起息天数</a-col>
+  <Drawer :title="'选择融资方案'"
+          :placement="'top'"
+          :visible="visible"
+          width="486px"
+          height="580px"
+          @cancel="update"
+          class="top financing">
+    <div class="financingCont">
+      <a-row class="f-t">
+        <a-col :span="7">融出方/名称</a-col>
+        <a-col :span="10">天数/保证金/利息</a-col>
+        <a-col :span="7">结息/起息天数</a-col>
+      </a-row>
+      <div class="contBar">
+        <a-row class="firstRow">
+          <a-col :span="7">铜供应链金融</a-col>
+          <a-col :span="17">放款快</a-col>
+        </a-row>
+        <a-row class="secondRow">
+          <a-col :span="7">铜杆帮你采</a-col>
+          <a-col :span="10">
+            <a-row class="middle">
+              <a-col :span="7">30天</a-col>
+              <a-col :span="10">30%</a-col>
+              <a-col :span="7">11%</a-col>
             </a-row>
-            <div class="contBar">
-                <a-row class="firstRow">
-                    <a-col :span="7">铜供应链金融</a-col>
-                    <a-col :span="17">放款快</a-col>
-                </a-row>
-                <a-row class="secondRow">
-                    <a-col :span="7">铜杆帮你采</a-col>
-                    <a-col :span="10">
-                        <a-row class="middle">
-                            <a-col :span="7">30天</a-col>
-                            <a-col :span="10">30%</a-col>
-                            <a-col :span="7">11%</a-col>
-                        </a-row>
-                    </a-col>
-                    <a-col :span="7">
-                        <div class="settle">
-                            <div>日结</div>
-                            <div>1天起息</div>
-                        </div>
-                    </a-col>
-                </a-row>
+          </a-col>
+          <a-col :span="7">
+            <div class="settle">
+              <div>日结</div>
+              <div>1天起息</div>
             </div>
-            <div class="contBar">
-                <a-row class="firstRow">
-                    <a-col :span="7">铜供应链金融</a-col>
-                    <a-col :span="17">放款快</a-col>
-                </a-row>
-                <a-row class="secondRow">
-                    <a-col :span="7">铜杆帮你采</a-col>
-                    <a-col :span="10">
-                        <a-row class="middle">
-                            <a-col :span="7">30天</a-col>
-                            <a-col :span="10">30%</a-col>
-                            <a-col :span="7">11%</a-col>
-                        </a-row>
-                    </a-col>
-                    <a-col :span="7">
-                        <div class="settle">
-                            <div>日结</div>
-                            <div>1天起息</div>
-                        </div>
-                    </a-col>
-                </a-row>
+          </a-col>
+        </a-row>
+      </div>
+      <div class="contBar">
+        <a-row class="firstRow">
+          <a-col :span="7">铜供应链金融</a-col>
+          <a-col :span="17">放款快</a-col>
+        </a-row>
+        <a-row class="secondRow">
+          <a-col :span="7">铜杆帮你采</a-col>
+          <a-col :span="10">
+            <a-row class="middle">
+              <a-col :span="7">30天</a-col>
+              <a-col :span="10">30%</a-col>
+              <a-col :span="7">11%</a-col>
+            </a-row>
+          </a-col>
+          <a-col :span="7">
+            <div class="settle">
+              <div>日结</div>
+              <div>1天起息</div>
             </div>
-            <div class="contBar">
-                <a-row class="firstRow">
-                    <a-col :span="7">铜供应链金融</a-col>
-                    <a-col :span="17">放款快</a-col>
-                </a-row>
-                <a-row class="secondRow">
-                    <a-col :span="7">铜杆帮你采</a-col>
-                    <a-col :span="10">
-                        <a-row class="middle">
-                            <a-col :span="7">30天</a-col>
-                            <a-col :span="10">30%</a-col>
-                            <a-col :span="7">11%</a-col>
-                        </a-row>
-                    </a-col>
-                    <a-col :span="7">
-                        <div class="settle">
-                            <div>日结</div>
-                            <div>1天起息</div>
-                        </div>
-                    </a-col>
-                </a-row>
+          </a-col>
+        </a-row>
+      </div>
+      <div class="contBar">
+        <a-row class="firstRow">
+          <a-col :span="7">铜供应链金融</a-col>
+          <a-col :span="17">放款快</a-col>
+        </a-row>
+        <a-row class="secondRow">
+          <a-col :span="7">铜杆帮你采</a-col>
+          <a-col :span="10">
+            <a-row class="middle">
+              <a-col :span="7">30天</a-col>
+              <a-col :span="10">30%</a-col>
+              <a-col :span="7">11%</a-col>
+            </a-row>
+          </a-col>
+          <a-col :span="7">
+            <div class="settle">
+              <div>日结</div>
+              <div>1天起息</div>
             </div>
-        </div>
-    </Drawer>
+          </a-col>
+        </a-row>
+      </div>
+    </div>
+  </Drawer>
 </template>
 
 <script lang="ts">

+ 16 - 7
src/views/market/spot_trade/components/buy-sell-market/components/financing_delisting/index.vue

@@ -87,11 +87,11 @@
             <a-col :span="24"
                    class="mt-10">
               <a-form-item label="融资方案"
+                           @click="openComponent({code: 'ChooseFinance'})"
                            name="case">
                 <div class="way">
                   <div class="left">铜供应链金融-铜杆帮你采-30天-10%-11%-按日结息-1天起息</div>
-                  <div class="right"
-                       @click="showAction">
+                  <div class="right">
                     <svg class="icon svg-icon"
                          aria-hidden="true">
                       <use xlink:href="#icon-fangan" />
@@ -126,13 +126,18 @@
       </div>
     </div>
   </Drawer>
-  <ChooseFinance v-if="show"
-                 @cancel="showAction" />
+  <!-- <ChooseFinance v-if="show"
+                 @cancel="showAction" /> -->
+  <component :is="componentId"
+             v-if="componentId"
+             :selectedRow="selectedRow"
+             @cancel="closeComponent">
+  </component>
 </template>
 
 <script lang="ts">
 import { PlusOutlined, MinusOutlined } from '@ant-design/icons-vue';
-import { defineComponent, PropType, ref } from 'vue';
+import { defineAsyncComponent, defineComponent, PropType, ref } from 'vue';
 import Drawer from '@/common/components/drawer/index.vue';
 import { WrOrderQuote, WrOrderQuoteDetail } from '@/services/go/wrtrade/interface';
 import { getAccountTypeList, getSelectedAccountId, getUserId } from '@/services/bus/account';
@@ -148,10 +153,10 @@ import { validateAction } from '@/common/setup/form';
 import { ListingForm } from './interface';
 import { BuyOrSell } from '@/common/constants/enumCommon';
 import { EnumRouterName } from '@/common/constants/enumRouterName';
-import ChooseFinance from './components/choose-finance/index.vue';
+import { handleModalComponent } from '@/common/setup/asyncComponent';
 export default defineComponent({
     name: ModalEnum.spot_trade_warehouse_delisting,
-    components: { Drawer, PlusOutlined, MinusOutlined, ChooseFinance },
+    components: { Drawer, ChooseFinance: defineAsyncComponent(() => import('./components/choose-finance/index.vue')) },
     emits: ['cancel'],
     props: {
         enumName: {
@@ -182,6 +187,7 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         const { isSale, isBuy, isFloat } = handleIs(props.enumName, props.buyOrSell);
         const { wrHoldList } = handleSpotWarrant(props.enumName, props.buyOrSell, props.parantSelectedRow, loading);
+        const { componentId, closeComponent, openComponent } = handleModalComponent(() => {}, ref({}));
 
         const show = ref<boolean>(false);
         function showAction() {
@@ -238,6 +244,9 @@ export default defineComponent({
             formRef,
             show,
             showAction,
+            componentId,
+            closeComponent,
+            openComponent,
         };
     },
 });