Handy_Cao 2 yıl önce
ebeveyn
işleme
acb51dc0b2

+ 5 - 1
src/packages/mobile/views/swap/detail/Index.vue

@@ -24,7 +24,7 @@
                         <span>{{ row.userid }}/{{ row.username }}</span>
                     </template>
                     <template #operate="{ row }">
-                        <Button size="small" type="primary" :disabled="status(row) === 2 || status(row) === 3 " round @click="onDelisting(row)">
+                        <Button size="small" type="primary" :disabled="isDisable(row)">
                             {{ getDelistingButtonTitles(tabIndex, row) }}
                         </Button>
                     </template>
@@ -81,6 +81,10 @@ const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
     }
 })
 
+const isDisable = (row: Model.TjmdTradeOrderDetailRsp) => {
+    return row.userid === getUserId() || (status(row) === 2 || status(row) === 3)
+}
+
 const status = (row: Model.TjmdTradeOrderDetailRsp) => {
     return protocolList.value.find((e) => e.areauserid === row.userid)?.protocolstatus ?? 1
 }

+ 5 - 1
src/packages/pc/views/market/trade/swap/detail/order/index.vue

@@ -16,7 +16,7 @@
             <!-- 展开行 -->
             <template #expand="{ row }">
                 <div class="buttonbar">
-                    <el-button type="primary" size="small" :disabled="row.userid === loginStore.userId"
+                    <el-button type="primary" size="small" :disabled="isDisable(row)"
                         @click="onDelisting(row)">{{ getDelistingButtonTitles( 1, row ) }}</el-button>
                 </div>
             </template>
@@ -65,6 +65,10 @@ const { dataList: protocolList} = useRequest(queryMdUserSwapProtocol, {
     }
 })
 
+const isDisable = (row: Model.TjmdTradeOrderDetailRsp) => {
+    return row.userid === getUserId() || (status(row) === 2 || status(row) === 3)
+}
+
 const status = (row: Model.TjmdTradeOrderDetailRsp) => {
     return protocolList.value.find((e) => e.areauserid === row.userid)?.protocolstatus ?? 1
 }