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
d81f1046
Commit
d81f1046
authored
Nov 02, 2023
by
“lixuyan”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改工时管理
parent
f07d4d6b
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
337 additions
and
241 deletions
+337
-241
Search.vue
...ws/assemblyPlanManagement/TimeToSee/components/Search.vue
+1
-6
productionTable.vue
...lyPlanManagement/TimeToSee/components/productionTable.vue
+38
-22
temporaryTable.vue
...blyPlanManagement/TimeToSee/components/temporaryTable.vue
+115
-80
index.vue
...-mes/src/views/assemblyPlanManagement/TimeToSee/index.vue
+11
-3
Search.vue
.../taskExecution/components/TimeToSee/components/Search.vue
+1
-6
productionTable.vue
...ution/components/TimeToSee/components/productionTable.vue
+34
-15
temporaryTable.vue
...cution/components/TimeToSee/components/temporaryTable.vue
+115
-80
index.vue
...es/src/views/taskExecution/components/TimeToSee/index.vue
+22
-29
No files found.
applications/dee-mes/src/views/assemblyPlanManagement/TimeToSee/components/Search.vue
View file @
d81f1046
...
...
@@ -30,10 +30,6 @@
</el-form-item>
<el-form-item
label=
"是否确认: "
>
<el-select
v-model=
"form.isConfirmCode"
clearable
placeholder=
"请选择确认状态"
class=
"input-with-select el-input--small"
>
<el-option
label=
"全部"
value=
""
/>
<el-option
label=
"已确认"
value=
"Y"
...
...
@@ -86,9 +82,8 @@ export default {
aoName
:
''
,
// 关键字
actualEnd
:
''
,
// 结束时间
isConfirmCode
:
''
}
this
.
$emit
(
'init'
)
this
.
$emit
(
'init'
,
this
.
form
)
},
// 查询
onSubmit
()
{
...
...
applications/dee-mes/src/views/assemblyPlanManagement/TimeToSee/components/productionTable.vue
View file @
d81f1046
...
...
@@ -90,7 +90,6 @@ export default {
this
.
setDefaultColums
()
},
mounted
()
{
// this.init()
},
methods
:
{
// 合计
...
...
@@ -125,7 +124,7 @@ export default {
init
(
form
)
{
this
.
tableData
=
[]
// 设置数据
this
.
form
=
form
form
?
this
.
form
=
form
:
this
.
form
this
.
loading
=
true
const
params
=
{
'pageFrom'
:
this
.
tablePagination
.
currentPage
,
...
...
@@ -138,24 +137,29 @@ export default {
'fieldName'
:
'extProcessSkillUser.dxUserInfoId'
,
'operator'
:
'EQ'
,
'value'
:
localStorage
.
getItem
(
'userId'
)
// 'value': 162678
2148600
// 'value': 162678
1929107
},
{
'fieldName'
:
'joExecutePlan.extProcessPlan.serialNumber'
,
'operator'
:
'LIKE'
,
'value'
:
form
.
aoName
// 'value': 'AOR-CAS-CA-53-D2701001-0500-001'
},
{
'fieldName'
:
'joExecutePlan.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
},
{
'fieldName'
:
'isConfirm'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
}
// {
// 'fieldName': 'joExecutePlan.jrExecutePlans.actualEnd',
// 'operator': 'BTWN',
// 'value': form.actualEnd[0],
// 'value1': form.actualEnd[1]
// },
// {
// 'fieldName': 'joExecutePlan.state',
// 'operator': 'EQ',
// 'value': form.state
// },
// {
// 'fieldName': 'isConfirm',
// 'operator': 'EQ',
// 'value': form.isConfirmCode
// }
],
'operator'
:
'AND'
}
...
...
@@ -184,15 +188,27 @@ export default {
],
'toValidateKeys'
:
''
}
if
(
form
.
state
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'joExecutePlan.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
})
}
if
(
form
.
isConfirmCode
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'isConfirm'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
})
}
if
(
form
.
actualEnd
&&
form
.
actualEnd
.
length
>
0
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
(
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'joExecutePlan.jrExecutePlans.actualEnd'
,
'operator'
:
'BTWN'
,
'value'
:
form
.
actualEnd
[
0
],
'value1'
:
form
.
actualEnd
[
1
]
}
)
})
}
// 发送请求
post
(
`/ProdTask/listCustomQuery`
,
params
).
then
(
res
=>
{
...
...
applications/dee-mes/src/views/assemblyPlanManagement/TimeToSee/components/temporaryTable.vue
View file @
d81f1046
...
...
@@ -26,17 +26,14 @@
</section>
</
template
>
<
script
>
// import { post } from '@/utils/http'
// import { getTemp, confirmTempWorkHour } from '@/api/programExecutionManagement.js'
import
{
post
}
from
'@/utils/http'
export
default
{
components
:
{
},
data
()
{
return
{
// 加载中
loading
:
false
,
// 搜索条件
form
:
[]
,
form
:
{}
,
// 分页
tablePagination
:
{
currentPage
:
1
,
...
...
@@ -51,15 +48,36 @@ export default {
// 所有可动态配置的表格列
colums
:
[
{
minWidth
:
'100'
,
title
:
'任务编号'
,
show
:
true
,
key
:
'tempWorkHour.billNo'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工时类型'
,
show
:
true
,
key
:
'tempWorkHour.workType'
,
sortable
:
true
},
{
minWidth
:
'70'
,
title
:
'站位'
,
show
:
true
,
key
:
'tempWorkHour.name'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工时类型'
,
show
:
true
,
key
:
'tempWorkHour.workType'
,
sortable
:
true
,
fildProp
:
{
type
:
'DictDataVO'
,
rule
:
{
dictTypeCode
:
'WorkType'
}
}
},
{
minWidth
:
'70'
,
title
:
'站位'
,
show
:
true
,
key
:
'tempWorkHour.extStandPosition.extcode'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工作内容'
,
show
:
true
,
key
:
'tempWorkHour.workContent'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'开始时间'
,
show
:
true
,
key
:
'tempWorkHour.startTime'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'结束时间'
,
show
:
true
,
key
:
'tempWorkHour.endTime'
,
sortable
:
true
},
{
minWidth
:
'110'
,
title
:
'本人工时(min)'
,
show
:
true
,
key
:
'workHour'
,
sortable
:
true
},
{
minWidth
:
'110'
,
title
:
'完成工时(min)'
,
show
:
true
,
key
:
'workHours'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'工时状态'
,
show
:
true
,
key
:
'tempWorkHour.stateName'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'是否确认'
,
show
:
true
,
key
:
'tempWorkHour.isConfirmName'
,
sortable
:
true
}
{
minWidth
:
'110'
,
title
:
'完成工时(min)'
,
show
:
true
,
key
:
'tempWorkHour.workHours'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'工时状态'
,
show
:
true
,
key
:
'tempWorkHour.state'
,
sortable
:
true
,
formatter
(
row
,
column
)
{
if
(
row
.
tempWorkHour
.
state
===
'Audited'
)
{
return
'己审核'
}
else
if
(
row
.
tempWorkHour
.
state
===
'Pending_Review'
)
{
return
'待审核'
}
else
if
(
row
.
tempWorkHour
.
state
===
'TF_Reviewing'
)
{
return
'审核中'
}
}
},
{
minWidth
:
'120'
,
title
:
'是否确认'
,
show
:
true
,
key
:
'isConfirmCode'
,
sortable
:
true
,
formatter
(
row
,
column
)
{
if
(
row
.
isConfirmCode
===
'Y'
)
{
return
'已确认'
}
else
{
return
'未确认'
}
}
}
],
// 默认展示的表格列
tableColums
:
[],
...
...
@@ -92,13 +110,10 @@ export default {
this
.
setDefaultColums
()
},
mounted
()
{
this
.
init
()
//
this.init()
},
methods
:
{
getSummaries
(
param
)
{
// this.$nextTick(() => {
// this.$refs.table.$refs.deeTable.doLayout()
// })
this
.
showSummary
=
true
const
{
columns
,
data
}
=
param
const
sums
=
[]
...
...
@@ -128,71 +143,83 @@ export default {
},
// 初始化数据
init
(
form
,
page
)
{
page
&&
(
this
.
tablePagination
.
currentPage
=
1
)
console
.
log
(
form
,
this
.
form
)
// 设置数据
this
.
loading
=
true
this
.
tableData
=
[]
form
&&
form
.
length
?
this
.
form
=
form
:
this
.
form
=
[{
fieldName
:
'state'
,
operator
:
'LIKE'
,
value
:
'Audited'
form
?
this
.
form
=
form
:
this
.
form
const
params
=
{
'pageFrom'
:
this
.
tablePagination
.
currentPage
,
'pageSize'
:
this
.
tablePagination
.
pageSize
,
'searchItems'
:
{
'items'
:
[
{
fieldName
:
'dxUserInfoId'
,
operator
:
'EQ'
,
value
:
localStorage
.
getItem
(
'userId'
)
},
{
fieldName
:
'isConfirmCode
'
,
fieldName
:
'tempWorkHour.billNo
'
,
operator
:
'LIKE'
,
value
:
'N'
}]
// const params = {
// 'indices': [
// 'TempWorkHourAssign'
// ],
// 'pageFrom': page || this.tablePagination.currentPage,
// 'pageSize': this.tablePagination.pageSize,
// 'searchItems': {
// 'items': [
// ...this.form,
// {
// fieldName: 'dxUserId',
// operator: 'EQ',
// value: localStorage.getItem('userId')
// }
// ],
// 'operator': 'AND'
// },
// 'sortItem': [
// {
// 'fieldName': 'modifyTime',
// 'sortOrder': 'desc'
// }
// ]
// }
// // 发送请求
// getTemp(params).then(res => {
// this.tableData = []
// res.items.content.map(item => {
// item.tempWorkHour.isConfirmName = item.isConfirmName
// this.tableData.push({
// ...item,
// workHours: item.tempWorkHour.workHours
// })
// })
// this.tablePagination.total = res.items.totalElements
// // 清空子表数据
// // this.$emit('clear')
// }).catch(err => console.log(err)).finally(() => {
// this.loading = false
// this.$nextTick(() => {
// this.sumRowShow = true
// })
// })
value
:
form
.
keyWord
||
''
}
],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'tempWorkHour'
,
'openProps'
:
[
{
'name'
:
'extStandPosition'
}
]
}
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
if
(
form
.
state
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'tempWorkHour.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
})
}
if
(
form
.
isConfirmCode
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'isConfirmCode'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
})
}
if
(
form
.
actualEnd
&&
form
.
actualEnd
.
length
>
0
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'tempWorkHour.endTime'
,
'operator'
:
'BTWN'
,
'value'
:
form
.
actualEnd
[
0
],
'value1'
:
form
.
actualEnd
[
1
]
})
}
// 发送请求
this
.
$api
.
searchApi
(
'TempWorkHourAssign'
,
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
items
.
content
this
.
tablePagination
.
total
=
res
.
items
.
totalElements
}).
catch
(
err
=>
console
.
log
(
err
)).
finally
(()
=>
{
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
this
.
sumRowShow
=
true
})
})
},
// 确认
confirmHandle
()
{
if
(
!
this
.
selectionRow
.
length
)
return
this
.
$utils
.
showMessageWarning
(
'请选择需要操作的数据'
)
const
confirmFlag
=
this
.
selectionRow
.
find
(
row
=>
(
row
.
isConfirm
Name
===
'Y'
||
row
.
isConfirmNam
e
===
'已确认'
))
const
confirmFlag
=
this
.
selectionRow
.
find
(
row
=>
(
row
.
isConfirm
Code
===
'Y'
||
row
.
isConfirmCod
e
===
'已确认'
))
if
(
confirmFlag
)
return
this
.
$utils
.
showMessageWarning
(
'已确认的数据无法再次进行确认,请重新选择'
)
this
.
$confirm
(
'是否对选中的数据进行确认?'
,
'提示'
,
{
confirmButtonText
:
'确认'
,
...
...
@@ -200,15 +227,23 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
this
.
loading
=
true
// const ids = this.selectionRow.map(row => row.id)
// confirmTempWorkHour(ids).then(res => {
// this.$utils.showMessageSuccess('确认成功')
// this.init('', 1)
// }).catch(err => {
// console.log(err)
// }).finally(() => {
// this.loading = false
// })
const
params
=
[]
this
.
selectionRow
.
map
(
row
=>
{
params
.
push
({
id
:
row
.
id
,
operator
:
'MODIFY'
,
isConfirmCode
:
'Y'
})
})
post
(
`/TempWorkHourAssign/recursions`
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'确认成功'
)
this
.
tablePagination
.
currentPage
=
1
this
.
init
(
this
.
form
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
finally
(()
=>
{
this
.
loading
=
false
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
...
...
applications/dee-mes/src/views/assemblyPlanManagement/TimeToSee/index.vue
View file @
d81f1046
<
template
>
<section
class=
"time-to-see"
>
<Search
:active-name=
"activeName"
@
init=
"
(form)=>tableInit(form)
"
/>
<Search
:active-name=
"activeName"
@
init=
"
searchData
"
/>
<dee-tools
:tools=
"tools"
mode=
"normal"
:collapse=
"false"
/>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"tab
leInit(false)
"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"tab
Click
"
>
<el-tab-pane
label=
"生产工时"
name=
"product"
>
<ProductionTable
ref=
"productTable"
/>
</el-tab-pane>
...
...
@@ -34,10 +34,18 @@ export default {
handler
:
{
click
:
()
=>
this
.
confirmHandle
()
}
}]
}],
initForm
:
{}
}
},
methods
:
{
searchData
(
form
)
{
this
.
initForm
=
form
this
.
tableInit
(
this
.
initForm
)
},
tabClick
()
{
this
.
tableInit
(
this
.
initForm
)
},
tableInit
(
form
)
{
if
(
this
.
activeName
===
'product'
)
{
this
.
$refs
.
productTable
.
init
(
form
,
1
)
...
...
applications/dee-mes/src/views/taskExecution/components/TimeToSee/components/Search.vue
View file @
d81f1046
...
...
@@ -30,10 +30,6 @@
</el-form-item>
<el-form-item
label=
"是否确认: "
>
<el-select
v-model=
"form.isConfirmCode"
clearable
placeholder=
"请选择确认状态"
class=
"input-with-select el-input--small"
>
<el-option
label=
"全部"
value=
""
/>
<el-option
label=
"已确认"
value=
"Y"
...
...
@@ -86,9 +82,8 @@ export default {
aoName
:
''
,
// 关键字
actualEnd
:
''
,
// 结束时间
isConfirmCode
:
''
}
this
.
$emit
(
'init'
)
this
.
$emit
(
'init'
,
this
.
form
)
},
// 查询
onSubmit
()
{
...
...
applications/dee-mes/src/views/taskExecution/components/TimeToSee/components/productionTable.vue
View file @
d81f1046
...
...
@@ -90,7 +90,6 @@ export default {
this
.
setDefaultColums
()
},
mounted
()
{
// this.init()
},
methods
:
{
// 合计
...
...
@@ -125,8 +124,7 @@ export default {
init
(
form
)
{
this
.
tableData
=
[]
// 设置数据
this
.
form
=
form
console
.
log
(
111
,
form
)
form
?
this
.
form
=
form
:
this
.
form
this
.
loading
=
true
const
params
=
{
'pageFrom'
:
this
.
tablePagination
.
currentPage
,
...
...
@@ -145,24 +143,23 @@ export default {
'fieldName'
:
'joExecutePlan.extProcessPlan.serialNumber'
,
'operator'
:
'LIKE'
,
'value'
:
form
.
aoName
// 'value': 'AOR-CAS-CA-53-D2701001-0500-001'
},
}
// {
// 'fieldName': 'joExecutePlan.jrExecutePlans.actualEnd',
// 'operator': 'BTWN',
// 'value': form.actualEnd[0],
// 'value1': form.actualEnd[1]
// },
{
'fieldName'
:
'joExecutePlan.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
},
{
'fieldName'
:
'isConfirm'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
}
//
{
//
'fieldName': 'joExecutePlan.state',
//
'operator': 'EQ',
//
'value': form.state
//
},
//
{
//
'fieldName': 'isConfirm',
//
'operator': 'EQ',
//
'value': form.isConfirmCode
//
}
],
'operator'
:
'AND'
}
...
...
@@ -191,6 +188,28 @@ export default {
],
'toValidateKeys'
:
''
}
if
(
form
.
state
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'joExecutePlan.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
})
}
if
(
form
.
isConfirmCode
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'isConfirm'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
})
}
if
(
form
.
actualEnd
&&
form
.
actualEnd
.
length
>
0
)
{
params
.
searchItems
.
children
[
0
].
items
.
push
({
'fieldName'
:
'joExecutePlan.jrExecutePlans.actualEnd'
,
'operator'
:
'BTWN'
,
'value'
:
form
.
actualEnd
[
0
],
'value1'
:
form
.
actualEnd
[
1
]
})
}
// 发送请求
post
(
`/ProdTask/listCustomQuery`
,
params
).
then
(
res
=>
{
this
.
tableData
=
[]
...
...
applications/dee-mes/src/views/taskExecution/components/TimeToSee/components/temporaryTable.vue
View file @
d81f1046
...
...
@@ -26,17 +26,14 @@
</section>
</
template
>
<
script
>
// import { post } from '@/utils/http'
// import { getTemp, confirmTempWorkHour } from '@/api/programExecutionManagement.js'
import
{
post
}
from
'@/utils/http'
export
default
{
components
:
{
},
data
()
{
return
{
// 加载中
loading
:
false
,
// 搜索条件
form
:
[]
,
form
:
{}
,
// 分页
tablePagination
:
{
currentPage
:
1
,
...
...
@@ -51,15 +48,36 @@ export default {
// 所有可动态配置的表格列
colums
:
[
{
minWidth
:
'100'
,
title
:
'任务编号'
,
show
:
true
,
key
:
'tempWorkHour.billNo'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工时类型'
,
show
:
true
,
key
:
'tempWorkHour.workType'
,
sortable
:
true
},
{
minWidth
:
'70'
,
title
:
'站位'
,
show
:
true
,
key
:
'tempWorkHour.name'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工时类型'
,
show
:
true
,
key
:
'tempWorkHour.workType'
,
sortable
:
true
,
fildProp
:
{
type
:
'DictDataVO'
,
rule
:
{
dictTypeCode
:
'WorkType'
}
}
},
{
minWidth
:
'70'
,
title
:
'站位'
,
show
:
true
,
key
:
'tempWorkHour.extStandPosition.extcode'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'工作内容'
,
show
:
true
,
key
:
'tempWorkHour.workContent'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'开始时间'
,
show
:
true
,
key
:
'tempWorkHour.startTime'
,
sortable
:
true
},
{
minWidth
:
'100'
,
title
:
'结束时间'
,
show
:
true
,
key
:
'tempWorkHour.endTime'
,
sortable
:
true
},
{
minWidth
:
'110'
,
title
:
'本人工时(min)'
,
show
:
true
,
key
:
'workHour'
,
sortable
:
true
},
{
minWidth
:
'110'
,
title
:
'完成工时(min)'
,
show
:
true
,
key
:
'workHours'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'工时状态'
,
show
:
true
,
key
:
'tempWorkHour.stateName'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'是否确认'
,
show
:
true
,
key
:
'tempWorkHour.isConfirmName'
,
sortable
:
true
}
{
minWidth
:
'110'
,
title
:
'完成工时(min)'
,
show
:
true
,
key
:
'tempWorkHour.workHours'
,
sortable
:
true
},
{
minWidth
:
'120'
,
title
:
'工时状态'
,
show
:
true
,
key
:
'tempWorkHour.state'
,
sortable
:
true
,
formatter
(
row
,
column
)
{
if
(
row
.
tempWorkHour
.
state
===
'Audited'
)
{
return
'己审核'
}
else
if
(
row
.
tempWorkHour
.
state
===
'Pending_Review'
)
{
return
'待审核'
}
else
if
(
row
.
tempWorkHour
.
state
===
'TF_Reviewing'
)
{
return
'审核中'
}
}
},
{
minWidth
:
'120'
,
title
:
'是否确认'
,
show
:
true
,
key
:
'isConfirmCode'
,
sortable
:
true
,
formatter
(
row
,
column
)
{
if
(
row
.
isConfirmCode
===
'Y'
)
{
return
'已确认'
}
else
{
return
'未确认'
}
}
}
],
// 默认展示的表格列
tableColums
:
[],
...
...
@@ -92,13 +110,10 @@ export default {
this
.
setDefaultColums
()
},
mounted
()
{
this
.
init
()
//
this.init()
},
methods
:
{
getSummaries
(
param
)
{
// this.$nextTick(() => {
// this.$refs.table.$refs.deeTable.doLayout()
// })
this
.
showSummary
=
true
const
{
columns
,
data
}
=
param
const
sums
=
[]
...
...
@@ -128,71 +143,83 @@ export default {
},
// 初始化数据
init
(
form
,
page
)
{
page
&&
(
this
.
tablePagination
.
currentPage
=
1
)
console
.
log
(
form
,
this
.
form
)
// 设置数据
this
.
loading
=
true
this
.
tableData
=
[]
form
&&
form
.
length
?
this
.
form
=
form
:
this
.
form
=
[{
fieldName
:
'state'
,
operator
:
'LIKE'
,
value
:
'Audited'
form
?
this
.
form
=
form
:
this
.
form
const
params
=
{
'pageFrom'
:
this
.
tablePagination
.
currentPage
,
'pageSize'
:
this
.
tablePagination
.
pageSize
,
'searchItems'
:
{
'items'
:
[
{
fieldName
:
'dxUserInfoId'
,
operator
:
'EQ'
,
value
:
localStorage
.
getItem
(
'userId'
)
},
{
fieldName
:
'isConfirmCode
'
,
fieldName
:
'tempWorkHour.billNo
'
,
operator
:
'LIKE'
,
value
:
'N'
}]
// const params = {
// 'indices': [
// 'TempWorkHourAssign'
// ],
// 'pageFrom': page || this.tablePagination.currentPage,
// 'pageSize': this.tablePagination.pageSize,
// 'searchItems': {
// 'items': [
// ...this.form,
// {
// fieldName: 'dxUserId',
// operator: 'EQ',
// value: localStorage.getItem('userId')
// }
// ],
// 'operator': 'AND'
// },
// 'sortItem': [
// {
// 'fieldName': 'modifyTime',
// 'sortOrder': 'desc'
// }
// ]
// }
// // 发送请求
// getTemp(params).then(res => {
// this.tableData = []
// res.items.content.map(item => {
// item.tempWorkHour.isConfirmName = item.isConfirmName
// this.tableData.push({
// ...item,
// workHours: item.tempWorkHour.workHours
// })
// })
// this.tablePagination.total = res.items.totalElements
// // 清空子表数据
// // this.$emit('clear')
// }).catch(err => console.log(err)).finally(() => {
// this.loading = false
// this.$nextTick(() => {
// this.sumRowShow = true
// })
// })
value
:
form
.
keyWord
||
''
}
],
'operator'
:
'AND'
},
'openProps'
:
[
{
'name'
:
'tempWorkHour'
,
'openProps'
:
[
{
'name'
:
'extStandPosition'
}
]
}
],
'sortItem'
:
[
{
'fieldName'
:
'modifyTime'
,
'sortOrder'
:
'desc'
}
]
}
if
(
form
.
state
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'tempWorkHour.state'
,
'operator'
:
'EQ'
,
'value'
:
form
.
state
})
}
if
(
form
.
isConfirmCode
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'isConfirmCode'
,
'operator'
:
'EQ'
,
'value'
:
form
.
isConfirmCode
})
}
if
(
form
.
actualEnd
&&
form
.
actualEnd
.
length
>
0
)
{
params
.
searchItems
.
items
.
push
({
'fieldName'
:
'tempWorkHour.endTime'
,
'operator'
:
'BTWN'
,
'value'
:
form
.
actualEnd
[
0
],
'value1'
:
form
.
actualEnd
[
1
]
})
}
// 发送请求
this
.
$api
.
searchApi
(
'TempWorkHourAssign'
,
params
).
then
(
res
=>
{
this
.
tableData
=
res
.
items
.
content
this
.
tablePagination
.
total
=
res
.
items
.
totalElements
}).
catch
(
err
=>
console
.
log
(
err
)).
finally
(()
=>
{
this
.
loading
=
false
this
.
$nextTick
(()
=>
{
this
.
sumRowShow
=
true
})
})
},
// 确认
confirmHandle
()
{
if
(
!
this
.
selectionRow
.
length
)
return
this
.
$utils
.
showMessageWarning
(
'请选择需要操作的数据'
)
const
confirmFlag
=
this
.
selectionRow
.
find
(
row
=>
(
row
.
isConfirm
Name
===
'Y'
||
row
.
isConfirmNam
e
===
'已确认'
))
const
confirmFlag
=
this
.
selectionRow
.
find
(
row
=>
(
row
.
isConfirm
Code
===
'Y'
||
row
.
isConfirmCod
e
===
'已确认'
))
if
(
confirmFlag
)
return
this
.
$utils
.
showMessageWarning
(
'已确认的数据无法再次进行确认,请重新选择'
)
this
.
$confirm
(
'是否对选中的数据进行确认?'
,
'提示'
,
{
confirmButtonText
:
'确认'
,
...
...
@@ -200,15 +227,23 @@ export default {
type
:
'warning'
}).
then
(()
=>
{
this
.
loading
=
true
// const ids = this.selectionRow.map(row => row.id)
// confirmTempWorkHour(ids).then(res => {
// this.$utils.showMessageSuccess('确认成功')
// this.init('', 1)
// }).catch(err => {
// console.log(err)
// }).finally(() => {
// this.loading = false
// })
const
params
=
[]
this
.
selectionRow
.
map
(
row
=>
{
params
.
push
({
id
:
row
.
id
,
operator
:
'MODIFY'
,
isConfirmCode
:
'Y'
})
})
post
(
`/TempWorkHourAssign/recursions`
,
params
).
then
(
res
=>
{
this
.
$utils
.
showMessageSuccess
(
'确认成功'
)
this
.
tablePagination
.
currentPage
=
1
this
.
init
(
this
.
form
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
}).
finally
(()
=>
{
this
.
loading
=
false
})
}).
catch
(()
=>
{
this
.
$message
({
type
:
'info'
,
...
...
applications/dee-mes/src/views/taskExecution/components/TimeToSee/index.vue
View file @
d81f1046
<
template
>
<dee-dialog
v-if=
"visible"
title=
"工时查看"
:dialog-visible
.
sync=
"visible"
width=
"90%"
custom-class=
"mobile-dialog"
>
<section
class=
"statistical-summary-working-hours-com"
>
<Search
:active-name=
"activeName"
@
init=
"(form)=>tableInit(form) "
/>
<section
class=
"time-to-see"
>
<Search
:active-name=
"activeName"
@
init=
"searchData"
/>
<dee-tools
:tools=
"tools"
mode=
"normal"
:collapse=
"false"
/>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"tableInit(false)
"
>
<el-tabs
v-model=
"activeName"
type=
"card"
@
tab-click=
"tabClick
"
>
<el-tab-pane
label=
"生产工时"
name=
"product"
>
<ProductionTable
ref=
"productTable"
/>
</el-tab-pane>
...
...
@@ -18,7 +11,6 @@
</el-tab-pane>
</el-tabs>
</section>
</dee-dialog>
</
template
>
<
script
>
...
...
@@ -35,7 +27,6 @@ export default {
data
()
{
return
{
activeName
:
'product'
,
visible
:
false
,
// 工具栏
tools
:
[{
name
:
'确认'
,
...
...
@@ -43,19 +34,19 @@ export default {
handler
:
{
click
:
()
=>
this
.
confirmHandle
()
}
}]
}],
initForm
:
{}
}
},
methods
:
{
// 打开弹出框
open
()
{
this
.
visible
=
true
searchData
(
form
)
{
this
.
initForm
=
form
this
.
tableInit
(
this
.
initForm
)
},
handleClose
()
{
this
.
visible
=
false
tabClick
()
{
this
.
tableInit
(
this
.
initForm
)
},
tableInit
(
form
)
{
console
.
log
(
1212
,
form
)
if
(
this
.
activeName
===
'product'
)
{
this
.
$refs
.
productTable
.
init
(
form
,
1
)
}
else
{
...
...
@@ -75,7 +66,9 @@ export default {
</
script
>
<
style
lang=
"scss"
>
.statistical-summary-working-hours-com
{
.time-to-see
{
padding-top
:
10px
;
background
:
#fff
;
.dee-tools
{
float
:
right
;
position
:
relative
;
...
...
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