ソースを参照

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP20_WEB_GLOBAL

li.shaoyi 2 年 前
コミット
eb01f899b1

+ 43 - 0
src/constants/order.ts

@@ -33,6 +33,12 @@ export enum WrTradeType {
     DeListing = 2,
 }
 
+/// 支付状态
+export enum PayStatus {
+    UnPay = 1,
+    Pay = 2,
+}
+
 /**
  * 获取买卖方向列表
  * @returns 
@@ -253,4 +259,41 @@ export function getPerformanceTypeList() {
 export function getPerformanceTypeName(value: number) {
     const enums = getPerformanceTypeList()
     return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取预售持仓状态列表
+ * @returns 
+ */
+export function getHandleStatusList() {
+    return getEnumTypeList('handlestatus')
+}
+
+/**
+ * 获取预售持仓状态名称
+ * @returns 
+ */
+export function getHandleStatusName(value: number) {
+    const enums = getHandleStatusList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
+ * 获取支付状态列表
+ * @returns 
+ */
+export function getPayStatusList() {
+    return [
+        { label: '未支付', value: PayStatus.UnPay },
+        { label: '已支付', value: PayStatus.Pay },
+    ]
+}
+
+/**
+ * 获取支付状态名称
+ * @returns 
+ */
+export function getPayStatusName(value: number) {
+    const enums = getPayStatusList()
+    return getEnumTypeName(enums, value)
 }

+ 2 - 1
src/packages/mobile/views/order/list/components/presale/list/Index.vue

@@ -10,7 +10,7 @@
                         <span>{{ item.orderid }}</span>
                     </div>
                     <div class="right">
-                        <span>{{ item.orderstatus }}</span>
+                        <span>{{ getOrderStatusName(item.orderstatus) }}</span>
                     </div>
                 </div>
                 <div class="g-order-list__content">
@@ -71,6 +71,7 @@ import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradeOrderDetails } from '@/services/api/presale'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getOrderStatusName } from '@/constants/order'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],

+ 2 - 1
src/packages/mobile/views/order/list/components/transferorder/detail/Index.vue

@@ -12,7 +12,7 @@
                     <Cell title="转让价" :value="selectedRow.orderprice" />
                     <Cell title="订货价" :value="selectedRow.presaleprice" />
                     <Cell title="摘牌数量" :value="selectedRow.tradeqty" />
-                    <Cell title="委托状态" :value="selectedRow.orderstatus" />
+                    <Cell title="委托状态" :value="getOrderStatusName(selectedRow.orderstatus)" />
                     <Cell title="委托时间" :value="selectedRow.ordertime" />
                     <Cell title="委托单号" :value="selectedRow.orderid" />
                 </CellGroup>
