Quellcode durchsuchen

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

李志伟 vor 3 Jahren
Ursprung
Commit
5d000fa217

+ 4
- 2
src/components/BossCard/index.jsx Datei anzeigen

@@ -18,15 +18,17 @@ import ProCard_hot from '@/assets/icons/ProCard/ProCard_hot.png'
18 18
 import './style.less'
19 19
 
20 20
 export default (props) => {
21
-  const { item } = props
21
+  const { item, cardNavigateTo } = props
22 22
   const { shopId } = props.item
23 23
   const [isSaved, toggleSave] = useSave(item.isSaved, 'shop_package', item.packageId)
24 24
   const [city, setCity] = useState({})
25 25
   const [detail, setDetail] = useState({})
26 26
 
27
+
28
+
29
+
27 30
   const goFood = () => {
28 31
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
29
-
30 32
   }
31 33
 
32 34
   useEffect(() => {

+ 8
- 10
src/components/ShopUnused/index.jsx Datei anzeigen

@@ -1,5 +1,6 @@
1 1
 import Taro from '@tarojs/taro'
2 2
 import { useState, useEffect } from 'react'
3
+import formatTimes from '@/utils/formatTime'
3 4
 import iconsearch from '@/assets/icons/housemantj/search.png'
4 5
 import ms from '@/assets/icons/housemantj/ms3.jpg'
5 6
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
@@ -7,7 +8,7 @@ import './style.less'
7 8
 
8 9
 
9 10
 export default (props) => {
10
-  const { } = props
11
+  const { item } = props
11 12
 
12 13
 
13 14
 
@@ -18,21 +19,18 @@ export default (props) => {
18 19
   return (
19 20
     <view className='orderCard'>
20 21
       <view style={{ overflow: 'hidden' }}>
21
-        <view className='orderId'>订单编号:<text>ABC123456789</text></view>
22
-        <view className='orderTime'>下单日期:<text>2021-06-22 12:35</text></view>
22
+        <view className='orderId'>订单编号:{item.orderId}</view>
23
+        <view className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss')}</view>
23 24
       </view>
24 25
       <view className='order'>
25
-        <image className='orderImg' src={ms} mode='aspectFit' />
26
+        <image className='orderImg' src={item.poster} mode='aspectFit' />
26 27
         <view className='orderRight'>
27
-          <view className='foodName'>【SEOUL.创意韩国料理】火爆全南京,
28
-            新街口又开新店啦...</view>
29
-          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>88</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
28
+          <view className='foodName'>{item.description}</view>
29
+          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>{item.actualPrice / 100}</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
30 30
           <view>已下单:等待客户上门就餐</view>
31 31
         </view>
32 32
         <view className='line' />
33
-
34
-        <view className='phone'>客户手机:<text>136****9434</text></view>
35
-        <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
33
+        <view className='phone'>客户手机:<text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</text></view>
36 34
       </view>
37 35
     </view>
38 36
   )

+ 0
- 1
src/components/ShopUnused/style.less Datei anzeigen

@@ -29,7 +29,6 @@
29 29
     }
30 30
     .orderRight{
31 31
       .foodName{
32
-        height: 63px;
33 32
         font-size: 24px;
34 33
         color: #333333;
35 34
         line-height: 40px;

+ 0
- 1
src/components/ShopUsed/index.jsx Datei anzeigen

@@ -32,7 +32,6 @@ export default (props) => {
32 32
         <view className='line' />
33 33
 
34 34
         <view className='phone'>客户手机:<text>136****9434</text><button className='button-OK'  >确认核销</button> </view>
35
-        <view className='tripTime'>客户行程日期:预计在<text>2021-06-21中下午10:30-16:30</text></view>
36 35
       </view>
37 36
     </view>
38 37
   )

+ 16
- 4
src/components/foodCards/foodCards.jsx Datei anzeigen

@@ -1,3 +1,6 @@
1
+import useSave from "@/utils/hooks/useSave"
2
+import { getShopDetail, getShopcity } from '@/services/home'
3
+import { useState, useEffect } from 'react'
1 4
 import Taro from '@tarojs/taro'
2 5
 import Star from '@/components/Star/Star.jsx'
3 6
 import pay from '@/assets/icons/housemantj/pay.png'
@@ -6,9 +9,6 @@ import wz from '@/assets/icons/housemantj/location.png'
6 9
 import hongxin from '@/assets/icons/housemantj/已收藏.png'
7 10
 import baixin from '@/assets/icons/housemantj/收藏.png'
8 11
 import './style.less'
9
-import useSave from "@/utils/hooks/useSave"
10
-import { getShopDetail, getShopcity } from '@/services/home'
11
-import { useState, useEffect } from 'react'
12 12
 
13 13
 
14 14
 
@@ -20,11 +20,23 @@ export default (props) => {
20 20
   const [city, setCity] = useState({})
21 21
   const [detail, setDetail] = useState({})
22 22
 
23
+
24
+
25
+
23 26
   const goFood = () => {
24
-    Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
27
+    const page = Taro.getCurrentPages()
28
+    const currentPage = page[page.length - 1];//第一位是首页,最后一位是当前页面
29
+    const pagesUrl = `/${currentPage.route}`;
30
+    if (pagesUrl === '/pages/details/foodDetails/foodDetails') {
25 31
 
32
+    } else {
33
+      Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${shopId}` })
34
+
35
+    }
26 36
   }
27 37
 
38
+
39
+
28 40
   useEffect(() => {
29 41
     getShopDetail(item.shopId).then((res) => {
30 42
       setDetail(res)

+ 6
- 4
src/pages/index/index.jsx Datei anzeigen

@@ -1,4 +1,6 @@
1
-import React, { useState, useEffect,useRef } from 'react'
1
+
2
+
3
+import React, { useState, useEffect, useRef } from 'react'
2 4
 import Taro from '@tarojs/taro'
3 5
 import CustomNav from '@/components/CustomNav'
4 6
 import logo from '@/assets/icons/comm/logo_small.png'
@@ -9,12 +11,12 @@ import Mine from './tabs/Mine'
9 11
 import Recommend from './tabs/Recommend'
10 12
 import './index.less'
11 13
 import { getLocation } from '@/utils/location'
12
-import { getIndexType,  getResourceList } from '@/services/home'
14
+import { getIndexType, getResourceList } from '@/services/home'
13 15
 
14 16
 
15 17
 
16 18
 export default withLayout((props) => {
17
-  const { router, person,location } = props
19
+  const { router, person, location } = props
18 20
   const { params, path } = router
19 21
   const { tab } = params || {}
20 22
   const [currentTab, setCurrentTab] = useState(0)
@@ -35,7 +37,7 @@ export default withLayout((props) => {
35 37
       <view className='index-container'>
36 38
         {currentTab === 0 && <Recommend location={location} />}
37 39
         {currentTab === 1 && <Guide person={person} router={router} />}
38
-        {/* {currentTab === 2 && <Strategy />} */}
40
+        {/* {currentTab === 2 && <Strategy />} */}
39 41
         {currentTab === 2 && <Mine person={person} />}
40 42
       </view>
41 43
       <view className='index-tabbar'>

+ 55
- 26
src/pages/index/tabs/Guide.jsx Datei anzeigen

@@ -18,14 +18,17 @@ import './GuideCss/style.less'
18 18
 
19 19
 
20 20
 
21
+
21 22
 export default (props) => {
22
-  const { router, person } = props
23
-  console.log("🚀 ~ file: Guide.jsx ~ line 34 ~ props", props)
24
-  const { roomId, location, roomOrderId } = router.params
23
+  const { router, person, iflocation } = props
24
+  const { roomId, roomOrderId } = router.params
25 25
   const [extend, setExtend] = useState([])
26 26
   const [ifroomId, setIfroomId] = useState('havenot')
27 27
   const [spackage, setPackage] = useState([])
28 28
 
29
+  const cardNavigateTo = undefined
30
+
31
+
29 32
   // 住宿经纬度
30 33
   const Roomlog = useRef('')
31 34
   const Roomlat = useRef('')
@@ -33,26 +36,32 @@ export default (props) => {
33 36
   const Parklog = useRef('')
34 37
   const Parklat = useRef('')
35 38
   const [taRoomContent, setTaRoomContent] = useState([])
36
-
39
+  const RoomLocation = taRoomContent?.location
40
+  //没有停车 wifi的就不显示按钮
41
+  const [wifiButtonStyle, setWifiButtonStyle] = useState('')
42
+  const [parkingButtonStyle, setParkingButtonStyle] = useState('')
43
+  const [guideStyle, setGuideStyle] = useState('')
37 44
 
38 45
   //当前指南总数
39 46
   const [newextNum, setNewextNum] = useState(0)
40 47
   //全部指南个数
41 48
   const [AllextNum, setAllextNum] = useState(0)
42 49
   //指南当前页数
43
-  const [epage, setepage] = useState(2)
50
+  const [epage, setEpage] = useState(2)
44 51
   const extendMore = () => {
45
-    setepage(epage + 1)
52
+    setEpage(epage + 1)
46 53
     getExtendContent('room', roomId, { pageNum: epage }).then((res) => {
47 54
       setExtend([...extend, ...res.records])
48 55
       setNewextNum(newextNum + res.records.length)
49 56
     })
50 57
   }
51 58
 
59
+
60
+
61
+
52 62
   useEffect(() => {
53 63
     if (roomOrderId) {
54 64
       goToRoomForm(roomOrderId).then((res) => {
55
-        console.log("🚀 ~ file: Guide.jsx ~ line 48 ~ goToRoomForm ~ res", res)
56 65
         if (res.status !== 1) {
57 66
           Taro.navigateTo({
58 67
             url: `/pages/RoomOrder/index?roomOrderId=${roomOrderId}&status=${res.status}&roomId=${roomId}`,
@@ -65,10 +74,6 @@ export default (props) => {
65 74
 
66 75
 
67 76
   useEffect(() => {
68
-    // 老板推荐的套餐
69
-    getRecommendList({ location: location }).then((res) => {
70
-      setPackage(res || [])
71
-    })
72 77
 
73 78
     if (roomId) {
74 79
       // 点击’去这里‘跳转导航
@@ -78,7 +83,6 @@ export default (props) => {
78 83
         Parklog.current = (res.parkingLocation).toString().split(',')[0]
79 84
         Parklat.current = (res.parkingLocation).toString().split(',')[1]
80 85
         setTaRoomContent(res || [])
81
-        console.log(res);
82 86
       })
83 87
       //更多指引
84 88
       getExtendContent('room', roomId).then((res) => {
@@ -87,14 +91,41 @@ export default (props) => {
87 91
         setAllextNum(res.total)
88 92
         setNewextNum(res.records.length)
89 93
       })
94
+      getRecommendList({ location: RoomLocation }).then((res) => {
95
+        setPackage(res || [])
96
+      })
90 97
 
91 98
 
92 99
     } else {
93
-      console.log('房源没有ID');
100
+      getRecommendList({ location: iflocation }).then((res) => {
101
+        setPackage(res || [])
102
+      })
103
+
94 104
       return
95 105
     }
106
+    // extend?.records === []
96 107
 
97
-  }, [roomId])
108
+
109
+    if (taRoomContent?.wifiPassword === "") {
110
+      setWifiButtonStyle('none')
111
+    }
112
+    if (taRoomContent?.parkingAddress === "") {
113
+      setParkingButtonStyle('none')
114
+    }
115
+    // if (extend.length === 0) {
116
+    //   setGuideStyle('none')
117
+    // }
118
+    // if (extend) {
119
+    //   extend.map(item => {
120
+    //     if (item.pages) {
121
+    //       setGuideStyle('none')
122
+    //     } else {
123
+    //       setGuideStyle('')
124
+    //     }
125
+    //   })
126
+    // }
127
+
128
+  }, [roomId, RoomLocation])
98 129
 
99 130
 
100 131
   const goRoomMap = () => {
@@ -137,8 +168,6 @@ export default (props) => {
137 168
 
138 169
 
139 170
 
140
-
141
-
142 171
   return (
143 172
     <scroll-view scroll-y style='height:100%;'  >
144 173
 
@@ -176,9 +205,9 @@ export default (props) => {
176 205
                 <view className='MessageCard-content'>
177 206
                   <view className='MessageCard-name' >{taRoomContent?.address}</view>
178 207
                 </view>
179
-                <view className='MessageCard-button-RoomName'>
208
+                <view className='MessageCard-button-RoomName' onClick={() => { goRoomMap() }}>
180 209
                   <image className='MessageCard-image' src={GoHere} />
181
-                  <text className='MessageCard-text' onClick={() => { goRoomMap() }} >去这里</text>
210
+                  <text className='MessageCard-text'  >去这里</text>
182 211
                 </view>
183 212
               </view>
184 213
               <view className='MessageCard'>
@@ -190,9 +219,9 @@ export default (props) => {
190 219
                 <view className='MessageCard-content'>
191 220
                   <view className='MessageCard-name' >{taRoomContent?.parkingAddress}</view>
192 221
                 </view>
193
-                <view className='MessageCard-button-Park'>
222
+                <view className='MessageCard-button-Park' onClick={() => { goParkMap() }} style={{ display: parkingButtonStyle }} >
194 223
                   <image className='MessageCard-image' src={Taxi} />
195
-                  <text className='MessageCard-text' onClick={() => { goParkMap() }} >去这里</text>
224
+                  <text className='MessageCard-text'  >去这里</text>
196 225
                 </view>
197 226
               </view>
198 227
               <view className='MessageCard'>
@@ -201,18 +230,18 @@ export default (props) => {
201 230
                   WiFi信息
202 231
                   <text className='MessageCard-right'>----------</text>
203 232
                 </view>
204
-                <view className='MessageCard-content'>
233
+                <view className='MessageCard-content' style={{ display: wifiButtonStyle }} >
205 234
                   <view className='MessageCard-name' >名称:{taRoomContent?.wifiName}</view>
206 235
                   <view className='MessageCard-info'  ><text className='MessageCard-name'>密码:</text>{taRoomContent?.wifiPassword}</view>
207 236
                 </view>
208
-                <view className='MessageCard-button'>
237
+                <view className='MessageCard-button' onClick={() => { wifiCopy() }} style={{ display: wifiButtonStyle }}>
209 238
                   <image className='MessageCard-image' src={WiFi} />
210
-                  <text className='MessageCard-text' onClick={() => { wifiCopy() }}>复制</text>
239
+                  <text className='MessageCard-text'>复制</text>
211 240
                 </view>
212 241
               </view>
213 242
 
214
-              <view className='Guide-Content-box' >
215
-                <view className='title-image'>
243
+              <view className='Guide-Content-box'  >
244
+                <view className='title-image' style={{ display: guideStyle }} >
216 245
                   <image mode='scaleToFill' className='title-image-cup' src={BlackSpot} />
217 246
                   <text className='title-title-boss' >更多指引</text>
218 247
                 </view>
@@ -232,7 +261,7 @@ export default (props) => {
232 261
             <text className='title-title-boss' >老板推荐好吃的</text>
233 262
           </view>
234 263
         </view>
235
-        {spackage?.map((item, index) => <BossCard key={(index)} item={item} />)}
264
+        {spackage?.map((item, index) => <BossCard cardNavigateTo={cardNavigateTo} key={(index)} item={item} />)}
236 265
         {/* 卡片------------- */}
237 266
         {/* <view className='Guide-Content-box-two'>
238 267
           <view className='title-image-two'>

+ 20
- 0
src/services/shopBoss.js Datei anzeigen

@@ -25,3 +25,23 @@ export const getShopMoney = (id, amountType) => request(`/shop/${id}/account?amo
25 25
  */
26 26
 export const getAccount = (id,) => request(`/shop/account/${id}/log`, { id })
27 27
 
28
+
29
+/**
30
+ * 商铺核销列表
31
+ * @param {*} 
32
+ * @returns 
33
+ */
34
+export const getVerifiedOrder = (data) => request(`/verifyTarget`, { data })
35
+
36
+
37
+
38
+
39
+
40
+/**
41
+ * 商铺核销确认
42
+ * @param {*} 
43
+ * @returns 
44
+ */
45
+export const setGetVerifiedOrder = (id) => request(`/verifyTarget​/${id}`, { method: 'put', id })
46
+
47
+

+ 43
- 9
src/shop/components/ShopKeeper/shopKeeper.jsx Datei anzeigen

@@ -21,7 +21,7 @@ import ToggleRole from '@/components/toggleRole/ToggleRole'
21 21
 
22 22
 
23 23
 export default (props) => {
24
-  const { shopList, shop, account, onHotelChange, accountlog, shopMoney } = props
24
+  const { shopList, shop, onHotelChange, shopMoney, verifiedOrder } = props
25 25
   const [activeTab, setActiveTab] = useState(0)
26 26
   const { params } = useRouter()
27 27
   const { tabJump } = params || {}
@@ -41,6 +41,26 @@ export default (props) => {
41 41
     onHotelChange(current)
42 42
   }
43 43
 
44
+
45
+  //搜索
46
+  const search = (value) => {
47
+    console.log(value);
48
+
49
+    return new Promise((resolve, reject) => {
50
+      console.log(resolve, reject);
51
+      resolve([{ text: '搜索结果', value: 1 }, { text: '搜索结果2', value: 2 }])
52
+
53
+    })
54
+  }
55
+  const handeInput = (e) => {
56
+    const value = e.detail.value
57
+    console.log("🚀 ~ file: shopKeeper.jsx ~ line 57 ~ handeInput ~ value", value)
58
+
59
+
60
+  }
61
+
62
+
63
+
44 64
   useEffect(() => {
45 65
     if (tabJump) {
46 66
       setActiveTab(tabJump - 0)
@@ -74,9 +94,9 @@ export default (props) => {
74 94
       </view>
75 95
       <ToggleRole showCutover={showCutover} onClose={onClose} role='shop' />
76 96
       <view style={{ padding: '30rpx', height: '100%' }}>
77
-        <scroll-view scroll-y scroll-view='true' bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" style={{ height: 'calc(100vh - 120px)' }}>
97
+        <scroll-view scroll-y scroll-view='true' bindscrolltoupper='upper' bindscrolltolower='lower' bindscroll='scroll' style={{ height: 'calc(100vh - 120px)' }}>
78 98
           <view className='storexx'>
79
-            <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder="请选择商铺" value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
99
+            <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder='请选择商铺' value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
80 100
             <view onClick={ShowMoldeOn} className='User-info-cutover'>
81 101
               <image className='User-info-cutover-image' src={cutoverUser} />
82 102
             </view>
@@ -86,7 +106,7 @@ export default (props) => {
86 106
                 <view className='lword'>全年订单收入(税前)</view>
87 107
 
88 108
                 <view className='yearMoney'>
89
-                  <text>{isyear ? shopMoney?.totalCharges : '******'}</text>元
109
+                  <text>{isyear ? shopMoney?.totalCharges / 100 : '******'}</text>元
90 110
                   <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
91 111
                 </view>
92 112
               </view>
@@ -94,15 +114,18 @@ export default (props) => {
94 114
               <view className='sright'>
95 115
                 <view className='rword'>当月订单收入(税前)</view>
96 116
                 <view className='monthMoney'>
97
-                  <text>{isMomth ? shopMoney?.currentCharges : '******'}</text>元
117
+                  <text>{isMomth ? shopMoney?.currentCharges / 100 : '******'}</text>元
98 118
                   <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
99 119
                 </view></view>
100 120
             </view>
101 121
           </view>
102 122
           <view className='search'>
103
-            <input className='searchInput' />
104
-            <image className='searchicon' src={iconsearch} />
105
-            <view className="searchword">搜索订单(输入客户手机号码)</view>
123
+            <mp-searchbar
124
+              placeholder='搜索订单(输入客户手机号码)'
125
+              search={search}
126
+              onInput={(e) => handeInput(e)}
127
+            >
128
+            </mp-searchbar>
106 129
           </view>
107 130
           <view className='index-tabs'>
108 131
             <mp-tabs
@@ -116,11 +139,22 @@ export default (props) => {
116 139
             >
117 140
             </mp-tabs>
118 141
           </view>
142
+          {
143
+            verifiedOrder.map
119 144
 
145
+          }
120 146
           <view>
121 147
             {/* 未核销 */}
122 148
             {activeTab === 0 &&
123
-              <ShopUnused />
149
+              <>
150
+                {
151
+                  verifiedOrder.map((item, index) => {
152
+
153
+                    return <ShopUnused key={(index)} item={item} />
154
+                  })
155
+                }
156
+              </>
157
+
124 158
             }
125 159
             {/* 已核销 */}
126 160
             {activeTab === 1 &&

+ 38
- 113
src/shop/components/ShopKeeper/shopKeeper.less Datei anzeigen

@@ -146,30 +146,47 @@
146 146
 }
147 147
 
148 148
 .search{
149
-  padding: 40px 0  30px 0;
150
-  position: relative;
151
-  .searchInput{    
152
-    height: 68px;
149
+  margin: 35px 0;
150
+  .weui-search-bar{
151
+    padding: 0px;
152
+    border-radius: 45px;
153 153
     background: #F8F8F8;
154
-    border-radius: 34px;
155
-    box-sizing: border-box;
156
-  }
157
-  .searchicon{
158
-    width: 25px;
159
-    height: 25px;
160
-    position: absolute;
161
-    left: 136px;
162
-    top: 61px;
163
-  }
164
-  .searchword{
165
-    height: 25px;
166
-    font-size: 24px;
167
-    color: #C0C8D3;
168
-    position: absolute;
169
-    left: calc(50% - 141rpx);
170
-    bottom: 60px;
154
+
155
+    .weui-search-bar__label{
156
+      background: #F8F8F8;
157
+    }
158
+    .weui-search-bar__form{
159
+      border-radius: 45px;
160
+      background: #F8F8F8;
161
+      
162
+
163
+    }
164
+
165
+    .weui-search-bar__label{
166
+      border-radius: 45px;
167
+      background: #F8F8F8;
168
+
169
+
170
+    }
171
+    .weui-search-bar__input{
172
+      text-align: center;
173
+      background: #F8F8F8;
174
+
175
+    }
176
+  
177
+    .weui-search-bar__cancel-btn{
178
+      position: relative;
179
+      left: -10px;
180
+      font-size: 31px;
181
+      padding-left: 5px;
182
+      background: #F8F8F8;
183
+
184
+
185
+    }
171 186
   }
172 187
 }
188
+
189
+
173 190
 .index-tabs {
174 191
   width: 100%;
175 192
   height: 91px;
@@ -194,99 +211,7 @@
194 211
     border-bottom: 5px solid black;
195 212
   }
196 213
 }
197
-.orderCard{
198
-  margin-bottom: 20px;
199
-  .orderId{
200
-    font-size: 20px;
201
-    color: #666666;
202
-    line-height: 44px;
203
-    float: left;
204
-    margin: 60px 0 32px 0;
205 214
 
206
-  }
207
-  .orderTime{    
208
-    font-size: 20px;
209
-    color: #666666;
210
-    line-height: 44px;
211
-    float: right;
212
-    margin: 60px 0 32px 0;
213
-  }
214
-  .order{
215
-    background: #FFFFFF;
216
-    box-shadow: 0px 8px 32px 0px rgba(0, 0, 0, 0.08);
217
-    border-radius: 12px;
218
-    padding: 20px;
219
-    .orderImg{
220
-      width: 194px;
221
-      height: 194px;
222
-      border-radius: 22px;
223
-      float: left;
224
-      margin:0 26px 30px 0;
225
-    }
226
-    .orderRight{
227
-      .foodName{
228
-        height: 63px;
229
-        font-size: 24px;
230
-        color: #333333;
231
-        line-height: 40px;
232
-      }
233
-      .price{
234
-        font-size: 20px;
235
-        font-weight: bold;
236
-        color: #202020;
237
-        line-height: 44px;
238
-        margin: 37px 0 40px 0;
239
-        height: 19px;
240
-        .pnum{
241
-          color: #333333;
242
-          font-weight: 400;
243
-          margin-left: 47px;         
244
-        }
245
-      }
246
-      .price+view{
247
-        font-size: 20px;
248
-        font-weight: bold;
249
-        color: #FF3434;
250
-        line-height: 44px;
251
-        margin-bottom: 35px;
252
-        height: 19px;
253
-      }
254
-    }
255
-    .line{
256
-      width: 100%;
257
-      height: 2px;
258
-      background: #000;
259
-      opacity: 0.1;
260
-    }
261
-    .phone{
262
-      font-size: 24px;
263
-      color: #666666;
264
-      line-height: 44px;
265
-      height: 23px;
266
-      margin: 30px 0;
267
-    }
268
-    .button-OK{
269
-      width: 160px;
270
-    height: 40px;
271
-    background: #1A3B83;
272
-    /* margin: 0 auto; */
273
-    line-height: 40px;
274
-    border-radius: 12px;
275
-    font-size: 23px;
276
-    color: #ffffff;
277
-    position: relative;
278
-    right: -8em;
279
-    top: -2em;
280
-    }
281
-    .tripTime{
282
-      font-size: 24px;
283
-      color: #666666;
284
-      line-height: 44px;
285
-      margin-bottom: 30px;
286
-    }
287
-  }
288
-  
289
-}
290 215
 .botton{
291 216
   font-size: 28px;   
292 217
   color: #C0C8D3;

+ 4
- 4
src/shop/components/Sparead/spreadMoney.jsx Datei anzeigen

@@ -16,7 +16,7 @@ import './spreadMoney.less'
16 16
 import ToggleRole from '@/components/toggleRole/ToggleRole'
17 17
 
18 18
 export default (props) => {
19
-  const { shopList, shop, account, onHotelChange, accountlog, shopMoney } = props
19
+  const { shopList, shop, onHotelChange, shopMoney } = props
20 20
   const [showCutover, setShowCutover] = useState(false)
21 21
   const [isyear, setYear] = useState(false)
22 22
   const [isMomth, setMonth] = useState(false)
@@ -73,7 +73,7 @@ export default (props) => {
73 73
               <view className='sleft'>
74 74
                 <view className='lword'>全年推广收入(税前)</view>
75 75
                 <view className='yearMoney'>
76
-                  <text>{isyear ? shopMoney?.totalCharges : '******'}</text>元
76
+                  <text>{isyear ? shopMoney?.totalCharges / 100 : '******'}</text>元
77 77
                   <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
78 78
                 </view>
79 79
               </view>
@@ -81,7 +81,7 @@ export default (props) => {
81 81
               <view className='sright'>
82 82
                 <view className='rword'>当月推广收入(税前)</view>
83 83
                 <view className='monthMoney'>
84
-                  <text>{isMomth ? shopMoney?.currentCharges : '******'}</text>元
84
+                  <text>{isMomth ? shopMoney?.currentCharges / 100 : '******'}</text>元
85 85
                   <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
86 86
                 </view></view>
87 87
             </view>
@@ -90,7 +90,7 @@ export default (props) => {
90 90
           {
91 91
             shopAccount.map((item, index) => {
92 92
               return (
93
-                <ShopCommission item={item} />
93
+                <ShopCommission key={(index)} item={item} />
94 94
 
95 95
               )
96 96
             })

+ 2
- 1
src/shop/pages/spread/spreadIndex.config.js Datei anzeigen

@@ -4,6 +4,7 @@ export default {
4 4
   usingComponents: {
5 5
     "mp-tabbar": "weui-miniprogram/tabbar/tabbar",
6 6
     "mp-tabs": "../../../components/tabs/index",
7
-    "mp-dialog": "weui-miniprogram/dialog/dialog"
7
+    "mp-dialog": "weui-miniprogram/dialog/dialog",
8
+    "mp-searchbar": "weui-miniprogram/searchbar/searchbar",
8 9
   }
9 10
 }

+ 25
- 10
src/shop/pages/spread/spreadIndex.jsx Datei anzeigen

@@ -1,7 +1,7 @@
1 1
 import React, { useState, useEffect } from 'react'
2 2
 import CustomNav from '@/components/CustomNav'
3 3
 import { useRouter } from '@tarojs/taro'
4
-import { getShopList, getShopMoney, getAccount } from '@/services/shopBoss'
4
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
5 5
 import ShopKeeper from '../../components/ShopKeeper/shopKeeper'
6 6
 import Sparead from '../../components/Sparead/spreadMoney'
7 7
 import TabBar from '@/components/CustTabBar'
@@ -21,14 +21,13 @@ export default withLayout((props) => {
21 21
   const { tab } = params || {}
22 22
   const [currentTab, setCurrentTab] = useState(0)
23 23
   const [shopList, setShopList] = useState([])
24
+  console.log("🚀 ~ file: spreadIndex.jsx ~ line 24 ~ withLayout ~ shopList", shopList)
24 25
   const [shop, setShop] = useState()
25 26
   const shopId = shop?.shopId
26
-  console.log("🚀 ~ file: spreadIndex.jsx ~ line 26 ~ withLayout ~ shopId", shopId)
27
-  const [account, setAccount] = useState()
28
-  const [accountlog, setAccountLog] = useState([])
29 27
 
30 28
   const [amountType, setAmountType] = useState('order')
31 29
   const [shopMoney, setShopMoney] = useState([])
30
+  const [verifiedOrder, setVerifiedOrder] = useState([])
32 31
   const handleTabChange = (e) => {
33 32
     const { index } = e.detail
34 33
     setCurrentTab(index)
@@ -40,17 +39,30 @@ export default withLayout((props) => {
40 39
 
41 40
   useEffect(() => {
42 41
     getShopList().then((res) => {
43
-      const { shopList: list, account: acc, shop: current } = res
42
+      const { shopList: list, shop: current } = res
44 43
       setShopList(list)
45 44
       setShop(current)
46
-      setAccount(acc)
47
-      console.log("🚀 ~ file: shopKeeper.jsx ~ line 48 ~ getShopList ~ res", res)
45
+    })
46
+
47
+  }, [])
48
+
48 49
 
50
+  //未核销订单列表
51
+  useEffect(() => {
52
+    getVerifiedOrder({
53
+      isVerified: 0,
54
+      pageNum: 1,
55
+      pageSize: 99,
56
+      shopId: shopId,
49 57
 
58
+    }).then((res) => {
59
+      const order = res.records
60
+      setVerifiedOrder(order)
61
+      console.log("🚀 ~ file: spreadIndex.jsx ~ line 49 ~ getVerifiedOrder ~ res", res)
50 62
 
51 63
     })
52 64
 
53
-  }, [])
65
+  }, [shopId])
54 66
 
55 67
   useEffect(() => {
56 68
     if (shopId) {
@@ -86,8 +98,11 @@ export default withLayout((props) => {
86 98
       <CustomNav title={shop?.shopName} />
87 99
 
88 100
       <view className='index-container'>
89
-        {currentTab === 0 && <ShopKeeper shopList={shopList} shop={shop} account={account} onHotelChange={handleHotelChange} accountlog={accountlog} shopMoney={shopMoney} />}
90
-        {currentTab === 1 && <Sparead shopList={shopList} shop={shop} account={account} onHotelChange={handleHotelChange} accountlog={accountlog} shopMoney={shopMoney} />}
101
+        {currentTab === 0 && <ShopKeeper verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
102
+
103
+
104
+        }
105
+        {currentTab === 1 && <Sparead shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
91 106
       </view>
92 107
       <view className='index-tabbar'>
93 108
         <TabBar extClass='custom-tabbar bottomTab' current={currentTab} onChange={handleTabChange}>