Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wms
Project
Project
Details
Activity
Releases
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
wuhao
wms
Commits
85ecd57b
Commit
85ecd57b
authored
Aug 02, 2023
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出库
parent
9335a317
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
48 deletions
+57
-48
useGlobal.js
src/models/useGlobal.js
+8
-1
index.jsx
src/pages/outsetstore/Otheroutstore/index.jsx
+49
-47
No files found.
src/models/useGlobal.js
View file @
85ecd57b
import
{
useState
,
useCallback
}
from
"react"
;
export
default
function
useGlobal
()
{
const
[
alive
,
setAlive
]
=
useState
(
false
),
[
newMenus
,
setMenu
]
=
useState
({});
[
newMenus
,
setMenu
]
=
useState
({}),
[
storeId
,
setStoreId
]
=
useState
(
""
);
const
changealive
=
useCallback
((
parser
)
=>
{
setAlive
(
parser
);
...
...
@@ -11,10 +12,16 @@ export default function useGlobal() {
setMenu
(
val
);
},
[]);
const
setStoreIdFn
=
useCallback
((
val
)
=>
{
setStoreId
(
val
);
},
[]);
return
{
alive
,
changealive
,
newMenus
,
setMenuFn
,
setStoreIdFn
,
storeId
,
};
}
src/pages/outsetstore/Otheroutstore/index.jsx
View file @
85ecd57b
...
...
@@ -42,8 +42,9 @@ const keytoval = {
four
:
"其他出库"
,
};
const
MySelect
=
({
storeId
,
record
,
value
,
onChange
})
=>
{
console
.
log
(
storeId
,
record
);
const
MySelect
=
({
record
,
value
,
onChange
})
=>
{
const
{
storeId
}
=
useModel
(
"useGlobal"
);
console
.
log
(
storeId
);
const
[
inputValue
,
setInputValue
]
=
useState
(
""
);
const
[
options
,
setoptions
]
=
useState
([]);
const
rref
=
useRef
();
...
...
@@ -513,11 +514,11 @@ function Outstore(props) {
actionRef
=
useRef
(),
ChildRef
=
null
,
printRef
=
useRef
(),
mutiPrintRef
=
useRef
(),
[
storeId
,
setstoreId
]
=
useState
();
mutiPrintRef
=
useRef
();
const
{
storeId
,
setStoreIdFn
}
=
useModel
(
"useGlobal"
);
const
outStoreFields
=
useMemo
(()
=>
{
cons
ole
.
log
(
storeId
)
;
cons
t
mystoreId
=
storeId
;
return
{
materieOutstoreNo
:
{
value
:
null
,
...
...
@@ -573,16 +574,11 @@ function Outstore(props) {
}),
params
:
{
materieControlNo
:
"linked"
},
effectresult
:
{
productionUnitName
:
"productionUnitName"
,
materieCode
:
"materieCode"
,
supplierId
:
"supplierId"
,
supplierName
:
"supplierName"
,
usableNum
:
"usableNum"
,
length
:
"length"
,
width
:
"width"
,
ironLoss
:
"ironLoss"
,
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
weight
:
"weight"
,
specificationModel
:
"specificationModel
"
,
holdNum
:
"holdNum
"
,
},
},
},
...
...
@@ -628,24 +624,23 @@ function Outstore(props) {
};
},
renderFormItem
:
({
entry
})
=>
{
console
.
log
(
"renderFormItem"
,
storeId
);
return
<
MySelect
storeId=
{
storeId
}
record=
{
entry
}
/>;
return
<
MySelect
record=
{
entry
}
/>;
// return storeId;
},
},
{
title
:
"
规格型号
"
,
dataIndex
:
"s
pecificationModel
"
,
key
:
"s
pecificationModel
"
,
title
:
"
库位名称
"
,
dataIndex
:
"s
torePositionName
"
,
key
:
"s
torePositionName
"
,
readonly
:
true
,
},
{
title
:
"
供应商
"
,
dataIndex
:
"
supplierName
"
,
key
:
"
supplierName
"
,
readonly
:
"
supplierName
"
,
title
:
"
米数
"
,
dataIndex
:
"
length
"
,
key
:
"
length
"
,
readonly
:
"
length
"
,
},
{
title
:
"宽度"
,
...
...
@@ -654,28 +649,22 @@ function Outstore(props) {
readonly
:
"width"
,
},
{
title
:
"
铁损
"
,
dataIndex
:
"
ironLoss
"
,
key
:
"
ironLoss
"
,
readonly
:
"
ironLoss
"
,
title
:
"
下架数量
"
,
dataIndex
:
"
usableNum
"
,
key
:
"
usableNum
"
,
readonly
:
"
usableNum
"
,
},
{
title
:
"
片厚
"
,
dataIndex
:
"
sheetThickness
"
,
key
:
"
sheetThickness
"
,
readonly
:
"
sheetThickness
"
,
title
:
"
出库数量
"
,
dataIndex
:
"
outstroeNum
"
,
key
:
"
outstroeNum
"
,
readonly
:
"
outstroeNum
"
,
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
},
{
title
:
"入库数量"
,
dataIndex
:
"weight"
,
key
:
"weight"
,
readonly
:
"weight"
,
title
:
"可用库存"
,
dataIndex
:
"holdNum"
,
key
:
"holdNum"
,
readonly
:
"holdNum"
,
},
{
title
:
"库存单位"
,
...
...
@@ -687,7 +676,7 @@ function Outstore(props) {
rowKey
:
"id"
,
},
};
},
[
drawprops
,
storeId
]);
},
[
drawprops
]);
//操作完成后刷新
function
reload
()
{
...
...
@@ -845,8 +834,8 @@ function Outstore(props) {
outStoreFields
[
i
].
value
=
detailData
[
i
];
}
}
console
.
log
(
"storeId"
,
detailData
?.
storeId
);
setstoreId
(
detailData
?.
storeId
);
setStoreIdFn
(
detailData
?.
storeId
);
setdrawprops
((
s
)
=>
({
...
s
,
visible
:
true
,
...
...
@@ -854,6 +843,7 @@ function Outstore(props) {
val
:
"edit"
,
title
:
`下架采集`
,
fields
:
outStoreFields
,
id
:
record
?.
id
,
}));
setInitialState
((
s
)
=>
{
return
{
...
...
@@ -1006,9 +996,7 @@ function Outstore(props) {
];
}
},
[
activeTabKey
]);
useEffect
(()
=>
{
console
.
log
(
"123123"
,
storeId
);
},
[
storeId
]);
const
handlePrint
=
useReactToPrint
({
content
:
()
=>
printRef
.
current
.
dom
.
current
,
});
...
...
@@ -1109,7 +1097,21 @@ function Outstore(props) {
reload
();
}
}
else
if
(
drawprops
.
val
==
"edit"
)
{
console
.
log
(
value
);
let
newfileds
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
const
materialList
=
newfileds
?.
materialList
?.
map
((
it
)
=>
{
return
{
id
:
it
?.
id
,
materieId
:
it
?.
materieId
,
materieControlNo
:
it
?.
materieControlNo
,
};
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieOutstore/download"
,
params
:
{
id
:
drawprops
.
id
,
materialList
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
}
}
}
}
onChange=
{
async
(
changedValues
,
allValues
)
=>
{
...
...
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