Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ems3.3
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
ems3.3
Commits
029f1993
Commit
029f1993
authored
Feb 03, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asder
parent
d03a2a65
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
243 additions
and
82 deletions
+243
-82
mtable.jsx
src/components/AutoTable/mtable.jsx
+10
-8
columns.js
src/pages/spare/instore/columns.js
+44
-0
columns.js
src/pages/spare/outstore/columns.js
+46
-8
columns.js
src/pages/spare/record/columns.js
+3
-0
columns.js
src/pages/spare/requisition/columns.js
+20
-8
index.jsx
src/pages/spare/requisition/index.jsx
+18
-1
columns.js
src/pages/spare/spareback/columns.js
+22
-10
index.jsx
src/pages/spare/spareback/index.jsx
+18
-2
columns.js
src/pages/spare/supplier/columns.js
+57
-43
index.jsx
src/pages/spare/supplier/index.jsx
+5
-2
No files found.
src/components/AutoTable/mtable.jsx
View file @
029f1993
...
...
@@ -95,16 +95,17 @@ const Mtable = (props) => {
:
resizeable
?
160
:
'auto'
;
let
options
=
{};
let
options
=
{},
faoptopns
=
it
?.
searchOptions
??
it
?.
options
;
if
([
'select'
,
'treeSelect'
,
'radio'
,
'checkbox'
,
'cascader'
].
includes
(
it
?.
valueType
))
{
if
(
Array
.
isArray
(
it
.
optio
ns
))
{
if
(
Array
.
isArray
(
faoptop
ns
))
{
options
=
{
fieldProps
:
{
...
it
?.
fieldProps
,
options
:
[...
it
.
optio
ns
],
options
:
[...
faoptop
ns
],
},
};
}
else
if
(
it
.
optio
ns
)
{
}
else
if
(
faoptop
ns
)
{
options
=
{
request
:
async
(
params
)
=>
{
let
list
=
await
doFetch
({
url
:
it
?.
options
?.
path
,
params
:
it
?.
options
?.
params
});
...
...
@@ -157,16 +158,17 @@ const Mtable = (props) => {
return
columns
.
map
((
item
,
index
)
=>
{
let
it
=
{
...
item
};
let
itemwidth
=
it
.
width
?
it
.
width
:
resizeable
?
160
:
'auto'
;
let
options
=
{};
let
options
=
{},
faoptopns
=
it
?.
searchOptions
??
it
?.
options
;
if
([
'select'
,
'treeSelect'
,
'radio'
,
'checkbox'
,
'cascader'
].
includes
(
it
?.
valueType
))
{
if
(
Array
.
isArray
(
it
.
optio
ns
))
{
if
(
Array
.
isArray
(
faoptop
ns
))
{
options
=
{
fieldProps
:
{
...
it
?.
fieldProps
,
options
:
[...
it
.
optio
ns
],
options
:
[...
faoptop
ns
],
},
};
}
else
if
(
it
.
optio
ns
)
{
}
else
if
(
faoptop
ns
)
{
options
=
{
params
:
newparames
,
request
:
async
(
params
)
=>
{
...
...
src/pages/spare/instore/columns.js
View file @
029f1993
...
...
@@ -24,6 +24,7 @@ function getcolumns(setdrawer) {
path
:
'/sparepart/sparePart/queryAllSelect'
,
params
:
{},
},
render
:
(
text
,
row
)
=>
row
?.
sparePartNo
+
'/'
+
row
?.
sparePartName
,
},
{
title
:
'供应商编号/名称'
,
...
...
@@ -47,6 +48,7 @@ function getcolumns(setdrawer) {
path
:
'/sparepart/sparePartSupplier/queryOnSelect'
,
params
:
{},
},
render
:
(
text
,
row
)
=>
row
?.
supplierNo
+
'/'
+
row
?.
supplierName
,
},
{
title
:
'入库数量'
,
...
...
@@ -120,6 +122,27 @@ function getcolumns(setdrawer) {
value
:
'3'
,
},
],
searchOptions
:
[
{
label
:
'采购入库'
,
value
:
'1'
,
},
{
label
:
'生产入库'
,
value
:
'2'
,
},
{
label
:
'其他入库'
,
value
:
'3'
,
},
{
label
:
'备件回冲入库'
,
value
:
'4'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
},
formItemProps
:
{
rules
:
[
{
...
...
@@ -263,6 +286,27 @@ function getcolumns(setdrawer) {
value
:
'3'
,
},
],
searchOptions
:
[
{
label
:
'采购入库'
,
value
:
'1'
,
},
{
label
:
'生产入库'
,
value
:
'2'
,
},
{
label
:
'其他入库'
,
value
:
'3'
,
},
{
label
:
'备件回冲入库'
,
value
:
'4'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
},
formItemProps
:
{
rules
:
[
{
...
...
src/pages/spare/outstore/columns.js
View file @
029f1993
...
...
@@ -103,11 +103,28 @@ function getcolumns(setdrawer) {
label
:
'其它出库'
,
value
:
'3'
,
},
],
searchOptions
:
[
{
label
:
'销售出库'
,
value
:
'1'
,
},
{
label
:
'报废出库'
,
value
:
'2'
,
},
{
label
:
'其它出库'
,
value
:
'3'
,
},
{
label
:
'备件申领出库'
,
value
:
'4'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
},
},
{
title
:
'入库仓库'
,
...
...
@@ -199,10 +216,12 @@ function getcolumns(setdrawer) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
taskSpareList
}
resizeable
=
{
false
}
expandable
=
{{
...
...
@@ -262,11 +281,28 @@ function getcolumns(setdrawer) {
label
:
'其它出库'
,
value
:
'3'
,
},
],
searchOptions
:
[
{
label
:
'销售出库'
,
value
:
'1'
,
},
{
label
:
'报废出库'
,
value
:
'2'
,
},
{
label
:
'其它出库'
,
value
:
'3'
,
},
{
label
:
'备件申领出库'
,
value
:
'4'
,
},
],
fieldProps
:
{
dropdownMatchSelectWidth
:
120
,
},
},
{
title
:
'入库仓库'
,
...
...
@@ -369,10 +405,12 @@ function getcolumns(setdrawer) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
resizeable
=
{
false
}
dataSource
=
{
row
?.
taskSpareList
}
expandable
=
{{
...
...
src/pages/spare/record/columns.js
View file @
029f1993
...
...
@@ -45,6 +45,7 @@ function getcolumns(setdrawer) {
title
:
'库存单位'
,
dataIndex
:
'unit'
,
key
:
'unit'
,
hideInSearch
:
true
,
},
{
title
:
'入库仓库'
,
...
...
@@ -65,11 +66,13 @@ function getcolumns(setdrawer) {
title
:
'操作后的备件库存'
,
dataIndex
:
'actualStock'
,
key
:
'actualStock'
,
hideInSearch
:
true
,
},
{
title
:
'操作数量'
,
dataIndex
:
'operateNum'
,
key
:
'operateNum'
,
hideInSearch
:
true
,
},
{
title
:
'相关单号'
,
...
...
src/pages/spare/requisition/columns.js
View file @
029f1993
...
...
@@ -61,6 +61,8 @@ function getcolumns(type) {
dataIndex
:
'applyReasonName'
,
key
:
'applyReason'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'applyReasonName'
,
options
:
[
{
label
:
'备库领用'
,
...
...
@@ -85,6 +87,8 @@ function getcolumns(type) {
dataIndex
:
'inWarehouseName'
,
key
:
'inWarehouseId'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'inWarehouseName'
,
options
:
{
path
:
'/auth/sysShop/getUserShopSelection'
,
params
:
{},
...
...
@@ -177,10 +181,12 @@ function getcolumns(type) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
detailsList
}
/
>
);
...
...
@@ -252,6 +258,8 @@ function getcolumns(type) {
dataIndex
:
'applyReasonName'
,
key
:
'applyReason'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'applyReasonName'
,
options
:
[
{
label
:
'备库领用'
,
...
...
@@ -276,6 +284,8 @@ function getcolumns(type) {
dataIndex
:
'inWarehouseName'
,
key
:
'inWarehouseId'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'inWarehouseName'
,
options
:
{
path
:
'/auth/sysShop/getUserShopSelection'
,
params
:
{},
...
...
@@ -384,10 +394,12 @@ function getcolumns(type) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
detailsList
}
/
>
);
...
...
src/pages/spare/requisition/index.jsx
View file @
029f1993
/* eslint-disable react-hooks/exhaustive-deps */
import
*
as
React
from
'react'
;
import
{
useState
,
useMemo
,
useRef
}
from
'react'
;
import
DrawerPro
from
'@/components/DrawerPro'
;
...
...
@@ -116,6 +117,7 @@ function Requisition(props) {
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
disabled
:
row
.
status
!==
1
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
...
...
@@ -123,6 +125,7 @@ function Requisition(props) {
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
disabled
:
row
.
status
!==
1
,
}
}
>
删除
...
...
@@ -189,7 +192,21 @@ function Requisition(props) {
/>
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
?.
filter
((
it
)
=>
{
if
(
drawer
?.
item
?.
status
==
1
)
{
return
(
[
'cdetails'
,
'approvalUserName'
,
'approvalTime'
,
'approvalResultName'
,
'approvalRemark'
,
].
indexOf
(
it
?.
dataIndex
)
==
-
1
);
}
else
{
return
true
;
}
})
}
detailpath=
{
pathconfig
?.
detail
||
null
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
...
...
src/pages/spare/spareback/columns.js
View file @
029f1993
...
...
@@ -73,6 +73,8 @@ function getcolumns(type) {
dataIndex
:
'backReasonName'
,
key
:
'backReason'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'backReasonName'
,
options
:
[
{
label
:
'回冲入库'
,
...
...
@@ -91,7 +93,7 @@ function getcolumns(type) {
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
key
:
'inWarehouse
Id
'
,
key
:
'inWarehouse
Name
'
,
hideInForm
:
true
,
},
{
...
...
@@ -99,6 +101,8 @@ function getcolumns(type) {
dataIndex
:
'outWarehouseName'
,
key
:
'outWarehouseId'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'outWarehouseName'
,
options
:
{
path
:
'/auth/sysShop/getUserShopSelection'
,
params
:
{},
...
...
@@ -204,10 +208,12 @@ function getcolumns(type) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
detailsList
}
/
>
);
...
...
@@ -279,6 +285,8 @@ function getcolumns(type) {
dataIndex
:
'backReasonName'
,
key
:
'backReason'
,
valueType
:
'select'
,
searchValueType
:
'input'
,
searchKey
:
'backReasonName'
,
options
:
[
{
label
:
'回冲入库'
,
...
...
@@ -297,13 +305,15 @@ function getcolumns(type) {
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
key
:
'inWarehouse
Id
'
,
key
:
'inWarehouse
Name
'
,
hideInForm
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
key
:
'outWarehouseId'
,
searchValueType
:
'input'
,
searchKey
:
'outWarehouseName'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getUserShopSelection'
,
...
...
@@ -426,10 +436,12 @@ function getcolumns(type) {
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
columns
=
{
columns
?.
filter
((
it
)
=>
it
.
key
!=
'usedStock'
)
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
detailsList
}
/
>
);
...
...
src/pages/spare/spareback/index.jsx
View file @
029f1993
...
...
@@ -59,7 +59,7 @@ function Spareback(props) {
<
PremButton
btn=
{
{
size
:
'small'
,
disabled
:
row
.
status
==
2
,
disabled
:
row
.
status
!==
1
,
onClick
:
()
=>
{
setdrawer
((
s
)
=>
({
...
s
,
...
...
@@ -116,6 +116,7 @@ function Spareback(props) {
title
:
'是否删除?'
,
okText
:
'确认'
,
cancelText
:
'取消'
,
disabled
:
row
.
status
!==
1
,
onConfirm
:
()
=>
{
run
({
url
:
pathconfig
?.
delete
||
'/delete'
,
params
:
{
id
:
row
?.
id
}
});
},
...
...
@@ -123,6 +124,7 @@ function Spareback(props) {
btn=
{
{
size
:
'small'
,
type
:
'danger'
,
disabled
:
row
.
status
!==
1
,
}
}
>
删除
...
...
@@ -189,7 +191,21 @@ function Spareback(props) {
/>
<
DrawerPro
fields=
{
columns
}
fields=
{
columns
?.
filter
((
it
)
=>
{
if
(
drawer
?.
item
?.
status
==
1
)
{
return
(
[
'cdetails'
,
'approvalUserName'
,
'approvalTime'
,
'approvalResultName'
,
'approvalRemark'
,
].
indexOf
(
it
?.
dataIndex
)
==
-
1
);
}
else
{
return
true
;
}
})
}
detailpath=
{
pathconfig
?.
detail
||
null
}
defaultFormValue=
{
drawer
?.
item
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
...
...
src/pages/spare/supplier/columns.js
View file @
029f1993
import
{
Switch
}
from
'antd'
;
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
changeState
)
{
let
columns
=
[
{
title
:
'联系人名称'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
colProps
:
{
sm
:
6
,
},
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
key
:
'telephone'
,
colProps
:
{
sm
:
6
,
},
},
{
title
:
'邮箱'
,
dataIndex
:
'email'
,
key
:
'email'
,
colProps
:
{
sm
:
6
,
},
},
{
title
:
'职务'
,
dataIndex
:
'title'
,
key
:
'title'
,
colProps
:
{
sm
:
6
,
},
},
];
return
{
columns
:
[
{
...
...
@@ -98,57 +141,28 @@ function getcolumns(changeState) {
},
},
{
title
:
'
列表
'
,
title
:
'
联系信息
'
,
valueType
:
'formList'
,
dataIndex
:
'userList'
,
colProps
:
{
xs
:
24
,
sm
:
24
,
},
columns
:
[
{
title
:
'联系人名称'
,
dataIndex
:
'userName'
,
key
:
'userName'
,
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
colProps
:
{
sm
:
6
,
},
},
{
title
:
'联系电话'
,
dataIndex
:
'telephone'
,
key
:
'telephone'
,
colProps
:
{
sm
:
6
,
},
},
{
title
:
'邮箱'
,
dataIndex
:
'email'
,
key
:
'email'
,
colProps
:
{
sm
:
6
,
},
},
{
title
:
'职务'
,
dataIndex
:
'title'
,
key
:
'title'
,
colProps
:
{
sm
:
6
,
},
},
],
columns
,
hideInSearch
:
true
,
hideInTable
:
true
,
render
:
(
text
,
row
)
=>
{
return
(
<
AutoTable
columns
=
{
columns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}))}
dataSource
=
{
row
?.
userList
}
resizeable
=
{
false
}
/
>
);
},
},
],
pathconfig
:
{
...
...
src/pages/spare/supplier/index.jsx
View file @
029f1993
...
...
@@ -120,7 +120,11 @@ function Supplier(props) {
url
:
'/base/paFormField/queryList'
,
params
:
{
formId
:
4
},
});
let
defcolumn
=
getcolumns
(
changeState
)?.
columns
;
extracolumns
=
extracolumns
?.
map
((
it
)
=>
({
...
it
,
hideInSearch
:
true
,
}));
let
defcolumn
=
getcolumns
(
changeState
)?.
columns
??
[];
setcolumns
([
...
defcolumn
,
...
extracolumns
,
...
...
@@ -170,7 +174,6 @@ function Supplier(props) {
formRef=
{
formRef
}
placement=
"right"
detailpath=
{
pathconfig
?.
detail
||
null
}
detailData=
{
drawer
?.
item
}
defaultFormValue=
{
drawer
?.
item
}
onClose=
{
()
=>
{
setdrawer
((
s
)
=>
({
...
...
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