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
0da2f8a1
Commit
0da2f8a1
authored
Feb 03, 2023
by
wuhao
🎯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asd
parent
029f1993
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
191 additions
and
78 deletions
+191
-78
mtable.jsx
src/components/AutoTable/mtable.jsx
+2
-2
index.jsx
src/components/DetailPro/index.jsx
+27
-25
FormItems.jsx
src/components/InitForm/FormItems.jsx
+46
-46
index.jsx
src/components/InitForm/index.jsx
+10
-0
columns.js
src/pages/spare/instore/columns.js
+14
-0
columns.js
src/pages/spare/outstore/columns.js
+14
-0
columns.js
src/pages/spare/requisition/columns.js
+33
-1
index.jsx
src/pages/spare/requisition/index.jsx
+7
-1
columns.js
src/pages/spare/spareback/columns.js
+31
-1
index.jsx
src/pages/spare/spareback/index.jsx
+7
-2
No files found.
src/components/AutoTable/mtable.jsx
View file @
0da2f8a1
...
...
@@ -392,8 +392,8 @@ const Mtable = (props) => {
}
}
columns=
{
resizeable
?
columnes
?.
filter
?.((
it
)
=>
it
.
valueType
!=
'split'
)
??
[]
:
columncs
?.
filter
?.((
it
)
=>
it
.
valueType
!=
'split'
)
??
[]
?
columnes
?.
filter
?.((
it
)
=>
[
'split'
,
'nosubmit'
].
indexOf
(
it
.
valueType
)
==
-
1
)
??
[]
:
columncs
?.
filter
?.((
it
)
=>
[
'split'
,
'nosubmit'
].
indexOf
(
it
.
valueType
)
==
-
1
)
??
[]
}
style=
{
style
||
{}
}
actionRef=
{
actionRefs
}
...
...
src/components/DetailPro/index.jsx
View file @
0da2f8a1
...
...
@@ -59,33 +59,35 @@ function DetailPro(props) {
return
(
<
ProDescriptions
column=
{
3
}
{
...
dataProps
}
title=
{
props
.
title
}
>
{
fields
?.
filter
(
it
=>
!
it
.
hideInDescriptions
&&
it
?.
valueType
!=
"option"
)?.
map
((
it
,
i
)
=>
{
const
dataIndexs
=
!
it
?.
render
||
it
?.
valueType
==
'option'
?
{
dataIndex
:
it
.
dataIndex
,
valueType
:
it
.
valueType
}
:
{};
if
(
it
.
valueType
==
'split'
)
{
{
fields
?.
filter
((
it
)
=>
!
it
.
hideInDescriptions
&&
it
?.
valueType
!=
'option'
)
?.
map
((
it
,
i
)
=>
{
const
dataIndexs
=
!
it
?.
render
||
it
?.
valueType
==
'option'
?
{
dataIndex
:
it
.
dataIndex
,
valueType
:
it
.
valueType
}
:
{};
if
(
it
.
valueType
==
'split'
)
{
return
(
<>
<
Col
span=
{
24
}
>
<
div
className=
{
styles
.
title
}
style=
{
{
borderWidth
:
i
==
0
?
0
:
1
}
}
>
{
it
.
title
}
</
div
>
</
Col
>
</>
);
}
return
(
<>
<
Col
span=
{
24
}
>
<
div
className=
{
styles
.
title
}
style=
{
{
borderWidth
:
i
==
0
?
0
:
1
}
}
>
{
it
.
title
}
</
div
>
</
Col
>
</>
<
Item
span=
{
it
?.
span
?
it
?.
span
:
fields
[
i
+
1
]?.
valueType
==
'split'
?
3
:
1
}
key=
{
it
.
dataIndex
}
label=
{
it
.
title
}
{
...
dataIndexs
}
>
{
it
?.
render
?
it
?.
render
?.(
curitem
[
it
.
dataIndex
],
curitem
)
:
''
}
</
Item
>
);
}
return
(
<
Item
span=
{
it
?.
span
?
it
?.
span
:
fields
[
i
+
1
]?.
valueType
==
'split'
?
3
:
1
}
key=
{
it
.
dataIndex
}
label=
{
it
.
title
}
{
...
dataIndexs
}
>
{
it
?.
render
?
it
?.
render
?.(
curitem
[
it
.
dataIndex
],
curitem
)
:
''
}
</
Item
>
);
})
}
})
}
</
ProDescriptions
>
);
}
...
...
src/components/InitForm/FormItems.jsx
View file @
0da2f8a1
...
...
@@ -148,7 +148,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef }) => {
{
createElement
(
FormItems
[
key
],
{
item
:
item
,
colProps
:
item
.
colProps
,
key
:
item
.
dataIndex
,
key
:
item
?
.
dataIndex
,
name
:
name
,
formRef
,
curindex
,
...
...
@@ -165,7 +165,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef }) => {
{
createElement
(
FormItems
[
key
],
{
item
:
item
,
colProps
:
item
.
colProps
,
key
:
item
.
dataIndex
,
key
:
item
?
.
dataIndex
,
name
:
name
,
formRef
,
curindex
,
...
...
@@ -180,7 +180,7 @@ let FormRender = memo(({ fields = [], name, curindex, formRef }) => {
// colProps 默认删格
function
Input
({
item
,
colProps
})
{
let
keys
=
item
.
key
??
item
.
dataIndex
??
''
;
let
keys
=
item
?.
key
??
item
?
.
dataIndex
??
''
;
keys
=
keys
??
''
;
const
defaultrule
=
keys
.
indexOf
(
'phone'
)
!=
-
1
...
...
@@ -243,7 +243,7 @@ function MyAutoComplete({ item, colProps, formRef }) {
});
}, [username]);
let col = item.colProps ?? colProps;
let curkey = item
.key ?? item
.dataIndex;
let curkey = item
?.key ?? item?
.dataIndex;
return (
<Col span={12}>
<ProForm.Item name={curkey} label={item.title} {...item.formItemProps}>
...
...
@@ -272,7 +272,7 @@ function Password({ item, colProps }) {
<ProFormText.Password
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请输入
$
{
item
.
title
}
`}
...
...
@@ -288,7 +288,7 @@ function Money({ item, colProps }) {
locale="zh-CN"
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请输入
$
{
item
.
title
}
`}
...
...
@@ -306,7 +306,7 @@ function Textarea({ item, colProps }) {
<ProFormTextArea
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? { span: 24 }}
label={item.title}
placeholder={`
请输入
$
{
item
.
title
}
`}
...
...
@@ -321,7 +321,7 @@ function Digit({ item, colProps }) {
<>
<ProFormDigit
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请输入
$
{
item
.
title
}
`}
...
...
@@ -339,7 +339,7 @@ function DigitRange({ item, colProps }) {
<>
<ProFormDigitRange
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={['请输入最小值', '请输入最大值']}
...
...
@@ -358,7 +358,7 @@ function Date({ item, colProps }) {
<ProFormDatePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -379,7 +379,7 @@ function DateWeek({ item, colProps }) {
<ProFormDatePicker
fieldProps={{ ...item?.fieldProps, picker: 'week', format: customWeekStartEndFormat }}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -395,7 +395,7 @@ function DateMonth({ item, colProps }) {
<ProFormDatePicker
fieldProps={{ ...item?.fieldProps, picker: 'month', format: 'YYYY-MM' }}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -416,7 +416,7 @@ function DateQuarter({ item, colProps }) {
<ProFormDatePicker
fieldProps={{ ...item?.fieldProps, picker: 'quarter', format: customWeekStartEndFormat }}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -432,7 +432,7 @@ function DateYear({ item, colProps }) {
<ProFormDatePicker
fieldProps={{ ...item?.fieldProps, picker: 'year', format: 'YYYY' }}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -449,7 +449,7 @@ function DateTime({ item, colProps }) {
<ProFormDateTimePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -465,7 +465,7 @@ function DateRange({ item, colProps }) {
<ProFormDateRangePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={['请选择开始日期', '请选择结束日期']}
...
...
@@ -481,7 +481,7 @@ function DateTimeRange({ item, colProps }) {
<ProFormDateTimeRangePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={['请选择开始时间', '请选择结束时间']}
...
...
@@ -497,7 +497,7 @@ function Time({ item, colProps }) {
<ProFormTimePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -513,7 +513,7 @@ function TimeRange({ item, colProps }) {
<ProFormTimePicker.RangePicker
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={['请选择开始时间', '请选择结束时间']}
...
...
@@ -531,7 +531,7 @@ function LinkSelect({ item, colProps, formRef, name, curindex }) {
<>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
return (
<ProFormSelect
convertValue={(value) => {
...
...
@@ -618,7 +618,7 @@ function NolinkSelect({ item, colProps }) {
<ProFormSelect
fieldProps={item.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -648,7 +648,7 @@ function LinkTreeSelect({ item, colProps, formRef, name, curindex }) {
<>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
return (
<ProFormTreeSelect
fieldProps={{
...
...
@@ -690,7 +690,7 @@ function LinkTreeSelect({ item, colProps, formRef, name, curindex }) {
//树结构所有value提取到数组
let allvalue = [];
treeForeach(res?.data?.dataList, (node) => {
allvalue.push(node.key);
allvalue.push(node
?
.key);
});
//过滤存在的value
...
...
@@ -745,7 +745,7 @@ function NolinkTreeSelect({ item, colProps }) {
showSearch: true,
}}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -771,7 +771,7 @@ function CheckboxItem({ item, colProps }) {
<ProFormCheckbox
fieldProps={item.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -788,7 +788,7 @@ function LinkCheckbox({ item, colProps, formRef, name, curindex }) {
<>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
return (
<ProFormCheckbox.Group
fieldProps={item?.fieldProps}
...
...
@@ -865,7 +865,7 @@ function NolinkCheckbox({ item, colProps }) {
<ProFormCheckbox.Group
fieldProps={item.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -891,7 +891,7 @@ function RadioItem({ item, colProps }) {
<ProFormRadio
fieldProps={item.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -908,7 +908,7 @@ function LinkRadio({ item, colProps, formRef, name, curindex }) {
<>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
return (
<ProFormRadio.Group
fieldProps={item?.fieldProps}
...
...
@@ -985,7 +985,7 @@ function NolinkRadio({ item, colProps }) {
<ProFormRadio.Group
fieldProps={item.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -1014,7 +1014,7 @@ function LinkCascader({ item, colProps, formRef, name, curindex }) {
<>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
return (
<ProFormCascader
fieldProps={{
...
...
@@ -1103,7 +1103,7 @@ function NolinkCascader({ item, colProps }) {
showSearch: true,
}}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请选择
$
{
item
.
title
}
`}
...
...
@@ -1130,7 +1130,7 @@ function Switch({ item, colProps }) {
<ProFormSwitch
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
placeholder={`
请输入
$
{
item
.
title
}
`}
...
...
@@ -1146,7 +1146,7 @@ function Rate({ item, colProps }) {
<ProFormRate
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
/>
...
...
@@ -1162,7 +1162,7 @@ function Slider({ item, colProps }) {
{...item?.fieldProps}
fieldProps={item?.fieldProps}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
/>
...
...
@@ -1193,7 +1193,7 @@ function UploadBtn({ item, colProps }) {
},
}}
transform={(value) => {
const key = item
.key ?? item
.dataIndex;
const key = item
?.key ?? item?
.dataIndex;
const transvalue = value?.map((it) => {
if (it.response) {
return it?.response?.data?.dataList[0];
...
...
@@ -1206,7 +1206,7 @@ function UploadBtn({ item, colProps }) {
};
}}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
title={`
上传
$
{
item
.
title
}
`}
...
...
@@ -1325,7 +1325,7 @@ function UploadImage({ item, colProps }) {
let col = item.colProps ?? colProps;
return (
<Col {...col}>
<Form.Item name={item
.key ?? item
.dataIndex} label={item.title} {...item.formItemProps}>
<Form.Item name={item
?.key ?? item?
.dataIndex} label={item.title} {...item.formItemProps}>
<UploadImg fieldProps={{ ...item?.fieldProps }} />
</Form.Item>
</Col>
...
...
@@ -1355,7 +1355,7 @@ function UploadDragger({ item, colProps }) {
},
}}
transform={(value) => {
const key = item
.key ?? item
.dataIndex;
const key = item
?.key ?? item?
.dataIndex;
const transvalue = value?.map((it) => {
if (it.response) {
return it?.response?.data?.dataList[0];
...
...
@@ -1368,7 +1368,7 @@ function UploadDragger({ item, colProps }) {
};
}}
formItemProps={item.formItemProps}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
colProps={item.colProps ?? colProps}
label={item.title}
/>
...
...
@@ -1379,7 +1379,7 @@ function UploadDragger({ item, colProps }) {
// editor
function Editor({ item, colProps, formRef }) {
let col = item.colProps ?? colProps;
let curkey = item
.key ?? item
.dataIndex;
let curkey = item
?.key ?? item?
.dataIndex;
return (
<Col {...col}>
<ProForm.Item
...
...
@@ -1410,7 +1410,7 @@ function Editor({ item, colProps, formRef }) {
// editor
function Diyrules({ item, colProps, formRef }) {
let col = item.colProps ?? colProps;
let curkey = item
.key ?? item
.dataIndex;
let curkey = item
?.key ?? item?
.dataIndex;
return (
<Col {...col}>
<ProForm.Item
...
...
@@ -1446,7 +1446,7 @@ function FormList({ item, colProps, formRef }) {
return (
<Col {...col}>
<ProFormList
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
label={item.title}
min={item.min ?? 0}
max={item.max ?? 100}
...
...
@@ -1463,7 +1463,7 @@ function FormList({ item, colProps, formRef }) {
action={action}
curindex={index}
formRef={formRef}
name={item
.key ?? item
.dataIndex}
name={item
?.key ?? item?
.dataIndex}
/>
);
}}
...
...
@@ -1682,7 +1682,7 @@ function LinkSelectList({ item, colProps, formRef, name, curindex }) {
<Col {...col}>
<ProFormDependency name={Object.keys(curlinkparams)}>
{(params) => {
const curkey = item
.key ?? item
.dataIndex;
const curkey = item
?.key ?? item?
.dataIndex;
let result = {};
for (let key in curlinkparams) {
let reversekey = !curlinkparams[key] ? key : curlinkparams[key];
...
...
@@ -1701,7 +1701,7 @@ function LinkSelectList({ item, colProps, formRef, name, curindex }) {
function NolinkSelectList({ item, colProps, formRef }) {
let col = item.colProps ?? colProps;
let curkey = item
.key ?? item
.dataIndex; //获取key
let curkey = item
?.key ?? item?
.dataIndex; //获取key
return (
<Col {...col}>
<Form.Item name={curkey} label={item.title} {...item.formItemProps}>
...
...
src/components/InitForm/index.jsx
View file @
0da2f8a1
...
...
@@ -13,6 +13,7 @@ import { doFetch } from '@/utils/doFetch';
import
styles
from
'./index.less'
;
import
FormItems
from
'./FormItems'
;
import
ExtendField
from
'@/components/ExtendField'
;
import
{
Input
,
Col
}
from
'antd'
;
function
upperCase
(
str
)
{
const
newStr
=
str
.
slice
(
0
,
1
).
toUpperCase
()
+
str
.
slice
(
1
);
...
...
@@ -35,6 +36,15 @@ let FormRender = memo(({ fields = [], colProps, proformRef }) => {
</
div
>
);
}
if
(
item
?.
valueType
==
'nosubmit'
)
{
return
(
<
Col
{
...
(
item
.
colProps
??
{
span
:
12
})}
style=
{
{
marginBottom
:
24
}
}
>
<
label
style=
{
{
marginBottom
:
8
,
display
:
'block'
}
}
>
{
item
?.
title
}
</
label
>
<
Input
disabled
value=
{
item
?.
initialValue
}
/>
</
Col
>
);
}
if
(
hideInForm
&&
Object
.
keys
(
hideInForm
))
{
return
(
<
ProFormDependency
name=
{
Object
.
keys
(
hideInForm
)
}
>
...
...
src/pages/spare/instore/columns.js
View file @
0da2f8a1
...
...
@@ -158,6 +158,13 @@ function getcolumns(setdrawer) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -322,6 +329,13 @@ function getcolumns(setdrawer) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/outstore/columns.js
View file @
0da2f8a1
...
...
@@ -139,6 +139,13 @@ function getcolumns(setdrawer) {
],
},
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -317,6 +324,13 @@ function getcolumns(setdrawer) {
],
},
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/requisition/columns.js
View file @
0da2f8a1
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
)
{
function
getcolumns
(
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -82,6 +82,14 @@ function getcolumns(type) {
},
],
},
{
title
:
'入库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
...
...
@@ -95,6 +103,13 @@ function getcolumns(type) {
},
hideInForm
:
type
==
1
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -147,6 +162,7 @@ function getcolumns(type) {
key
:
'status'
,
hideInForm
:
true
,
valueType
:
'select'
,
span
:
3
,
options
:
[
{
label
:
'待审批'
,
...
...
@@ -279,6 +295,14 @@ function getcolumns(type) {
},
],
},
{
title
:
'入库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'inWarehouseName'
,
...
...
@@ -292,6 +316,13 @@ function getcolumns(type) {
},
hideInForm
:
type
==
1
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -355,6 +386,7 @@ function getcolumns(type) {
key
:
'status'
,
hideInForm
:
true
,
valueType
:
'select'
,
span
:
3
,
options
:
[
{
label
:
'已驳回'
,
...
...
src/pages/spare/requisition/index.jsx
View file @
0da2f8a1
...
...
@@ -9,6 +9,7 @@ import { useRequest } from 'ahooks';
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
InitForm
from
'@/components/InitForm'
;
import
{
message
,
Divider
}
from
'antd'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Requisition
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -17,6 +18,9 @@ function Requisition(props) {
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
initialState
:
{
currentUser
},
}
=
useModel
(
'@@initialState'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
...
...
@@ -134,7 +138,9 @@ function Requisition(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
...
...
src/pages/spare/spareback/columns.js
View file @
0da2f8a1
import
AutoTable
from
'@/components/AutoTable/mtable'
;
function
getcolumns
(
type
)
{
function
getcolumns
(
type
,
fullName
)
{
const
columns
=
[
{
title
:
'备件料号'
,
...
...
@@ -96,6 +96,21 @@ function getcolumns(type) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
@@ -308,6 +323,21 @@ function getcolumns(type) {
key
:
'inWarehouseName'
,
hideInForm
:
true
,
},
{
title
:
'入库仓库'
,
dataIndex
:
'nosubmits'
,
initialValue
:
'备件仓库'
,
valueType
:
'nosubmit'
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库(个人)'
,
dataIndex
:
'nosubmit'
,
initialValue
:
fullName
,
valueType
:
'nosubmit'
,
hideInForm
:
type
!==
1
,
hideInDescriptions
:
true
,
},
{
title
:
'出库仓库'
,
dataIndex
:
'outWarehouseName'
,
...
...
src/pages/spare/spareback/index.jsx
View file @
0da2f8a1
...
...
@@ -8,6 +8,7 @@ import { useRequest } from 'ahooks';
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
InitForm
from
'@/components/InitForm'
;
import
{
message
,
Divider
}
from
'antd'
;
import
{
useModel
}
from
'@umijs/max'
;
function
Spareback
(
props
)
{
const
actionRef
=
useRef
(),
...
...
@@ -16,7 +17,9 @@ function Spareback(props) {
open
:
false
,
}),
[
activeTabKey
,
setactiveTabKey
]
=
useState
(
'1'
);
const
{
initialState
:
{
currentUser
},
}
=
useModel
(
'@@initialState'
);
const
{
run
,
loading
}
=
useRequest
(
doFetch
,
{
manual
:
true
,
onSuccess
:
(
res
,
params
)
=>
{
...
...
@@ -133,7 +136,9 @@ function Spareback(props) {
};
const
columns
=
useMemo
(()
=>
{
let
defcolumn
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
columns
;
let
defcolumn
=
getcolumns
(
drawer
?.
type
,
currentUser
?.
fullName
).
filter
(
(
it
)
=>
it
.
key
==
activeTabKey
,
)[
0
]?.
columns
;
let
defpath
=
getcolumns
(
drawer
?.
type
).
filter
((
it
)
=>
it
.
key
==
activeTabKey
)[
0
]?.
pathconfig
??
{};
return
defcolumn
.
concat
({
...
...
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