skyblued vor 2 Jahren
Ursprung
Commit
6ab1c5ada8
1 geänderte Dateien mit 13 neuen und 2 gelöschten Zeilen
  1. 13 2
      src/student/trade/list/index.tsx

+ 13 - 2
src/student/trade/list/index.tsx

@@ -91,6 +91,7 @@ export default defineComponent({
       this.loading = false
     },
     onDetail(item: any) {
+      if (this.type === 'refund') return
       this.$router.push({
         path: '/tradeDetail',
         query: {
@@ -221,7 +222,11 @@ export default defineComponent({
               >
                 <Cell
                   title={dayjs(item.createTime).format('YYYY-MM-DD HH:mm')}
-                  value={this.type ==='buy' ? orderType[item.status] : returnType[item.status]}
+                  value={
+                    this.type === 'buy'
+                      ? orderType[item.status]
+                      : returnType[item.status]
+                  }
                   valueClass={styles.tradeType}
                 />
                 <Cell
@@ -239,7 +244,13 @@ export default defineComponent({
                       <div class={styles.content}>
                         <span class={styles.price}>
-                          {(this as any).$filters.moneyFormat(item.actualPrice || item.actualAmount)}
+                          {this.type === 'buy'
+                            ? (this as any).$filters.moneyFormat(
+                                item.actualPrice
+                              )
+                            : (this as any).$filters.moneyFormat(
+                                item.actualAmount
+                              )}
                         </span>
                       </div>
                     )