Commit 6c9fe490 by 肖康

网站修改

parent 9aa49d35
...@@ -210,7 +210,7 @@ const ListOneItem = (props: dataListItemType) => { ...@@ -210,7 +210,7 @@ const ListOneItem = (props: dataListItemType) => {
}) })
} }
</div> </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="请输入数量" /> <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 && {itemInfo.cn_delivery_time &&
......
...@@ -26,6 +26,7 @@ export type dataListItemType = { ...@@ -26,6 +26,7 @@ export type dataListItemType = {
multiple: number; multiple: number;
stock: number; stock: number;
supplier_name: string; supplier_name: string;
supplier_id?: any;
ladder_price: Array<{ ladder_price: Array<{
checked?:boolean; checked?:boolean;
price_cn: number; price_cn: number;
......
const os = require('os'); 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 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")?'http://erpweb.liexindev.net':'http://api.chiplinks.net'
export const API_URL=((os.hostname()=="MS-NDPSTQVAWPAX"||os.hostname()=="dev235"||os.hostname()=="localhost")?'http://erpweb.liexindev.net':'http://api.chiplinks.net')
.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 @@ ...@@ -2,6 +2,19 @@
margin: 20px auto; margin: 20px auto;
width: 1226px; width: 1226px;
position: relative; 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 { .shopLayer {
width: 1226px; width: 1226px;
......
...@@ -31,6 +31,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{ ...@@ -31,6 +31,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
const [defaultAddress, setDefaultAddress] = useState<any>(); const [defaultAddress, setDefaultAddress] = useState<any>();
const [arrInvoice, setArrInvoice] = useState<any>(); const [arrInvoice, setArrInvoice] = useState<any>();
const [arrAddress, setArrAddress] = useState<any>(); const [arrAddress, setArrAddress] = useState<any>();
const [userInfo,setUserInfo]= useState<any>(null);
const {query}=router const {query}=router
const [idList, setIdList] = useState<any>([]) const [idList, setIdList] = useState<any>([])
...@@ -78,8 +79,24 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{ ...@@ -78,8 +79,24 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
if (query?.deliveryPlaceType) setSePlace(String(query?.deliveryPlaceType)) if (query?.deliveryPlaceType) setSePlace(String(query?.deliveryPlaceType))
if (query?.number) setGoodNumber(Number(query?.number)) if (query?.number) setGoodNumber(Number(query?.number))
handleDataInit() handleDataInit()
}, [query,sourceType]) }, [query,sourceType])
useEffect(() => { 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() handleInvoiceInit()
handleAddressInit() handleAddressInit()
}, [query]) }, [query])
...@@ -100,6 +117,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{ ...@@ -100,6 +117,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
if(disArray.length>0){handleOrderCount(param)} if(disArray.length>0){handleOrderCount(param)}
}, [shopList]) }, [shopList])
const handleOrderCount = async (param: any) => { const handleOrderCount = async (param: any) => {
const res = await userRequest({ const res = await userRequest({
url: `/api/order/calculateOrder`, url: `/api/order/calculateOrder`,
...@@ -171,6 +189,10 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{ ...@@ -171,6 +189,10 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
} }
const handleOrderSubmit = async () => { const handleOrderSubmit = async () => {
if(userInfo?.audit_status!=1){
message("请先审核用户发票!",3000)
return
}
const param = { const param = {
goods_list: disList.map((disItem:any) => { goods_list: disList.map((disItem:any) => {
return { return {
...@@ -212,7 +234,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{ ...@@ -212,7 +234,7 @@ const TopH = (props: { cateList: ResponseTypeCateList }) =>{
return ( return (
<> <>
<Header {...props.cateList} /> <Header {...props.cateList} />
<div className={styles.shopBox}> <div className={`${styles.shopBox}`}>
<div className={styles.shopLayer}> <div className={styles.shopLayer}>
{sePlace === '1' && ( {sePlace === '1' && (
<div className={styles.basicModule}> <div className={styles.basicModule}>
......
...@@ -10,7 +10,7 @@ import ListOneItem from '../../components/ListOneItem'; ...@@ -10,7 +10,7 @@ import ListOneItem from '../../components/ListOneItem';
import { brandsAndClasssReducer, supplierDataReducer } from '@/reducers/searchReducers'; import { brandsAndClasssReducer, supplierDataReducer } from '@/reducers/searchReducers';
import type { ResponseTypeSearch, supplierDataType } from '@/types/searchTypes' import type { ResponseTypeSearch, supplierDataType } from '@/types/searchTypes'
import useRequest from '../../hooks/useRequest'; import useRequest from '../../hooks/useRequest';
import ListNoData from '../../components/ListNoData';
import { useRouter } from 'next/router'; import { useRouter } from 'next/router';
...@@ -46,12 +46,15 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -46,12 +46,15 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
const [isFixedH, setIsFixedH] = useState(false); const [isFixedH, setIsFixedH] = useState(false);
useEffect(() => { useEffect(() => {
const handleScroll = () => { const handleScroll = () => {
try{
let distanceFromTop = document.getElementById('tableboxfg')!.offsetTop; let distanceFromTop = document.getElementById('tableboxfg')!.offsetTop;
if (window.scrollY > distanceFromTop) { if (window.scrollY > distanceFromTop) {
setIsFixedH(true); setIsFixedH(true);
} else { } else {
setIsFixedH(false); setIsFixedH(false);
} }
}catch(err){}
}; };
window.addEventListener('scroll', handleScroll); window.addEventListener('scroll', handleScroll);
// 清除事件监听器 // 清除事件监听器
...@@ -82,6 +85,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -82,6 +85,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
datasg.push(child) datasg.push(child)
}) })
}) })
dispatchSupplierR({ type: 'supplierInit', value: JSON.parse(JSON.stringify(datasg)) })
dispatchBrands({ type: 'brandsInit', value: JSON.parse(JSON.stringify(datasg)) }) dispatchBrands({ type: 'brandsInit', value: JSON.parse(JSON.stringify(datasg)) })
dispatchclasss({ type: 'classsInit', 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)) }) dispatchSupplierList({ type: 'init', value: JSON.parse(JSON.stringify(initSupplierList.current)) })
...@@ -96,21 +100,24 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -96,21 +100,24 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
stockSort: '', stockSort: '',
priceSort: '' priceSort: ''
}) })
const [supplierR, dispatchSupplierR] = useReducer(brandsAndClasssReducer, [])
const [brandsR, dispatchBrands] = useReducer(brandsAndClasssReducer, []) const [brandsR, dispatchBrands] = useReducer(brandsAndClasssReducer, [])
const [classsR, dispatchclasss] = useReducer(brandsAndClasssReducer, []) const [classsR, dispatchclasss] = useReducer(brandsAndClasssReducer, [])
//品牌分类盒子 UI //品牌分类盒子 UI
const supplierListRef = useRef<HTMLDivElement>(null);
const brandListRef = useRef<HTMLDivElement>(null); const brandListRef = useRef<HTMLDivElement>(null);
const classListRef = useRef<HTMLDivElement>(null); const classListRef = useRef<HTMLDivElement>(null);
const [supplierListAll, setSupplierListAll] = useState(false)
const [brandListAll, setBrandListAll] = useState(false) const [brandListAll, setBrandListAll] = useState(false)
const [classListAll, setClassListAll] = useState(false) const [classListAll, setClassListAll] = useState(false)
//品牌,分类,排序发生变化 //品牌,分类,渠道,排序发生变化
useEffect(() => { useEffect(() => {
dispatchSupplierList({ type: 'change', value: JSON.parse(JSON.stringify(initSupplierList.current)), brandsR: brandsR, classsR: classsR, sortObj: sortObj }) dispatchSupplierList({ type: 'change', value: JSON.parse(JSON.stringify(initSupplierList.current)),supplierR:supplierR, brandsR: brandsR, classsR: classsR, sortObj: sortObj })
}, [brandsR, classsR, sortObj]) }, [brandsR, classsR,supplierR, sortObj])
const updateBrandAndClass = (type: number, id?: string) => { const updateBrandAndClass = (type: number, id?: string) => {
if (type === 1) { if (type === 1) {
...@@ -119,6 +126,9 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -119,6 +126,9 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
if (type === 2) { if (type === 2) {
dispatchclasss({ type: 'classsUpdate', value: id }) dispatchclasss({ type: 'classsUpdate', value: id })
} }
if (type === 3) {
dispatchSupplierR({ type: 'supplierUpdate', value: id })
}
} }
...@@ -134,7 +144,26 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -134,7 +144,26 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
initSupplierList.current.length > 0 && initSupplierList.current.length > 0 &&
<div className={styles.shiftBox}> <div className={styles.shiftBox}>
<div className={`${styles.shiftGroup} row`} > <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}> <div className={brandListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={brandListRef}>
{ {
brandsR.map(item => { brandsR.map(item => {
...@@ -155,7 +184,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => { ...@@ -155,7 +184,7 @@ const Page = (props: { cateList: ResponseTypeCateList }) => {
{ {
classsR.length > 0 && classsR.length > 0 &&
<div className={`${styles.shiftGroup} row`}> <div className={`${styles.shiftGroup} row`}>
<span>分类:</span> <span> 类:</span>
<div className={classListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={classListRef}> <div className={classListAll ? `${styles.itemBox} row` : `${styles.itemBox} row ${styles.overflowheight}`} ref={classListRef}>
{ {
classsR.map(item => { classsR.map(item => {
......
.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;
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: #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 .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 .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:#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}
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
font-size: 12px; font-size: 12px;
color: #888888; color: #888888;
padding-top: 2px; padding-top: 2px;
width:50px;
} }
&:last-child{border-bottom: 0px;margin-bottom: 0px;} &:last-child{border-bottom: 0px;margin-bottom: 0px;}
.itemBox{ .itemBox{
......
...@@ -204,7 +204,7 @@ input::-webkit-input-placeholder { ...@@ -204,7 +204,7 @@ input::-webkit-input-placeholder {
.searchFixedTopC { .searchFixedTopC {
position: fixed !important; position: fixed !important;
z-index: 4; z-index: 5;
top: -4px; top: -4px;
transform: translateX(1112px); 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 { ...@@ -211,7 +211,7 @@ input::-webkit-input-placeholder {
.searchFixedTopC{ .searchFixedTopC{
position: fixed!important; position: fixed!important;
z-index: 4; z-index: 5;
top: -4px; top: -4px;
transform: translateX(1112px); transform: translateX(1112px);
} }
......
...@@ -24,7 +24,28 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) => ...@@ -24,7 +24,28 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) =>
}, []); }, []);
return uniqueBrand 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 }]
})
const 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] let newList = [...state]
if (!action.value) { if (!action.value) {
...@@ -42,7 +63,7 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) => ...@@ -42,7 +63,7 @@ export const brandsAndClasssReducer = (state: BrandAndClassType, action: any) =>
return state 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) { switch (action.type) {
case 'init': case 'init':
...@@ -101,6 +122,7 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ ...@@ -101,6 +122,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 checkBrand=action.brandsR?.filter(item => item.checked).map(item => item.id)
let checkClass=action.classsR?.filter(item => item.checked).map(item => item.id) let checkClass=action.classsR?.filter(item => item.checked).map(item => item.id)
// if(checkBrand?.length===0){ // if(checkBrand?.length===0){
...@@ -109,6 +131,14 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ ...@@ -109,6 +131,14 @@ export const supplierDataReducer = (state: Array<supplierDataType>, action: {typ
// if(checkClass?.length===0){ // if(checkClass?.length===0){
// checkClass=action.classsR?.map(item => item.id) // 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){ if(checkBrand!.length>0){
initList.forEach(item=>{ initList.forEach(item=>{
const data_=item.data.filter(itemChild=> 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