@@ -25,6 +25,7 @@
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
+import { getOrderStatusName } from '@/constants/order'
 
 defineProps({
     selectedRow: {

+ 2 - 1
src/packages/mobile/views/order/list/components/transferorder/list/Index.vue

@@ -10,7 +10,7 @@
                         <span>{{ item.orderid }}</span>
                     </div>
                     <div class="right">
-                        <span>{{ item.orderstatus }}</span>
+                        <span>{{ getOrderStatusName(item.orderstatus) }}</span>
                     </div>
                 </div>
                 <div class="g-order-list__content">
@@ -54,6 +54,7 @@ import { EOperateType } from '@/constants/client'
 import { queryMineTradeOrders } from '@/services/api/transfer'
 import { useCancelOrder } from '@/business/trade'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getOrderStatusName } from '@/constants/order'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],

+ 2 - 1
src/packages/mobile/views/order/list/components/transfertrade/detail/Index.vue

@@ -8,7 +8,7 @@
             <div class="g-form__container">
                 <CellGroup title="预售认购信息">
                     <Cell title="商品代码/名称" :value="selectedRow.goodsname" />
-                    <Cell title="方向" :value="selectedRow.buyorsell" />
+                    <Cell title="方向" :value="getBuyOrSellName(selectedRow.buyorsell)" />
                     <Cell title="转让数量" :value="selectedRow.tradeqty" />
                     <Cell title="转让价" :value="selectedRow.tradeprice" />
                     <Cell title="订货价" :value="selectedRow.presaleprice" />
@@ -26,6 +26,7 @@
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
 import AppModal from '@/components/base/modal/index.vue'
+import { getBuyOrSellName } from '@/constants/order'
 
 defineProps({
     selectedRow: {

+ 2 - 1
src/packages/mobile/views/order/list/components/transfertrade/list/Index.vue

@@ -10,7 +10,7 @@
                         <span>{{ item.orderid }}</span>
                     </div>
                     <div class="right">
-                        <span>{{ item.buyorsell }}</span>
+                        <span>{{ getBuyOrSellName(item.buyorsell) }}</span>
                     </div>
                 </div>
                 <div class="g-order-list__content">
@@ -54,6 +54,7 @@ import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradeTradeDetails } from '@/services/api/transfer'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getBuyOrSellName } from '@/constants/order'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],

+ 47 - 1
src/packages/mobile/views/order/position/components/presale/detail/Index.vue

@@ -1,7 +1,53 @@
 <!-- 我的持仓-预售持仓-详情 -->
 <template>
-    详情
+    <app-modal direction="right" height="100%" v-model:show="showModal">
+        <app-view class="g-form">
+            <template #header>
+                <app-navbar title="转让持仓详情" @back="closed" />
+            </template>
+            <div class="g-form__container">
+                <CellGroup title="预售持仓信息">
+                    <Cell title="商品代码/名称" :value="selectedRow.goodsname+'/'+selectedRow.goodscode" />
+                    <Cell title="发售方" :value="selectedRow.sellname" />
+                    <Cell title="开始日期" :value="formatDate(selectedRow.starttime)" />
+                    <Cell title="结束日期" :value="formatDate(selectedRow.endtime)" />
+                    <Cell title="认购数量" :value="selectedRow.tradeqty" />
+                    <Cell title="预售价" :value="selectedRow.openprice" />
+                    <Cell title="总货款" :value="selectedRow.tradeamount" />
+                    <Cell title="转让定金比例" :value="selectedRow.transferdepositratio" />
+                    <Cell title="转让订金" :value="selectedRow.transferdeposit" />
+                    <Cell title="未付订金" :value="selectedRow.depositremain" />
+                    <Cell title="支付状态" :value="getPayStatusName(selectedRow.paystatus)" />
+                    <Cell title="成交单号" :value="selectedRow.tradeid" />
+                </CellGroup>
+            </div>
+        </app-view>
+    </app-modal>
 </template>
 
 <script lang="ts" setup>
+import { shallowRef, PropType } from 'vue'
+import { CellGroup, Cell } from 'vant'
+import AppModal from '@/components/base/modal/index.vue'
+import { formatDate } from '@/filters'
+import { getPayStatusName } from '@/constants/order'
+
+defineProps({
+    selectedRow: {
+        type: Object as PropType<Model.MineCpTradePreSaleResultsRsp>,
+        required: true,
+    }
+})
+
+const showModal = shallowRef(true)
+
+// 关闭弹窗
+const closed = () => {
+    showModal.value = false
+}
+
+// 暴露组件属性给父组件调用
+defineExpose({
+    closed,
+})
 </script>

+ 2 - 1
src/packages/mobile/views/order/position/components/presale/list/Index.vue

@@ -9,7 +9,7 @@
                         <h4>{{ item.goodsname }}</h4>
                     </div>
                     <div class="right">
-                        <span>{{ item.handlestatus }}</span>
+                        <span>{{ getHandleStatusName(item.handlestatus) }}</span>
                     </div>
                 </div>
                 <div class="g-order-list__content">
@@ -68,6 +68,7 @@ import { useRequest } from '@/hooks/request'
 import { queryMineCpTradePreSaleResults } from '@/services/api/presale'
 import { makeUpDeposit } from '@/services/api/trade'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { getHandleStatusName } from '@/constants/order'
 
 const componentMap = new Map<string, unknown>([
     ['detail', defineAsyncComponent(() => import('../detail/Index.vue'))],

+ 2 - 1
src/packages/mobile/views/order/position/components/transfer/detail/Index.vue

@@ -18,7 +18,7 @@
                     <Cell title="转让订金比例" :value="selectedRow.transferdepositratio" />
                     <Cell title="转让订金" :value="selectedRow.transferdeposit" />
                     <Cell title="未付订金" :value="selectedRow.depositremain" />
-                    <Cell title="支付状态" :value="selectedRow.paystatus" />
+                    <Cell title="支付状态" :value="getPayStatusName(selectedRow.paystatus)" />
                     <Cell title="最后交易日" :value="selectedRow.lasttradedate" />
                 </CellGroup>
             </div>
@@ -29,6 +29,7 @@
 <script lang="ts" setup>
 import { shallowRef, PropType } from 'vue'
 import { CellGroup, Cell } from 'vant'
+import { getPayStatusName } from '@/constants/order'
 import AppModal from '@/components/base/modal/index.vue'
 
 defineProps({

+ 2 - 1
src/packages/mobile/views/order/position/components/transfer/list/Index.vue

@@ -9,7 +9,7 @@
                         <h4>{{ item.goodsname }}</h4>
                     </div>
                     <div class="right">
-                        <span>{{ item.paystatus }}</span>
+                        <span>{{ getPayStatusName(item.paystatus) }}</span>
                     </div>
                 </div>
                 <div class="g-order-list__content">
@@ -71,6 +71,7 @@ import { useComponent } from '@/hooks/component'
 import { useRequest } from '@/hooks/request'
 import { queryMineTradePositionExs } from '@/services/api/transfer'
 import { holdAppendDeposit } from '@/services/api/trade'
+import { getPayStatusName } from '@/constants/order'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
 const componentMap = new Map<string, unknown>([

+ 1 - 1
src/stores/modules/enum.ts

@@ -12,7 +12,7 @@ export interface EnumType {
     disabled?: boolean;
 }
 
-const enumKeys = ['clientType', 'scoreConfigType', 'performanceStatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2'] as const
+const enumKeys = ['clientType', 'scoreConfigType', 'GZBSCPayStatus', 'performanceStatus', 'handlestatus', 'performanceType', 'accountBusinessCode', 'certificatetype', 'signstatus', 'thjOrderStatus', 'THJDeliveryMode', 'goodsunit', 'WROutInApplyStatus2', 'THJTransferStatus', 'WRTradeOrderStatus', 'THJMarket', 'THJProfitRoleType', 'appointmentModelOut', 'orderstatus', 'Pricemode2'] as const
 
 const enumMap = new Map<typeof enumKeys[number], ShallowRef<Model.EnumRsp[]>>()