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
470b8e5f
Commit
470b8e5f
authored
Jul 06, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
73b5b435
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
326 additions
and
125 deletions
+326
-125
index.jsx
src/components/AutoTable/Resizecell/index.jsx
+1
-1
index.jsx
src/components/AutoTable/index.jsx
+95
-4
Index.jsx
src/pages/craft/Materiel/Index.jsx
+1
-1
fields.js
src/pages/insertstore/Instore/fields.js
+117
-0
index.jsx
src/pages/insertstore/Instore/index.jsx
+90
-104
index.jsx
src/pages/platform/Custom/index.jsx
+5
-5
fields.js
src/pages/platform/Provide/fields.js
+3
-3
index.jsx
src/pages/platform/Provide/index.jsx
+10
-7
detailTotalCard.js
src/utils/detailTotalCard.js
+4
-0
No files found.
src/components/AutoTable/Resizecell/index.jsx
View file @
470b8e5f
...
...
@@ -4,7 +4,7 @@ import { Resizable } from "react-resizable";
function
Resizecell
({
onResize
,
onResizeStop
,
width
,
onClick
,
...
restProps
})
{
return
(
<
Resizable
width=
{
width
}
width=
{
width
??
1
}
height=
{
0
}
onResize=
{
onResize
}
onResizeStop=
{
onResizeStop
}
...
...
src/components/AutoTable/index.jsx
View file @
470b8e5f
import
{
Row
,
Col
,
Card
,
Grid
}
from
"antd"
;
import
{
Row
,
Col
,
Card
,
Grid
,
Button
}
from
"antd"
;
import
Mcard
from
"./mcard"
;
import
Mtable
from
"./mtable"
;
import
getPrem
from
"@/utils/getPrem"
;
//权限判断fn
import
{
ExportOutlined
}
from
"@ant-design/icons"
;
const
{
useBreakpoint
}
=
Grid
;
function
isString
(
obj
)
{
return
obj
.
constructor
===
String
?
true
:
false
;
}
// const tableprops = {
// ...props,
// addconfig: {
// premkey: "sysDepartment_save",
// disabled:true,
// btnprops:{},
// onClick: () => {
// alert(0)
// },
// },
// exportconfig:{
// premkey: "sysDepartment_save",
// btnprops:{
// },
// onClick: () => {
// alert(1)
// },
// },
// pageextra: activeTabKey == "1" ? "add" : "none",
// tabList: [
// {
// tab: "未完成",
// key: "1"
// }, {
// tab: "已完成",
// key: "2"
// }
// ],
// activeTabKey,
// onTabChange
// }
export
default
(
props
)
=>
{
const
screens
=
useBreakpoint
();
const
actionbtn
=
{
add
:
<
Button
key=
{
"add"
}
disabled=
{
props
?.
addconfig
?.
disabled
||
!
getPrem
(
props
?.
addconfig
?.
premkey
??
""
,
"ifs"
)
}
type=
"primary"
{
...
props
?
.
addconfig
?
.
btnprops
}
onClick=
{
()
=>
{
props
?.
addconfig
?.
onClick
?.()
}
}
>
新增
</
Button
>,
export
:
<
Button
key=
{
"add"
}
disabled=
{
props
?.
exportconfig
?.
disabled
||
!
getPrem
(
props
?.
exportconfig
?.
premkey
??
""
,
"ifs"
)
}
type=
"danger"
icon=
{
<
ExportOutlined
/>
}
{
...
props
?
.
exportconfig
?
.
btnprops
}
onClick=
{
()
=>
{
props
?.
exportconfig
?.
onClick
?.()
}
}
>
导出
</
Button
>
}
//右上角 pageextra 类型 1.reactDom 2.string 以逗号隔开 为none时不显示
const
renderextra
=
()
=>
{
if
(
props
.
pageextra
&&
!
isString
(
props
.
pageextra
))
{
return
props
.
pageextra
}
else
if
(
props
.
pageextra
===
"none"
)
{
return
<
div
style=
{
{
height
:
32
,
width
:
64
}
}
></
div
>
}
else
{
let
strarr
=
props
.
pageextra
?
props
.
pageextra
.
split
(
","
)
:
[
"add"
];
console
.
log
(
strarr
);
return
strarr
.
map
((
it
,
i
)
=>
{
return
<
div
style=
{
{
marginRight
:
i
==
strarr
.
length
-
1
?
0
:
6
}
}
>
{
actionbtn
[
it
]
}
</
div
>
})
}
}
return
(
<
div
className=
"diycard"
>
{
screens
.
xs
?
(
...
...
@@ -22,7 +113,7 @@ export default (props) => {
)
:
props
.
withCard
===
false
?
(
<
div
style=
{
{
display
:
"flex"
,
width
:
"100%"
}
}
>
{
(
props
.
childposition
==
"left"
||
!
props
.
childposition
)
&&
props
.
children
}
props
.
children
}
<
div
style=
{
{
flex
:
1
,
width
:
"100%"
}
}
>
{
props
.
childposition
==
"top"
&&
props
.
children
}
<
Mtable
{
...
props
}
/>
...
...
@@ -34,8 +125,8 @@ export default (props) => {
<
Card
bordered=
{
props
.
bordered
===
false
?
false
:
true
}
style=
{
{
height
:
"100%"
}
}
title=
{
props
.
pagetitle
||
null
}
extra=
{
props
.
pageextra
||
null
}
title=
{
props
?.
route
?.
name
?
props
.
route
.
name
:
props
.
pagetitle
}
extra=
{
<
div
className=
"center"
>
{
renderextra
()
}
</
div
>
}
activeTabKey=
{
props
.
activeTabKey
}
tabList=
{
props
.
tabList
}
onTabChange=
{
props
.
onTabChange
}
...
...
src/pages/craft/Materiel/Index.jsx
View file @
470b8e5f
...
...
@@ -240,7 +240,7 @@ const Materiel = (props) => {
key
:
"qualityGuaranteePeriod"
,
search
:
false
,
render
:
(
text
,
row
)
=>
{
return
row
.
qualityGuaranteePeriod
+
" "
+
row
.
qualityGuaranteePeriodUnitName
return
(
row
.
qualityGuaranteePeriod
??
""
)
+
" - "
+
(
row
.
qualityGuaranteePeriodUnitName
??
""
)
}
},
{
...
...
src/pages/insertstore/Instore/fields.js
0 → 100644
View file @
470b8e5f
import
{
factorySelect
,
shopSelectByFactory
}
from
"@/services/system"
;
import
regValue
from
"@/utils/regValue"
;
export
default
{
processLineCode
:
{
value
:
null
,
type
:
"input"
,
title
:
"工艺路线编号"
,
name
:
[
"processLineCode"
],
required
:
true
,
},
processLineName
:
{
value
:
null
,
type
:
"input"
,
title
:
"工艺路线名称"
,
name
:
[
"processLineName"
],
required
:
true
,
},
factoryId
:
{
value
:
null
,
type
:
"select"
,
title
:
"所属工厂"
,
name
:
[
"factoryId"
],
required
:
true
,
options
:
{
database
:
factorySelect
,
params
:
{},
},
linked
:
true
,
},
shopId
:
{
value
:
null
,
type
:
"select"
,
title
:
"所属车间"
,
name
:
[
"shopId"
],
required
:
true
,
belinked
:
{
options
:
{
database
:
shopSelectByFactory
,
params
:
{
factoryId
:
"linked"
},
},
},
linked
:
true
,
},
processLineType
:
{
value
:
null
,
type
:
"select"
,
title
:
"工艺路线类型"
,
name
:
[
"processLineType"
],
required
:
false
,
options
:
[
{
label
:
"常规"
,
value
:
1
,
},
{
label
:
"返工"
,
value
:
2
,
},
],
},
capacity
:
{
value
:
null
,
type
:
"inputnumber"
,
title
:
"能力"
,
name
:
[
"capacity"
],
required
:
false
,
...
regValue
(
null
,
6
,
3
),
},
remark
:
{
value
:
null
,
type
:
"textarea"
,
title
:
"描述"
,
name
:
[
"remark"
],
required
:
false
,
col
:
{
span
:
24
},
},
materieProductUnitList
:
{
value
:
[],
title
:
"转换单位"
,
type
:
"table"
,
col
:
{
span
:
24
},
name
:
[
"materieProductUnitList"
],
required
:
true
,
columns
:
[
{
title
:
"辅助单位"
,
dataIndex
:
"productionUnit"
,
key
:
"productionUnit"
,
search
:
false
,
valueType
:
"select"
,
request
:
async
()
=>
{
let
res
=
await
doFetch
({
url
:
"/ngic-base-business/sysDic/queryMaterieUnitSelect"
,
params
:{}})
return
res
?.
data
?.
dataList
},
},
{
title
:
"转换比"
,
dataIndex
:
"conversionRate"
,
key
:
"conversionRate"
,
search
:
false
,
valueType
:
"digit"
,
width
:
200
},
{
title
:
"操作"
,
valueType
:
"option"
,
width
:
70
,
render
:
(
text
,
record
,
_
,
action
)
=>
[
<
a
key
=
"delete"
onClick
=
{()
=>
{
}}
>
删除
<
/a>
,
],
},
],
rowKey
:
"id"
,
},
};
src/pages/insertstore/Instore/index.jsx
View file @
470b8e5f
import
React
,
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
MenuUnfoldOutlined
,
MenuFoldOutlined
,
HomeOutlined
}
from
'@ant-design/icons'
;
import
{
Breadcrumb
,
Layout
,
Menu
,
Input
,
Tooltip
,
Tree
}
from
'antd'
;
import
React
,
{
useState
}
from
'react'
;
import
styles
from
'./index.less'
const
{
Header
,
Content
,
Footer
,
Sider
}
=
Layout
,
{
Search
}
=
Input
Button
,
Tooltip
,
Row
,
Divider
,
Drawer
,
Table
,
Col
,
Steps
,
Card
,
}
from
"antd"
;
import
AutoTable
from
"@/components/AutoTable"
;
import
{
useRequest
}
from
"umi"
;
import
defaultFields
from
"./fields"
;
import
{
doFetch
}
from
"@/utils/doFetch"
;
import
Details
from
"@/components/Details"
;
import
{
gongyiDetail
}
from
"@/utils/detailTotalCard"
;
import
Coltext
from
"@/components/Coltext"
;
import
DrawInitForm
from
"@/components/DrawInitForm"
;
import
styles
from
"./index.less"
;
import
{
PlusSquareOutlined
,
MinusSquareOutlined
,
MinusCircleOutlined
,
ArrowDownOutlined
,
ArrowUpOutlined
,
}
from
"@ant-design/icons"
;
function
Instore
(
props
)
{
const
[
activeTabKey
,
onTabChange
]
=
useState
(
"1"
);
const
[
drawprops
,
setdrawprops
]
=
useState
({
title
:
""
,
visible
:
false
,
onClose
:
()
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
false
,
}))
},
fields
:
defaultFields
});
const
Storesearch
=
()
=>
{
const
[
collapsed
,
setCollapsed
]
=
useState
(
false
);
const
[
search
,
setsearch
]
=
useState
();
const
[
select
,
setselect
]
=
useState
({});
return
(
<
Layout
style=
{
{
height
:
'100%'
,
}
}
>
<
Sider
theme=
'light'
collapsed=
{
collapsed
}
width=
{
260
}
>
<
div
style=
{
{
padding
:
12
,
justifyContent
:
"space-between"
,
paddingBottom
:
collapsed
?
12
:
0
,
alignItems
:
"center"
,
display
:
"flex"
,
flexDirection
:
!
collapsed
?
"row"
:
"column"
}
}
>
<
p
className=
{
styles
.
title
}
style=
{
{
marginBottom
:
!
collapsed
?
0
:
12
}
}
>
<
HomeOutlined
/>
{
!
collapsed
?
<
span
style=
{
{
marginLeft
:
6
}
}
>
仓库库位
</
span
>
:
""
}
</
p
>
const
tableprops
=
{
...
props
,
addconfig
:
{
premkey
:
"sysDepartment_save"
,
btnprops
:
{},
onClick
:
()
=>
{
setdrawprops
(
s
=>
({
...
s
,
visible
:
true
,
title
:
"新增"
,
width
:
600
}))
},
},
exportconfig
:
{
premkey
:
"sysDepartment_save"
,
btnprops
:
{
},
onClick
:
()
=>
{
alert
(
1
)
},
},
pageextra
:
activeTabKey
==
"1"
?
"add"
:
"none"
,
tabList
:
[
{
tab
:
"未完成"
,
key
:
"1"
},
{
tab
:
"已完成"
,
key
:
"2"
}
],
activeTabKey
,
onTabChange
}
{
collapsed
?
(
<
MenuUnfoldOutlined
style=
{
{
cursor
:
"pointer"
,
fontSize
:
20
}
}
onClick=
{
()
=>
{
setCollapsed
(
!
collapsed
)
}
}
/>
)
:
(
<
MenuFoldOutlined
style=
{
{
cursor
:
"pointer"
,
fontSize
:
20
}
}
onClick=
{
()
=>
{
setCollapsed
(
!
collapsed
)
}
}
/>
)
}
</
div
>
return
(
<
div
>
<
AutoTable
{
!
collapsed
&&
<
div
style=
{
{
padding
:
12
,
paddingBottom
:
collapsed
?
12
:
0
}
}
>
<
Search
value=
{
search
}
onChange=
{
e
=>
setsearch
(
e
.
target
.
value
)
}
style=
{
{
marginRight
:
10
}
}
></
Search
>
</
div
>
...
tableprops
}
{
!
collapsed
?
<
div
style=
{
{
padding
:
collapsed
?
0
:
12
}
}
>
<
Tree
treeData=
{
[
{
title
:
'全部仓库'
,
key
:
'0'
},
// 菜单项务必填写 key
{
title
:
'菜单项二'
,
key
:
'item-2'
},
{
title
:
'子菜单'
,
key
:
'submenu'
,
children
:
[{
title
:
'子菜单项'
,
key
:
'submenu-item-1'
}],
},
]
}
onSelect=
{
(
selectedKeys
,
e
)
=>
{
setselect
(
selectedKeys
[
0
]
?
{
title
:
e
.
node
.
title
,
selectedKeys
:
selectedKeys
[
0
]
}
:
{
})
}
}
/>
</
div
>
:
<
div
onDoubleClick=
{
()
=>
{
setCollapsed
(
false
)
}
}
style=
{
{
writingMode
:
"vertical-lr"
,
width
:
"100%"
,
textAlign
:
"center"
,
height
:
"80vh"
,
display
:
"flex"
,
justifyContent
:
"center"
,
alignItems
:
"center"
,
userSelect
:
"none"
}
}
>
双击此处展开
</
div
>
}
></
AutoTable
>
<
DrawInitForm
{
...
drawprops
}
/>
</
Sider
>
<
Layout
className=
{
styles
.
sitelayout
}
>
<
Content
style=
{
{
margin
:
'0 0 6px 6px'
,
display
:
"flex"
,
flexDirection
:
"column"
}
}
>
<
Breadcrumb
style=
{
{
margin
:
'8px 6px'
,
}
}
>
<
Breadcrumb
.
Item
>
物料库存
</
Breadcrumb
.
Item
>
<
Breadcrumb
.
Item
>
{
select
.
title
}
</
Breadcrumb
.
Item
>
</
Breadcrumb
>
<
div
className=
{
styles
.
sitelayoutbackground
}
style=
{
{
padding
:
6
,
height
:
"100%"
,
flex
:
1
}
}
>
Bill is a cat.
</
div
>
</
Content
>
</
Layout
>
</
Layout
>
</
div
>
);
}
;
}
export
default
Storesearch
;
\ No newline at end of file
export
default
Instore
;
\ No newline at end of file
src/pages/platform/Custom/index.jsx
View file @
470b8e5f
...
...
@@ -97,7 +97,7 @@ const Deviceprovide = (props) => {
return
<
div
style=
{
{
padding
:
'3px 0'
,
overflow
:
'hidden'
,
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
}
}
>
<
Tooltip
title=
{
row
.
customerName
}
>
<
a
onClick=
{
()
=>
{
d
eviceprovideDetail
({
id
:
row
.
id
}).
then
(
res
=>
{
d
oFetch
({
url
:
"/ngic-auth/sysCustomer/query/detail"
,
params
:{
id
:
row
.
id
}
}).
then
(
res
=>
{
let
data
=
res
?.
data
?.
data
||
{};
dispatch
({
type
:
"cdetails"
,
dataSource
:
data
})
})
...
...
@@ -291,7 +291,7 @@ const Deviceprovide = (props) => {
>
</
InitForm
>
</
Modal
>
<
D
rawer
<
D
etails
title=
"客户详情"
closable=
{
true
}
visible=
{
visible
}
...
...
@@ -302,9 +302,9 @@ const Deviceprovide = (props) => {
}
}
width=
"100%"
className=
"drawerDetails"
>
<
Details
{
...
details
}
></
Details
>
</
Drawer
>
{
...
details
}
></
Details
>
</
div
>
}
export
default
Deviceprovide
;
\ No newline at end of file
src/pages/platform/Provide/fields.js
View file @
470b8e5f
...
...
@@ -64,14 +64,14 @@ export default {
allowHalf
:
true
,
},
"status"
:
{
"value"
:
null
,
"value"
:
1
,
"type"
:
"select"
,
"title"
:
"启停状态"
,
"name"
:
[
"status"
],
"required"
:
true
,
options
:
[
"options"
:
[
{
label
:
"启用"
,
value
:
1
...
...
@@ -128,7 +128,7 @@ export default {
rules
:
[
{
required
:
false
,
pattern
:
/^
\d{11}
$/
,
pattern
:
/^
(((\d{3,4}
-
)?[
0-9
]{7,8})
|
(
1
(
3|4|5|6|7|8|9
)\d{9}))
$/
,
message
:
'手机号格式不正确'
},
],
...
...
src/pages/platform/Provide/index.jsx
View file @
470b8e5f
...
...
@@ -141,7 +141,7 @@ const Deviceprovide = (props) => {
{
"title"
:
"状态"
,
"dataIndex"
:
"status"
,
"key"
:
"status"
,
"key"
:
"status"
,
valueType
:
"select"
,
options
:
[
{
...
...
@@ -201,7 +201,7 @@ const Deviceprovide = (props) => {
}
})
}),
getPrem
(
"equipmentSupplier_deleteById"
,
action
,
'删除'
,
null
,{
getPrem
(
"equipmentSupplier_deleteById"
,
action
,
'删除'
,
null
,
{
title
:
"确认删除该供应商?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysSupplier/deleteById"
,
params
:
{
id
:
record
.
id
}
})
...
...
@@ -226,9 +226,12 @@ const Deviceprovide = (props) => {
let
extrarender
=
([
<
Button
disabled=
{
!
getPrem
(
"equipmentSupplier_save"
,
"ifs"
)
}
type=
"primary"
onClick=
{
()
=>
{
for
(
let
i
in
defaultFields
)
{
defaultFields
[
i
].
value
=
null
;
if
(
i
==
"supplierUserList"
)
{
defaultFields
[
i
].
value
=
[]
}
else
if
(
i
==
"status"
)
{
defaultFields
[
i
].
status
=
0
}
else
{
defaultFields
[
i
].
value
=
null
;
}
}
dispatch
({
type
:
"add"
,
fields
:
defaultFields
})
...
...
@@ -267,7 +270,7 @@ const Deviceprovide = (props) => {
>
</
InitForm
>
</
Modal
>
<
D
rawer
<
D
etails
title=
"供应商详情"
closable=
{
true
}
visible=
{
visible
}
...
...
@@ -278,9 +281,9 @@ const Deviceprovide = (props) => {
}
}
width=
"100%"
className=
"drawerDetails"
>
<
Details
{
...
details
}
></
Details
>
</
D
rawer
>
{
...
details
}
>
</
D
etails
>
</
div
>
}
export
default
Deviceprovide
;
\ No newline at end of file
src/utils/detailTotalCard.js
View file @
470b8e5f
...
...
@@ -259,6 +259,8 @@ const userDetails = [
],
},
];
const
deviceprovideDetails
=
[
//设备供应商详情
{
cardTitle
:
'基本信息'
,
...
...
@@ -339,6 +341,8 @@ const deviceprovideDetails = [ //设备供应商详情
},
];
const
userCheckDetails
=
[
//个人详情-----待审核
{
...
...
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