Commit 3eb4349b by 肖康

Merge branch 'feature/20250108/web' into dev

# Conflicts:
#	configReact.tsx
parents 96ea1321 07eb486b
......@@ -210,7 +210,7 @@ const ListOneItem = (props: dataListItemType) => {
})
}
</div>
<div className={`${styles.item}`} style={{ width: '160px' }}>
<div className={`${styles.item}`} style={{ width: '163px' }}>
<>
<Input value={purNum || itemInfo.moq} style={{ width: 100,"borderColor":"#999" }} onChange={(e) => changeNum(e, Number(itemInfo.moq), Number(itemInfo.stock), itemInfo)} placeholder="请输入数量" />
{itemInfo.cn_delivery_time &&
......
......@@ -26,6 +26,7 @@ export type dataListItemType = {
multiple: number;
stock: number;
supplier_name: string;
supplier_id?: any;
ladder_price: Array<{
checked?:boolean;
price_cn: number;
......
const os = require('os');
export const QQURL='https://wpa.qq.com/msgrd?v=3&amp;uin=1908059998&amp;site=qq&amp;menu=yes'
export const API_URL=(os.hostname()=="MS-NDPSTQVAWPAX"||os.hostname()=="dev235"||os.hostname()=="erpweb.liexindev.com")?'http://erpweb.liexindev.net':'http://api.chiplinks.net'
export const API_URL=((os.hostname()=="MS-NDPSTQVAWPAX"||os.hostname()=="dev235"||os.hostname()=="localhost"||os.hostname()=="erpweb.liexindev.com")?'http://erpweb.liexindev.net':'http://api.chiplinks.net')
console.log(os.hostname(),API_URL)
.shopBox {
margin: 20px auto;
width: 1226px;
position: relative;
}
.shopBox.shopBoxNot::before {
content: "";
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background: rgba(125, 125, 125, 0.3);
z-index: 2;
cursor: not-allowed;
}
.shopLayer {
width: 1226px;
background-color: #fff;
box-sizing: border-box;
padding: 20px 25px;
}
.shopLayer .basicModule {
width: 100%;
height: 175px;
background-color: #fff;
box-sizing: border-box;
}
.shopLayer .basicModule .basicTitle {
height: 20px;
font-size: 14px;
line-height: 20px;
}
.shopLayer .basicModule .subTitle {
padding: 10px 30px 0;
}
.shopLayer .basicModule .subTitle > span {
font-weight: bold;
color: #000;
margin-right: 20px;
}
.shopLayer .typeButton {
width: 115px;
height: 24px;
background: #FFAE33;
border-radius: 1px;
color: #FFFFFF;
font-size: 14px;
cursor: pointer;
margin-left: 10px;
}
.shopLayer .changeButton {
width: 75px;
height: 20px;
font-size: 12px;
color: #595959;
background: #FFFFFF;
border-radius: 1px;
border: 1px solid #B0B0B0;
cursor: pointer;
}
.shopLayer .changeButton:hover {
color: #000;
}
.shopLayer .basicContent {
padding: 10px 60px;
box-sizing: border-box;
height: 100%;
display: flex;
flex-direction: column;
flex-wrap: wrap;
font-size: 14px;
}
.shopLayer .basicContent .basicItem {
width: calc(50% - 5px);
display: inline-flex;
height: 30px;
align-items: center;
color: #808080;
}
.shopLayer .basicContent .basicItem > span:last-child {
color: #000;
margin-left: 10px;
}
.shopLayer .layerContain {
margin-top: 60px;
}
.layerFooter {
width: 100%;
height: 300px;
margin-top: 20px;
align-items: center;
background-color: #fff;
box-sizing: border-box;
padding-left: 45px;
text-align: right;
padding: 20px 40px;
}
.layerFooter .accountButton {
width: 170px;
height: 68px;
background: #D0121B;
margin-top: 30px;
color: #fff;
font-weight: bold;
cursor: pointer;
}
.layerFooter .countLine {
margin-bottom: 10px;
}
.disNumber {
display: inline-block;
width: 100px;
margin-left: 15px;
text-align: left;
}
.keyNumbers {
color: #CC0000;
font-weight: bold;
margin-top: 20px;
}
.announce {
width: 100%;
height: 130px;
background: #FFFFFF;
padding: 25px 60px;
font-size: 12px;
box-sizing: border-box;
margin-top: 20px;
}
.invoiceType {
display: inline-block;
width: 100px;
text-align: right;
margin-left: -10px;
}
.shopBox{margin:20px auto;width:1226px;position:relative}.shopLayer{width:1226px;background-color:#fff;box-sizing:border-box;padding:20px 25px}.shopLayer .basicModule{width:100%;height:175px;background-color:#fff;box-sizing:border-box}.shopLayer .basicModule .basicTitle{height:20px;font-size:14px;line-height:20px}.shopLayer .basicModule .subTitle{padding:10px 30px 0}.shopLayer .basicModule .subTitle>span{font-weight:bold;color:#000;margin-right:20px}.shopLayer .typeButton{width:115px;height:24px;background:#FFAE33;border-radius:1px;color:#FFFFFF;font-size:14px;cursor:pointer;margin-left:10px}.shopLayer .changeButton{width:75px;height:20px;font-size:12px;color:#595959;background:#FFFFFF;border-radius:1px;border:1px solid #B0B0B0;cursor:pointer}.shopLayer .changeButton:hover{color:#000}.shopLayer .basicContent{padding:10px 60px;box-sizing:border-box;height:100%;display:flex;flex-direction:column;flex-wrap:wrap;font-size:14px}.shopLayer .basicContent .basicItem{width:calc(50% - 5px);display:inline-flex;height:30px;align-items:center;color:#808080}.shopLayer .basicContent .basicItem>span:last-child{color:#000;margin-left:10px}.shopLayer .layerContain{margin-top:60px}.layerFooter{width:100%;height:300px;margin-top:20px;align-items:center;background-color:#fff;box-sizing:border-box;padding-left:45px;text-align:right;padding:20px 40px}.layerFooter .accountButton{width:170px;height:68px;background:#D0121B;margin-top:30px;color:#fff;font-weight:bold;cursor:pointer}.layerFooter .countLine{margin-bottom:10px}.disNumber{display:inline-block;width:100px;margin-left:15px;text-align:left}.keyNumbers{color:#CC0000;font-weight:bold;margin-top:20px}.announce{width:100%;height:130px;background:#FFFFFF;padding:25px 60px;font-size:12px;box-sizing:border-box;margin-top:20px}.invoiceType{display:inline-block;width:100px;text-align:right;margin-left:-10px}
.shopBox{margin:20px auto;width:1226px;position:relative}.shopBox.shopBoxNot::before{content:"";position:absolute;left:0px;top:0px;width:100%;height:100%;background:rgba(125,125,125,0.3);z-index:2;cursor:not-allowed}.shopLayer{width:1226px;background-color:#fff;box-sizing:border-box;padding:20px 25px}.shopLayer .basicModule{width:100%;height:175px;background-color:#fff;box-sizing:border-box}.shopLayer .basicModule .basicTitle{height:20px;font-size:14px;line-height:20px}.shopLayer .basicModule .subTitle{padding:10px 30px 0}.shopLayer .basicModule .subTitle>span{font-weight:bold;color:#000;margin-right:20px}.shopLayer .typeButton{width:115px;height:24px;background:#FFAE33;border-radius:1px;color:#FFFFFF;font-size:14px;cursor:pointer;margin-left:10px}.shopLayer .changeButton{width:75px;height:20px;font-size:12px;color:#595959;background:#FFFFFF;border-radius:1px;border:1px solid #B0B0B0;cursor:pointer}.shopLayer .changeButton:hover{color:#000}.shopLayer .basicContent{padding:10px 60px;box-sizing:border-box;height:100%;display:flex;flex-direction:column;flex-wrap:wrap;font-size:14px}.shopLayer .basicContent .basicItem{width:calc(50% - 5px);display:inline-flex;height:30px;align-items:center;color:#808080}.shopLayer .basicContent .basicItem>span:last-child{color:#000;margin-left:10px}.shopLayer .layerContain{margin-top:60px}.layerFooter{width:100%;height:300px;margin-top:20px;align-items:center;background-color:#fff;box-sizing:border-box;padding-left:45px;text-align:right;padding:20px 40px}.layerFooter .accountButton{width:170px;height:68px;background:#D0121B;margin-top:30px;color:#fff;font-weight:bold;cursor:pointer}.layerFooter .countLine{margin-bottom:10px}.disNumber{display:inline-block;width:100px;margin-left:15px;text-align:left}.keyNumbers{color:#CC0000;font-weight:bold;margin-top:20px}.announce{width:100%;height:130px;background:#FFFFFF;padding:25px 60px;font-size:12px;box-sizing:border-box;margin-top:20px}.invoiceType{display:inline-block;width:100px;text-align:right;margin-left:-10px}
......@@ -2,6 +2,19 @@
margin: 20px auto;
width: 1226px;
position: relative;
&.shopBoxNot{
&::before{
content:"";
position: absolute;
left:0px;
top:0px;
width:100%;
height:100%;
background: rgba(125,125,125,0.3);
z-index: 2;
cursor: not-allowed;
}
}
}
.shopLayer {
width: 1226px;
......
......@@ -31,6 +31,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
const [defaultAddress, setDefaultAddress] = useState<any>();
const [arrInvoice, setArrInvoice] = useState<any>();
const [arrAddress, setArrAddress] = useState<any>();
const [userInfo,setUserInfo]= useState<any>(null);
const {query}=router
const [idList, setIdList] = useState<any>([])
......@@ -78,7 +79,23 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
if (query?.deliveryPlaceType) setSePlace(String(query?.deliveryPlaceType))
if (query?.number) setGoodNumber(Number(query?.number))
handleDataInit()
}, [query,sourceType])
// useEffect(() => {
// if(userInfo){return}
// userRequest({ url: '/api/userInfo/userInfo', method: 'get', data: { } }).then((res) => {
// if (res?.code === 0) {
// setUserInfo(res?.data)
// if(res?.data.audit_status!=1){
// message("请先审核用户发票!",3000)
// }
// }else{
// message(res?.msg)
// }
// })
// }, [])
useEffect(() => {
handleInvoiceInit()
handleAddressInit()
......@@ -100,6 +117,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
if(disArray.length>0){handleOrderCount(param)}
}, [shopList])
const handleOrderCount = async (param: any) => {
const res = await userRequest({
url: `/api/order/calculateOrder`,
......@@ -171,6 +189,10 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
}
const handleOrderSubmit = async () => {
// if(userInfo?.audit_status!=1){
// message("请先审核用户发票!",3000)
// return
// }
const param = {
goods_list: disList.map((disItem:any) => {
return {
......@@ -212,7 +234,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
return (
<>
<Header {...props.cateList} />
<div className={styles.shopBox}>
<div className={`${styles.shopBox}`}>
<div className={styles.shopLayer}>
{sePlace === '1' && (
<div className={styles.basicModule}>
......
......@@ -10,7 +10,7 @@ import ListOneItem from '../../components/ListOneItem';
import { brandsAndClasssReducer, supplierDataReducer } from '@/reducers/searchReducers';
import type { ResponseTypeSearch, supplierDataType } from '@/types/searchTypes'
import useRequest from '../../hooks/useRequest';
import ListNoData from '../../components/ListNoData';
import { useRouter } from 'next/router';
......@@ -25,10 +25,10 @@ import FixedSearchTop from '@/components/FixedSearchTop';
export const getServerSideProps: GetServerSideProps = async () => {
return getCateList()
}
const supplierIdS = ['', '24','73','102','57']
const supplierIdS = ['', '24', '73', '102', '57']
const Page = (props: { cateList: ResponseTypeCateList }) => {
const { QQURL,PHONE}=useQq()
const { QQURL, PHONE } = useQq()
const requestCount = useRef(0)
const router = useRouter()
const keyword = router.query.keyword || '';
......@@ -38,7 +38,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
const { request: getListRequest } = useRequest<ResponseTypeSearch>({ manual: true,loading:false })
const { request: getListRequest } = useRequest<ResponseTypeSearch>({ manual: true, loading: false })
const initSupplierList = useRef<supplierDataType[]>([])//初始化数据
const [supplierList, dispatchSupplierList] = useReducer(supplierDataReducer, [])
......@@ -46,12 +46,15 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
const [isFixedH, setIsFixedH] = useState(false);
useEffect(() => {
const handleScroll = () => {
let distanceFromTop = document.getElementById('tableboxfg')!.offsetTop;
if (window.scrollY > distanceFromTop) {
setIsFixedH(true);
} else {
setIsFixedH(false);
}
try {
let distanceFromTop = document.getElementById('tableboxfg')!.offsetTop;
if (window.scrollY > distanceFromTop) {
setIsFixedH(true);
} else {
setIsFixedH(false);
}
} catch (err) { }
};
window.addEventListener('scroll', handleScroll);
// 清除事件监听器
......@@ -60,6 +63,26 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
};
}, []);
const getSlideSupplierInit = (datasg: any[]) => {
let newSlideSupplier: any = []
datasg.forEach((item) => {
const id_ = String(item.supplier_id)
const name_ = String(item.supplier_name)
newSlideSupplier = [...newSlideSupplier, { id: id_, value: name_, checked: false }]
})
let uniqueBrand = newSlideSupplier.reduce((acc: any, current: any) => {
if (!acc.some((item: any) => item.id === current.id)) {
if (current.value) {
acc.push(current);
}
}
return acc;
}, []);
if (uniqueBrand.length > 0) {
uniqueBrand[0].checked = true
}
return uniqueBrand
}
useEffect(() => {
initSupplierList.current = []
......@@ -82,9 +105,15 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
datasg.push(child)
})
})
dispatchSupplierR({ type: 'supplierInit', value: JSON.parse(JSON.stringify(datasg)) })
dispatchBrands({ type: 'brandsInit', value: JSON.parse(JSON.stringify(datasg)) })
dispatchclasss({ type: 'classsInit', value: JSON.parse(JSON.stringify(datasg)) })
dispatchSupplierList({ type: 'init', value: JSON.parse(JSON.stringify(initSupplierList.current)) })
if (requestCount.current >= supplierIdS.length) {
}
......@@ -96,21 +125,80 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
stockSort: '',
priceSort: ''
})
const [supplierR, dispatchSupplierR] = useReducer(brandsAndClasssReducer, [])
const [brandsR, dispatchBrands] = useReducer(brandsAndClasssReducer, [])
const [classsR, dispatchclasss] = useReducer(brandsAndClasssReducer, [])
//品牌分类盒子 UI
const supplierListRef = useRef<HTMLDivElement>(null);
const brandListRef = useRef<HTMLDivElement>(null);
const classListRef = useRef<HTMLDivElement>(null);
const [supplierListAll, setSupplierListAll] = useState(false)
const [brandListAll, setBrandListAll] = useState(false)
const [classListAll, setClassListAll] = useState(false)
//侧边栏盒子
const [slideSupplier, setSlideSupplier] = useState<any>([])
const elementsRef = useRef([]);
useEffect(() => {
if (supplierR.length == 0) {
setSlideSupplier([])
return
}
let arr_: any[] = []
supplierR.forEach(item => {
if (item.checked) {
arr_.push({
id: item.id,
value: item.value
})
}
})
if (arr_.length == 0) {
supplierR.forEach(item => {
arr_.push({
id: item.id,
value: item.value,
check: false
})
})
}
arr_[0].checked = true
setSlideSupplier(arr_)
}, [supplierR])
const scrollToSupplierBox = (id: string | number) => {
let arr_:any[]=[]
slideSupplier.forEach((item:any) => {
arr_.push({
value:item.value,
id:item.id,
checked:id==item.id?true:false
})
});
setSlideSupplier(arr_)
try {
const element = document.getElementById('supplierBox' + id);
if (element) {
const elementTop = element.offsetTop;
const scrollPosition = elementTop - 100;
console.log(scrollPosition)
window.scrollTo({
top: scrollPosition,
behavior: 'smooth'
});
}
} catch (e) {
}
}
//品牌,分类,排序发生变化
//品牌,分类,渠道,排序发生变化
useEffect(() => {
dispatchSupplierList({ type: 'change', value: JSON.parse(JSON.stringify(initSupplierList.current)), brandsR: brandsR, classsR: classsR, sortObj: sortObj })
}, [brandsR, classsR, sortObj])
dispatchSupplierList({ type: 'change', value: JSON.parse(JSON.stringify(initSupplierList.current)), supplierR: supplierR, brandsR: brandsR, classsR: classsR, sortObj: sortObj })
}, [brandsR, classsR, supplierR, sortObj])
const updateBrandAndClass = (type: number, id?: string) => {
if (type === 1) {
......@@ -119,10 +207,14 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
if (type === 2) {
dispatchclasss({ type: 'classsUpdate', value: id })
}
if (type === 3) {
dispatchSupplierR({ type: 'supplierUpdate', value: id })
}
}
return (
<>
<main>
......@@ -134,7 +226,26 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
initSupplierList.current.length > 0 &&
<div className={styles.shiftBox}>
<div className={`${styles.shiftGroup} row`} >
<span>品牌:</span>
<span >供应商:</span>
<div className={supplierListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={supplierListRef}>
{
supplierR.map(item => {
return (
<div key={item.id + Math.random()} onClick={() => { updateBrandAndClass(3, item.id) }} className={item.checked ? `${styles.item} ${styles.act}` : `${styles.item}`} >{item.value}</div>
)
})
}
</div>
<div className={`${styles.shitrankbox} row`}>
<div className={supplierR.find(item => item.checked === true) ? `${styles.more} row verCenter rowCenter ${styles.shitrank} ${styles.shows}` : `${styles.more} row verCenter rowCenter ${styles.shitrank} ${styles.hides}`} onClick={() => { updateBrandAndClass(3) }}>清除条件</div>
<div className={`${styles.more} row verCenter rowCenter ${styles.shitrank}`} onClick={() => { setSupplierListAll(!supplierListAll) }}>
{supplierListAll ? (<>收起<i className='icon iconfont icon-xiangshang2'></i></>) : (<>展开<i className='icon iconfont icon-xiangxia2'></i></>)}
</div>
</div>
</div>
<div className={`${styles.shiftGroup} row`} >
<span>品 牌:</span>
<div className={brandListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={brandListRef}>
{
brandsR.map(item => {
......@@ -155,7 +266,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
{
classsR.length > 0 &&
<div className={`${styles.shiftGroup} row`}>
<span>分类:</span>
<span> 类:</span>
<div className={classListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={classListRef}>
{
classsR.map(item => {
......@@ -176,11 +287,11 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
</div>
}
<div className={styles.databox}>
<ListSort sortObj={sortObj} setSortObj={setSortObj} />
<div id="tableboxfg" className={styles.tableboxt}>
<div className={isFixedH?`${styles.tableTitle} ${styles.tableTitleFixed}`:`${styles.tableTitle}`}>
<div className={isFixedH ? `${styles.tableTitle} ${styles.tableTitleFixed}` : `${styles.tableTitle}`}>
<span className={styles.boxInfo}>商品信息</span>
<span className={styles.boxCount}>库存及起订</span>
<span className={styles.boxJt}>阶梯</span>
......@@ -190,26 +301,26 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
<span className={styles.boxAction}>操作</span>
</div>
</div>
{
(supplierList.length == 0 &&requestCount.current != supplierIdS.length)&&
<div className={styles.searchLoadingBox}>
<img src="/images/searchLoading.gif" alt="" />
</div>
(supplierList.length == 0 && requestCount.current != supplierIdS.length) &&
<div className={styles.searchLoadingBox}>
<img src="/images/searchLoading.gif" alt="" />
</div>
}
{
supplierList.length > 0 ?
supplierList.map((item, index) => {
supplierList.map((item: any, index) => {
return (
item.data.length > 0 &&
<div className={styles.dataGroupSupplier} key={String(item.supplier_id) + index + Math.random()}>
<div className={styles.dataGroupSupplier} id={`supplierBox${item.supplier_id}`} key={String(item.supplier_id) + index + Math.random()}>
<div className={styles.dataListTitle}>{item.supplier_name || '其他'}</div>
<div className={styles.searchListDatas}>
{
item.data.map(child => {
item.data.map((child: any) => {
return (
<ListOneItem key={String(child.sku_id) + Math.random()} {...child} QQURL={QQURL} PHONE={PHONE} />
<ListOneItem key={String(child.sku_id) + Math.random()} {...child} QQURL={QQURL} PHONE={PHONE} />
)
})
}
......@@ -218,11 +329,22 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
</div>
)
})
: requestCount.current >= supplierIdS.length && <Empty image='/images/emptyorder.png' description="数据为空!" imageStyle={{height: '183px', margin: '30px auto 0'}} />
: requestCount.current >= supplierIdS.length && <Empty image='/images/emptyorder.png' description="数据为空!" imageStyle={{ height: '183px', margin: '30px auto 0' }} />
}
</div>
{
slideSupplier.length > 0 &&
<div className={`${styles.fixedSupplierBox}`}>
<div>快速访问</div>
{
slideSupplier.map((item: any, index: number) => {
return <p key={index} onClick={() => { scrollToSupplierBox(item.id) }} className={item.checked ? `${styles.act}` : ''}>{item?.value}</p>
})
}
</div>
}
</div>
<Footer />
......
.mvSearchPage {
margin-bottom: 70px;
}
.mvSearchPage .fixedSupplierBox {
position: fixed;
top: 243px;
transform: translateX(-214px);
}
.mvSearchPage .fixedSupplierBox div {
position: relative;
width: 62px;
height: 22px;
background-color: #FF9A00;
border-radius: 2px;
color: #fff;
margin-bottom: 12px;
line-height: 21px;
font-size: 14px;
padding: 0 5px;
left: 128px;
}
.mvSearchPage .fixedSupplierBox div::after {
content: "";
position: absolute;
right: 7px;
top: 22px;
height: 0;
width: 0;
overflow: hidden;
font-size: 0;
line-height: 0;
border-color: #fff #FF9A00 transparent transparent;
border-style: solid solid dashed dashed;
border-width: 0px 8px 8px 0;
}
.mvSearchPage .fixedSupplierBox p {
width: 200px;
box-sizing: border-box;
padding-right: 12px;
border-right: 1px solid #e5e5e5;
font-size: 14px;
height: 35px;
line-height: 35px;
color: #000;
font-weight: bold;
text-align: right;
position: relative;
}
.mvSearchPage .fixedSupplierBox p:hover, .mvSearchPage .fixedSupplierBox p.act {
color: #FF9A00;
cursor: pointer;
}
.mvSearchPage .fixedSupplierBox p:hover::after, .mvSearchPage .fixedSupplierBox p.act::after {
content: "";
position: absolute;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #FF9A00;
right: 2px;
top: 11px;
}
.mvSearchPage .fixedSupplierBox p:hover::before, .mvSearchPage .fixedSupplierBox p.act::before {
content: "";
position: absolute;
height: 18px;
width: 3px;
background: #FF9A00;
right: -3px;
top: 8px;
}
.mvSearchPage .shiftBox {
padding: 24px 30px;
background: #fff;
padding-bottom: 6px;
}
.mvSearchPage .shiftBox .shiftGroup {
border-bottom: 1px solid #E7E7E7;
margin-bottom: 18px;
}
.mvSearchPage .shiftBox .shiftGroup span {
font-weight: bold;
font-size: 12px;
color: #888888;
padding-top: 2px;
width: 50px;
}
.mvSearchPage .shiftBox .shiftGroup:last-child {
border-bottom: 0px;
margin-bottom: 0px;
}
.mvSearchPage .shiftBox .shiftGroup .itemBox {
width: 1000px;
flex-wrap: wrap;
min-height: 40px;
}
.mvSearchPage .shiftBox .shiftGroup .itemBox.overflowheight {
height: 40px;
overflow: hidden;
}
.mvSearchPage .shiftBox .shiftGroup .itemBox .item {
height: 22px;
border: 1px solid transparent;
line-height: 20px;
box-sizing: border-box;
margin-left: 45px;
margin-bottom: 18px;
font-size: 12px;
color: #000;
cursor: pointer;
text-align: center;
padding: 0 15px;
}
.mvSearchPage .shiftBox .shiftGroup .itemBox .item.act {
background: #FFFBF5;
border: 1px solid #FF9A00;
}
.mvSearchPage .shiftBox .shiftGroup .shitrankbox {
width: 130px;
justify-content: flex-end;
}
.mvSearchPage .shiftBox .shiftGroup .shitrank {
margin-left: 5px;
height: 22px;
width: 58px;
border: 1px solid #B0B0B0;
box-sizing: border-box;
color: #595959;
font-size: 12px;
cursor: pointer;
}
.mvSearchPage .shiftBox .shiftGroup .shitrank.shows {
display: flex;
}
.mvSearchPage .shiftBox .shiftGroup .shitrank.hides {
display: none;
}
.mvSearchPage .shiftBox .shiftGroup .shitrank:first-child {
margin-left: 0px;
}
.mvSearchPage .shiftBox .shiftGroup .shitrank i {
color: #595959;
font-size: 12px;
}
.mvSearchPage .databox {
padding-top: 24px;
min-height: 290px;
}
.mvSearchPage .databox .searchLoadingBox {
padding-top: 40px 0;
}
.mvSearchPage .databox .searchLoadingBox img {
width: 220px;
height: 220px;
display: block;
margin: 0 auto;
}
.mvSearchPage .databox .dataGroupSupplier {
border: 1px solid #f0f0f0;
margin-bottom: 30px;
}
.mvSearchPage .databox .dataGroupSupplier .searchListDatas .listGroupOneItem:first-child .cons {
border-top: 0px;
}
.mvSearchPage .databox .dataGroupSupplier .dataListTitle {
padding: 0 27px;
height: 50px;
line-height: 50px;
font-size: 16px;
color: #000000;
background: #f6f6f6;
}
.mvSearchPage .databox .dataGroupSupplier .dataListMore {
height: 48px;
line-height: 48px;
color: #000;
font-size: 12px;
text-align: center;
background: #fff;
}
.mvSearchPage .databox .dataGroupSupplier .dataListMore b {
color: #FF9A00;
cursor: pointer;
}
.mvSearchPage .databox .tableboxt {
width: 1226px;
height: 34px;
}
.mvSearchPage .databox .tableTitle {
width: 1226px;
height: 34px;
background: #F2EEE6;
border: 1px solid #E5DFD3;
line-height: 34px;
display: flex;
box-sizing: border-box;
padding-left: 17px;
}
.mvSearchPage .databox .tableTitle.tableTitleFixed {
position: fixed;
z-index: 4;
top: 60px;
}
.mvSearchPage .databox .tableTitle > span {
padding-left: 10px;
}
.mvSearchPage .databox .tableTitle .boxInfo {
width: 310px;
}
.mvSearchPage .databox .tableTitle .boxCount {
width: 204px;
}
.mvSearchPage .databox .tableTitle .boxJt {
width: 89px;
}
.mvSearchPage .databox .tableTitle .boxHk {
width: 89px;
}
.mvSearchPage .databox .tableTitle .boxMain {
width: 105px;
}
.mvSearchPage .databox .tableTitle .boxTime {
width: 168px;
}
.mvSearchPage .databox .tableTitle .boxAction {
flex: 2;
}
.mvSearchPage{margin-bottom:70px}.mvSearchPage .shiftBox{padding:24px 30px;background:#fff;padding-bottom:6px}.mvSearchPage .shiftBox .shiftGroup{border-bottom:1px solid #E7E7E7;margin-bottom:18px}.mvSearchPage .shiftBox .shiftGroup span{font-weight:bold;font-size:12px;color:#888888;padding-top:2px}.mvSearchPage .shiftBox .shiftGroup:last-child{border-bottom:0px;margin-bottom:0px}.mvSearchPage .shiftBox .shiftGroup .itemBox{width:1000px;flex-wrap:wrap;min-height:40px}.mvSearchPage .shiftBox .shiftGroup .itemBox.overflowheight{height:40px;overflow:hidden}.mvSearchPage .shiftBox .shiftGroup .itemBox .item{height:22px;border:1px solid transparent;line-height:20px;box-sizing:border-box;margin-left:45px;margin-bottom:18px;font-size:12px;color:#000;cursor:pointer;text-align:center;padding:0 15px}.mvSearchPage .shiftBox .shiftGroup .itemBox .item.act{background:#FFFBF5;border:1px solid #FF9A00}.mvSearchPage .shiftBox .shiftGroup .shitrankbox{width:130px;justify-content:flex-end}.mvSearchPage .shiftBox .shiftGroup .shitrank{margin-left:5px;height:22px;width:58px;border:1px solid #B0B0B0;box-sizing:border-box;color:#919191;font-size:12px;cursor:pointer}.mvSearchPage .shiftBox .shiftGroup .shitrank.shows{display:flex}.mvSearchPage .shiftBox .shiftGroup .shitrank.hides{display:none}.mvSearchPage .shiftBox .shiftGroup .shitrank:first-child{margin-left:0px}.mvSearchPage .shiftBox .shiftGroup .shitrank i{color:#919191;font-size:12px}.mvSearchPage .databox{padding-top:24px;min-height:290px}.mvSearchPage .databox .searchLoadingBox{padding-top:40px 0}.mvSearchPage .databox .searchLoadingBox img{width:220px;height:220px;display:block;margin:0 auto}.mvSearchPage .databox .dataGroupSupplier{border:1px solid #EDEFEF;margin-bottom:30px}.mvSearchPage .databox .dataGroupSupplier .searchListDatas .listGroupOneItem:first-child .cons{border-top:0px}.mvSearchPage .databox .dataGroupSupplier .dataListTitle{padding:0 27px;height:50px;line-height:50px;font-size:16px;color:#000000;background:#f6f6f6}.mvSearchPage .databox .dataGroupSupplier .dataListMore{height:48px;line-height:48px;color:#000;font-size:12px;text-align:center;background:#fff}.mvSearchPage .databox .dataGroupSupplier .dataListMore b{color:#FF9A00;cursor:pointer}.mvSearchPage .databox .tableboxt{width:1226px;height:34px}.mvSearchPage .databox .tableTitle{width:1226px;height:34px;background:#F2EEE6;border:1px solid #E5DFD3;line-height:34px;display:flex;box-sizing:border-box;padding-left:17px}.mvSearchPage .databox .tableTitle.tableTitleFixed{position:fixed;z-index:4;top:60px}.mvSearchPage .databox .tableTitle>span{padding-left:10px}.mvSearchPage .databox .tableTitle .boxInfo{width:310px}.mvSearchPage .databox .tableTitle .boxCount{width:204px}.mvSearchPage .databox .tableTitle .boxJt{width:89px}.mvSearchPage .databox .tableTitle .boxHk{width:89px}.mvSearchPage .databox .tableTitle .boxMain{width:105px}.mvSearchPage .databox .tableTitle .boxTime{width:168px}.mvSearchPage .databox .tableTitle .boxAction{flex:2}
.mvSearchPage{margin-bottom:70px}.mvSearchPage .fixedSupplierBox{position:fixed;top:243px;transform:translateX(-214px)}.mvSearchPage .fixedSupplierBox div{position:relative;width:62px;height:22px;background-color:#FF9A00;border-radius:2px;color:#fff;margin-bottom:12px;line-height:21px;font-size:14px;padding:0 5px;left:128px}.mvSearchPage .fixedSupplierBox div::after{content:"";position:absolute;right:7px;top:22px;height:0;width:0;overflow:hidden;font-size:0;line-height:0;border-color:#fff #FF9A00 transparent transparent;border-style:solid solid dashed dashed;border-width:0px 8px 8px 0}.mvSearchPage .fixedSupplierBox p{width:200px;box-sizing:border-box;padding-right:12px;border-right:1px solid #e5e5e5;font-size:14px;height:35px;line-height:35px;color:#000;font-weight:bold;text-align:right;position:relative}.mvSearchPage .fixedSupplierBox p:hover,.mvSearchPage .fixedSupplierBox p.act{color:#FF9A00;cursor:pointer}.mvSearchPage .fixedSupplierBox p:hover::after,.mvSearchPage .fixedSupplierBox p.act::after{content:"";position:absolute;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #FF9A00;right:2px;top:11px}.mvSearchPage .fixedSupplierBox p:hover::before,.mvSearchPage .fixedSupplierBox p.act::before{content:"";position:absolute;height:18px;width:3px;background:#FF9A00;right:-3px;top:8px}.mvSearchPage .shiftBox{padding:24px 30px;background:#fff;padding-bottom:6px}.mvSearchPage .shiftBox .shiftGroup{border-bottom:1px solid #E7E7E7;margin-bottom:18px}.mvSearchPage .shiftBox .shiftGroup span{font-weight:bold;font-size:12px;color:#888888;padding-top:2px;width:50px}.mvSearchPage .shiftBox .shiftGroup:last-child{border-bottom:0px;margin-bottom:0px}.mvSearchPage .shiftBox .shiftGroup .itemBox{width:1000px;flex-wrap:wrap;min-height:40px}.mvSearchPage .shiftBox .shiftGroup .itemBox.overflowheight{height:40px;overflow:hidden}.mvSearchPage .shiftBox .shiftGroup .itemBox .item{height:22px;border:1px solid transparent;line-height:20px;box-sizing:border-box;margin-left:45px;margin-bottom:18px;font-size:12px;color:#000;cursor:pointer;text-align:center;padding:0 15px}.mvSearchPage .shiftBox .shiftGroup .itemBox .item.act{background:#FFFBF5;border:1px solid #FF9A00}.mvSearchPage .shiftBox .shiftGroup .shitrankbox{width:130px;justify-content:flex-end}.mvSearchPage .shiftBox .shiftGroup .shitrank{margin-left:5px;height:22px;width:58px;border:1px solid #B0B0B0;box-sizing:border-box;color:#595959;font-size:12px;cursor:pointer}.mvSearchPage .shiftBox .shiftGroup .shitrank.shows{display:flex}.mvSearchPage .shiftBox .shiftGroup .shitrank.hides{display:none}.mvSearchPage .shiftBox .shiftGroup .shitrank:first-child{margin-left:0px}.mvSearchPage .shiftBox .shiftGroup .shitrank i{color:#595959;font-size:12px}.mvSearchPage .databox{padding-top:24px;min-height:290px}.mvSearchPage .databox .searchLoadingBox{padding-top:40px 0}.mvSearchPage .databox .searchLoadingBox img{width:220px;height:220px;display:block;margin:0 auto}.mvSearchPage .databox .dataGroupSupplier{border:1px solid #f0f0f0;margin-bottom:30px}.mvSearchPage .databox .dataGroupSupplier .searchListDatas .listGroupOneItem:first-child .cons{border-top:0px}.mvSearchPage .databox .dataGroupSupplier .dataListTitle{padding:0 27px;height:50px;line-height:50px;font-size:16px;color:#000000;background:#f6f6f6}.mvSearchPage .databox .dataGroupSupplier .dataListMore{height:48px;line-height:48px;color:#000;font-size:12px;text-align:center;background:#fff}.mvSearchPage .databox .dataGroupSupplier .dataListMore b{color:#FF9A00;cursor:pointer}.mvSearchPage .databox .tableboxt{width:1226px;height:34px}.mvSearchPage .databox .tableTitle{width:1226px;height:34px;background:#F2EEE6;border:1px solid #E5DFD3;line-height:34px;display:flex;box-sizing:border-box;padding-left:17px}.mvSearchPage .databox .tableTitle.tableTitleFixed{position:fixed;z-index:4;top:60px}.mvSearchPage .databox .tableTitle>span{padding-left:10px}.mvSearchPage .databox .tableTitle .boxInfo{width:310px}.mvSearchPage .databox .tableTitle .boxCount{width:204px}.mvSearchPage .databox .tableTitle .boxJt{width:89px}.mvSearchPage .databox .tableTitle .boxHk{width:89px}.mvSearchPage .databox .tableTitle .boxMain{width:105px}.mvSearchPage .databox .tableTitle .boxTime{width:168px}.mvSearchPage .databox .tableTitle .boxAction{flex:2}
.mvSearchPage{
margin-bottom: 70px;
.fixedSupplierBox{
position: fixed;
top:243px;
transform: translateX(-214px);
div{
position: relative;
width: 62px;
height: 22px;
background-color: #FF9A00;
border-radius: 2px;
color: #fff;
margin-bottom: 12px;
line-height: 21px;
font-size: 14px;
padding:0 5px;
left:128px;
&::after{
content:"";
position: absolute;
right:7px;
top:22px;
height: 0;
width: 0;
overflow: hidden;
font-size: 0;
line-height: 0;
border-color: #fff #FF9A00 transparent transparent;
border-style: solid solid dashed dashed;
border-width: 0px 8px 8px 0;
}
}
p{
width:200px;
box-sizing: border-box;
padding-right:12px;
border-right: 1px solid #e5e5e5;
font-size: 14px;
height:35px;
line-height: 35px;
color:#000;
font-weight: bold;
text-align: right;
position: relative;
&:hover,&.act{
color:#FF9A00;
cursor: pointer;
&::after{
content:"";
position: absolute;
width: 0;
height: 0;
border-top: 6px solid transparent;
border-bottom: 6px solid transparent;
border-right: 6px solid #FF9A00;
right:2px;
top:11px;
}
&::before{
content:"";
position: absolute;
height:18px;
width:3px;
background: #FF9A00;
right:-3px;
top:8px;
}
}
}
}
.shiftBox{
padding:24px 30px;
background: #fff;
......@@ -12,6 +81,7 @@
font-size: 12px;
color: #888888;
padding-top: 2px;
width:50px;
}
&:last-child{border-bottom: 0px;margin-bottom: 0px;}
.itemBox{
......@@ -50,7 +120,7 @@
width:58px;
border: 1px solid #B0B0B0;
box-sizing: border-box;
color:#919191;
color:#595959;
font-size: 12px;
cursor: pointer;
&.shows{
......@@ -61,7 +131,7 @@
}
&:first-child{margin-left: 0px;}
i{
color:#919191;
color:#595959;
font-size: 12px;
}
}
......@@ -82,7 +152,7 @@
}
}
.dataGroupSupplier{
border: 1px solid #EDEFEF;
border: 1px solid #f0f0f0;
margin-bottom: 30px;
.searchListDatas{
.listGroupOneItem:first-child{
......@@ -155,4 +225,5 @@
}
}
}
}
\ No newline at end of file
}
......@@ -204,7 +204,7 @@ input::-webkit-input-placeholder {
.searchFixedTopC {
position: fixed !important;
z-index: 4;
z-index: 5;
top: -4px;
transform: translateX(1112px);
}
......
html,body,div,iframe,em,img,p,a,strong,b,i,form,label,span,h1,h2,h3,h4,h5,h6,dl,dt,dd,ol,ul,li,applet,object,blockquote,big,cite,code,del,dfn,abbr,acronym,address,pre,time,mark,audio,video,article,aside,canvas,details,embed,figure,figcaption,footer,header,nav,section,menu,button,input,textarea{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;font-weight:normal;list-style:none;outline:none;resize:none}table,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;font-size:100%;font:inherit}a{text-decoration:none}a:hover{color:#FF9A00}.f-red{color:red}table{border-color:#ccc !important}body,html,button,input{font-family:Arial, helvetica, PingFangSC-Regular, PingFang SC, "微软雅黑"}input::-webkit-input-placeholder{color:#808080}.fw{font-weight:bold}.clr:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.clr{display:block;min-height:1%}.clr{clear:both}.clr:after{content:" ";display:table;clear:both}.fl{float:left}.fr{float:right}.fw{font-weight:bold}.ta-c{text-align:center}.ta-r{text-align:right}.ta-l{text-align:left}.flex{display:flex}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.boxsiz{-webkit-box-sizing:border-box;box-sizing:border-box}.bothSide{justify-content:space-between}.avarage{justify-content:space-around}.rowCenter{justify-content:center}.verCenter{align-items:center}.searchFixedTopC{position:fixed !important;z-index:4;top:-4px;transform:translateX(1112px)}body,html{background:#fafafa;font-size:14px;color:#333}.w1226{width:1226px;margin:0 auto}.spinner{display:none !important}.paginationxk{margin-top:20px;display:flex;justify-content:flex-end}.paginationxk li{display:block;background:#FBFBFB;border-radius:2px;border:1px solid #E8E8E8;text-align:center;line-height:25px;color:#616161;position:relative;transition:all 0.5s;border-radius:1px;font-size:12px;cursor:pointer;margin-left:7px}.paginationxk li.disabled{cursor:not-allowed}.paginationxk li.break a{line-height:19px}.paginationxk li a{color:#616161;display:block;box-sizing:border-box;text-align:center;padding:0 7px;height:25px;line-height:26px;min-width:25px;min-height:25px}.paginationxk li.activexk,.paginationxk li:hover{background:linear-gradient(180deg, #FDFDFD 0%, #E2E2E2 100%);border:1px solid #A1A1A1;color:#313131}.ant-pagination{display:flex;justify-content:flex-end;margin-top:20px !important;padding:0 35px !important}.ant-table-row-expand-icon-cell{display:none !important}.ant-empty-description{margin-top:30px !important;color:#888 !important;font-size:14px !important}.ant-table-cell{color:#313131 !important;font-weight:normal !important}.ant-table-tbody>tr>td{word-wrap:break-word;word-break:break-all}
html,body,div,iframe,em,img,p,a,strong,b,i,form,label,span,h1,h2,h3,h4,h5,h6,dl,dt,dd,ol,ul,li,applet,object,blockquote,big,cite,code,del,dfn,abbr,acronym,address,pre,time,mark,audio,video,article,aside,canvas,details,embed,figure,figcaption,footer,header,nav,section,menu,button,input,textarea{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline;font-weight:normal;list-style:none;outline:none;resize:none}table,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;font-size:100%;font:inherit}a{text-decoration:none}a:hover{color:#FF9A00}.f-red{color:red}table{border-color:#ccc !important}body,html,button,input{font-family:Arial, helvetica, PingFangSC-Regular, PingFang SC, "微软雅黑"}input::-webkit-input-placeholder{color:#808080}.fw{font-weight:bold}.clr:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.clr{display:block;min-height:1%}.clr{clear:both}.clr:after{content:" ";display:table;clear:both}.fl{float:left}.fr{float:right}.fw{font-weight:bold}.ta-c{text-align:center}.ta-r{text-align:right}.ta-l{text-align:left}.flex{display:flex}.column{display:flex;flex-direction:column}.row{display:flex;flex-direction:row}.boxsiz{-webkit-box-sizing:border-box;box-sizing:border-box}.bothSide{justify-content:space-between}.avarage{justify-content:space-around}.rowCenter{justify-content:center}.verCenter{align-items:center}.searchFixedTopC{position:fixed !important;z-index:5;top:-4px;transform:translateX(1112px)}body,html{background:#fafafa;font-size:14px;color:#333}.w1226{width:1226px;margin:0 auto}.spinner{display:none !important}.paginationxk{margin-top:20px;display:flex;justify-content:flex-end}.paginationxk li{display:block;background:#FBFBFB;border-radius:2px;border:1px solid #E8E8E8;text-align:center;line-height:25px;color:#616161;position:relative;transition:all 0.5s;border-radius:1px;font-size:12px;cursor:pointer;margin-left:7px}.paginationxk li.disabled{cursor:not-allowed}.paginationxk li.break a{line-height:19px}.paginationxk li a{color:#616161;display:block;box-sizing:border-box;text-align:center;padding:0 7px;height:25px;line-height:26px;min-width:25px;min-height:25px}.paginationxk li.activexk,.paginationxk li:hover{background:linear-gradient(180deg, #FDFDFD 0%, #E2E2E2 100%);border:1px solid #A1A1A1;color:#313131}.ant-pagination{display:flex;justify-content:flex-end;margin-top:20px !important;padding:0 35px !important}.ant-table-row-expand-icon-cell{display:none !important}.ant-empty-description{margin-top:30px !important;color:#888 !important;font-size:14px !important}.ant-table-cell{color:#313131 !important;font-weight:normal !important}.ant-table-tbody>tr>td{word-wrap:break-word;word-break:break-all}
......@@ -211,7 +211,7 @@ input::-webkit-input-placeholder {
.searchFixedTopC{
position: fixed!important;
z-index: 4;
z-index: 5;
top: -4px;
transform: translateX(1112px);
}
......
......@@ -24,7 +24,29 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) =>
}, []);
return uniqueBrand
}
if (action.type === 'brandsUpdate' || action.type === 'classsUpdate') {
if (action.type === 'supplierInit' ) {
let newBrand: BrandAndClassType = []
const datasg = [...action.value]
datasg.forEach((item) => {
const id_ = String(item.supplier_id)
const name_ = String(item.supplier_name)
newBrand = [...newBrand, { id: id_, value: name_, checked: false }]
})
let uniqueBrand = newBrand.reduce((acc: BrandAndClassType, current) => {
if (!acc.some(item => item.id === current.id)) {
if(current.value){
acc.push(current);
}
}
return acc;
}, []);
return uniqueBrand
}
if (action.type === 'supplierUpdate'||action.type === 'brandsUpdate' || action.type === 'classsUpdate') {
let newList = [...state]
if (!action.value) {
......@@ -39,10 +61,12 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) =>
}
return newList
}
return state
}
export const supplierDataReducer = (state: Array<supplierDataType>, action: {type:string,value:Array<supplierDataType>,brandsR?:BrandAndClassType,classsR?:BrandAndClassType,sortObj?:ListSortType}) => {
export const supplierDataReducer = (state: Array<supplierDataType>, action: {type:string,value:Array<supplierDataType>,supplierR?:BrandAndClassType, brandsR?:BrandAndClassType,classsR?:BrandAndClassType,sortObj?:ListSortType}) => {
switch (action.type) {
case 'init':
......@@ -101,6 +125,7 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ
}
let checkSupplier=action.supplierR?.filter(item => item.checked).map(item => item.id)
let checkBrand=action.brandsR?.filter(item => item.checked).map(item => item.id)
let checkClass=action.classsR?.filter(item => item.checked).map(item => item.id)
// if(checkBrand?.length===0){
......@@ -109,6 +134,14 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ
// if(checkClass?.length===0){
// checkClass=action.classsR?.map(item => item.id)
// }
if(checkSupplier!.length>0){
initList.forEach(item=>{
const data_=item.data.filter(itemChild=>
checkSupplier?.indexOf(String(itemChild.supplier_id))!==-1
)
item.data=data_
})
}
if(checkBrand!.length>0){
initList.forEach(item=>{
const data_=item.data.filter(itemChild=>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment