Browse Source

commit 履约相关枚举提交

yu jie 4 năm trước cách đây
mục cha
commit
e5892d4f69

+ 108 - 0
src/common/constants/enumsName.ts

@@ -622,6 +622,114 @@ export function getWrOrderTypeName(buyOrSell: number, wrTradeType: number){
         result = "卖入"
     }
     return result
+}
 
+/**
+ * 履约类型 - 0:通用 1:交割 2:仓单贸易 3:预售集采 4:竞拍-降价式 (无仓单) 5:挂牌期权 6:竞拍-降价式 7:竞拍-竞价式 8:竞拍-大宗式 9:荷兰式 10:法币C2C 11:报价系统 12:挂牌系统
+ * @param type
+ */
+export function getPerformanceTypeName(type: number) {
+    let result = '--'
+    switch (type) {
+        case 0:
+            result = '通用'
+            break
+        case 1:
+            result = '交割'
+            break
+        case 2:
+            result = '仓单贸易'
+            break
+        case 3:
+            result = '预售集采'
+            break
+        case 4:
+            result = '竞拍-降价式'
+            break
+        case 5:
+            result = '挂牌期权'
+            break
+        case 6:
+            result = '竞拍-降价式'
+            break
+        case 7:
+            result = '竞拍-竞价式'
+            break
+        case 8:
+            result = '竞拍-大宗式'
+            break
+        case 9:
+            result = '荷兰式'
+            break
+        case 10:
+            result = '法币C2C'
+            break
+        case 11:
+            result = '报价系统'
+            break
+        case 12:
+            result = '挂牌系统'
+            break
+    }
+    return result
+}
 
+/**
+ * 履约状态 1:初始化 2:正常 3:处理错误 4:违约待处理 5:违约处理中 6:完成 7.违约已完成 8:释放冻结失败 9:超时待处理 10:超时关闭
+ * @param type
+ */
+export function getPerformanceStatusName(type: number) {
+    let result = '--'
+    switch (type) {
+        case 0:
+            result = '初始化'
+            break
+        case 1:
+            result = '正常'
+            break
+        case 2:
+            result = '处理错误'
+            break
+        case 3:
+            result = '处理错误'
+            break
+        case 4:
+            result = '违约待处理'
+            break
+        case 5:
+            result = '违约处理中'
+            break
+        case 6:
+            result = '完成'
+            break
+        case 7:
+            result = '违约已完成'
+            break
+        case 8:
+            result = '释放冻结失败'
+            break
+        case 9:
+            result = '超时待处理'
+            break
+        case 10:
+            result = '超时关闭'
+            break
+    }
+    return result
+}
+
+/**
+ * 付款方式 - 1:冻结 2:扣款
+ */
+export function getPaymentTypeName(type: number){
+    let result = '--'
+    switch (type) {
+        case 1:
+            result = '冻结'
+            break
+        case 2:
+            result = '扣款'
+            break
+    }
+    return result
 }

+ 23 - 0
src/views/order/performance_information/components/performance_information_buy_performance/index.vue

@@ -16,6 +16,25 @@
                  :record="record"
                  @click="openComponent" />
       </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ record }">
+            <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
+        </template>
+
+        <!-- 付款方式 -->
+        <template #paymenttype="{ record }">
+            <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
+        </template>
+
+        <!-- 履约状态 -->
+        <template #performancestatus="{ record }">
+            <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
+        </template>
+
+        <!-- 当前步骤 -->
+        <template #curstepname="{ record }">
+            <a>{{ record.curstepname }}</a>
+        </template>
     </a-table>
     <component :is="componentId"
                v-if="componentId"
@@ -32,6 +51,7 @@ import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrad
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
+import {getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName} from "@/common/constants/enumsName";
 export default defineComponent({
     name: enumOrderComponents.performance_information_buy_performance,
     components: {
@@ -61,6 +81,9 @@ export default defineComponent({
             ...handleComposeOrderTable<WrPerformancePlan>(param),
             loading,
             tableList,
+            getPerformanceTypeName,
+            getPerformanceStatusName,
+            getPaymentTypeName,
         };
     },
 });

+ 23 - 0
src/views/order/performance_information/components/performance_information_sell_performance/index.vue

@@ -16,6 +16,25 @@
                  :record="record"
                  @click="openComponent" />
       </template>
+        <!-- 履约类型 -->
+        <template #performancetype="{ record }">
+            <a>{{ getPerformanceTypeName(record.performancetype) }}</a>
+        </template>
+
+        <!-- 付款方式 -->
+        <template #paymenttype="{ record }">
+            <a>{{ getPaymentTypeName(record.paymenttype) }}</a>
+        </template>
+
+        <!-- 履约状态 -->
+        <template #performancestatus="{ record }">
+            <a>{{ getPerformanceStatusName(record.performancestatus) }}</a>
+        </template>
+
+        <!-- 当前步骤 -->
+        <template #curstepname="{ record }">
+            <a>{{ record.curstepname }}</a>
+        </template>
     </a-table>
     <component :is="componentId"
                v-if="componentId"
@@ -32,6 +51,7 @@ import { QueryPerformancePlanReq, WrPerformancePlan } from '@/services/go/wrtrad
 import { getRecordItemTab } from '@/common/setup/order/orderData';
 import { handleComposeOrderTable } from '@/common/setup/table/compose';
 import { ComposeOrderTableParam } from '@/common/setup/table/interface';
+import {getPaymentTypeName, getPerformanceStatusName, getPerformanceTypeName} from "@/common/constants/enumsName";
 export default defineComponent({
     name: enumOrderComponents.performance_information_sell_performance,
     components: {
@@ -61,6 +81,9 @@ export default defineComponent({
             ...handleComposeOrderTable<WrPerformancePlan>(param),
             loading,
             tableList,
+            getPerformanceTypeName,
+            getPaymentTypeName,
+            getPerformanceStatusName,
         };
     },
 });