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
73b4032d
Commit
73b4032d
authored
Aug 01, 2023
by
krysent
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
2616c243
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
208 additions
and
8 deletions
+208
-8
index.jsx
src/pages/historystore/Histore/index.jsx
+48
-0
index.jsx
src/pages/insertstore/Otherinstore/index.jsx
+160
-8
No files found.
src/pages/historystore/Histore/index.jsx
View file @
73b4032d
...
...
@@ -39,6 +39,53 @@ function Instore(props) {
dataIndex
:
"materieControlNo"
,
key
:
"materieControlNo"
,
},
{
title
:
"规格型号"
,
dataIndex
:
"specificationModel"
,
key
:
"specificationModel"
,
search
:
false
,
},
{
title
:
"铁损"
,
dataIndex
:
"ironLoss"
,
key
:
"ironLoss"
,
readonly
:
"ironLoss"
,
search
:
false
,
},
{
title
:
"片厚"
,
dataIndex
:
"sheetThickness"
,
key
:
"sheetThickness"
,
readonly
:
"sheetThickness"
,
search
:
false
,
},
{
title
:
"宽度"
,
dataIndex
:
"width"
,
key
:
"width"
,
readonly
:
"width"
,
search
:
false
,
},
{
title
:
"单边厚度"
,
key
:
"unilateralThickness"
,
dataIndex
:
"unilateralThickness"
,
search
:
false
,
},
{
title
:
"米数"
,
dataIndex
:
"length"
,
key
:
"length"
,
search
:
false
,
},
{
title
:
"牌号"
,
dataIndex
:
"shopSign"
,
key
:
"shopSign"
,
readonly
:
"shopSign"
,
search
:
false
,
},
{
title
:
"当时库存数量"
,
dataIndex
:
"currentNum"
,
...
...
@@ -77,6 +124,7 @@ function Instore(props) {
dataIndex
:
"stockDetailTypeName"
,
key
:
"stockDetailTypeName"
,
width
:
280
,
search
:
false
,
},
{
title
:
"相关单号"
,
...
...
src/pages/insertstore/Otherinstore/index.jsx
View file @
73b4032d
...
...
@@ -9,7 +9,7 @@ import { useReactToPrint } from "react-to-print";
import
{
useModel
}
from
"umi"
;
import
PrintDom
from
"./printdom"
;
import
{
PrintQrCode
}
from
"@/components/PrintCode"
;
import
{
EditableProTable
}
from
"@ant-design/pro-table"
;
const
keytoval
=
{
one
:
1
,
two
:
2
,
...
...
@@ -40,6 +40,147 @@ const keytoval = {
three
:
"退料入库"
,
four
:
"其他入库"
,
};
const
EditUpload
=
({
record
,
fid
,
storeId
})
=>
{
const
[
value
,
setvalue
]
=
useState
({
[
record
.
id
]:
record
.
uploadList
,
});
const
{
initialState
,
setInitialState
}
=
useModel
(
"@@initialState"
);
useEffect
(()
=>
{
if
(
!
value
)
{
return
;
}
let
newlist
=
Object
.
keys
(
value
)?.
map
?.((
it
)
=>
{
let
id
=
it
;
let
newArr
=
value
[
id
]?.
filter
((
it
)
=>
typeof
it
.
id
==
"number"
)
??
[];
return
{
id
,
uploadList
:
newArr
.
map
((
its
)
=>
{
return
{
storePositionId
:
its
?.
storePositionId
,
instroeNum
:
its
?.
instroeNum
,
remark
:
its
?.
remark
,
};
}),
};
})
??
[];
setInitialState
((
s
)
=>
{
return
{
...
s
,
submit
:
{
id
:
fid
,
materialList
:
s
.
submit
&&
s
?.
submit
?.
materialList
?
s
?.
submit
?.
materialList
?.
filter
(
(
it
)
=>
newlist
.
map
((
item
)
=>
item
.
id
).
indexOf
(
it
.
id
)
==
-
1
)
?.
concat
(
newlist
)
?.
filter
((
it
)
=>
it
.
uploadList
?.
length
>
0
)
:
[],
},
};
});
},
[
value
]);
return
(
<
EditableProTable
rowKey=
{
"id"
}
maxLength=
{
1000
}
style=
{
{
marginLeft
:
48
}
}
columns=
{
[
{
title
:
(
<
span
>
库位名称
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"storePositionName"
,
key
:
"storePositionId"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
(
params
)
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-auth/sysStorePosition/queryByStoreId/selection"
,
params
:
{
storeId
:
params
.
storeId
},
});
return
res
?.
data
?.
dataList
;
},
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
;
},
params
:
{
storeId
:
storeId
},
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
(
<
span
>
上架数量
<
b
style=
{
{
color
:
"red"
}
}
>
*
</
b
>
</
span
>
),
dataIndex
:
"instroeNum"
,
key
:
"instroeNum"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
;
},
valueType
:
"digit"
,
formItemProps
:
()
=>
{
return
{
rules
:
[{
required
:
true
,
message
:
"此项为必填项"
}],
};
},
},
{
title
:
"备注"
,
dataIndex
:
"remark"
,
key
:
"remark"
,
search
:
false
,
editable
:
(
text
,
record
,
index
)
=>
{
return
!
record
.
materieOutstoreDetailId
;
},
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
typeof
record
.
id
==
"number"
&&
(
<
a
key=
"delete"
onClick=
{
()
=>
{}
}
>
删除
</
a
>
),
],
},
]
}
value=
{
value
[
record
.
id
]
}
recordCreatorProps=
{
{
newRecordType
:
"dataSource"
,
record
:
()
=>
({
id
:
Date
.
now
(),
}),
}
}
editable=
{
{
type
:
"multiple"
,
actionRender
:
(
row
,
config
,
defaultDoms
)
=>
{
return
[
defaultDoms
.
delete
];
},
onValuesChange
:
async
(
records
,
recordList
)
=>
{
setvalue
((
s
)
=>
{
return
{
...
s
,
[
record
.
id
]:
recordList
,
};
});
},
}
}
pagination=
{
false
}
/>
);
};
const
defaultFields
=
{
four
:
{
...
...
@@ -88,7 +229,7 @@ const defaultFields = {
//根据url接口 改变某个value
database
:
(
params
)
=>
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/queryById"
,
url
:
"/ngic-workmanship/wmsMaterieLabel/queryBy
Label
Id"
,
params
,
}),
params
:
{
labelId
:
"linked"
},
...
...
@@ -102,6 +243,7 @@ const defaultFields = {
sheetThickness
:
"sheetThickness"
,
shopSign
:
"shopSign"
,
weight
:
"weight"
,
specificationModel
:
"specificationModel"
,
},
},
},
...
...
@@ -115,7 +257,7 @@ const defaultFields = {
dataIndex
:
"labelId"
,
key
:
"labelId"
,
valueType
:
"select"
,
width
:
30
0
,
width
:
22
0
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieLabel/selectionByStatus"
,
...
...
@@ -142,7 +284,6 @@ const defaultFields = {
dataIndex
:
"materieCode"
,
key
:
"materieCode"
,
valueType
:
"select"
,
width
:
300
,
readonly
:
true
,
},
{
...
...
@@ -1005,8 +1146,8 @@ function Instore(props) {
columns
,
path
:
activeTabKey
==
"1"
?
"/ngic-workmanship/wmsMaterieInstore/queryList"
:
"/ngic-workmanship/wmsMaterieInstoreHis/queryList"
,
?
"/ngic-workmanship/wmsMaterieInstore/query
Other
List"
:
"/ngic-workmanship/wmsMaterieInstoreHis/query
Other
List"
,
};
return
(
...
...
@@ -1028,9 +1169,20 @@ function Instore(props) {
{
...
drawprops
}
submitData=
{
async
(
value
)
=>
{
if
(
drawprops
.
val
==
"add"
)
{
const
data
=
JSON
.
parse
(
JSON
.
stringify
(
value
));
const
materialList
=
data
?.
materialList
?.
map
((
it
)
=>
{
return
{
labelId
:
it
?.
labelId
,
};
});
let
res
=
await
doFetch
({
url
:
"/ngic-workmanship/wmsMaterieInstore/saveInStore"
,
params
:
{
...
value
},
url
:
"/ngic-workmanship/wmsMaterieInstore/saveOtherInstore"
,
params
:
{
materieInstoreNo
:
data
.
materieInstoreNo
,
storeId
:
data
.
storeId
,
remark
:
data
.
remark
,
materialList
:
materialList
,
},
});
if
(
res
.
code
==
"0000"
)
{
reload
();
...
...
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