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

修改检验派工

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