李志伟 3 年前
父节点
当前提交
00307a12ab

+ 13
- 12
src/components/CompoentsOrder/OrderCard/index.jsx 查看文件

@@ -17,7 +17,7 @@ const CouponMedia = CouponCard.Media
17 17
 const Action = CouponCard.Action
18 18
 
19 19
 export default (props) => {
20
-  const { item, setShowCutover, show, sh } = props
20
+  const { item, setShowCutover, show, sh, kkp } = props
21 21
 
22 22
   const handleDetail = () => {
23 23
     if (item.status === 0) {
@@ -60,20 +60,21 @@ export default (props) => {
60 60
     });
61 61
   };
62 62
   const PayAction =
63
-    sh == '1' ? <Action.Icon icon={Refund} text='售后/退款' onClick={() => handleRefund(item)} /> :
64
-      item.status === 0 ? <Action.Icon icon={Pay} text='支付' onClick={handleDetail} /> :
65
-        item.status === 1 && item.isVerified == false ? <Action.Icon icon={QRcode} text='扫码核销' onClick={() => onWriteOff(item)} /> :
66
-          item.status === 2 && item.isVerified == false ? <Action.Image image={refund} /> :
67
-            item.status === 7 && item.isVerified == false ? <Action.Image image={Cancel} /> :
68
-              item.status === 9 ? <Action.Image image={Null} /> :
69
-                item.isVerified == true && item.isEvaluated > 0 ? <Action.Image image={Evaluated} /> :
70
-                  item.isVerified == true ? <Action.Icon icon={Evaluation} text='评价' onClick={() => evaluation(item)} /> : <Action.Icon icon={Evaluation} />
63
+    kkp == '1' ? null :
64
+      sh == '1' ? <Action.Icon icon={Refund} text='售后/退款' onClick={() => handleRefund(item)} /> :
65
+        item.status === 0 ? <Action.Icon icon={Pay} text='支付' onClick={handleDetail} /> :
66
+          item.status === 1 && item.isVerified == false ? <Action.Icon icon={QRcode} text='扫码核销' onClick={() => onWriteOff(item)} /> :
67
+            item.status === 2 && item.isVerified == false ? <Action.Image image={refund} /> :
68
+              item.status === 7 && item.isVerified == false ? <Action.Image image={Cancel} /> :
69
+                item.status === 9 ? <Action.Image image={Null} /> :
70
+                  item.isVerified == true && item.isEvaluated > 0 ? <Action.Image image={Evaluated} /> :
71
+                    item.isVerified == true ? <Action.Icon icon={Evaluation} text='评价' onClick={() => evaluation(item)} /> : null
71 72
 
72 73
 
73 74
   return (
74 75
     <>
75 76
       {
76
-        sh != '1' ? <view className='OrderNumber'>订单编号:{item.orderId}</view> : null
77
+        sh != '1'|| kkp == '1'? <view className='OrderNumber'>订单编号:{item.orderId}</view> : null
77 78
       }
78 79
       <CouponCard action={PayAction}>
79 80
         <CouponMedia>
@@ -82,11 +83,11 @@ export default (props) => {
82 83
             image={item.poster}
83 84
             badge='food'
84 85
           />
85
-          <CouponMedia.Body star={item.score}>
86
+          <CouponMedia.Body star={kkp == '1' ? null : item.score}>
86 87
             <View className='orderCard'>
87 88
               <View className='cpn-card-text'>
88 89
                 <View style={{ flex: '1' }}>{(item.packageDescription).toString().length > 25 ? (item.packageDescription).substring(0, 25) + '...' : (item.packageDescription)}</View>
89
-                <text className='title-money-2'>
90
+                <text className={kkp == '1' ? 'shanchu' : 'title-money-2'}>
90 91
                   数量:{item.amount}张
91 92
                 </text>
92 93
               </View>

+ 5
- 0
src/components/CompoentsOrder/OrderCard/style.less 查看文件

@@ -9,6 +9,11 @@
9 9
     .title-money-2 {
10 10
       font-size: 20px;
11 11
       color: #333333;
12
+      text-decoration: line-through;
13
+    }
14
+    .shanchu{
15
+      font-size: 20px;
16
+      color: #333333;
12 17
     }
13 18
     & > text {
14 19
       display: inline-block;

+ 4
- 1
src/components/CouponCard/Media/Body.jsx 查看文件

@@ -10,7 +10,10 @@ export default (props) => {
10 10
 
11 11
   return (
12 12
     <View className='coupun-media_body'>
13
-      {enableStar && <Star score={(star).toFixed(1)} style={{ marginTop: '26rpx' }} />}      
13
+      {
14
+      !enableStar?
15
+      <Star score={5} style={{ marginTop: '26rpx',opacity: '0' }} />:
16
+       <Star score={(star).toFixed(1)} style={{ marginTop: '26rpx' }} />}      
14 17
       <View className='coupun-media_body_ctt'>
15 18
         {props.children}
16 19
       </View>

+ 2
- 38
src/pages/MineUserAll/RefundMoney/CheckRefund/index.jsx 查看文件

@@ -4,6 +4,7 @@ import { Button, Textarea, View } from "@tarojs/components";
4 4
 import formatPrice from "@/utils/formatPrice";
5 5
 import formatTime from "@/utils/formatTime";
6 6
 import { useState, useEffect } from "react";
7
+import OrderCard from '@/components/CompoentsOrder/OrderCard'
7 8
 import withLayout from "@/layouts";
8 9
 import { getOrderSub, refund } from "@/services/payOrder";
9 10
 import food from "@/assets/icons/ProCard/food.png";
@@ -130,44 +131,7 @@ export default withLayout((props) => {
130 131
           <view>
131 132
             {(list || []).map((item) => {
132 133
               return (
133
-                <view class='wrapper' key={item.orderId}>
134
-                  <view class='left-complete-one'>
135
-                    <image className='left-image-1' src={ProCard_hot}></image>
136
-                    <view className='left-viewText'>
137
-                      返现¥{formatPrice(item.cashback)}
138
-                    </view>
139
-                    <view className='title-image'>
140
-                      <image
141
-                        className='image-1'
142
-                        mode='scaleToFill'
143
-                        src={item.poster}
144
-                      ></image>
145
-                      <image className='image-2' src={food}></image>
146
-                    </view>
147
-                    <view className='title-content'>
148
-                      <view className='Pro-title'>
149
-                        <View className='cpn-card-text'>
150
-                          <View style={{ flex: '1' }}>{(item.packageDescription).toString().length > 25 ? (item.packageDescription).substring(0, 25) + '...' : (item.packageDescription)}</View>
151
-                          <text className='title-money-2'>
152
-                            数量:{item.amount}张
153
-                          </text>
154
-                        </View>
155
-                      </view>
156
-                      <text className='title-money'>
157
-                        ¥{formatPrice(item.unitPrice)}元
158
-                        <text className='title-money-2'>
159
-                          门市价{formatPrice(item.standardPrice)}元
160
-                        </text>
161
-                      </text>
162
-                      <view className='title-time'>
163
-                        有效期:{formatTime(item?.startTime, "yyyy/MM/dd")}-
164
-                        {formatTime(item.endTime, "yyyy/MM/dd")}
165
-                      </view>
166
-                    </view>
167
-                  </view>
168
-                  <view class='right-complete-two'>
169
-                  </view>
170
-                </view>
134
+                <OrderCard item={item}  key={item.orderId} kkp='1' />                
171 135
               );
172 136
             })}
173 137
           </view>

+ 0
- 127
src/pages/MineUserAll/RefundMoney/CheckRefund/style.less 查看文件

@@ -22,132 +22,6 @@
22 22
     }
23 23
   }
24 24
 
25
-  .wrapper {
26
-    margin-top: 40px;
27
-    display: flex;
28
-    filter: drop-shadow(0 0 0.9rem rgba(0, 0, 0, 0.12));
29
-    .left-complete-one {
30
-      padding-top: 87px;
31
-      padding-bottom: 43px;
32
-      display: flex;
33
-      background: @whiteColor;
34
-      background: radial-gradient(circle at top right, transparent 15px, #fff 0)
35
-          top right,
36
-        radial-gradient(circle at bottom right, transparent 15px, #fff 0) bottom
37
-          right;
38
-      background-size: 100% 60%;
39
-      background-repeat: no-repeat;
40
-      border-radius: 15px 0px 0px 15px;
41
-      align-items: center;
42
-      .left-image-1 {
43
-        width: 145px;
44
-        height: 44px;
45
-        position: absolute;
46
-        top: 22px;
47
-      }
48
-      .left-viewText {
49
-        position: absolute;
50
-        left: 1px;
51
-        top: 28px;
52
-        font-size: 20px;
53
-        color: @whiteColor;
54
-      }
55
-      //图片
56
-      .title-image {
57
-        height: 144px;
58
-        margin-left: 20px;
59
-        border-radius: 24px;
60
-        overflow: hidden;
61
-        position: relative;
62
-        min-width: 144px;
63
-
64
-        .image-1 {
65
-          width: 144px;
66
-          height: 144px;
67
-        }
68
-        .image-2 {
69
-          width: 89px;
70
-          height: 34px;
71
-          position: absolute;
72
-          left: 0;
73
-          top: 0;
74
-        }
75
-      }
76
-      // 商品标题
77
-      .title-content {
78
-        padding-left: 20px;
79
-
80
-        .Pro-title {
81
-          .cpn-card-text {
82
-            font-size: 24px;
83
-            font-weight: 400;
84
-            color: #333333;
85
-            line-height: 40px;
86
-            vertical-align: baseline;
87
-            display: flex;
88
-          }
89
-        }
90
-        .title-money {
91
-          font-size: 24px;
92
-          display: inline-block;
93
-          font-weight: 800;
94
-          margin: 15px auto;
95
-        }
96
-        .title-money-2 {
97
-          font-size: 20px;
98
-          font-weight: 400;
99
-          color: #333333;
100
-          padding-left: 20px;
101
-          text-decoration: line-through;
102
-        }
103
-
104
-        .title-time {
105
-          font-size: 24px;
106
-          color: #c0c8d3;
107
-        }
108
-        .title-position-on {
109
-          display: flex;
110
-          font-size: 20px;
111
-          .title-position {
112
-            width: 18px;
113
-            height: 24px;
114
-            padding-right: 10px;
115
-            padding-top: 5px;
116
-          }
117
-          .title-position-image {
118
-            align-items: center;
119
-            font-size: 20px;
120
-            color: #333;
121
-          }
122
-          .title-on {
123
-            padding-top: 5px;
124
-            padding-left: 40px;
125
-            width: 21px;
126
-            height: 21px;
127
-            padding-right: 10px;
128
-          }
129
-          .title-on-text {
130
-            align-items: center;
131
-
132
-            font-size: 20px;
133
-            color: #333;
134
-          }
135
-        }
136
-      }
137
-    }
138
-  }
139
-
140
-  .right-complete-two {
141
-    background: @whiteColor;
142
-    background: radial-gradient(circle at top left, transparent 15px, #fff 0)
143
-        top left,
144
-      radial-gradient(circle at bottom left, transparent 15px, #fff 0) bottom
145
-        left;
146
-    background-size: 100% 60%;
147
-    background-repeat: no-repeat;
148
-    min-width: 130px;
149
-    border-radius: 0 15px 15px 0;
150
-  }
151 25
   .Refund-content {
152 26
     margin-top: 45px;
153 27
     .Refund-star-view1 {
@@ -191,7 +65,6 @@
191 65
       color: #ff3434;
192 66
     }
193 67
   }
194
-
195 68
   
196 69
   .ul-li-text {
197 70
     .ul-li-view {