Handy_Cao 2 anni fa
parent
commit
54c744deea

+ 1 - 0
src/packages/mobile/views/bank/wallet/components/withdraw/index.less

@@ -18,5 +18,6 @@
     .g-form__time {
         color: #999;
         padding-left: 15px;
+        padding-top: 10px;
     }
 }

+ 2 - 3
src/packages/mobile/views/swap/detail/Index.vue

@@ -48,7 +48,7 @@ import { useFuturesStore } from '@/stores'
 import { useLoginStore, useUserStore } from '@/stores'
 import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import AppList from '@mobile/components/base/list/index.vue'
-import { getMemberUserId, getUserId } from '@/services/methods/user'
+import { getUserId } from '@/services/methods/user'
 
 const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
 const Chart = defineAsyncComponent(() => import('@mobile/components/modules/quote/chart/index.vue'))
@@ -71,8 +71,7 @@ const futuresStore = useFuturesStore()
 const quote = futuresStore.getGoodsQuote(item.refgoodsid)
 const goodsCode = computed(() => quote.value?.goodscode ?? '')
 const userStore = useUserStore()
-/// 所属机构 ID
-const memberUserId = shallowRef(getMemberUserId())
+
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => onTabChange())
 
 /// 查询用户掉期协议签署表

+ 44 - 3
src/packages/pc/views/market/trade/swap/detail/order/index.vue

@@ -7,7 +7,7 @@
             <template #expand="{ row }">
                 <div class="buttonbar">
                     <el-button type="primary" size="small" :disabled="row.userid === loginStore.userId"
-                        @click="showComponent('delisting', row)">摘牌</el-button>
+                        @click="onDelisting(row)">{{ getDelistingButtonTitles( 0, row ) }}</el-button>
                 </div>
             </template>
         </app-table>
@@ -17,7 +17,7 @@
             <template #expand="{ row }">
                 <div class="buttonbar">
                     <el-button type="primary" size="small" :disabled="row.userid === loginStore.userId"
-                        @click="showComponent('delisting', row)">摘牌</el-button>
+                        @click="onDelisting(row)">{{ getDelistingButtonTitles( 1, row ) }}</el-button>
                 </div>
             </template>
         </app-table>
@@ -32,10 +32,12 @@ import { useRequest } from '@/hooks/request'
 import { BuyOrSell } from '@/constants/order'
 import { useComponent } from '@/hooks/component'
 import { useComposeTable } from '@pc/components/base/table'
-import { queryTjmdTradeOrderDetail } from '@/services/api/swap'
+import { queryTjmdTradeOrderDetail, queryMdUserSwapProtocol } from '@/services/api/swap'
 import { useLoginStore, useFuturesStore } from '@/stores'
 import AppTable from '@pc/components/base/table/index.vue'
 import eventBus from '@/services/bus'
+import { getUserId } from '@/services/methods/user'
+import { ElMessage } from 'element-plus'
 
 const props = defineProps({
     goodsId: {
@@ -56,6 +58,17 @@ const loginStore = useLoginStore()
 const futuresStore = useFuturesStore()
 const quote = futuresStore.getGoodsQuote(props.goodsId)
 
+/// 查询用户掉期协议签署表
+const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
+    params: {
+        userId: getUserId()
+    }
+})
+
+const status = (row: Model.TjmdTradeOrderDetailRsp) => {
+    return protocolList.value.find((e) => e.areauserid === row.userid)?.protocolstatus ?? 1
+}
+
 const { rowKey, expandKeys, selectedRow, rowClick } = useComposeTable<Model.TjmdTradeOrderDetailRsp>({ rowKey: 'orderid' })
 const { componentRef, componentId, openComponent, closeComponent } = useComponent(()=> {
     // 获取买大厅数据
@@ -64,6 +77,19 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
     getSellList()
 })
 
+const getDelistingButtonTitles = (tab: number, row: Model.TjmdTradeOrderDetailRsp) => {
+    switch (status(row)) {
+        case 1:
+            return '签署'
+        case 2:
+            return '待审核'
+        case 3:
+            return '待审核'
+        default:
+            return tab === BuyOrSell.Buy ? '卖出' : '买入'
+    }
+}
+
 const { dataList: buyList, run: getBuyList } = useRequest(queryTjmdTradeOrderDetail, {
     params: {
         pagesize: 20,
@@ -72,6 +98,21 @@ const { dataList: buyList, run: getBuyList } = useRequest(queryTjmdTradeOrderDet
     },
 })
 
+const onDelisting = (row: Model.TjmdTradeOrderDetailRsp) => {
+    switch (status(row)) {
+        case 4: /// 已签署
+        showComponent('delisting', row)
+            break;
+        case 1:  /// 未签署
+            /// 传对应的机构 ID
+            /// 进行下一步
+            ElMessage('请登录手机 App进行合同签署!')
+            break; 
+        default: /// 其他状态
+            break;
+    }
+}
+
 const { dataList: sellList, run: getSellList } = useRequest(queryTjmdTradeOrderDetail, {
     params: {
         pagesize: 20,

+ 2 - 12
src/packages/tjmd/views/account/certification/Index.vue

@@ -128,9 +128,8 @@ const onCheckCardNum = () => {
         }).then(() => {
             formSubmit().then(() => {
                 hideLoading()
-                dialog('提交请求成功').then(() => {
-                    /// 进行下一步
-                    router.push({name: 'account-protocol', query: { memberUserId: getMemberUserId().toString() }})
+                dialog('提交请求成功,请耐心等待审核!').then(() => {
+                    router.back()
                 })
             }).catch((err) => {
                 hideLoading(err, 'fail')
@@ -141,15 +140,6 @@ const onCheckCardNum = () => {
     })
 }
 
-// const onSubmit = () => {
-//     const isInclude = userESignRecords.value.some((e) => e.recordstatus === 1)
-//     if (!userESignRecords.value.length || isInclude) {
-//         formRef.value?.submit()
-//     } else {
-//         openComponent('certification-next')
-//     }
-// }
-
 onMounted(() => {
     formData.mobile = userStore.userInfo?.mobile2 ?? ''
 })

+ 1 - 1
src/services/http/index.ts

@@ -132,7 +132,7 @@ export default new (class {
      * @returns 
      */
     async commonRequest<T>(config: AxiosRequestConfig, errMsg?: string) {
-        const baseUrl = service.getConfig('goCommonSearchUrl')
+        const baseUrl = 'http://192.168.30.172:8082/api'//service.getConfig('goCommonSearchUrl')
         config.url = baseUrl + config.url
         const res = await this.request<CommonResult<T>>(config, errMsg)
         switch (res.code) {