吃个甘蔗嚼一年 3 years ago
parent
commit
048caaf1cf

+ 6
- 2
src/components/ShopUnused/index.jsx View File

@@ -4,6 +4,8 @@ import formatTimes from '@/utils/formatTime'
4 4
 import iconsearch from '@/assets/icons/housemantj/search.png'
5 5
 import ms from '@/assets/icons/housemantj/ms3.jpg'
6 6
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
7
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
8
+
7 9
 import './style.less'
8 10
 
9 11
 
@@ -12,9 +14,11 @@ export default (props) => {
12 14
 
13 15
 
14 16
 
15
-  useEffect(() => {
17
+  // useEffect(() => {
18
+  //   getVerifiedOrder({ phone: '18082043755' }).then((res) => {
16 19
 
17
-  }, [])
20
+  //   })
21
+  // }, [])
18 22
 
19 23
   return (
20 24
     <view className='orderCard'>

+ 5
- 4
src/components/ShopUsed/index.jsx View File

@@ -29,15 +29,13 @@ export default (props) => {
29 29
   }
30 30
 
31 31
 
32
-  useEffect(() => {
33 32
 
34
-  }, [])
35 33
 
36 34
   return (
37 35
     <View className='orderCard'>
38 36
       <View style={{ overflow: 'hidden' }}>
39 37
         <View className='orderId'>订单编号:{item.orderId}</View>
40
-        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss')}</View>
38
+        <View className='orderTime'>下单日期:{formatTimes(item.orderDate, 'yyyy-MM-dd hh:ss') || ''}</View>
41 39
       </View>
42 40
       <View className='order'>
43 41
         <Image className='orderImg' src={item.poster} mode='aspectFit' />
@@ -47,7 +45,10 @@ export default (props) => {
47 45
         </View>
48 46
         <View className='line' />
49 47
         <View className='phone'>客户手机:<Text>{item.phone.replace(/^(\d{3})\d{4}(\d+)/, "$1****$2") || ''}</Text>
50
-          <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button> </View>
48
+          {
49
+            !item.isConfirmVerified && <button className='Button-OK' onClick={confirmOrder} style={{ display: buttonStyle }}  >确认核销</button>
50
+          }
51
+        </View>
51 52
       </View>
52 53
     </View>
53 54
   )

+ 3
- 5
src/pages/index/tabs/Mine.jsx View File

@@ -31,7 +31,6 @@ export default (props) => {
31 31
   const hasAvatar = !!person.avatar
32 32
   const [orderNum, setOrderNum] = useState([])
33 33
 
34
-  console.log('--------DefaultImage-----', DefaultImage)
35 34
 
36 35
   const ShowMoldeOn = () => {
37 36
     setShowCutover(true)
@@ -46,7 +45,6 @@ export default (props) => {
46 45
   }, [])
47 46
 
48 47
 
49
-
50 48
   // 通过getUserProfile获取微信用户信息
51 49
   const handleGetUserProfile = () => {
52 50
     if (hasAvatar) return;
@@ -135,12 +133,12 @@ export default (props) => {
135 133
             <view className='buy-list-Paybox' onClick={handleTobePaid} >
136 134
               <image className='buy-list-PayLogo' src={awaitPay} />
137 135
               <view className='buy-list-goPay'>待支付</view>
138
-              <view className='buy-list-OrderNumber'>{orderNum?.unPayNum}笔订单</view>
136
+              <view className='buy-list-OrderNumber'>{orderNum?.unPayNum || '0'}笔订单</view>
139 137
             </view>
140 138
             <view className='buy-list-Paybox ' onClick={handleTobeWritten} >
141 139
               <image className='buy-list-PayLogo' src={ToShop} />
142 140
               <view className='buy-list-goPay'>待核销</view>
143
-              <view className='buy-list-OrderNumber'>{orderNum?.unVerifiedNum}个订单</view>
141
+              <view className='buy-list-OrderNumber'>{orderNum?.unVerifiedNum || '0'}个订单</view>
144 142
             </view>
145 143
             <view className='buy-list-Paybox ' onClick={handleAllOrder} >
146 144
               <image className='buy-list-PayLogo' src={AllOrder} />
@@ -150,7 +148,7 @@ export default (props) => {
150 148
             <view className='buy-list-Paybox ' onClick={handleRefund} >
151 149
               <image className='buy-list-PayLogo' src={Refund} />
152 150
               <view className='buy-list-goPay'>退款/售后</view>
153
-              <view className='buy-list-OrderNumber'>{orderNum?.refundNum}笔订单</view>
151
+              <view className='buy-list-OrderNumber'>{orderNum?.refundNum || '0'}笔订单</view>
154 152
             </view>
155 153
           </view>
156 154
           <view className='Badge-box'>

+ 32
- 7
src/shop/components/ShopKeeper/shopKeeper.jsx View File

@@ -6,11 +6,14 @@ import Popup from '@/components/Popup'
6 6
 import ShopUsed from '@/components/ShopUsed' //已核销
7 7
 import ShopUnused from '@/components/ShopUnused' //未核销
8 8
 import SearchBar from '@/components/SearchBar'
9
+import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
9 10
 
10 11
 import eyes from '@/assets/icons/shopKeeper/小眼睛.png'
11 12
 import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png'
12 13
 import iconsearch from '@/assets/icons/housemantj/search.png'
13 14
 import ms from '@/assets/icons/housemantj/ms3.jpg'
15
+import ToggleRole from '@/components/toggleRole/ToggleRole'
16
+
14 17
 import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png'
15 18
 import touristON from '@/assets/icons/UserCenter/touristON.png'
16 19
 import touristOFF from '@/assets/icons/UserCenter/touristOFF.png'
@@ -19,11 +22,10 @@ import hotelBossOFF from '@/assets/icons/UserCenter/hotelBossOFF.png'
19 22
 import shopBossON from '@/assets/icons/UserCenter/shopBossON.png'
20 23
 import shopBossOFF from '@/assets/icons/UserCenter/shopBossOFF.png'
21 24
 import './shopKeeper.less'
22
-import ToggleRole from '@/components/toggleRole/ToggleRole'
23 25
 
24 26
 
25 27
 export default (props) => {
26
-  const { shopList, shop, onHotelChange, shopMoney, verifiedOrder, onVarified, onVarifiedTwo } = props
28
+  const { shopList, shop, onHotelChange, shopMoney, verifiedOrder, onVarified, onVarifiedTwo, setVer } = props
27 29
   const shopId = shop?.shopId
28 30
   const [activeTab, setActiveTab] = useState(0)
29 31
   const { params } = useRouter()
@@ -71,6 +73,11 @@ export default (props) => {
71 73
     },
72 74
   ]
73 75
 
76
+  const [vale, setVale] = useState('')
77
+
78
+  const phoneVale = () => {
79
+
80
+  }
74 81
 
75 82
   const handleVarified = () => {
76 83
     onVarified()
@@ -78,7 +85,29 @@ export default (props) => {
78 85
 
79 86
 
80 87
   const onSearch = (e) => {
81
-    console.log('eeeeeeeeeeeeeeeeee', e.detail.value);
88
+    const val = e.detail.value
89
+    if (val !== '') {
90
+      getVerifiedOrder({
91
+        phone: val,
92
+        pageNum: 1,
93
+        pageSize: 10,
94
+
95
+      }).then((res) => {
96
+        setVer(res)
97
+
98
+      })
99
+    } else {
100
+      getVerifiedOrder({
101
+        shopId: shopId,
102
+        pageNum: 1,
103
+        pageSize: 10,
104
+
105
+      }).then((res) => {
106
+        setVer(res)
107
+
108
+      })
109
+    }
110
+
82 111
   }
83 112
 
84 113
   const [showCutover, setShowCutover] = useState(false)
@@ -135,10 +164,6 @@ export default (props) => {
135 164
             >
136 165
             </mp-tabs>
137 166
           </view>
138
-          {
139
-            verifiedOrder.map
140
-
141
-          }
142 167
           <view>
143 168
             {/* 未核销 */}
144 169
             {activeTab === 0 &&

+ 10
- 1
src/shop/pages/spread/spreadIndex.jsx View File

@@ -47,6 +47,15 @@ export default withLayout((props) => {
47 47
   }, [])
48 48
 
49 49
 
50
+  // 搜索核销手机号
51
+  const setVer = (e) => {
52
+    setVerifiedOrder(e.records)
53
+
54
+
55
+
56
+  }
57
+
58
+
50 59
   //未核销订单列表
51 60
   useEffect(() => {
52 61
     getVerifiedOrder({
@@ -107,7 +116,7 @@ export default withLayout((props) => {
107 116
     <view className='page-index'>
108 117
       <CustomNav title={shop?.shopName} />
109 118
       <view className='index-container'>
110
-        {currentTab === 0 && <ShopKeeper onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
119
+        {currentTab === 0 && <ShopKeeper setVer={setVer} onVarifiedTwo={onVarifiedTwo} onVarified={onVarified} verifiedOrder={verifiedOrder} shopList={shopList} shop={shop} onHotelChange={handleHotelChange} shopMoney={shopMoney} />
111 120
         }
112 121
         {currentTab === 1 && <Sparead shopList={shopList} shop={shop} verifiedOrder={verifiedOrder} onHotelChange={handleHotelChange} shopMoney={shopMoney} />}
113 122
       </view>