Commit 642fd9a7 authored by 旭艳's avatar 旭艳

修改检验派工

parent 07c827fb
<template>
<div class="ReassignWorkersCheck">
<el-select v-model="group.id" placeholder="班组" @change="changeGroup">
<el-select v-model="group.id" placeholder="班组" style="width:20%" @change="changeGroup">
<el-option
v-for="(item, i) in groupList"
:key="item.value + i"
......
......@@ -160,6 +160,7 @@ export default {
total: 0,
pageSizes: [20, 50, 100]
},
selectionRow: [],
tools: [
{
type: 'icon',
......@@ -167,27 +168,35 @@ export default {
icon: '/icons/o-Referencedoc.png',
handler: {
click: () => {
if (this.selectionRow.length <= 0) {
this.$utils.showMessageWarning('该操作至少选择一条数据')
return
}
const user = []
this.groupUserList.forEach(item => {
if (item.isSelect) {
user.push({
subTypeName: 'CheckOut',
operator: 'ADD',
extProcessSkillUserId: item.id,
extProcessSkillUserIdType: item.subTypeName,
isMasterOperator: false,
taskState: 'N',
extProcessSkillId: item.extProcessSkillId,
extProcessSkillIdType: item.extProcessSkillIdType
})
}
})
if (user.length <= 0) {
this.$utils.showMessageWarning('请选择检验派工人员')
return
}
this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const arr = []
const user = []
this.groupUserList.forEach(item => {
if (item.isSelect) {
user.push({
subTypeName: 'CheckOut',
operator: 'ADD',
extProcessSkillUserId: item.id,
extProcessSkillUserIdType: item.subTypeName,
isMasterOperator: false,
taskState: 'N',
extProcessSkillId: item.extProcessSkillId,
extProcessSkillIdType: item.extProcessSkillIdType
})
}
})
this.selectionRow.map(item => {
arr.push(
{
......@@ -203,6 +212,10 @@ export default {
type: 'success',
message: '提交成功!'
})
this.groupUserPage = 1
this.groupUserList = []
this.groupUserTotal = 0
this.getGroupUser()
this.getTableData()
})
.catch((err) => console.log(err))
......@@ -352,7 +365,14 @@ export default {
if (this.groupList.length > 0) {
this.$set(this.searchFormData, 'group', this.groupList[0].value)
this.$set(this.searchFormData, 'groupName', this.groupList[0].label)
this.groupUserPage = 1
this.groupUserList = []
this.groupUserTotal = 0
this.getGroupUser()
} else {
this.groupUserPage = 1
this.groupUserList = []
this.groupUserTotal = 0
}
}
})
......@@ -363,6 +383,7 @@ export default {
this.$set(this.searchFormData, 'group', group && group.value || '')
this.groupUserPage = 1
this.groupUserList = []
this.groupUserTotal = 0
this.getGroupUser()
},
tabClick(tab) {
......
......@@ -152,6 +152,7 @@
</div>
<div class="more-bar">
<span v-if="groupUserList.length < groupUserTotal" class="more" @click="getMoreData">加载更多</span>
<span v-else-if="groupUserList.length===0">暂无数据</span>
<span v-else>已全部加载!</span>
</div>
</div>
......@@ -195,6 +196,7 @@ export default {
total: 0,
pageSizes: [20, 50, 100]
},
selectionRow: [],
tools: [
{
type: 'icon',
......@@ -202,32 +204,40 @@ export default {
icon: '/icons/o-Referencedoc.png',
handler: {
click: () => {
if (this.selectionRow.length <= 0) {
this.$utils.showMessageWarning('该操作至少选择一条数据')
return
}
const user = []
this.groupUserList.forEach(item => {
if (item.isSelect) {
if (item.id === this.mainUserId) {
item.isMasterOperator = true
} else {
item.isMasterOperator = false
}
user.push({
subTypeName: 'FitOut',
operator: 'ADD',
extProcessSkillUserId: item.id,
extProcessSkillUserIdType: item.subTypeName,
isMasterOperator: item.isMasterOperator,
taskState: 'N',
extProcessSkillId: item.extProcessSkillId,
extProcessSkillIdType: item.extProcessSkillIdType
})
}
})
if (user.length <= 0) {
this.$utils.showMessageWarning('请选择执行派工人员')
return
}
this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const arr = []
const user = []
this.groupUserList.forEach(item => {
if (item.isSelect) {
if (item.id === this.mainUserId) {
item.isMasterOperator = true
} else {
item.isMasterOperator = false
}
user.push({
subTypeName: 'FitOut',
operator: 'ADD',
extProcessSkillUserId: item.id,
extProcessSkillUserIdType: item.subTypeName,
isMasterOperator: item.isMasterOperator,
taskState: 'N',
extProcessSkillId: item.extProcessSkillId,
extProcessSkillIdType: item.extProcessSkillIdType
})
}
})
this.selectionRow.map(item => {
arr.push(
{
......@@ -243,6 +253,10 @@ export default {
type: 'success',
message: '提交成功!'
})
// this.groupUserPage = 1
// this.groupUserList = []
// this.groupUserTotal = 0
// this.getGroupUser()
this.getTableData()
})
.catch((err) => console.log(err))
......@@ -361,6 +375,8 @@ export default {
this.$set(this.searchFormData, 'group', this.groupList[0].value)
this.$set(this.searchFormData, 'groupName', this.groupList[0].label)
this.getTableData()
} else {
this.getTableData()
}
})
},
......@@ -381,8 +397,9 @@ export default {
},
getTableData() {
this.groupUserPage = 1
this.tableData = []
this.groupUserTotal = 0
this.groupUserList = []
this.tableData = []
this.mainUserId = null
if (this.activeName === '1') {
if (this.$refs.detailComAlready) {
......
......@@ -87,12 +87,12 @@
<div class="right-text"><span>当月完成任务:</span><span>{{ item.finishCount }}</span></div>
<div class="right-text"><span>当月完成工时:</span><span>{{ item.finishWork }}(h)</span></div>
<el-tooltip placement="top">
<div slot="content">
<div v-if="item.extProcessSkillUsers" slot="content">
<span v-for="user in item.extProcessSkillUsers" :key="user.id">
{{ user.dxUserInfo.name }}
</span>
</div>
<div class="right-text overfllowhind">
<div v-if="item.extProcessSkillUsers" class="right-text overfllowhind">
<span>班组长:</span>
<span v-for="user in item.extProcessSkillUsers" :key="user.id">
{{ user.dxUserInfo.name }}
......@@ -103,6 +103,7 @@
</div>
<div class="more-bar">
<span v-if="groupDropList.length < groupTotal" class="more" @click="getMoreData">加载更多</span>
<span v-else-if="groupDropList.length===0">暂无数据</span>
<span v-else>已全部加载!</span>
</div>
</div>
......@@ -153,6 +154,7 @@ export default {
total: 0,
pageSizes: [20, 50, 100]
},
selectionRow: [],
tools: [
{
type: 'icon',
......@@ -161,6 +163,14 @@ export default {
handler: {
click: () => {
if (this.status !== 'New') {
if (this.selectionRow.length <= 0) {
this.$utils.showMessageWarning('该操作至少选择一条数据')
return
}
if (!this.group) {
this.$utils.showMessageWarning('请选择下发班组')
return
}
this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
......@@ -184,6 +194,10 @@ export default {
type: 'success',
message: '提交成功!'
})
this.groupPage = 1
this.groupTotal = 0
this.groupDropList = []
this.getGroupList()
this.getInstructionsIssuedListTo()
})
.catch((err) => console.log(err))
......@@ -360,6 +374,9 @@ export default {
this.$set(this.searchFormData, 'postionName', this.postionList[0].label)
this.$set(this.searchFormData, 'postionId', this.postionList[0].id)
this.getSortiesList()
this.groupPage = 1
this.groupTotal = 0
this.groupDropList = []
this.getGroupList()
}
}
......@@ -370,6 +387,9 @@ export default {
this.$set(this.searchFormData, 'postionName', postion && postion.label || '')
this.$set(this.searchFormData, 'postionId', postion && postion.id || '')
this.getSortiesList()
this.groupPage = 1
this.groupTotal = 0
this.groupDropList = []
this.getGroupList()
},
changeSorties() {
......@@ -383,6 +403,10 @@ export default {
this.activeName = tab.index
if (this.activeName === '1') {
this.defaultPercent = 100
this.groupPage = 1
this.groupTotal = 0
this.groupDropList = []
this.getGroupList()
} else {
this.defaultPercent = 80
}
......@@ -605,6 +629,8 @@ export default {
type: 'success',
message: '开工成功!'
})
this.status = res.items.planState
this.getTableData()
})
.catch((err) => console.log(err))
.finally(() => {})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment