Commit 09746d88 authored by “lixuyan”'s avatar “lixuyan”

修改重派功能

parent 03ddbe34
<template>
<div class="ReassignWorkersCheck">
<el-select v-model="group.id" placeholder="班组" @change="changeGroup">
<el-option
v-for="(item, i) in groupList"
:key="item.value + i"
:label="item.label"
:value="item.value"
/>
</el-select>
<dee-up-table
table-height="auto"
selection-row
......@@ -16,6 +24,7 @@
export default {
name: 'ReassignWorkersCheck',
componentName: '检验执行重新派工',
inject: ['searchFormData'],
props: {
form: {
type: Object,
......@@ -24,11 +33,20 @@ export default {
basicData: {
type: Object,
default: () => {}
},
parentTableData: {
type: Object,
default: () => {}
}
},
data() {
const that = this
return {
group: {
id: '',
name: ''
},
groupList: [],
tools: [{
name: '新增',
icon: '/icons/c-add.png',
......@@ -115,7 +133,7 @@ export default {
this.tableData = [...this.basicData.prodTask.filter(item => item.subTypeName === 'CheckOut')]
}
}
this.getOpertorList()
this.getGroup()
},
deep: true,
immediate: true
......@@ -126,43 +144,96 @@ export default {
mounted() {
},
methods: {
// 操作者下拉框修改,已选的人不能再选
changeOpertotList() {
const arr = []
this.filterData.forEach(element => {
arr.push(element.extProcessSkillUserId)
})
this.opertorList.forEach(item => {
if (arr.includes(item.id)) {
item.disabled = true
} else {
item.disabled = false
changeGroup() {
const group = this.groupList.find(r => r.value === this.group.id)
this.$set(this.group, 'name', group && group.label || '')
this.$set(this.group, 'id', group && group.value || '')
this.getGroupUser()
},
getGroup() {
const params = {
'searchItems': {
'children': [
{
'items': [
{
'fieldName': 'extStandPositionId',
'operator': 'EQ',
'value': this.searchFormData.postion
},
{
'fieldName': 'isValid',
'operator': 'EQ',
'value': 'Y'
},
{
'fieldName': 'skillType',
'operator': 'EQ',
'value': 'CheckOut'
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
this.$api.searchApi('ExtProcessSkill', params).then(res => {
if (res.items && res.items.content) {
this.groupList = res.items.content.map(row => {
return {
value: row.id,
label: row.resName
}
})
if (this.groupList.length > 0) {
this.$set(this.group, 'id', this.groupList[0].value)
this.$set(this.group, 'name', this.groupList[0].label)
this.getGroupUser()
}
}
})
},
getOpertorList() {
getGroupUser() {
const params = {
'pageFrom': 1,
'pageSize': 9999,
'searchItems': {
'children': [{
'items': [{
'fieldName': 'extProcessSkillId',
'operator': 'EQ',
'value': this.basicData.extProcessSkillId
}],
'operator': 'AND'
}],
'children': [
{
'items': [
{
'fieldName': 'extProcessSkillId',
'operator': 'EQ',
'value': this.group.id
}
],
'operator': 'AND'
}
],
'items': [],
'operator': 'AND'
},
'openProps': [{
'name': 'extProcessSkill'
}],
'sortItem': [{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}],
'openProps': [
{
'name': 'extProcessSkill'
}
],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'toValidateKeys': ''
}
this.$api.searchApi('ExtProcessSkillUser', params).then(res => {
......@@ -182,6 +253,20 @@ export default {
}
})
},
// 操作者下拉框修改,已选的人不能再选
changeOpertotList() {
const arr = []
this.filterData.forEach(element => {
arr.push(element.extProcessSkillUserId)
})
this.opertorList.forEach(item => {
if (arr.includes(item.id)) {
item.disabled = true
} else {
item.disabled = false
}
})
},
handleSelectionChange(val) {
this.selectedRow = val
},
......
......@@ -119,6 +119,11 @@
<script>
import { post } from '@/utils/http'
export default {
provide() {
return {
searchFormData: this.searchFormData
}
},
data() {
return {
searchFormData: {
......
......@@ -228,7 +228,7 @@ export default {
watch: {
status: {
handler(val) {
if (val === 'New') {
if (val === 'New' || val === '') {
this.wordImgUrl = '/icons/startWork1.png'
this.title = '未开工'
} else if (val === 'Run') {
......@@ -306,7 +306,8 @@ export default {
this.$set(this.searchFormData, 'sorties', this.sortiesData[0].value)
this.$set(this.searchFormData, 'sortiesName', this.sortiesData[0].label)
this.$set(this.searchFormData, 'workId', this.sortiesData[0].postionId)
this.status = res.items.content[0].extPosition[0].extPositionPlans[0].planState
this.$set(this, 'status', this.sortiesData[0].status)
// this.status = res.items.content[0].extPosition[0].extPositionPlans[0].planState
this.getTableData()
}
})
......@@ -574,6 +575,10 @@ export default {
this.$utils.showMessageWarning('没有站位')
return
}
if (this.status === '') {
this.$utils.showMessageWarning('该站位下没有生成计划')
return
}
// this.$utils.showMessageWarning('该站位不能开工')
return
}
......
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