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
a1e67909
Commit
a1e67909
authored
Jun 22, 2022
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
30c24b9f
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
574 additions
and
19 deletions
+574
-19
routes.js
config/routes.js
+6
-1
index.jsx
src/components/DrawInitForm/index.jsx
+1
-1
global.less
src/global.less
+3
-0
fields.js
src/pages/platform/Custom/fields.js
+174
-0
index.jsx
src/pages/platform/Custom/index.jsx
+308
-0
fields.js
src/pages/platform/Provide/fields.js
+21
-2
index.jsx
src/pages/platform/Provide/index.jsx
+2
-2
Index.jsx
src/pages/system/Store/Index.jsx
+1
-1
fields.js
src/pages/system/Store/fields.js
+0
-0
fieldstore.js
src/pages/system/Store/fieldstore.js
+2
-2
store.js
src/pages/system/Store/store.js
+10
-10
tempfields.js
src/utils/tempfields.js
+46
-0
No files found.
config/routes.js
View file @
a1e67909
...
...
@@ -65,7 +65,7 @@ export default [
{
path
:
"/system/store"
,
name
:
"仓库管理"
,
component
:
"./system/S
hop
"
,
component
:
"./system/S
tore
"
,
},
// {
// path: "/system/productionline",
...
...
@@ -160,6 +160,11 @@ export default [
name
:
'供应商管理'
,
component
:
'./platform/Provide'
,
},
{
path
:
'/platform/custom'
,
name
:
'客户管理'
,
component
:
'./platform/Custom'
,
},
{
component
:
"./404"
,
},
...
...
src/components/DrawInitForm/index.jsx
View file @
a1e67909
...
...
@@ -19,7 +19,7 @@ function DrawInitForm(props) {
placement=
"right"
closable=
{
true
}
getContainer=
{
false
}
style=
{
{
position
:
"absolute"
}
}
style=
{
{
position
:
"absolute"
,
transform
:
"translateX(0)"
}
}
{
...
props
}
>
{
props
.
children
}
...
...
src/global.less
View file @
a1e67909
...
...
@@ -317,3 +317,6 @@ pre {
table {
min-width: calc(100% - 6px) !important;
}
.ant-drawer-open{
transform: none !important;
}
\ No newline at end of file
src/pages/platform/Custom/fields.js
0 → 100644
View file @
a1e67909
export
default
{
"customerNo"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"编号"
,
"name"
:
[
"customerNo"
],
"required"
:
false
},
"customerName"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"名称"
,
"name"
:
[
"customerName"
],
"required"
:
true
},
"officialWebsite"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"公司官网"
,
"name"
:
[
"officialWebsite"
],
"required"
:
false
},
"telephone"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"联系电话"
,
"name"
:
[
"telephone"
],
"required"
:
false
},
"email"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"公司邮箱"
,
"name"
:
[
"email"
],
"required"
:
false
},
"address"
:
{
"value"
:
null
,
"type"
:
"input"
,
"title"
:
"地址"
,
"name"
:
[
"address"
],
"required"
:
false
},
"score"
:
{
"value"
:
null
,
"type"
:
"rate"
,
"title"
:
"评分"
,
"name"
:
[
"score"
],
"required"
:
false
,
allowHalf
:
true
,
},
"status"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"启停状态"
,
"name"
:
[
"status"
],
"required"
:
true
,
options
:
[
{
label
:
"启用"
,
value
:
1
},
{
label
:
"停用"
,
value
:
0
},
]
},
"remark"
:
{
"value"
:
null
,
"type"
:
"textarea"
,
"title"
:
"备注"
,
"name"
:
[
"remark"
],
"required"
:
false
,
col
:
{
span
:
24
}
},
"customerUserList"
:
{
"value"
:
null
,
"editable"
:
true
,
"type"
:
"table"
,
"title"
:
"联系人"
,
"name"
:
[
"customerUserList"
],
"required"
:
false
,
"columns"
:
[
{
"title"
:
"联系人姓名"
,
"dataIndex"
:
"userName"
,
"key"
:
"userName"
,
"search"
:
false
,
"valueType"
:
"input"
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
}
},
{
"title"
:
"联系电话"
,
"dataIndex"
:
"telephone"
,
"key"
:
"telephone"
,
"search"
:
false
,
"valueType"
:
"input"
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
pattern
:
/^
\d{11}
$/
,
message
:
'手机号格式不正确'
},
],
}
},
{
"title"
:
"邮箱"
,
"dataIndex"
:
"email"
,
"key"
:
"email"
,
"search"
:
false
,
"valueType"
:
"input"
,
formItemProps
:
{
rules
:
[
{
required
:
false
,
pattern
:
/^
[
a-z0-9A-Z
]
+
[
- | a-z0-9A-Z . _
]
+@
([
a-z0-9A-Z
]
+
(
-
[
a-z0-9A-Z
]
+
)?\.)
+
[
a-z
]{2,}
$/
,
message
:
'邮箱格式不正确'
},
],
}
},
{
"title"
:
"职位"
,
"dataIndex"
:
"title"
,
"key"
:
"title"
,
"search"
:
false
,
"valueType"
:
"input"
},
{
title
:
'操作'
,
valueType
:
'option'
,
render
:
()
=>
{
return
null
;
},
},
],
"editable"
:
true
,
"rowKey"
:
"id"
,
"rowName"
:
""
,
"dataSource"
:
[],
col
:
{
span
:
24
}
}
}
\ No newline at end of file
src/pages/platform/Custom/index.jsx
0 → 100644
View file @
a1e67909
This diff is collapsed.
Click to expand it.
src/pages/platform/Provide/fields.js
View file @
a1e67909
...
...
@@ -62,7 +62,25 @@ export default {
],
"required"
:
false
,
allowHalf
:
true
,
col
:
{
span
:
24
}
},
"status"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"启停状态"
,
"name"
:
[
"status"
],
"required"
:
true
,
options
:
[
{
label
:
"启用"
,
value
:
1
},
{
label
:
"停用"
,
value
:
0
},
]
},
"remark"
:
{
"value"
:
null
,
...
...
@@ -74,6 +92,7 @@ export default {
"required"
:
false
,
col
:
{
span
:
24
}
},
"supplierUserList"
:
{
"value"
:
null
,
"editable"
:
true
,
...
...
@@ -126,7 +145,7 @@ export default {
{
required
:
false
,
pattern
:
/^
[
a-z0-9A-Z
]
+
[
- | a-z0-9A-Z . _
]
+@
([
a-z0-9A-Z
]
+
(
-
[
a-z0-9A-Z
]
+
)?\.)
+
[
a-z
]{2,}
$/
,
message
:
'邮箱格式不正确'
message
:
'邮箱格式不正确'
},
],
}
...
...
src/pages/platform/Provide/index.jsx
View file @
a1e67909
...
...
@@ -29,7 +29,7 @@ function reducer(state, action) {
...
state
,
vs
:
true
,
iftype
:
{
title
:
"新增
设备
供应商"
,
title
:
"新增供应商"
,
val
:
type
},
fields
:
{
...
action
.
fields
}
...
...
@@ -40,7 +40,7 @@ function reducer(state, action) {
...
state
,
vs
:
true
,
iftype
:
{
title
:
"编辑
设备
供应商"
,
title
:
"编辑供应商"
,
val
:
type
},
fields
:
{
...
action
.
fields
},
...
...
src/pages/system/S
hop
/Index.jsx
→
src/pages/system/S
tore
/Index.jsx
View file @
a1e67909
...
...
@@ -152,7 +152,7 @@ const Store = (props) => {
title
:
"确认删除该仓库?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysS
hop
/deleteById"
,
url
:
"/ngic-auth/sysS
tore
/deleteById"
,
params
:
{
id
:
record
.
id
},
});
},
...
...
src/pages/system/S
hop
/fields.js
→
src/pages/system/S
tore
/fields.js
View file @
a1e67909
File moved
src/pages/system/S
hop
/fieldstore.js
→
src/pages/system/S
tore
/fieldstore.js
View file @
a1e67909
...
...
@@ -10,12 +10,12 @@ export default {
],
"required"
:
true
},
"storeArea
Nam
e"
:
{
"storeArea
Cod
e"
:
{
"value"
:
null
,
"type"
:
"select"
,
"title"
:
"所属库区"
,
"name"
:
[
"storeArea
Nam
e"
"storeArea
Cod
e"
],
"required"
:
true
,
"options"
:
{
...
...
src/pages/system/S
hop
/store.js
→
src/pages/system/S
tore
/store.js
View file @
a1e67909
...
...
@@ -15,7 +15,7 @@ const initState = {
dataSource
:
{},
totalCard
:
[],
},
v
isible
:
false
,
v
s
:
false
,
};
function
reducer
(
state
,
action
)
{
let
{
type
}
=
action
,
...
...
@@ -48,14 +48,14 @@ function reducer(state, action) {
newState
=
{
...
state
,
curitem
:
action
.
curitem
,
v
isible
:
true
,
v
s
:
true
,
};
break
;
case
"close"
:
newState
=
{
...
state
,
curitem
:
{},
v
isible
:
false
,
v
s
:
false
,
};
break
;
}
...
...
@@ -82,7 +82,7 @@ const StoreApp = (props) => {
},
}),
[
state
,
dispatch
]
=
useReducer
(
reducer
,
initState
),
{
vs
,
fields
,
iftype
,
curitem
,
detail
,
visible
}
=
state
,
{
vs
,
fields
,
iftype
,
curitem
}
=
state
,
columns
=
[
{
"title"
:
"库位名称"
,
...
...
@@ -95,8 +95,8 @@ const StoreApp = (props) => {
"key"
:
"storeAreaName"
,
"valueType"
:
"select"
,
"options"
:
{
database
:
()
=>
doFetch
(
"/ngic-base-business/sysDic/queryStorePositionSelect"
),
params
:{}
database
:
()
=>
doFetch
(
"/ngic-base-business/sysDic/queryStorePositionSelect"
),
params
:
{}
}
},
{
...
...
@@ -126,7 +126,7 @@ const StoreApp = (props) => {
title
:
"确认删除该库位?"
,
onConfirm
:
()
=>
{
run
({
url
:
"/ngic-auth/sysS
hop
/deleteById"
,
url
:
"/ngic-auth/sysS
torePosition
/deleteById"
,
params
:
{
id
:
record
.
id
},
});
},
...
...
@@ -137,9 +137,9 @@ const StoreApp = (props) => {
let
saveData
=
(
values
,
fn
)
=>
{
let
newfields
=
JSON
.
parse
(
JSON
.
stringify
(
values
));
//新增&修改
let
difrid
=
iftype
.
val
==
"edit"
?
{
id
:
curitem
.
id
}
:
{
};
let
difrid
=
iftype
.
val
==
"edit"
?
{
id
:
curitem
.
id
,
storeId
:
props
?.
curitem
?.
id
}
:
{
storeId
:
props
?.
curitem
?.
id
};
run
({
url
:
"/ngic-auth/sysStore/save"
,
url
:
"/ngic-auth/sysStore
Position
/save"
,
params
:
{
...
newfields
,
...
difrid
},
});
};
...
...
@@ -169,7 +169,7 @@ const StoreApp = (props) => {
path
=
"/ngic-auth/sysStorePosition/queryList"
actionRef
=
{
actionRef
}
onRef
=
{(
node
)
=>
(
ChildRef
=
node
)}
extraparams
=
{{
storeId
:
props
?.
curitem
?.
id
??
"0"
}}
extraparams
=
{{
storeId
:
props
?.
curitem
?.
id
??
"0"
}}
><
/AutoTable
>
<
DrawInitForm
...
...
src/utils/tempfields.js
0 → 100644
View file @
a1e67909
import
{
doFetch
}
from
"./doFetch"
;
function
formatFieds
(
data
)
{
let
obj
=
{};
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
item
=
data
[
i
],
fieldsKey
=
"field"
+
i
;
if
(
item
.
fieldChar
==
1
)
{
obj
[
fieldsKey
]
=
{
value
:
item
?.
fieldRealValue
??
""
,
title
:
item
.
fieldName
,
name
:
[
fieldsKey
],
required
:
false
,
type
:
"input"
,
};
}
else
{
obj
[
fieldsKey
]
=
{
value
:
item
?.
fieldRealValue
==
0
||
item
?.
fieldRealValue
?
item
?.
fieldRealValue
:
item
.
fieldChar
==
4
?
[]
:
""
,
title
:
item
.
fieldName
,
name
:
[
fieldsKey
],
required
:
false
,
type
:
item
.
fieldChar
==
3
?
"radio"
:
"select"
,
options
:
item
.
valueList
,
multiple
:
item
.
fieldChar
==
4
?
true
:
false
,
};
}
}
return
obj
}
async
function
tempfields
(
url
,
params
)
{
let
datas
=
await
doFetch
({
url
,
params
})
let
list
=
datas
?.
data
?.
dataList
;
return
{
fields
:
formatFieds
(
list
),
data
:
list
}
}
export
default
tempfields
\ No newline at end of file
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