Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
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
TFMOM
TF-MOM-WEB
Commits
b0e93481
Commit
b0e93481
authored
Sep 15, 2023
by
xioln
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
班组新增人员、库房新增库位、移库库位选择修改
parent
bb5c0856
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
144 additions
and
6 deletions
+144
-6
index.vue
...teComponents/components/AddExtDxProductWorkUnit/index.vue
+74
-0
index.vue
...ateComponents/components/AddExtProcessSkillUser/index.vue
+68
-6
index.vue
...ponents/components/InStorageMoveWarehouseSelect/index.vue
+2
-0
No files found.
applications/dee-mes/src/privateComponents/components/AddExtDxProductWorkUnit/index.vue
0 → 100644
View file @
b0e93481
/**
* @Description: 新增库位
* @author xioln
* @date 2023-09-15
* @FilePath: applications/dee-mes/src/privateComponents/components/AddExtDxProductWorkUnit/index.vue
*/
<
template
>
<div
class=
"add-extDxProductWorkUnit"
>
<dee-as-com
ref=
"addtWorkUnit"
:form=
"form"
:lay-config=
"
{ typeName: 'ExtDxProductWorkUnit', layKey: 'addExtDxProductWorkUnit' }" />
<div
slot=
"footer"
class=
"foot-btn-box"
>
<el-button
type=
"primary"
@
click=
"submitEvent"
>
确认
</el-button>
<el-button
@
click=
"cancelEvent"
>
取消
</el-button>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'AddExtDxProductWorkUnit'
,
// name写在组件的最前方,自定义组件为必填
componentName
:
'新增库位'
,
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
()
=>
{
}
}
},
data
()
{
return
{
form
:
{}
}
},
computed
:
{},
created
()
{
// 初始化数据
},
mounted
()
{
this
.
$nextTick
(()
=>
{
if
(
this
.
basicData
.
hasOwnProperty
(
'createTime'
))
{
this
.
form
=
this
.
basicData
}
})
},
methods
:
{
submitEvent
()
{
const
currentDate
=
new
Date
()
const
addForm
=
this
.
$refs
.
addtWorkUnit
.
$refs
.
asCom
.
form
// 格式化为 "YYYY-MM-DD HH:MM:SS" 格式
const
formattedDate
=
`
${
currentDate
.
getFullYear
()}
-
${(
currentDate
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
)}
-
${
currentDate
.
getDate
().
toString
().
padStart
(
2
,
'0'
)}
${
currentDate
.
getHours
().
toString
().
padStart
(
2
,
'0'
)}
:
${
currentDate
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
)}
:
${
currentDate
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
)}
`
const
form
=
{
creator
:
{
userName
:
localStorage
.
getItem
(
'user'
)
},
createTime
:
formattedDate
,
extcode
:
addForm
.
extcode
,
isValid
:
addForm
.
isValid
}
this
.
$emit
(
'submitEvent'
,
{
formData
:
form
})
},
cancelEvent
()
{
this
.
$emit
(
'cancel'
)
}
}
}
</
script
>
<
style
lang=
'scss'
>
.add-extDxProductWorkUnit
{
.foot-btn-box
{
display
:
flex
;
margin-top
:
10px
;
justify-content
:
center
;
align-content
:
center
;
}
}
</
style
>
applications/dee-mes/src/privateComponents/components/AddExtProcessSkillUser/index.vue
View file @
b0e93481
...
...
@@ -37,12 +37,74 @@ export default {
// 初始化数据
},
methods
:
{
submitEvent
()
{
const
form
=
this
.
$refs
.
addUser
.
$children
[
0
].
$children
[
0
].
form
const
formData
=
[{
...
form
}]
this
.
$emit
(
'submitEvent'
,
{
formData
:
formData
})
async
submitEvent
()
{
// 新增班组添加人员
const
form
=
this
.
$refs
.
addUser
.
$refs
.
asCom
.
form
// 新增班组班组人员表格
const
tableData
=
this
.
$parent
.
$parent
.
$parent
.
$parent
.
form
const
tableDataList
=
[]
let
users
=
[]
if
(
form
.
hasOwnProperty
(
'dxUserInfo'
)
&&
form
.
dxUserInfo
)
{
const
params
=
{
'searchItems'
:
{
'items'
:
[
{
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'value'
:
form
.
dxUserInfo
}
],
'operator'
:
'AND'
}
}
await
this
.
$api
.
searchApi
(
'DxUserInfo'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
content
.
length
)
{
users
=
res
.
items
.
content
}
})
// 展开人员岗位信息
if
(
users
)
{
// 列表是否有数据
if
(
tableData
.
hasOwnProperty
(
'extProcessSkillUsers'
)
&&
tableData
.
extProcessSkillUsers
)
{
const
arr
=
tableData
.
extProcessSkillUsers
.
filter
(
item
=>
form
.
dxUserInfo
.
includes
(
item
.
dxUserInfoId
))
if
(
arr
.
length
!==
0
)
{
const
names
=
arr
.
map
(
item
=>
item
.
dxUserInfo
.
userName
)
return
this
.
$utils
.
showMessageWarning
(
'人员已存在:'
+
names
.
join
(
','
))
}
}
// 使用 Promise.all 来等待所有请求完成
await
Promise
.
all
(
users
.
map
(
async
(
user
,
i
)
=>
{
const
params
=
{
'openProps'
:
[{
'name'
:
'source'
}],
'searchItems'
:
{
'items'
:
[{
'fieldName'
:
'targetId'
,
'operator'
:
'EQ'
,
'value'
:
user
.
id
}],
'operator'
:
'AND'
}
}
try
{
const
post
=
await
this
.
$api
.
searchApi
(
'DxPostMemberLink'
,
params
)
if
(
post
.
items
.
content
.
length
)
{
const
postList
=
post
.
items
.
content
[
0
]
tableDataList
.
push
({
dxPost
:
postList
.
source
,
dxUserInfo
:
user
,
dxUserInfoId
:
user
.
id
,
isSkillLeader
:
form
.
isSkillLeader
,
postValidity
:
form
.
postValidity
,
remark
:
form
.
remark
,
sealNo
:
form
.
sealNo
})
}
// 判断是否是最后一个用户
if
(
i
===
users
.
length
-
1
)
{
this
.
$emit
(
'submitEvent'
,
{
formData
:
tableDataList
})
}
}
catch
(
error
)
{
console
.
error
(
'Error fetching data for user:'
,
user
.
id
,
error
)
}
}))
}
}
},
cancelEvent
()
{
this
.
$emit
(
'cancel'
)
...
...
applications/dee-mes/src/privateComponents/components/InStorageMoveWarehouseSelect/index.vue
View file @
b0e93481
...
...
@@ -101,6 +101,8 @@ export default {
const
_val
=
_get
(
this
.
form
,
this
.
itemObj
.
linkageAttr
)
if
(
_val
!==
this
.
linkageValue
)
{
this
.
linkageValue
=
_val
this
.
selVal
=
null
this
.
options
=
[]
}
}
}
...
...
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