|
|
@ -8,6 +8,7 @@ import moment from "moment"; |
|
|
|
import "./index.scss"; |
|
|
|
import { SearchOutlined } from '@ant-design/icons'; |
|
|
|
import ajax from '@/services' |
|
|
|
import { useSetState } from "ahooks"; |
|
|
|
|
|
|
|
|
|
|
|
function SalesStat(props) { |
|
|
@ -266,7 +267,7 @@ function SalesStat(props) { |
|
|
|
const exportNow = () => { |
|
|
|
let data = { |
|
|
|
...formData, |
|
|
|
export_type:"" |
|
|
|
export_type: "" |
|
|
|
} |
|
|
|
ajax.salesExport(data).then(res => { |
|
|
|
window.open(res.data.url) |
|
|
@ -274,10 +275,10 @@ function SalesStat(props) { |
|
|
|
}) |
|
|
|
} |
|
|
|
const exportAll = () => { |
|
|
|
|
|
|
|
|
|
|
|
let data = { |
|
|
|
...formData, |
|
|
|
export_type:"all" |
|
|
|
export_type: "all" |
|
|
|
} |
|
|
|
ajax.salesExport(data).then(res => { |
|
|
|
window.open(res.data.url) |
|
|
@ -288,6 +289,7 @@ function SalesStat(props) { |
|
|
|
const revenueModal = () => { |
|
|
|
setRevenueVisible(false) |
|
|
|
} |
|
|
|
const [textL, setTextL] = useState('') |
|
|
|
useEffect(() => { |
|
|
|
getData() |
|
|
|
}, []) |
|
|
@ -327,10 +329,10 @@ function SalesStat(props) { |
|
|
|
]} |
|
|
|
/> |
|
|
|
<div className="btnBox"> |
|
|
|
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { getSearchData() }}> |
|
|
|
查询 |
|
|
|
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { getSearchData() }}> |
|
|
|
查询 |
|
|
|
</Button> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -339,8 +341,8 @@ function SalesStat(props) { |
|
|
|
<div className="result-info-row"> |
|
|
|
<span className="font">共检索到<em>{resultData.total_records}</em>条结果</span> |
|
|
|
<Button type="primary" className="yisa-btn colorBtn" onClick={() => { salesData() }}> |
|
|
|
导出 |
|
|
|
</Button> |
|
|
|
导出 |
|
|
|
</Button> |
|
|
|
</div> |
|
|
|
<ResultFlowResult ajaxLoad={ajaxLoading} resultData={resultData.data ? resultData.data : []}> |
|
|
|
<Table |
|
|
@ -388,7 +390,7 @@ function SalesStat(props) { |
|
|
|
}>《</div> |
|
|
|
{/* 外层做显示区域,里边元素滚动 */} |
|
|
|
<div className="list-view"> |
|
|
|
<div className="tab-top" style={{ transform: `translateX(${-getValue * 100}px)` }}> |
|
|
|
<div className="tab-top" style={{ transform: `translateX(${- textL * 14 * getValue}px)` }}> |
|
|
|
{ |
|
|
|
getTabData && |
|
|
|
getTabData.map((item, index) => { |
|
|
@ -398,10 +400,16 @@ function SalesStat(props) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style={{ lineHeight: 4, marginLeft: 6 }} |
|
|
|
className="curpoint" |
|
|
|
className="curpoint" |
|
|
|
onClick={() => { |
|
|
|
getValue < getTabData.length - 1 && |
|
|
|
if (getValue < getTabData.length - 1) { |
|
|
|
setGetValue(getValue + 1) |
|
|
|
let Arritem = getTabData.filter((item) => item.value == getValue + 1)[0] |
|
|
|
setTextL(Arritem.text.length) |
|
|
|
console.log(textL); |
|
|
|
setCheckData(Arritem.children) |
|
|
|
setGetTotal(Arritem.total_records) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
>》</div> |
|
|
|