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
6b908e96
Commit
6b908e96
authored
Nov 22, 2022
by
TZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11221527
parent
88ce3d55
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1119 additions
and
64 deletions
+1119
-64
columns.js
src/pages/device/account/columns.js
+1
-1
index.jsx
src/pages/device/account/index.jsx
+1118
-63
No files found.
src/pages/device/account/columns.js
View file @
6b908e96
...
@@ -14,7 +14,7 @@ function getcolumns(setdrawer) {
...
@@ -14,7 +14,7 @@ function getcolumns(setdrawer) {
title
:
'设备名称'
,
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
dataIndex
:
'equipmentName'
,
align
:
'center'
,
align
:
'center'
,
width
:
1
20
,
width
:
2
20
,
key
:
'equipmentName'
,
key
:
'equipmentName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
...
...
src/pages/device/account/index.jsx
View file @
6b908e96
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: Li Hanlin
* @Author: Li Hanlin
* @Date: 2022-11-10 09:39:56
* @Date: 2022-11-10 09:39:56
* @Last Modified by: Li Hanlin
* @Last Modified by: Li Hanlin
* @Last Modified time: 2022-11-2
1 17:38:29
* @Last Modified time: 2022-11-2
2 15:20:40
*/
*/
import
*
as
React
from
'react'
;
import
*
as
React
from
'react'
;
...
@@ -12,58 +12,456 @@ import AutoTable from '@/components/AutoTable';
...
@@ -12,58 +12,456 @@ import AutoTable from '@/components/AutoTable';
import
PremButton
from
'@/components/PremButton'
;
import
PremButton
from
'@/components/PremButton'
;
import
getcolumns
from
'./columns'
;
import
getcolumns
from
'./columns'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
doFetch
}
from
'@/utils/doFetch'
;
import
{
message
,
Dropdown
,
Menu
,
Layout
,
Button
,
Space
,
Divider
,
Tabs
}
from
'antd'
;
import
{
message
,
Dropdown
,
Menu
,
Layout
,
Button
,
Image
,
Space
,
Divider
,
Tabs
}
from
'antd'
;
import
TreeRender
from
'@/components/TreeRender'
;
import
TreeRender
from
'@/components/TreeRender'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
{
ProDescriptions
}
from
'@ant-design/pro-components'
;
import
InitForm
from
'@/components/InitForm'
;
import
InitForm
from
'@/components/InitForm'
;
const
{
Sider
,
Content
}
=
Layout
;
const
{
Sider
,
Content
}
=
Layout
;
function
Model
(
props
)
{
function
Model
(
props
)
{
const
actionRef
=
useRef
(),
const
actionRef
=
useRef
(),
formRef
=
useRef
();
formRef
=
useRef
(),
const
[
drawer
,
setDrawer
]
=
useState
({
[
drawer
,
setDrawer
]
=
useState
({
visible
:
false
,
visible
:
false
,
});
}),
[
currDrawer
,
setCurrDrawer
]
=
useState
({
const
urlParams
=
{
visible
:
false
,
save
:
'/asset/equipment/save'
,
}),
remove
:
'/asset/equipment/deleteById'
,
currfields
=
{
list
:
'/asset/equipment/queryList'
,
1
:
[
detail
:
'/asset/equipment/detail'
,
{
};
title
:
'操作人'
,
dataIndex
:
'updateUserName'
,
const
urlParams_childEquipment
=
{
key
:
'updateUserName'
,
list
:
'/asset/equipment/children/queryList'
,
},
checked
:
'/asset/equipment/children/selected/queryList'
,
{
save
:
'/asset/equipmentChildren/save'
,
title
:
'操作时间'
,
};
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
const
urlParams_resume
=
{
},
save
:
'/asset/equipmentLog/save'
,
{
};
title
:
'改造日期'
,
dataIndex
:
'reformDate'
,
const
detail
=
(
text
,
row
,
_
,
action
)
=>
{
key
:
'reformDate'
,
return
(
valueType
:
'date'
,
<
PremButton
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
btn=
{
{
},
size
:
'small'
,
{
type
:
'link'
,
title
:
'改造承包商'
,
onClick
:
()
=>
{
dataIndex
:
'supplierId'
,
setDrawer
((
s
)
=>
({
key
:
'supplierId'
,
...
s
,
valueType
:
'select'
,
visible
:
true
,
options
:
{
item
:
row
,
path
:
'/asset/equipmentSupplier/query/selection'
,
title
:
'详情'
,
params
:
{},
val
:
'detail'
,
title
:
row
.
userName
+
'的详细信息'
,
}));
},
},
}
}
formItemProps
:
{
>
rules
:
[
详情
{
</
PremButton
>
required
:
true
,
);
message
:
'此项为必填项'
,
};
},
],
},
},
{
title
:
'改造内容'
,
dataIndex
:
'reformContent'
,
key
:
'reformContent'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'上传文件(上限为5个)'
,
key
:
'urlIds '
,
valueType
:
'uploadDragger'
,
// colProps: { span: 24 },
fieldProps
:
{
limit
:
5
,
},
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
render
:
(
text
,
row
)
=>
{
return
row
?.
urlIds
?.
map
((
it
)
=>
{
<
Image
width
=
{
70
}
src
=
{
it
.
url
}
/>
;
});
},
},
],
2
:
[
{
title
:
'操作人'
,
dataIndex
:
'updateUserName'
,
key
:
'updateUserName'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
},
{
title
:
'报废日期'
,
dataIndex
:
'scrapDate'
,
key
:
'scrapDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'报废原因'
,
dataIndex
:
'scrapReason'
,
key
:
'scrapReason'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'上传文件'
,
key
:
'urlIds '
,
valueType
:
'uploadDragger'
,
// colProps: { span: 24 },
formItemProps
:
{
rules
:
[
{
required
:
true
,
message
:
'此项为必填项'
,
},
],
},
fieldProps
:
{
limit
:
5
,
},
render
:
(
text
,
row
)
=>
{
return
row
?.
urlIds
.
map
((
it
)
=>
{
<
Image
width
=
{
70
}
src
=
{
it
.
url
}
/>
;
});
},
},
],
3
:
[
{
title
:
'操作人'
,
dataIndex
:
'updateUserName'
,
key
:
'updateUserName'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
},
{
title
:
'调入公司'
,
dataIndex
:
'organizationName'
,
key
:
'toOrganizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'调入部门'
,
valueType
:
'select'
,
dataIndex
:
'departmentName'
,
key
:
'toDepartmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
toOrganizationId
:
'parentId'
,
},
},
},
{
title
:
'调入工厂'
,
dataIndex
:
'factoryName'
,
key
:
'toFactoryId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'调入车间'
,
dataIndex
:
'shopName'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
toFactoryId
:
'factoryId'
,
},
},
key
:
'toShopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'调入工段'
,
dataIndex
:
'sectionName'
,
key
:
'toSectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
toShopId
:
'shopId'
,
},
},
},
{
title
:
'调入产线'
,
dataIndex
:
'productionLines'
,
valueType
:
'select'
,
key
:
'toProductLineId'
,
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
toShopId
:
'shopId'
,
},
},
},
{
title
:
'调入位置号'
,
dataIndex
:
'toPositionNo'
,
valueType
:
'input'
,
key
:
'toPositionNo'
,
},
{
title
:
'调拨日期'
,
dataIndex
:
'transferDate'
,
key
:
'transferDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'调拨原因'
,
dataIndex
:
'transferReason'
,
key
:
'transferReason'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
],
4
:
[
{
title
:
'操作人'
,
dataIndex
:
'updateUserName'
,
key
:
'updateUserName'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
},
{
title
:
'借用公司'
,
dataIndex
:
'organizationName'
,
key
:
'toOrganizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'借用部门'
,
valueType
:
'select'
,
dataIndex
:
'departmentName'
,
key
:
'toDepartmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
toOrganizationId
:
'parentId'
,
},
},
},
{
title
:
'借用工厂'
,
dataIndex
:
'factoryName'
,
key
:
'toFactoryId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'借用车间'
,
dataIndex
:
'shopName'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
toFactoryId
:
'factoryId'
,
},
},
key
:
'toShopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'借用工段'
,
dataIndex
:
'sectionName'
,
key
:
'toSectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
toShopId
:
'shopId'
,
},
},
},
{
title
:
'借用产线'
,
dataIndex
:
'productionLines'
,
valueType
:
'select'
,
key
:
'toProductLineId'
,
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
toShopId
:
'shopId'
,
},
},
},
{
title
:
'借用位置号'
,
dataIndex
:
'toPositionNo'
,
valueType
:
'input'
,
key
:
'toPositionNo'
,
},
{
title
:
'借用日期'
,
dataIndex
:
'borrowDate'
,
key
:
'borrowDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'预计归还日期'
,
dataIndex
:
'planReturnDate'
,
key
:
'planReturnDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'借用原因'
,
dataIndex
:
'borrowReason'
,
key
:
'borrowReason'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
],
5
:
[
{
title
:
'操作人'
,
dataIndex
:
'updateUserName'
,
key
:
'updateUserName'
,
},
{
title
:
'操作时间'
,
dataIndex
:
'updateTime'
,
key
:
'updateTime'
,
},
{
title
:
'接收公司'
,
dataIndex
:
'returnOrganizationId'
,
key
:
'returnOrganizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收部门'
,
valueType
:
'select'
,
dataIndex
:
'returnDepartmentId'
,
key
:
'returnDepartmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
returnOrganizationId
:
'parentId'
,
},
},
},
{
title
:
'接收工厂'
,
dataIndex
:
'returnFactoryId'
,
key
:
'returnFactoryId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收车间'
,
dataIndex
:
'returnShopId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
returnFactoryId
:
'factoryId'
,
},
},
key
:
'returnShopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收工段'
,
dataIndex
:
'returnSectionId'
,
key
:
'returnSectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
returnShopId
:
'shopId'
,
},
},
},
{
title
:
'接收产线'
,
dataIndex
:
'returnProductLineId'
,
valueType
:
'select'
,
key
:
'returnProductLineId'
,
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
returnShopId
:
'shopId'
,
},
},
},
{
title
:
'接收位置号'
,
dataIndex
:
'returnPositionNo'
,
valueType
:
'input'
,
key
:
'returnPositionNo'
,
},
{
title
:
'实际归还日期'
,
dataIndex
:
'realReturnDate'
,
key
:
'realReturnDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
],
},
urlParams
=
{
save
:
'/asset/equipment/save'
,
remove
:
'/asset/equipment/deleteById'
,
list
:
'/asset/equipment/queryList'
,
detail
:
'/asset/equipment/detail'
,
},
urlParams_childEquipment
=
{
list
:
'/asset/equipment/children/queryList'
,
checked
:
'/asset/equipment/children/selected/queryList'
,
save
:
'/asset/equipmentChildren/save'
,
},
urlParams_resume
=
{
save
:
'/asset/equipmentLog/save'
,
list
:
'/asset/equipmentLog/queryEquipmentLogPage'
,
detail
:
'/asset/equipmentLog/query/resumeDetail'
,
},
urlParams_correlation
=
{
zsb
:
'/asset/equipment/detail/children/page'
,
fsb
:
'/asset/equipment/detail/parent/page'
,
};
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
const
edit
=
(
text
,
row
,
_
,
action
)
=>
{
return
(
return
(
...
@@ -231,14 +629,476 @@ function Model(props) {
...
@@ -231,14 +629,476 @@ function Model(props) {
/>
/>
);
);
return
(
return
(
<
Dropdown
<
Dropdown
overlay=
{
menu
}
overlay=
{
menu
}
trigger=
{
[
'click'
]
}
trigger=
{
[
'click'
]
}
arrow=
{
true
}
arrow=
{
true
}
getPopupContainer=
{
()
=>
document
.
getElementsByClassName
(
'ant-table-content'
)[
0
]
}
getPopupContainer=
{
()
=>
document
.
getElementsByClassName
(
'ant-table-content'
)[
0
]
}
>
>
<
Button
size=
"small"
>
更多
</
Button
>
<
Button
size=
"small"
>
更多
</
Button
>
</
Dropdown
>
</
Dropdown
>
);
};
//设备详情
const
Detail
=
()
=>
{
const
[
activeTab
,
setactiveTab
]
=
useState
(
1
);
// 基础信息
const
BaseInfo
=
()
=>
{
return
(
<>
<
ProDescriptions
request=
{
async
()
=>
{
const
{
data
}
=
await
doFetch
({
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
});
return
{
success
:
true
,
data
:
data
?.
data
,
};
}
}
columns=
{
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'位置号'
,
dataIndex
:
'positionNo'
,
key
:
'positionNo'
,
},
{
title
:
'设备类型'
,
dataIndex
:
'equipmentTypeName'
,
key
:
'equipmentTypeId'
,
},
{
title
:
'状态'
,
dataIndex
:
'statusName'
,
key
:
'statusName'
,
span
:
2
,
},
{
title
:
'公司名称'
,
dataIndex
:
'organizationName'
,
key
:
'organizationId'
,
},
{
title
:
'部门名称'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopId'
,
},
{
title
:
'工段名称'
,
dataIndex
:
'sectionName'
,
key
:
'sectionId'
,
},
{
title
:
'产线名称'
,
dataIndex
:
'productLineName'
,
key
:
'productLineName'
,
},
{
title
:
'供应商'
,
dataIndex
:
'supplierName'
,
key
:
'supplierId'
,
},
{
title
:
'设备原值'
,
dataIndex
:
'equipmentWorth'
,
key
:
'equipmentWorth'
,
},
{
title
:
'安装投产日期'
,
dataIndex
:
'productDate'
,
key
:
'productDate'
,
},
{
title
:
'图片'
,
dataIndex
:
'pictureUrl'
,
key
:
'pictureUrl'
,
render
:
(
text
,
row
)
=>
<
Image
width=
{
70
}
src=
{
row
.
pictureUrl
}
/>,
},
{
title
:
'二维码'
,
dataIndex
:
'qrCodeUrl'
,
key
:
'qrCodeUrl'
,
render
:
(
text
,
row
)
=>
<
Image
width=
{
70
}
src=
{
row
.
qrCodeUrl
}
/>,
},
]
}
/>
<
Divider
/>
<
h3
className=
"page-title"
>
扩展字段
</
h3
>
</>
);
};
// 相关设备
const
Correlation
=
()
=>
{
return
(
<>
<
AutoTable
pagetitle=
"子设备"
columns=
{
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
align
:
'center'
,
width
:
120
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
align
:
'center'
,
width
:
120
,
key
:
'equipmentName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'公司名称'
,
align
:
'center'
,
dataIndex
:
'organizationName'
,
width
:
120
,
key
:
'organizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'部门名称'
,
width
:
120
,
align
:
'center'
,
valueType
:
'select'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
organizationId
:
'parentId'
,
},
},
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
width
:
120
,
align
:
'center'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
align
:
'center'
,
width
:
120
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
factoryId
:
''
,
},
},
key
:
'shopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'工段名称'
,
width
:
120
,
dataIndex
:
'sectionName'
,
align
:
'center'
,
key
:
'sectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
shopId
:
''
,
},
},
},
{
title
:
'产线名称'
,
width
:
120
,
dataIndex
:
'productLineName'
,
valueType
:
'select'
,
key
:
'productLineName'
,
align
:
'center'
,
options
:
{
path
:
'auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
shopId
:
''
,
},
},
},
]
}
path=
{
urlParams_correlation
.
zsb
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
resizeable=
{
false
}
/>
<
Divider
/>
<
AutoTable
pagetitle=
"父设备"
columns=
{
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
align
:
'center'
,
width
:
120
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
align
:
'center'
,
width
:
120
,
key
:
'equipmentName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'公司名称'
,
align
:
'center'
,
dataIndex
:
'organizationName'
,
width
:
120
,
key
:
'organizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'部门名称'
,
width
:
120
,
align
:
'center'
,
valueType
:
'select'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
organizationId
:
'parentId'
,
},
},
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
width
:
120
,
align
:
'center'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
align
:
'center'
,
width
:
120
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
factoryId
:
''
,
},
},
key
:
'shopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'工段名称'
,
width
:
120
,
dataIndex
:
'sectionName'
,
align
:
'center'
,
key
:
'sectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
shopId
:
''
,
},
},
},
{
title
:
'产线名称'
,
width
:
120
,
dataIndex
:
'productLineName'
,
valueType
:
'select'
,
key
:
'productLineName'
,
align
:
'center'
,
options
:
{
path
:
'auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
shopId
:
''
,
},
},
},
]
}
path=
{
urlParams_correlation
.
fsb
}
params=
{
{
id
:
drawer
?.
item
?.
id
}
}
resizeable=
{
false
}
/>
</>
);
};
//履历查询
const
Curritae
=
()
=>
{
return
(
<>
<
ProDescriptions
title=
"设备信息"
request=
{
async
()
=>
{
const
{
data
}
=
await
doFetch
({
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
});
return
{
success
:
true
,
data
:
data
?.
data
,
};
}
}
columns=
{
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'位置号'
,
dataIndex
:
'positionNo'
,
key
:
'positionNo'
,
},
{
title
:
'公司名称'
,
dataIndex
:
'organizationName'
,
key
:
'organizationId'
,
},
{
title
:
'部门名称'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopId'
,
},
{
title
:
'工段名称'
,
dataIndex
:
'sectionName'
,
key
:
'sectionId'
,
},
{
title
:
'产线名称'
,
dataIndex
:
'productLineName'
,
key
:
'productLineName'
,
},
]
}
/>
<
Divider
/>
<
AutoTable
pagetitle=
"履历详情"
columns=
{
[
{
title
:
'操作时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
width
:
120
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'履历类型'
,
dataIndex
:
'logTypeName'
,
width
:
120
,
key
:
'logTypeName'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'相关单号'
,
dataIndex
:
'relateNo'
,
width
:
120
,
key
:
'relateNo'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
render
:
(
text
,
row
)
=>
{
return
(
<
a
onClick=
{
()
=>
{
setCurrDrawer
((
s
)
=>
({
...
s
,
visible
:
true
,
item
:
row
,
val
:
'only'
,
title
:
`${row.logTypeName}详情`
,
}));
}
}
>
{
row
.
relateNo
}
</
a
>
);
},
},
]
}
path=
{
urlParams_resume
.
list
}
params=
{
{
equipmentId
:
drawer
?.
item
?.
id
}
}
resizeable=
{
false
}
/>
</>
);
};
return
(
<>
<
Tabs
activeKey=
{
activeTab
}
onChange=
{
setactiveTab
}
items=
{
[
{
label
:
'基础信息'
,
key
:
1
,
children
:
<
BaseInfo
/>,
},
{
label
:
'相关设备'
,
key
:
2
,
children
:
<
Correlation
/>,
},
{
label
:
'履历查询'
,
key
:
3
,
children
:
<
Curritae
/>,
},
]
}
/>
</>
);
);
};
};
...
@@ -547,10 +1407,13 @@ function Model(props) {
...
@@ -547,10 +1407,13 @@ function Model(props) {
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
{
{
title
:
'上传文件'
,
title
:
'上传文件
(上限为5个)
'
,
key
:
'urlIds '
,
key
:
'urlIds '
,
valueType
:
'uploadDragger'
,
valueType
:
'uploadDragger'
,
// colProps: { span: 24 },
// colProps: { span: 24 },
fieldProps
:
{
limit
:
5
,
},
formItemProps
:
{
formItemProps
:
{
rules
:
[
rules
:
[
{
{
...
@@ -589,6 +1452,9 @@ function Model(props) {
...
@@ -589,6 +1452,9 @@ function Model(props) {
},
},
],
],
},
},
fieldProps
:
{
limit
:
5
,
},
},
},
],
],
3
:
[
3
:
[
...
@@ -774,9 +1640,89 @@ function Model(props) {
...
@@ -774,9 +1640,89 @@ function Model(props) {
],
],
5
:
[
5
:
[
{
{
title
:
'设备1'
,
title
:
'接收公司'
,
dataIndex
:
'equipmentId'
,
dataIndex
:
'returnOrganizationId'
,
key
:
'equipment'
,
key
:
'returnOrganizationId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysDepartment/query/organization/selectbox'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收部门'
,
valueType
:
'select'
,
dataIndex
:
'returnDepartmentId'
,
key
:
'returnDepartmentId'
,
options
:
{
path
:
'/auth/sysDepartment/query/depart/selectbox'
,
linkParams
:
{
returnOrganizationId
:
'parentId'
,
},
},
},
{
title
:
'接收工厂'
,
dataIndex
:
'returnFactoryId'
,
key
:
'returnFactoryId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysFactory/getAllFactorySelection'
,
params
:
{}
},
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收车间'
,
dataIndex
:
'returnShopId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysShop/getShopSelectionByFactory'
,
linkParams
:
{
returnFactoryId
:
'factoryId'
,
},
},
key
:
'returnShopId'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'接收工段'
,
dataIndex
:
'returnSectionId'
,
key
:
'returnSectionId'
,
valueType
:
'select'
,
options
:
{
path
:
'/auth/sysSection/getAllSectionSelectionByShop'
,
linkParams
:
{
returnShopId
:
'shopId'
,
},
},
},
{
title
:
'接收产线'
,
dataIndex
:
'returnProductLineId'
,
valueType
:
'select'
,
key
:
'returnProductLineId'
,
options
:
{
path
:
'/auth/sysProductionLine/getAllProductLineSelectionByShop'
,
linkParams
:
{
returnShopId
:
'shopId'
,
},
},
},
{
title
:
'接收位置号'
,
dataIndex
:
'returnPositionNo'
,
valueType
:
'input'
,
key
:
'returnPositionNo'
,
},
{
title
:
'实际归还日期'
,
dataIndex
:
'realReturnDate'
,
key
:
'realReturnDate'
,
valueType
:
'date'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
{
title
:
'备注'
,
dataIndex
:
'remark'
,
key
:
'remark'
,
valueType
:
'textarea'
,
formItemProps
:
{
rules
:
[{
required
:
true
,
message
:
'此项为必填项'
}]
},
},
},
],
],
};
};
...
@@ -961,7 +1907,27 @@ function Model(props) {
...
@@ -961,7 +1907,27 @@ function Model(props) {
{
{
label
:
'归还'
,
label
:
'归还'
,
key
:
5
,
key
:
5
,
children
:
<
InitForm
fields=
{
fields
[
activeTab
]
}
/>,
children
:
activeTab
==
5
&&
(
<
InitForm
fields=
{
fields
[
activeTab
]
}
onFinish=
{
async
(
vals
)
=>
{
console
.
log
(
vals
);
let
res
=
await
doFetch
({
url
:
urlParams_resume
.
save
,
params
:
{
...
vals
,
type
:
'5'
,
equipmentId
:
drawer
?.
item
?.
id
},
});
if
(
res
.
code
===
'0000'
)
{
message
.
success
(
'登记成功!'
);
setDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
item
:
null
,
}));
actionRef
.
current
.
reload
();
}
}
}
/>
),
},
},
]
}
]
}
/>
/>
...
@@ -1023,11 +1989,9 @@ function Model(props) {
...
@@ -1023,11 +1989,9 @@ function Model(props) {
setDrawer
((
s
)
=>
({
setDrawer
((
s
)
=>
({
...
s
,
...
s
,
visible
:
true
,
visible
:
true
,
// item: row,
type
:
'detail'
,
title
:
'详情'
,
item
:
row
,
val
:
'detail'
,
val
:
'only'
,
detailpath
:
urlParams
.
detail
,
params
:
{
id
:
row
.
id
},
title
:
row
.
equipmentName
+
'的详细信息'
,
title
:
row
.
equipmentName
+
'的详细信息'
,
}));
}));
}
}
}
}
...
@@ -1073,6 +2037,8 @@ function Model(props) {
...
@@ -1073,6 +2037,8 @@ function Model(props) {
return
<
EditChildEquipment
/>;
return
<
EditChildEquipment
/>;
case
'resume'
:
case
'resume'
:
return
<
Resume
/>;
return
<
Resume
/>;
case
'detail'
:
return
<
Detail
/>;
default
:
default
:
return
null
;
return
null
;
}
}
...
@@ -1156,6 +2122,95 @@ function Model(props) {
...
@@ -1156,6 +2122,95 @@ function Model(props) {
>
>
{
selectMoreDrawerType
(
drawer
?.
type
)
}
{
selectMoreDrawerType
(
drawer
?.
type
)
}
</
DrawerPro
>
</
DrawerPro
>
<
DrawerPro
placement=
"right"
onClose=
{
()
=>
{
setCurrDrawer
((
s
)
=>
({
...
s
,
visible
:
false
,
item
:
null
,
}));
}
}
{
...
currDrawer
}
>
<
ProDescriptions
title=
"设备信息"
request=
{
async
()
=>
{
const
{
data
}
=
await
doFetch
({
url
:
urlParams
.
detail
,
params
:
{
id
:
drawer
?.
item
?.
id
},
});
return
{
success
:
true
,
data
:
data
?.
data
,
};
}
}
columns=
{
[
{
title
:
'设备编号'
,
dataIndex
:
'equipmentNo'
,
key
:
'equipmentNo'
,
},
{
title
:
'设备名称'
,
dataIndex
:
'equipmentName'
,
key
:
'equipmentName'
,
},
{
title
:
'位置号'
,
dataIndex
:
'positionNo'
,
key
:
'positionNo'
,
},
{
title
:
'公司名称'
,
dataIndex
:
'organizationName'
,
key
:
'organizationId'
,
},
{
title
:
'部门名称'
,
dataIndex
:
'departmentName'
,
key
:
'departmentId'
,
},
{
title
:
'工厂名称'
,
dataIndex
:
'factoryName'
,
key
:
'factoryId'
,
},
{
title
:
'车间名称'
,
dataIndex
:
'shopName'
,
key
:
'shopId'
,
},
{
title
:
'工段名称'
,
dataIndex
:
'sectionName'
,
key
:
'sectionId'
,
},
{
title
:
'产线名称'
,
dataIndex
:
'productLineName'
,
key
:
'productLineName'
,
},
]
}
/>
<
Divider
/>
<
ProDescriptions
title=
{
currDrawer
?.
item
?.
logTypeName
+
'信息'
}
request=
{
async
()
=>
{
const
{
data
}
=
await
doFetch
({
url
:
urlParams_resume
.
detail
,
params
:
{
id
:
currDrawer
?.
item
?.
id
},
});
return
{
success
:
true
,
data
:
data
?.
data
?.
resume
,
};
}
}
columns=
{
currfields
[
currDrawer
?.
item
?.
logType
]
}
/>
</
DrawerPro
>
</
div
>
</
div
>
);
);
}
}
...
...
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