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
f7862cfa
Commit
f7862cfa
authored
Feb 24, 2023
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
111
parent
7834d23e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
122 additions
and
108 deletions
+122
-108
index.jsx
src/components/InitForm/Expandable/index.jsx
+5
-5
index.jsx
src/pages/maintain/workOrder/index.jsx
+14
-3
index.jsx
src/pages/repair/order/index.jsx
+103
-100
No files found.
src/components/InitForm/Expandable/index.jsx
View file @
f7862cfa
...
...
@@ -76,18 +76,18 @@ function Expandables({ value = [], onChange, item }) {
editable
:
false
,
},
{
title
:
'
库存
数量'
,
dataIndex
:
'
actual
Stock'
,
title
:
'
可用
数量'
,
dataIndex
:
'
used
Stock'
,
search
:
false
,
key
:
'
actual
Stock'
,
key
:
'
used
Stock'
,
editable
:
false
,
},
{
title
:
'
下架
数量'
,
title
:
'
更换
数量'
,
dataIndex
:
'operateNum'
,
search
:
false
,
key
:
'operateNum'
,
valueType
:
'
digi
t'
,
valueType
:
'
inpu
t'
,
fieldProps
:
{
precision
:
3
,
},
...
...
src/pages/maintain/workOrder/index.jsx
View file @
f7862cfa
...
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Date: 2023-01-19 09:53:59
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-24 1
7:39
:49
* @Last Modified time: 2023-02-24 1
9:18
:49
*/
import
*
as
React
from
'react'
;
...
...
@@ -590,7 +590,7 @@ function WorkOrder(props) {
hideInSearch
:
true
,
hideInTable
:
true
,
path
:
'/sparepart/lineStock/queryConsumeStock'
,
rowName
:
'
supplier
List'
,
rowName
:
'
lineStockUse
List'
,
rowSelection
:
{
type
:
'checkbox'
,
getCheckboxProps
:
(
record
)
=>
({
...
...
@@ -672,9 +672,20 @@ function WorkOrder(props) {
};
}
});
let
lineStockUseList
=
vals
?.
lineStockUseList
?.
map
((
it
)
=>
({
lineStockId
:
it
?.
id
,
operateNum
:
it
?.
operateNum
,
}))
??
[];
let
ifePieceStockUseList
=
vals
?.
ifePieceStockUseList
??
[];
run
({
url
:
'/maintain/umMaintainTask/finishMaintainTask'
,
params
:
{
id
:
drawer
?.
item
?.
id
,
maintainTaskItemList
},
params
:
{
id
:
drawer
?.
item
?.
id
,
maintainTaskItemList
,
lineStockUseList
,
ifePieceStockUseList
,
},
});
}
}
/>
...
...
src/pages/repair/order/index.jsx
View file @
f7862cfa
...
...
@@ -3,7 +3,7 @@
* @Author: Li Hanlin
* @Date: 2022-12-02 11:41:03
* @Last Modified by: Li Hanlin
* @Last Modified time: 2023-02-24 1
5:18:44
* @Last Modified time: 2023-02-24 1
9:10:16
*/
import
*
as
React
from
'react'
;
...
...
@@ -711,90 +711,90 @@ function Failure(props) {
};
// 完成维修
const
Finishrepair
=
()
=>
{
const
EditTableItem
=
({
record
})
=>
{
const
[
value
,
setvalue
]
=
useState
([]);
//
const EditTableItem = ({ record }) => {
//
const [value, setvalue] = useState([]);
return
(
<
div
>
<
EditTable
resizeable=
{
false
}
alwaysShowAlert=
{
false
}
tableAlertRender=
{
false
}
tableAlertOptionRender=
{
false
}
columns=
{
[
{
title
:
'线边库'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
editable
:
false
,
},
{
title
:
'供应商编号'
,
dataIndex
:
'supplierNo'
,
key
:
'supplierNo'
,
span
:
3
,
editable
:
false
,
},
{
title
:
'供应商名称'
,
dataIndex
:
'supplierName'
,
key
:
'supplierName'
,
span
:
3
,
editable
:
false
,
},
{
title
:
'可用数量'
,
dataIndex
:
'usedStock'
,
key
:
'usedStock'
,
search
:
false
,
span
:
3
,
editable
:
false
,
},
{
title
:
(
<
div
>
更换数量
<
span
style=
{
{
color
:
'red'
}
}
>
*
</
span
>
</
div
>
),
search
:
false
,
dataIndex
:
'operateNum'
,
valueType
:
'digit'
,
fieldProps
:
{
precision
:
3
,
},
key
:
'operateNum'
,
span
:
3
,
hideInForm
:
true
,
editable
:
true
,
},
]
}
path=
"/sparepart/lineStock/queryReplaceStock"
extraparams=
{
{
lifePieceAccountId
:
record
?.
id
}
}
rowSelection=
{
{
type
:
'checkbox'
,
columnWidth
:
44
,
preserveSelectedRowKeys
:
true
,
selectedRowKeys
:
value
?.
map
((
it
)
=>
it
?.
lineStockId
)
??
[],
onChange
:
(
selectedKeys
,
selectedRows
)
=>
{
const
lineStockUseList
=
selectedRows
?.
map
((
it
)
=>
{
return
{
lineStockId
:
it
?.
id
,
operateNum
:
it
?.
operateNum
};
});
setvalue
(
lineStockUseList
);
},
}
}
editable=
{
{
onValuesChange
:
(
rower
,
recordList
)
=>
{
setvalue
((
value
)
=>
{
const
curkey
=
value
?.
map
((
it
)
=>
it
?.
lineStockId
);
const
newValue
=
value
.
concat
(
rower
);
return
[...
newValue
];
});
},
}
}
/>
</
div
>
);
};
//
return (
//
<div>
//
<EditTable
//
resizeable={false}
//
alwaysShowAlert={false}
//
tableAlertRender={false}
//
tableAlertOptionRender={false}
//
columns={[
//
{
//
title: '线边库',
//
dataIndex: 'supplierNo',
//
key: 'supplierNo',
//
editable: false,
//
},
//
{
//
title: '供应商编号',
//
dataIndex: 'supplierNo',
//
key: 'supplierNo',
//
span: 3,
//
editable: false,
//
},
//
{
//
title: '供应商名称',
//
dataIndex: 'supplierName',
//
key: 'supplierName',
//
span: 3,
//
editable: false,
//
},
//
{
//
title: '可用数量',
//
dataIndex: 'usedStock',
//
key: 'usedStock',
//
search: false,
//
span: 3,
//
editable: false,
//
},
//
{
//
title: (
//
<div>
//
更换数量 <span style={{ color: 'red' }}>* </span>
//
</div>
//
),
//
search: false,
//
dataIndex: 'operateNum',
//
valueType: 'digit',
//
fieldProps: {
//
precision: 3,
//
},
//
key: 'operateNum',
//
span: 3,
//
hideInForm: true,
//
editable: true,
//
},
//
]}
//
path="/sparepart/lineStock/queryReplaceStock"
//
extraparams={{ lifePieceAccountId: record?.id }}
//
rowSelection={{
//
type: 'checkbox',
//
columnWidth: 44,
//
preserveSelectedRowKeys: true,
//
selectedRowKeys: value?.map((it) => it?.lineStockId) ?? [],
//
onChange: (selectedKeys, selectedRows) => {
//
const lineStockUseList = selectedRows?.map((it) => {
//
return { lineStockId: it?.id, operateNum: it?.operateNum };
//
});
//
setvalue(lineStockUseList);
//
},
//
}}
//
editable={{
//
onValuesChange: (rower, recordList) => {
//
setvalue((value) => {
//
const curkey = value?.map((it) => it?.lineStockId);
//
const newValue = value.concat(rower);
//
return [...newValue];
//
});
//
},
//
}}
//
/>
//
</div>
//
);
//
};
const
columns_fsmjxh
=
[
{
title
:
'线边库'
,
...
...
@@ -846,7 +846,7 @@ function Failure(props) {
),
search
:
false
,
dataIndex
:
'operateNum'
,
valueType
:
'
digi
t'
,
valueType
:
'
inpu
t'
,
fieldProps
:
{
precision
:
3
,
},
...
...
@@ -1075,7 +1075,6 @@ function Failure(props) {
}
}
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
params
=
{
repairComplete
:
{
faultType
:
vals
.
faultSettingId
,
...
...
@@ -1087,20 +1086,24 @@ function Failure(props) {
},
id
:
drawer
?.
item
.
id
,
repairAssistList
:
vals
?.
repairAssistList
?.
map
((
it
)
=>
({
assistUserId
:
it
})),
lineStockUseList
:
vals
?.
supplierList
?.
map
((
it
)
=>
({
lineStockId
:
it
?.
id
,
operateNum
:
it
?.
operateNum
,
})),
ifePieceStockUseList
:
vals
?.
ifePieceStockUseList
,
};
console
.
log
(
params
);
// let res = await doFetch(
{
// url: '/repair/umRepairOrder/completeRepair',
// params,
//
});
// if (res.code === '0000')
{
// message.success('操作成功!');
// setdrawer((s) => (
{
// ...s,
// open: false,
//
}));
// actionRef.current.reload();
//
}
let
res
=
await
doFetch
({
url
:
'/repair/umRepairOrder/completeRepair'
,
params
,
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'操作成功!'
);
setdrawer
((
s
)
=>
({
...
s
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
}
}
}
{
...
drawer
}
/>
...
...
@@ -1144,7 +1147,7 @@ function Failure(props) {
...
s
,
open
:
false
,
}));
actionRef
.
current
.
reload
();
actionRef
?.
current
?
.
reload
();
}
}
}
{
...
drawer
}
...
...
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