李志伟 3 年之前
父節點
當前提交
d875e820e6

+ 27
- 24
src/components/ShopUnused/index.jsx 查看文件

@@ -1,7 +1,6 @@
1 1
 import Taro from '@tarojs/taro'
2
-import { useState, useEffect } from 'react'
3 2
 import { compressImage } from '@/utils'
4
-
3
+import { View, Text,Image } from '@tarojs/components'
5 4
 import formatTimes from '@/utils/formatTime'
6 5
 
7 6
 
@@ -11,28 +10,32 @@ import './style.less'
11 10
 export default (props) => {
12 11
   const { item } = props
13 12
 
14
-
15
-
16
-  useEffect(() => {
17
-
18
-  }, [])
19
-
20 13
   return (
21
-    <view className='orderCard'>
22
-      <view style={{ overflow: 'hidden' }}>
23
-        <view className='orderId'>订单编号:{item.orderId}</view>
24
-        <view className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:mm')}</view>
25
-      </view>
26
-      <view className='order'>
27
-        <image className='orderImg' src={compressImage(item.poster)} mode='aspectFit' />
28
-        <view className='orderRight'>
29
-          <view className='foodName'>{item.description}</view>
30
-          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>{((item.actualPrice / 100) - (item.cashback / 100) - (item.commissionCharge / 100)).toFixed(2)}</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
31
-          <view>已下单:等待客户上门就餐</view>
32
-        </view>
33
-        <view className='line' />
34
-        <view className='phone'>客户手机:<text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</text></view>
35
-      </view>
36
-    </view>
14
+    <View className='orderCard2'>
15
+      <View className='hardtop'>
16
+        <View className='orderId'>订单编号:{item.orderId}</View>
17
+        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:mm')}</View>
18
+      </View>
19
+      <View className='order'>
20
+        <View className='orderTop'>
21
+          <Image className='orderImg' src={compressImage(item.poster)} mode='aspectFit' />
22
+          <View className='orderRight'>
23
+            <View className='foodName'>{item.description}</View>
24
+            <View className='price'>
25
+              <Text className='priceleft'>
26
+                合计金额:¥
27
+                <Text style={{ fontSize: '24rpx' }}>
28
+                  {((item.actualPrice / 100) - (item.cashback / 100) - (item.commissionCharge / 100)).toFixed(2)}
29
+                </Text>元
30
+              </Text>
31
+              <Text className='pnum'>数量:1张</Text>
32
+            </View>
33
+            <View className='tips'>已下单:等待客户上门就餐</View>
34
+          </View>
35
+        </View>
36
+        <View className='line' />
37
+        <View className='phone'>客户手机:{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</View>
38
+      </View>
39
+    </View>
37 40
   )
38 41
 }

+ 55
- 68
src/components/ShopUnused/style.less 查看文件

@@ -1,89 +1,76 @@
1
-.orderCard {
2
-  margin-bottom: 20px;
3
-  .orderId {
4
-    font-size: 20px;
1
+.orderCard2{
2
+  .hardtop{
5 3
     color: #666666;
6
-    line-height: 44px;
7
-    float: left;
8
-    margin: 60px 0 0 0;
9
-  }
10
-  .orderTime {
4
+    line-height: 44px;    
11 5
     font-size: 20px;
12
-    color: #666666;
13
-    line-height: 44px;
14
-    float: right;
15
-    margin: 60px 0 0 0;
6
+    position: relative;
7
+    margin: 20px 0;
8
+    .orderId{
9
+      display: inline-block;
10
+    }
11
+    .orderTime{
12
+      position: absolute;
13
+      right: 30px;
14
+      display: inline-block;
15
+      justify-self: right;
16
+    }
16 17
   }
17
-  .order {
18
-    background: #ffffff;
18
+  .order{
19 19
     box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
20 20
     border-radius: 12px;
21 21
     padding: 20px;
22
-    .orderImg {
23
-      width: 194px;
24
-      height: 194px;
25
-      border-radius: 22px;
26
-      float: left;
27
-      margin: 0 26px 0 0;
28
-    }
29
-    .orderRight {
30
-      .foodName {
31
-        font-size: 24px;
32
-        color: #333333;
33
-        margin-top: 40px;
22
+    margin: 0 5px;
23
+    .orderTop{
24
+      display: flex;
25
+      .orderImg{
26
+        flex: none;
27
+        width: 194px;
28
+        height: 194px;
29
+        margin-right: 25px;
30
+        margin-bottom: 30px;
34 31
       }
35
-      .price {
36
-        font-size: 20px;
37
-        font-weight: bold;
38
-        color: #202020;
39
-        margin: 0 0 10px 0;
40
-        .pnum {
32
+      .orderRight{
33
+        flex: auto;
34
+        .foodName{
35
+          font-size: 24px;
41 36
           color: #333333;
42
-          font-weight: 400;
43
-          margin-left: 47px;
37
+          line-height: 40px;
38
+          margin-top: 30px;
39
+        }
40
+        .price{
41
+          font-size: 20px;
42
+          font-weight: bold;
43
+          color: #202020;
44
+          line-height: 44px;
45
+          display: flex;
46
+          .priceleft{
47
+            flex: 1;
48
+          }
49
+          .pnum {
50
+            color: #333333;
51
+            flex: 1;
52
+            font-weight: 400;
53
+          }
54
+        }
55
+        .tips{
56
+          font-size: 20px;
57
+          font-weight: bold;
58
+          color: #FF3434;
59
+          line-height: 44px;
44 60
         }
45
-      }
46
-      .price + view {
47
-        font-size: 20px;
48
-        font-weight: bold;
49
-        color: #ff3434;
50
-        line-height: 44px;
51
-        margin-bottom: 35px;
52
-        height: 19px;
53 61
       }
54 62
     }
55
-    .line {
56
-      margin-top: 30px;
57
-
63
+    .line{
58 64
       width: 100%;
59 65
       height: 2px;
60 66
       background: #000;
61 67
       opacity: 0.1;
68
+      margin-bottom: 30px;
62 69
     }
63
-    .phone {
64
-      font-size: 24px;
65
-      color: #666666;
66
-      line-height: 44px;
67
-      height: 23px;
68
-      margin: 37px 0;
69
-    }
70
-    .button-OK {
71
-      width: 160px;
72
-      height: 40px;
73
-      background: #1a3b83;
74
-      line-height: 40px;
75
-      border-radius: 12px;
76
-      font-size: 23px;
77
-      color: #ffffff;
78
-      position: relative;
79
-      right: -8em;
80
-      top: -2em;
81
-    }
82
-    .tripTime {
70
+    .phone{
83 71
       font-size: 24px;
84 72
       color: #666666;
85 73
       line-height: 44px;
86
-      margin-bottom: 30px;
87 74
     }
88 75
   }
89
-}
76
+}

+ 44
- 11
src/components/ShopUsed/index.jsx 查看文件

@@ -1,6 +1,6 @@
1 1
 import Taro from '@tarojs/taro'
2 2
 import { setGetVerifiedOrder } from '@/services/shopBoss'
3
-import { View, Text, Image } from '@tarojs/components'
3
+import { View, Text, Image,Button } from '@tarojs/components'
4 4
 import { compressImage } from '@/utils'
5 5
 import { useState } from 'react'
6 6
 import formatTimes from '@/utils/formatTime'
@@ -31,26 +31,59 @@ export default (props) => {
31 31
 
32 32
 
33 33
   return (
34
-    <View className='orderCard'>
35
-      <View style={{ overflow: 'hidden' }}>
34
+    // <View className='orderCard'>
35
+    //   <View style={{ overflow: 'hidden' }}>
36
+    //     <View className='orderId'>订单编号:{item.orderId}</View>
37
+    //     <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:mm') || ''}</View>
38
+    //   </View>
39
+    //   <View className='order'>
40
+    //     <Image className='orderImg' src={compressImage(item.poster)} mode='aspectFit' />
41
+    //     <View className='orderRight'>
42
+    //       <View className='foodName'>{item.description}</View>
43
+    //       <View className='price'>合计金额:¥<Text style={{ fontSize: '24rpx' }}>{((item.actualPrice / 100) - (item.cashback / 100) - (item.commissionCharge / 100)).toFixed(2)}</Text>元 <Text className='pnum'>数量:<Text>1</Text>张</Text> </View>
44
+    //     </View>
45
+    //     <View className='veri_Date' > 核销时间:{formatTimes(item.verifiedDate, 'yyyy-MM-dd hh:mm')}</View>
46
+    //     <View className='line' />
47
+    //     <View className='phone'>客户手机:<Text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</Text>
48
+    //       {
49
+    //         !item.isConfirmVerified && <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button>
50
+    //       }
51
+    //     </View>
52
+    //   </View>
53
+    // </View>
54
+
55
+    <View className='orderCard3'>
56
+      <View className='hardtop'>
36 57
         <View className='orderId'>订单编号:{item.orderId}</View>
37
-        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:mm') || ''}</View>
58
+        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:mm')}</View>
38 59
       </View>
39 60
       <View className='order'>
40
-        <Image className='orderImg' src={compressImage(item.poster)} mode='aspectFit' />
41
-        <View className='orderRight'>
42
-          <View className='foodName'>{item.description}</View>
43
-          <View className='price'>合计金额:¥<Text style={{ fontSize: '24rpx' }}>{((item.actualPrice / 100) - (item.cashback / 100) - (item.commissionCharge / 100)).toFixed(2)}</Text>元 <Text className='pnum'>数量:<Text>1</Text>张</Text> </View>
61
+        <View className='orderTop'>
62
+          <Image className='orderImg' src={compressImage(item.poster)} mode='aspectFit' />
63
+          <View className='orderRight'>
64
+            <View className='foodName'>{item.description}</View>
65
+            <View className='price'>
66
+              <Text className='priceleft'>
67
+                合计金额:¥
68
+                <Text style={{ fontSize: '24rpx' }}>
69
+                  {((item.actualPrice / 100) - (item.cashback / 100) - (item.commissionCharge / 100)).toFixed(2)}
70
+                </Text>元
71
+              </Text>
72
+              <Text className='pnum'>数量:1张</Text>
73
+            </View>
74
+            <View className='veri_Date' > 核销时间:{formatTimes(item.verifiedDate, 'yyyy-MM-dd hh:mm')}</View>
75
+          </View>
44 76
         </View>
45
-        <View className='veri_Date' > 核销时间:{formatTimes(item.verifiedDate, 'yyyy-MM-dd hh:mm')}</View>
46 77
         <View className='line' />
47
-        <View className='phone'>客户手机:<Text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</Text>
78
+        <View className='phone'>
79
+          客户手机:{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}
48 80
           {
49
-            !item.isConfirmVerified && <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button>
81
+            !item.isConfirmVerified && <Button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</Button>
50 82
           }
51 83
         </View>
52 84
       </View>
53 85
     </View>
86
+
54 87
   )
55 88
 }
56 89
 

+ 173
- 84
src/components/ShopUsed/style.less 查看文件

@@ -1,104 +1,193 @@
1
-.orderCard {
2
-  margin-bottom: 20px;
3
-  .orderId {
4
-    font-size: 20px;
1
+// .orderCard {
2
+//   margin-bottom: 20px;
3
+//   .orderId {
4
+//     font-size: 20px;
5
+//     color: #666666;
6
+//     line-height: 44px;
7
+//     float: left;
8
+//     margin: 60px 0 32px 0;
9
+//   }
10
+//   .orderTime {
11
+//     font-size: 20px;
12
+//     color: #666666;
13
+//     line-height: 44px;
14
+//     float: right;
15
+//     margin: 60px 0 32px 0;
16
+//   }
17
+//   .order {
18
+//     background: #ffffff;
19
+//     box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
20
+//     border-radius: 12px;
21
+//     padding: 20px;
22
+//     .orderImg {
23
+//       width: 194px;
24
+//       height: 194px;
25
+//       border-radius: 22px;
26
+//       float: left;
27
+//       margin: 0 26px 30px 0;
28
+//     }
29
+//     .orderRight {
30
+//       .foodName {
31
+//         font-size: 24px;
32
+//         color: #333333;
33
+//       }
34
+//       .price {
35
+//         font-size: 20px;
36
+//         font-weight: bold;
37
+//         color: #202020;
38
+//         line-height: 44px;
39
+//         height: 19px;
40
+//         .pnum {
41
+//           color: #333333;
42
+//           font-weight: 400;
43
+//           margin-left: 47px;
44
+//         }
45
+//       }
46
+//       .price + view {
47
+//         font-size: 20px;
48
+//         font-weight: bold;
49
+//         color: #ff3434;
50
+//         line-height: 44px;
51
+//         margin-bottom: 35px;
52
+//         height: 19px;
53
+//       }
54
+//     }
55
+//     .veri_Date {
56
+//       color: red;
57
+//       letter-spacing: 1px;
58
+//       font-size: 30px;
59
+//       padding-top: 20px;
60
+//     }
61
+//     .line {
62
+//       margin-top: 30px;
63
+
64
+//       width: 100%;
65
+//       height: 2px;
66
+//       background: #000;
67
+//       opacity: 0.1;
68
+//       margin-top: 30px;
69
+//     }
70
+//     .phone {
71
+//       font-size: 24px;
72
+//       color: #666666;
73
+//       line-height: 44px;
74
+//       height: 23px;
75
+//       margin: 37px 0;
76
+//       // .Button-OK{
77
+//       //   font-size: 28px;
78
+//       //   color: #C0C8D3;
79
+//       //   line-height: 34px;
80
+//       //   text-align: center;
81
+//       //   padding:40px 0 100px 0;
82
+//       // }
83
+//     }
84
+
85
+//     .tripTime {
86
+//       font-size: 24px;
87
+//       color: #666666;
88
+//       line-height: 44px;
89
+//       margin-bottom: 30px;
90
+//     }
91
+//   }
92
+// }
93
+// button {
94
+//   width: 160px;
95
+//   height: 40px;
96
+//   background: #1a3b83;
97
+//   line-height: 40px;
98
+//   border-radius: 12px;
99
+//   font-size: 23px;
100
+//   color: #ffffff;
101
+//   position: relative;
102
+//   right: -8em;
103
+//   top: -2em;
104
+// }
105
+
106
+.orderCard3{
107
+  .hardtop{
5 108
     color: #666666;
6
-    line-height: 44px;
7
-    float: left;
8
-    margin: 60px 0 32px 0;
9
-  }
10
-  .orderTime {
109
+    line-height: 44px;    
11 110
     font-size: 20px;
12
-    color: #666666;
13
-    line-height: 44px;
14
-    float: right;
15
-    margin: 60px 0 32px 0;
111
+    position: relative;
112
+    margin: 20px 0;
113
+    .orderId{
114
+      display: inline-block;
115
+    }
116
+    .orderTime{
117
+      position: absolute;
118
+      right: 30px;
119
+      display: inline-block;
120
+      justify-self: right;
121
+    }
16 122
   }
17
-  .order {
18
-    background: #ffffff;
123
+  .order{
19 124
     box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
20 125
     border-radius: 12px;
21 126
     padding: 20px;
22
-    .orderImg {
23
-      width: 194px;
24
-      height: 194px;
25
-      border-radius: 22px;
26
-      float: left;
27
-      margin: 0 26px 30px 0;
28
-    }
29
-    .orderRight {
30
-      .foodName {
31
-        font-size: 24px;
32
-        color: #333333;
127
+    margin: 0 5px;
128
+    .orderTop{
129
+      display: flex;
130
+      .orderImg{
131
+        flex: none;
132
+        width: 194px;
133
+        height: 194px;
134
+        margin-right: 25px;
135
+        margin-bottom: 30px;
33 136
       }
34
-      .price {
35
-        font-size: 20px;
36
-        font-weight: bold;
37
-        color: #202020;
38
-        line-height: 44px;
39
-        height: 19px;
40
-        .pnum {
137
+      .orderRight{
138
+        flex: auto;
139
+        .foodName{
140
+          font-size: 24px;
41 141
           color: #333333;
42
-          font-weight: 400;
43
-          margin-left: 47px;
142
+          line-height: 40px;
143
+          margin-top: 30px;
144
+        }
145
+        .price{
146
+          font-size: 20px;
147
+          font-weight: bold;
148
+          color: #202020;
149
+          line-height: 44px;
150
+          display: flex;
151
+          .priceleft{
152
+            flex: 1;
153
+          }
154
+          .pnum {
155
+            color: #333333;
156
+            flex: 1;
157
+            font-weight: 400;
158
+          }
159
+        }        
160
+        .veri_Date {
161
+          color: red;
162
+          letter-spacing: 1px;
163
+          font-size: 30px;
44 164
         }
45 165
       }
46
-      .price + view {
47
-        font-size: 20px;
48
-        font-weight: bold;
49
-        color: #ff3434;
50
-        line-height: 44px;
51
-        margin-bottom: 35px;
52
-        height: 19px;
53
-      }
54
-    }
55
-    .veri_Date {
56
-      color: red;
57
-      letter-spacing: 1px;
58
-      font-size: 30px;
59
-      padding-top: 20px;
60 166
     }
61
-    .line {
62
-      margin-top: 30px;
63
-
167
+    .line{
64 168
       width: 100%;
65 169
       height: 2px;
66 170
       background: #000;
67 171
       opacity: 0.1;
68
-      margin-top: 30px;
69
-    }
70
-    .phone {
71
-      font-size: 24px;
72
-      color: #666666;
73
-      line-height: 44px;
74
-      height: 23px;
75
-      margin: 37px 0;
76
-      // .Button-OK{
77
-      //   font-size: 28px;
78
-      //   color: #C0C8D3;
79
-      //   line-height: 34px;
80
-      //   text-align: center;
81
-      //   padding:40px 0 100px 0;
82
-      // }
172
+      margin-bottom: 30px;
83 173
     }
84
-
85
-    .tripTime {
174
+    .phone{
86 175
       font-size: 24px;
87 176
       color: #666666;
88
-      line-height: 44px;
89
-      margin-bottom: 30px;
177
+      line-height: 44px;  
178
+      position: relative;  
179
+      button {
180
+        width: 160px;
181
+        position: absolute;
182
+        right: 60px;
183
+        top: 0;
184
+        height: 40px;
185
+        background: #1a3b83;
186
+        line-height: 40px;
187
+        border-radius: 12px;
188
+        font-size: 23px;
189
+        color: #ffffff;
190
+      }
90 191
     }
91 192
   }
92
-}
93
-button {
94
-  width: 160px;
95
-  height: 40px;
96
-  background: #1a3b83;
97
-  line-height: 40px;
98
-  border-radius: 12px;
99
-  font-size: 23px;
100
-  color: #ffffff;
101
-  position: relative;
102
-  right: -8em;
103
-  top: -2em;
104
-}
193
+}

+ 0
- 1
src/shop/components/ShopKeeper/shopKeeper.jsx 查看文件

@@ -154,7 +154,6 @@ export default (props) => {
154 154
           {/* 已核销 */}
155 155
           {activeTab === 1 &&
156 156
             <view style={{ height: '45vh' }}>
157
-
158 157
               <List
159 158
                 style={{ height: '100%' }}
160 159
                 noData={<NoData />}