Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
24ba7c06
Commit
24ba7c06
authored
Mar 23, 2022
by
wzy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 进销存-仓库管理接口修改
parent
05aa57c7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
24 deletions
+5
-24
index.tsx
...kSellStorage/warehouse/components/WarehouseForm/index.tsx
+2
-21
index.tsx
src/pages/transaction/stockSellStorage/warehouse/index.tsx
+3
-3
No files found.
src/pages/transaction/stockSellStorage/warehouse/components/WarehouseForm/index.tsx
View file @
24ba7c06
...
...
@@ -10,7 +10,7 @@ import { warehouseDetailSchema } from './schema';
import
{
useLinkEnumEffect
}
from
'@/components/NiceForm/linkages/linkEnum'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
getManageAreaAll
,
getManageCountryAreaGetTelCode
}
from
'@/services/ManageV2Api'
;
import
{
getProductWarehouseDetails
,
postProductWarehouseAdd
,
postProductWarehouse
Update
}
from
'@/services/ProductV2Api'
;
import
{
getProductWarehouseDetails
,
postProductWarehouseAdd
Or
Update
}
from
'@/services/ProductV2Api'
;
import
styles
from
'./index.less'
;
const
intl
=
getIntl
();
...
...
@@ -87,26 +87,8 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
};
const
handleSubmit
=
value
=>
{
if
(
!
id
)
{
if
(
isEdit
)
{
return
;
}
setSubmitLoading
(
true
);
postProductWarehouseAdd
({
...
value
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setTimeout
(()
=>
{
history
.
goBack
();
},
800
);
};
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
else
{
if
(
!
isEdit
)
{
return
;
}
setSubmitLoading
(
true
);
postProductWarehouseUpdate
({
postProductWarehouseAddOrUpdate
({
id
:
id
,
...
value
,
}).
then
(
res
=>
{
...
...
@@ -118,7 +100,6 @@ const WarehouseForm: React.FC<WarehouseFormProps> = ({
}).
finally
(()
=>
{
setSubmitLoading
(
false
);
});
}
setUnsaved
(
false
);
};
...
...
src/pages/transaction/stockSellStorage/warehouse/index.tsx
View file @
24ba7c06
...
...
@@ -11,7 +11,7 @@ import StandardTable from '@/components/StandardTable';
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getProductWarehouseList
,
postProductWarehouseStart
RoStop
,
pos
tProductWarehouseDelete
}
from
'@/services/ProductV2Api'
;
import
{
getProductWarehouseList
,
postProductWarehouseStart
OrStop
,
ge
tProductWarehouseDelete
}
from
'@/services/ProductV2Api'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
NiceForm
from
'@/components/NiceForm'
;
...
...
@@ -135,7 +135,7 @@ const WareHouse: React.FC<{}> = () => {
};
const
handleModify
=
record
=>
{
postProductWarehouseStart
Ro
Stop
({
postProductWarehouseStart
Or
Stop
({
id
:
record
.
id
,
state
:
record
.
state
===
POSITION_STATUS_EFFECTIVE
?
POSITION_STATUS_INVALID
:
POSITION_STATUS_EFFECTIVE
,
}).
then
(
res
=>
{
...
...
@@ -146,7 +146,7 @@ const WareHouse: React.FC<{}> = () => {
};
const
handleDelete
=
record
=>
{
pos
tProductWarehouseDelete
({
ge
tProductWarehouseDelete
({
id
:
record
.
id
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment