Commit 91c17b87 authored by shenshaokai's avatar shenshaokai

fix: [37824] 物料重新和请购单查询-补充查询参数

parent faa1d60f
......@@ -9,9 +9,9 @@ import { Button, Card, Space, Cascader, message, Menu, Dropdown, Modal } from 'a
import { getColumn } from '../common/columns';
import { createFormActions, useFormEffects, FormEffectHooks } from '@formily/antd';
import { useRowSelectionTable } from '@/hooks/useRowSelectionTable';
import { getProductCommodityGoodsUsing, getProductGoodsGetMaterialList, getProductGoodsExport,GetProductGoodsGetMaterialListRequest, postProductGoodsFreezeOrEnableGoods, postProductGoodsFreezeOrEnableGoodsBatch, postProductCustomerGetMemberCustomerCategoryAttribute } from '@/services/ProductV2Api';
import { getProductCommodityGoodsUsing, getProductGoodsGetMaterialList, getProductGoodsExport, GetProductGoodsGetMaterialListRequest, postProductGoodsFreezeOrEnableGoods, postProductGoodsFreezeOrEnableGoodsBatch, postProductCustomerGetMemberCustomerCategoryAttribute } from '@/services/ProductV2Api';
import { useAsyncSelect } from '@/formSchema/effects/useAsyncSelect';
import { useAsyncCascader, fetchBrand, fetchStatus, fetchCategoryData, fetchTreeData, EMPTY,fetchExternalState } from '../common/useGetTableSearchData';
import { useAsyncCascader, fetchBrand, fetchStatus, fetchCategoryData, fetchTreeData, EMPTY, fetchExternalState } from '../common/useGetTableSearchData';
import { Link } from 'umi';
import { DownOutlined } from '@ant-design/icons';
import FrozonMadal from '../components/frozonMadal';
......@@ -158,7 +158,7 @@ const MaterialQuery = () => {
const [visible, setVisible] = useState<boolean>(false);
const [activeItem, setActiveItem] = useState(null)
const [isBatch, setIsBatch] = useState(false);
const [exportLoading, setExportLoading ] = useState(false);
const [exportLoading, setExportLoading] = useState(false);
const [querySchema, setQuerySchema] = useState<any>();
const [customerCategoryId, setCustomerCategoryId] = useState<any>();
const [customerCategoryValues, setCustomerCategoryValues] = useState<any>();
......@@ -337,9 +337,9 @@ const MaterialQuery = () => {
</Button>
</AuthButton>
<Button
onClick={exportFile}
loading={exportLoading}
>导出</Button>
onClick={exportFile}
loading={exportLoading}
>导出</Button>
</Space>
)
}
......@@ -437,13 +437,13 @@ const MaterialQuery = () => {
}
}
result['customerAttributeValueIdList'] = _customerAttributeValueIdList.length > 0 ? _customerAttributeValueIdList.join(',') : undefined;
result['customerAttributeValueList'] = _customerAttributeValueList.length > 0 ? _customerAttributeValueList.join(',') : undefined;
result['customerAttributeValueList'] = _customerAttributeValueList.length > 0 ? _customerAttributeValueList.join(',') : undefined;
ref.current.reload(result)
};
const fetchListData = async (params: GetProductGoodsGetMaterialListRequest) => {
try {
const { data, code } = await getProductGoodsGetMaterialList(params);
const { data, code } = await getProductGoodsGetMaterialList({ ...params, all: true });
if (code === 1000) {
return data;
}
......@@ -469,14 +469,14 @@ const MaterialQuery = () => {
// })
// })
const exportFile = async ()=>{
const exportFile = async () => {
if (selectRowFns.selectedRowKeys.length === 0) {
message.info('请选择你要导出的物料')
return;
}
setExportLoading(true)
const res = await getProductGoodsExport({
ids:selectRowFns.selectedRowKeys.join(','),
const res = await getProductGoodsExport({
ids: selectRowFns.selectedRowKeys.join(','),
}, {
responseType: 'blob',
requestType: 'json',
......@@ -486,7 +486,7 @@ const MaterialQuery = () => {
const downloadElement = document.createElement('a');
const href = window.URL.createObjectURL(blob); //创建下载的链接
downloadElement.href = href;
downloadElement.download = '物料查询导出'+moment().format('YYYY-MM-DD HH:mm:ss'); // 下载后文件名
downloadElement.download = '物料查询导出' + moment().format('YYYY-MM-DD HH:mm:ss'); // 下载后文件名
document.body.appendChild(downloadElement);
downloadElement.click(); // 点击下载
document.body.removeChild(downloadElement); // 下载完成移除元素
......
......@@ -29,7 +29,7 @@ export interface RequestBillProps { }
const fetchTableData = (parmas) => {
return new Promise(reolve => {
getPurchaseRequisitionPage({ ...parmas }).then(res => {
getPurchaseRequisitionPage({ ...parmas, all: true }).then(res => {
reolve(res.data)
})
})
......
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 to comment