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

+ 2
- 1
src/components/SearchBar/index.jsx 查看文件

@@ -4,7 +4,7 @@ import './style.less'
4 4
 
5 5
 export default (props) => {
6 6
 
7
-  const { placeholder, onBlur } = props
7
+  const { placeholder, onBlur, searchValue } = props
8 8
 
9 9
 
10 10
 
@@ -14,6 +14,7 @@ export default (props) => {
14 14
       <mp-searchbar
15 15
         placeholder={placeholder}
16 16
         onBlur={onBlur}
17
+        value={searchValue}
17 18
       >
18 19
       </mp-searchbar>
19 20
     </View>

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

@@ -25,7 +25,7 @@ export default (props) => {
25 25
         <image className='orderImg' src={item.poster} mode='aspectFit' />
26 26
         <view className='orderRight'>
27 27
           <view className='foodName'>{item.description}</view>
28
-          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>{(item.actualPrice / 100).toFixed(2)}</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
28
+          <view className='price'>合计金额:¥<text style={{ fontSize: '24rpx' }}>{(item.commissionCharge / 100).toFixed(2)}</text>元 <text className='pnum'>数量:<text>1</text>张</text> </view>
29 29
           <view>已下单:等待客户上门就餐</view>
30 30
         </view>
31 31
         <view className='line' />

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

@@ -39,7 +39,7 @@ export default (props) => {
39 39
         <Image className='orderImg' src={item.poster} mode='aspectFit' />
40 40
         <View className='orderRight'>
41 41
           <View className='foodName'>{item.description}</View>
42
-          <View className='price'>合计金额:¥<Text style={{ fontSize: '24rpx' }}>{item.actualPrice / 100}</Text>元 <Text className='pnum'>数量:<Text>1</Text>张</Text> </View>
42
+          <View className='price'>合计金额:¥<Text style={{ fontSize: '24rpx' }}>{(item.commissionCharge / 100).toFixed(2)}</Text>元 <Text className='pnum'>数量:<Text>1</Text>张</Text> </View>
43 43
         </View>
44 44
 
45 45
         <View className='veri_Date' > 核销时间:{formatTimes(item.verifiedDate, 'yyyy-MM-dd hh:mm')}</View>

+ 14
- 1
src/hotel/components/HouseManage/houseManage.jsx 查看文件

@@ -23,17 +23,22 @@ export default React.forwardRef((props, ref) => {
23 23
   const { hotel, hotelList, onHotelChange } = props
24 24
   const [detail, setDetail] = useState([])
25 25
 
26
+<<<<<<< HEAD
26 27
   // const fetchAPI = useMemo(() => hotel.hotelId ? () => getRoomList({ hotelId: hotel.hotelId }) : undefined, [hotel?.hotelId])
27 28
   // const queryParams = useMemo(() => ({}), [])
28 29
   const [queryParams, setQueryParams] = useState({ hotelId: hotel.hotelId, pageNum: 1, pageSize: 10})
29 30
 
30 31
   const [loading, setLoading] = useState(false)
32
+=======
33
+  const fetchAPI = useMemo(() => hotel.hotelId ? () => getRoomList({ hotelId: hotel.hotelId }) : undefined, [hotel?.hotelId])
34
+  const queryParams = useMemo(() => ({ pageNum: 1, pageSize: 0, }), [])
35
+>>>>>>> 91e477ef906774c0e2b33f2118e38d1b1544cb9c
31 36
 
32 37
   const shareDataRef = useRef()
33 38
 
34 39
   // 判断是否首次加载
35
-  const mounted = useRef(false)
36 40
 
41
+  const mounted = useRef(false)
37 42
   const handelClick = () => {
38 43
     Taro.navigateTo({ url: `/hotel/pages/landlord/addRoom/addRoom?hotelId=${hotel.hotelId}&hotelName=${hotel.hotelName}` });
39 44
   }
@@ -127,13 +132,18 @@ export default React.forwardRef((props, ref) => {
127 132
       })
128 133
     }
129 134
     else {
135
+      // setVal('')
130 136
       getRoomList({ hotelId: hotel.hotelId, roomName: e.detail.value }).then((res) => {
131 137
         setDetail(res.records || [])
132 138
       })
133 139
     }
134 140
   }
141
+<<<<<<< HEAD
135 142
   const handelCopy = (e, val) => {
136 143
     setLoading(true)
144
+=======
145
+  const handelCopy = (e, val, index) => {
146
+>>>>>>> 91e477ef906774c0e2b33f2118e38d1b1544cb9c
137 147
     //阻止冒泡不允许执行父元素的点击事件
138 148
     e.stopPropagation()
139 149
     saveRoom({ ...val, roomId: null, roomName: val.roomName + '复制', createDate: null }).then((res) => {
@@ -144,6 +154,8 @@ export default React.forwardRef((props, ref) => {
144 154
       })
145 155
       setLoading(false)
146 156
     })
157
+
158
+
147 159
   }
148 160
   const [showCutover3, setShowCutover3] = useState(false)
149 161
   const ShowMoldeOn3 = () => {
@@ -152,6 +164,7 @@ export default React.forwardRef((props, ref) => {
152 164
   const onClose3 = () => {
153 165
     setShowCutover3(false)
154 166
   }
167
+  const [val, setVal] = useState()
155 168
   return (
156 169
     <View style={{ display: 'flex', flexDirection: 'column', overflow: 'hidden', boxSizing: 'border-box',height:'100%' }}>
157 170
       <ToggleRole role='hotel' showCutover={showCutover3} maskClosable={showCutover3} onClose={onClose3} />

+ 14
- 1
src/hotel/pages/landlord/addRoom/addRoom.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import withLayout from '@/layouts'
2
-import Taro from '@tarojs/taro'
2
+import Taro, { useDidShow } from '@tarojs/taro'
3 3
 import CustomNav from '@/components/CustomNav'
4 4
 import { View, Input, Button, Label, Textarea, Text, Image } from '@tarojs/components';
5 5
 import { useEffect, useState } from "react"
@@ -31,11 +31,24 @@ export default withLayout((props) => {
31 31
   })
32 32
   const [paddress, setpAddress] = useState()
33 33
   const [wifiName, setwifiName] = useState()
34
+
35
+  const tipsMap = () => {
36
+    Taro.showToast({
37
+      title: '位置信息添加成功',
38
+      icon: 'success',
39
+      duration: 2000
40
+    })
41
+  }
42
+
43
+
34 44
   const onRoomMap = () => {
35 45
     Taro.chooseLocation().then((res) => {
36 46
       setRoomModel({ ...roomModel, location: res.longitude + ',' + res.latitude,locName: res.name })
37 47
     })
38 48
   }
49
+
50
+
51
+
39 52
   const onParkMap = () => {
40 53
     Taro.chooseLocation().then((res) => {
41 54
       setRoomModel({ ...roomModel, parkingLocation: res.longitude + ',' + res.latitude, pkLocName: res.name  })

+ 6
- 5
src/hotel/pages/landlord/addRoom/addRoom.less 查看文件

@@ -2,25 +2,26 @@
2 2
   padding: 30px;
3 3
   background-color: #f8f8f8;
4 4
   .weui-cells__title {
5
-    font-size: 34px;
5
+    font-size: 26px;
6 6
   }
7 7
   .weui-cells_after-title {
8 8
     border-radius: 50px;
9 9
     font-size: 30px;
10 10
     margin-top: 40px;
11 11
   }
12
-  .roomloc{
12
+  .roomloc {
13 13
     position: relative;
14
-    .location{
14
+    font-size: 26px;
15
+    .location {
15 16
       width: 50px;
16 17
       height: 50px;
17
-      position:absolute;
18
+      position: absolute;
18 19
       right: 0;
19 20
       top: -2px;
20 21
       z-index: 999;
21 22
     }
22 23
   }
23
-  
24
+
24 25
   .adds {
25 26
     width: 100%;
26 27
     background-color: #fff;

+ 0
- 1
src/pages/details/foodDetails/foodDetails.less 查看文件

@@ -187,7 +187,6 @@
187 187
   border-radius: 12px;
188 188
   column-count: 3;
189 189
   text-align: center;
190
-  height: 6em;
191 190
 
192 191
   .sharebtn {
193 192
     position: absolute;

+ 0
- 1
src/pages/details/mjDetails/sceneryDetails.less 查看文件

@@ -154,7 +154,6 @@
154 154
   border-radius: 12px;
155 155
   column-count: 3;
156 156
   text-align: center;
157
-  height: 6em;
158 157
 
159 158
   .sharebtn {
160 159
     position: absolute;

+ 4
- 1
src/pages/index/components/Card/index.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 
2
-import Taro from '@tarojs/taro'
2
+import Taro, { useDidShow } from '@tarojs/taro'
3 3
 import useSave from "@/utils/hooks/useSave"
4 4
 import msTip from '@/assets/icons/housemantj/foodtip.png'
5 5
 import mjTip from '@/assets/icons/housemantj/mjtip.png'
@@ -21,6 +21,9 @@ export default (props) => {
21 21
       Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${item.targetId}` })
22 22
     }
23 23
   }
24
+
25
+
26
+
24 27
   return (
25 28
     <view className='contentCard' style={style}>
26 29
       <view className='cardTop'>

+ 11
- 3
src/pages/index/tabs/Guide.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import { useState, useEffect, useRef } from "react";
2
-import Taro from '@tarojs/taro'
2
+import Taro, { useDidShow } from '@tarojs/taro'
3 3
 import MoreGuide from "@/components/MoreGuide";
4 4
 import BossCard from '@/components/BossCard'
5 5
 import GPS from '@/assets/icons/GuideCheck/GPS.png'
@@ -55,8 +55,7 @@ export default (props) => {
55 55
     })
56 56
   }
57 57
 
58
-
59
-  useEffect(() => {
58
+  const goContent = () => {
60 59
     if (roomOrderId) {
61 60
       goToRoomForm(roomOrderId).then((res) => {
62 61
         if (res.status !== 1 && res.personNum > 0) {
@@ -66,8 +65,17 @@ export default (props) => {
66 65
         }
67 66
       })
68 67
     }
68
+  }
69
+
70
+
71
+  useEffect(() => {
72
+    goContent()
69 73
   }, [roomId, roomOrderId])
70 74
 
75
+  useDidShow(() => {
76
+    goContent()
77
+  })
78
+
71 79
 
72 80
   useEffect(() => {
73 81
 

+ 11
- 1
src/pages/index/tabs/Recommend.jsx 查看文件

@@ -1,4 +1,4 @@
1
-import Taro from '@tarojs/taro'
1
+import Taro, { useDidShow } from '@tarojs/taro'
2 2
 import { React, useState, useEffect, useRef } from 'react'
3 3
 import iconsearch from '@/assets/icons/housemantj/search.png'
4 4
 import locationimg from '@/assets/icons/housemantj/location.png'
@@ -55,8 +55,18 @@ export default (props) => {
55 55
     // 用绝对路径
56 56
     Taro.navigateTo({ url: '/pages/search/search' });
57 57
   }
58
+  // 联动收藏
59
+  const likeLook = () => {
60
+    getResourceList().then(e => {
61
+      setAllList(e.records)
62
+    })
63
+
64
+  }
58 65
 
59 66
 
67
+  useDidShow(() => {
68
+    likeLook()
69
+  })
60 70
 
61 71
 
62 72
 

+ 40
- 38
src/shop/components/ShopKeeper/shopKeeper.jsx 查看文件

@@ -102,47 +102,48 @@ export default (props) => {
102 102
       </view>
103 103
       <ToggleRole showCutover={showCutover} maskClosable={showCutover} onClose={onClose} role='shop' />
104 104
       <view style={{ padding: '30rpx', height: '100%' }}>
105
-        <scroll-view scrollY style={{ height: 'calc(100vh - 120px)' }}>
106
-          <view className='storexx'>
107
-            <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder='请选择商铺' value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
108
-            <view onClick={ShowMoldeOn} className='User-info-cutover'>
109
-              <image className='User-info-cutover-image' src={cutoverUser} />
110
-            </view>
111
-            <view className='tip'>(计算收入以核销为准)</view>
112
-            <view className='money'>
113
-              <view className='sleft'>
114
-                <view className='lword'>全年订单收入(税前)</view>
115
-
116
-                <view className='yearMoney'>
117
-                  <text>{isyear ? (shopMoney?.totalCharges / 100).toFixed(2) : '******'}</text>元
118
-                  <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
119
-                </view>
105
+        <view className='storexx'>
106
+          <view className='storeName'>店名:<Picker style={{ display: 'inline-block' }} placeholder='请选择商铺' value={shop?.shopId} kv={['shopName', 'shopId']} dicts={shopList} onChange={handleHotelChange} /></view>
107
+          <view onClick={ShowMoldeOn} className='User-info-cutover'>
108
+            <image className='User-info-cutover-image' src={cutoverUser} />
109
+          </view>
110
+          <view className='tip'>(计算收入以核销为准)</view>
111
+          <view className='money'>
112
+            <view className='sleft'>
113
+              <view className='lword'>全年订单收入(税前)</view>
114
+
115
+              <view className='yearMoney'>
116
+                <text>{isyear ? (shopMoney?.totalCharges / 100).toFixed(2) : '******'}</text>元
117
+                <image className='micon' src={isyear ? eyes : ceyes} onClick={handleYear} />
120 118
               </view>
121
-              <view className='line' />
122
-              <view className='sright'>
123
-                <view className='rword'>当月订单收入(税前)</view>
124
-                <view className='monthMoney'>
125
-                  <text>{isMomth ? (shopMoney?.currentCharges / 100).toFixed(2) : '******'}</text>元
126
-                  <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
127
-                </view></view>
128 119
             </view>
120
+            <view className='line' />
121
+            <view className='sright'>
122
+              <view className='rword'>当月订单收入(税前)</view>
123
+              <view className='monthMoney'>
124
+                <text>{isMomth ? (shopMoney?.currentCharges / 100).toFixed(2) : '******'}</text>元
125
+                <image className='micon2' src={isMomth ? eyes : ceyes} onClick={handleMonth}></image>
126
+              </view></view>
129 127
           </view>
130
-          <view className='search'>
128
+        </view>
129
+        <view className='search'>
130
+
131
+          <SearchBar placeholder='搜索订单(输入客户手机号码)' onBlur={handelSearch} />
132
+        </view>
133
+        <view className='index-tabs'>
134
+          <mp-tabs
135
+            tabClass='tabs-Unselected'
136
+            swiperClass='tabs-swiper'
137
+            activeClass='tabs-Selected'
138
+            tabs={tabs}
139
+            current={activeTab}
140
+            onChange={handleTabChange}
141
+            activeTab={activeTab}
142
+          >
143
+          </mp-tabs>
144
+        </view>
145
+        <scroll-view scrollY style={{ height: 'calc(100vh - 120px)' }}>
131 146
 
132
-            <SearchBar placeholder='搜索订单(输入客户手机号码)' onBlur={handelSearch} />
133
-          </view>
134
-          <view className='index-tabs'>
135
-            <mp-tabs
136
-              tabClass='tabs-Unselected'
137
-              swiperClass='tabs-swiper'
138
-              activeClass='tabs-Selected'
139
-              tabs={tabs}
140
-              current={activeTab}
141
-              onChange={handleTabChange}
142
-              activeTab={activeTab}
143
-            >
144
-            </mp-tabs>
145
-          </view>
146 147
           <view>
147 148
             {/* 未核销 */}
148 149
             {activeTab === 0 &&
@@ -175,8 +176,9 @@ export default (props) => {
175 176
               </>
176 177
             }
177 178
           </view>
178
-          {/* <view className='botton'>这是我的底线</view> */}
179 179
         </scroll-view>
180
+
181
+        {/* <view className='botton'>这是我的底线</view> */}
180 182
       </view>
181 183
     </view>
182 184
   )