Commit b689cd0d authored by XieZhiXiong's avatar XieZhiXiong

chore: 修改接口名

parent 5fcefe2b
......@@ -791,7 +791,7 @@ export const logisticsDeliverySearchSchema: ISchema = {
"x-component": 'SearchSelect',
'x-component-props': {
placeholder: '单据类型',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
fetchSearch: PublicApi.getProductInvoicesTypeAll,
style: {
width: 160
}
......
......@@ -182,7 +182,7 @@ const AddLogistics: React.FC<{}> = () => {
}).catch(error => console.log(error));
switch (Number(createType)) {
case 2:
PublicApi.getWarehouseInvoicesDetails({ invoicesId: id }).then((res: any) => {
PublicApi.getProductInvoicesDetails({ invoicesId: id }).then((res: any) => {
if (res.code === 1000) {
const obj = {
receiverName: res.data.receiverName,
......@@ -373,7 +373,7 @@ const AddLogistics: React.FC<{}> = () => {
switch (Number(createType)) {
case 1:
case 2:
PublicApi.getWarehouseInvoicesProductList({ ...params, invoicesId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then((res: any) => {
PublicApi.getProductInvoicesProductList({ ...params, invoicesId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then((res: any) => {
if (res.code === 1000) {
res.data.data.forEach(item => {
item.category = item.categoryName
......@@ -385,7 +385,7 @@ const AddLogistics: React.FC<{}> = () => {
})
break;
case 3:
PublicApi.getWarehouseInvoicesProductList({ ...params, invoicesId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then((res: any) => {
PublicApi.getProductInvoicesProductList({ ...params, invoicesId: query.shipmentOrderId ? query.shipmentOrderId : query.relevanceOrderId }).then((res: any) => {
if (res.code === 1000) {
res.data.data.forEach(item => {
item.category = item.categoryName
......@@ -495,7 +495,7 @@ const AddLogistics: React.FC<{}> = () => {
/** 选择发货单 列表数据 */
const fetchShippingData = (params: any) => {
return new Promise(resolve => {
PublicApi.getWarehouseInvoicesList({ ...params }).then(res => {
PublicApi.getProductInvoicesList({ ...params }).then(res => {
if (res.code === 1000) {
resolve(res.data)
}
......
......@@ -47,7 +47,7 @@ export const deliveryNumberSchema: ISchema = {
"x-component-props": {
placeholder: '请选择单据类型',
className: 'fixed-ant-selected-down',
fetchSearch: PublicApi.getWarehouseInvoicesTypeAll,
fetchSearch: PublicApi.getProductInvoicesTypeAll,
style: {
width: 160
}
......
......@@ -122,7 +122,7 @@ const listDialog: React.FC<Params> = (props) => {
}if(props.type === 2){//发货单 仓库服务 -进销存-单据列表
return new Promise((resolve, reject) => {
PublicApi.getWarehouseInvoicesList({ ...params }).then(res => {
PublicApi.getProductInvoicesList({ ...params }).then(res => {
resolve(res.data)
})
})
......
......@@ -5,7 +5,7 @@ import { PublicApi } from '@/services/api';
// 获取单据类型
const fetchInvoicesType = (): Promise<any[]> => {
return new Promise((resolve, reject) => {
PublicApi.getWarehouseInvoicesTypeAll().then(res => {
PublicApi.getProductInvoicesTypeAll().then(res => {
if (res.code === 1000) {
resolve(res.data);
}
......@@ -19,7 +19,7 @@ const fetchInvoicesType = (): Promise<any[]> => {
// 获取仓库
const fetchInventory = (): Promise<any[]> => {
return new Promise((resolve, reject) => {
PublicApi.getWarehouseWarehouseAll().then(res => {
PublicApi.getProductWarehouseAll().then(res => {
if (res.code === 1000) {
resolve(res.data);
}
......
......@@ -167,7 +167,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
return;
}
setInfoLoading(true);
PublicApi.getWarehouseInvoicesDetails({
PublicApi.getProductInvoicesDetails({
invoicesId: `${id}`,
invoicesNo,
}).then(res => {
......@@ -852,7 +852,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -962,7 +962,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1061,7 +1061,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1160,7 +1160,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1276,7 +1276,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1387,7 +1387,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1496,7 +1496,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1605,7 +1605,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......@@ -1713,7 +1713,7 @@ const BillsForm: React.FC<BillsFormProps> = ({
if (!isEdit) {
return;
}
PublicApi.postWarehouseInvoicesUpdata({
PublicApi.postProductInvoicesUpdata({
id: +id,
invoicesAbstract: rest.invoicesAbstract,
inventoryId: rest.inventoryId,
......
......@@ -27,7 +27,7 @@ const Bills: React.FC<{}> = () => {
const [batchLoading, setBatchLoading] = useState(false);
const fetchListData = async (params: any) => {
const res = await PublicApi.getWarehouseInvoicesList(params);
const res = await PublicApi.getProductInvoicesList(params);
if (res.code === 1000) {
return res.data;
}
......@@ -36,19 +36,19 @@ const Bills: React.FC<{}> = () => {
// 获取单据类型
const fetchInvoicesType = async () => {
const { data } = await PublicApi.getWarehouseInvoicesTypeAll();
const { data } = await PublicApi.getProductInvoicesTypeAll();
return data.map(v => ({ label: v.name, value: v.id }));
};
// 获取对应仓库
const fetchInventory = async () => {
const { data } = await PublicApi.getWarehouseWarehouseAll();
const { data } = await PublicApi.getProductWarehouseAll();
return data.map(v => ({ label: v.name, value: v.id }));
};
const deleteInvoices = (ids: number[], callback?: () => void) => {
setBatchLoading(true);
PublicApi.postWarehouseInvoicesBatchDelete({
PublicApi.postProductInvoicesBatchDelete({
ids,
}).then(res => {
if (res.code !== 1000) {
......@@ -64,7 +64,7 @@ const Bills: React.FC<{}> = () => {
const auditInvoices = (ids: number[], callback?: () => void) => {
setBatchLoading(true);
PublicApi.postWarehouseInvoicesBatchReviewAll({
PublicApi.postProductInvoicesBatchReviewAll({
ids,
}).then(res => {
if (res.code !== 1000) {
......@@ -80,7 +80,7 @@ const Bills: React.FC<{}> = () => {
const counterclaimInvoices = (ids: number[], callback?: () => void) => {
setBatchLoading(true);
PublicApi.postWarehouseInvoicesBatchAgainstReview({
PublicApi.postProductInvoicesBatchAgainstReview({
ids,
}).then(res => {
if (res.code !== 1000) {
......
......@@ -35,7 +35,7 @@ const BillTypeForm: React.FC<BillTypeFormProps> = ({
return;
}
setInfoLoading(true);
const infoRes = await PublicApi.getWarehouseInvoicesTypeDetails({
const infoRes = await PublicApi.getProductInvoicesTypeDetails({
id,
});
......@@ -55,7 +55,7 @@ const BillTypeForm: React.FC<BillTypeFormProps> = ({
return;
}
setSubmitLoading(true);
PublicApi.postWarehouseInvoicesTypeAdd({ ...value })
PublicApi.postProductInvoicesTypeAdd({ ...value })
.then(res => {
if (res.code === 1000) {
setTimeout(() => {
......@@ -71,7 +71,7 @@ const BillTypeForm: React.FC<BillTypeFormProps> = ({
return;
}
setSubmitLoading(true);
PublicApi.postWarehouseInvoicesTypeUpdate({
PublicApi.postProductInvoicesTypeUpdate({
id: id,
...value,
}).then(res => {
......
......@@ -104,7 +104,7 @@ const billsType: React.FC<{}> = () => {
const fetchListData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getWarehouseInvoicesTypeList(params)
PublicApi.getProductInvoicesTypeList(params)
.then(res => {
if (res.code === 1000) {
resolve(res.data);
......@@ -118,7 +118,7 @@ const billsType: React.FC<{}> = () => {
};
const handleModify = (record: any) => {
PublicApi.postWarehouseInvoicesTypeStateUpdate({
PublicApi.postProductInvoicesTypeStateUpdate({
id: record.id,
state: record.state === DOC_TYPE_STATUS_EFFECTIVE ? DOC_TYPE_STATUS_INVALID : DOC_TYPE_STATUS_EFFECTIVE,
}).then(res => {
......@@ -129,7 +129,7 @@ const billsType: React.FC<{}> = () => {
};
const handleDelete = record => {
PublicApi.postWarehouseInvoicesTypeDelete({
PublicApi.postProductInvoicesTypeDelete({
id: record.id,
}).then(res => {
if (res.code === 1000) {
......
......@@ -105,7 +105,7 @@ const Inventory: React.FC<{}> = () => {
const fetchListData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getWarehouseInventoryList(params)
PublicApi.getProductInventoryList(params)
.then(res => {
if (res.code === 1000) {
resolve(res.data);
......@@ -120,7 +120,7 @@ const Inventory: React.FC<{}> = () => {
// 获取对应仓库
const fetchInventory = async () => {
const { data } = await PublicApi.getWarehouseWarehouseAll();
const { data } = await PublicApi.getProductWarehouseAll();
return data.map(v => ({ label: v.name, value: v.id }));
};
......@@ -128,7 +128,7 @@ const Inventory: React.FC<{}> = () => {
const handleSubmit = async values => {
setConfirmLoading(true);
const res = await PublicApi.postWarehouseInventorySafetyUpdate({
const res = await PublicApi.postProductInventorySafetyUpdate({
id: current.id,
safetyInvoices: +values.safetyInvoices,
});
......
......@@ -36,7 +36,7 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
const getWarehouseInfo = async () => {
if (id) {
setInfoLoading(true);
const infoRes = await PublicApi.getWarehouseWarehouseDetails({
const infoRes = await PublicApi.getProductWarehouseDetails({
id,
});
......@@ -87,7 +87,7 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
return;
}
setSubmitLoading(true);
PublicApi.postWarehouseWarehouseAdd({ ...value }).then(res => {
PublicApi.postProductWarehouseAdd({ ...value }).then(res => {
if (res.code === 1000) {
setTimeout(() => {
history.goBack();
......@@ -101,7 +101,7 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
return;
}
setSubmitLoading(true);
PublicApi.postWarehouseWarehouseUpdate({
PublicApi.postProductWarehouseUpdate({
id: id,
...value,
}).then(res => {
......
......@@ -109,7 +109,7 @@ const WareHouse: React.FC<{}> = () => {
const fetchListData = (params: any) => {
return new Promise((resolve, reject) => {
PublicApi.getWarehouseWarehouseList(params)
PublicApi.getProductWarehouseList(params)
.then(res => {
if (res.code === 1000) {
resolve(res.data);
......@@ -123,7 +123,7 @@ const WareHouse: React.FC<{}> = () => {
};
const handleModify = record => {
PublicApi.postWarehouseWarehouseStartRoStop({
PublicApi.postProductWarehouseStartRoStop({
id: record.id,
state: record.state === POSITION_STATUS_EFFECTIVE ? POSITION_STATUS_INVALID : POSITION_STATUS_EFFECTIVE,
}).then(res => {
......@@ -134,7 +134,7 @@ const WareHouse: React.FC<{}> = () => {
};
const handleDelete = record => {
PublicApi.postWarehouseWarehouseDelete({
PublicApi.postProductWarehouseDelete({
id: record.id,
}).then(res => {
if (res.code === 1000) {
......
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