import { React, useState, useEffect, useRef } from 'react' import Taro, { useRouter } from '@tarojs/taro' import CustomNav from '@/components/CustomNav' import Picker from '@/components/Picker' import Popup from '@/components/Popup' import ShopUsed from '@/components/ShopUsed' //已核销 import ShopUnused from '@/components/ShopUnused' //未核销 import SearchBar from '@/components/SearchBar' import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss' import List from '@/components/List'; import eyes from '@/assets/icons/shopKeeper/小眼睛.png' import ceyes from '@/assets/icons/shopKeeper/小眼睛-闭上.png' import iconsearch from '@/assets/icons/housemantj/search.png' import ms from '@/assets/icons/housemantj/ms3.jpg' import ToggleRole from '@/components/toggleRole/ToggleRole' import cutoverUser from '@/assets/icons/UserCenter/cutoverUser.png' import './shopKeeper.less' import { useMemo } from 'react' export default (props) => { const { shopList, shop, onHotelChange, shopMoney, verifiedOrder, isVerified, onVarified, onVarifiedTwo, setVer } = props const { params } = useRouter() const { tabJump } = params || {} const [activeTab, setActiveTab] = useState(0) const [phone, setPhone] = useState() // const [isVerified, setisVerified] = useState(0) // const [queryParams, setQueryParams] = useState({ isVerified: isVerified, pageNum: 1, pageSize: 10, shopId: shop?.shopId, phone: phone }) const queryParams = useMemo(() => ({ shopId: shop?.shopId, isVerified: `${tabJump}` === '1' ? 1 : 0, phone: phone || '', }), [phone, shop?.shopId, tabJump]) // 获取资源表信息 const [alllist, setAllList] = useState([]) const [isyear, setYear] = useState(true) const [isMomth, setMonth] = useState(false) //小眼睛开关 const handleYear = () => { isyear ? setYear(false) : setYear(true) } const handleMonth = () => { isMomth ? setMonth(false) : setMonth(true) } const handleHotelChange = (e, current) => { onHotelChange(current) } const handelSearch = (e) => { const val = e.detail.value setPhone(val) } useEffect(() => { if (tabJump) { setActiveTab(tabJump - 0) } }, [tabJump]) const handleTabChange = (e) => { const { index } = e.detail setActiveTab(index) } const tabs = [ { title: '未核销订单', }, { title: '已核销订单', }, ] //给父组件传val const handleVarified = () => { onVarified() } const [showCutover, setShowCutover] = useState(false) const ShowMoldeOn = () => { setShowCutover(true) } const onClose = () => { setShowCutover(false) } return ( 店名: (计算收入以核销为准) 全年订单收入(税前) {isyear ? shopMoney?.totalCharges / 100 : '******'} 当月订单收入(税前) {isMomth ? shopMoney?.currentCharges / 100 : '******'} {/* 未核销 */} {activeTab === 0 && <> } > } {/* 已核销 */} {activeTab === 1 && <> } > } {/* 已经到底了~ */} ) }