Commit ad2dc80b authored by 旭艳's avatar 旭艳

修改指令下发限制条件

parent be3a6947
......@@ -2,6 +2,18 @@
<div class="instructions-disptach">
<div class="instructions-issued-top">
<el-form :inline="true" :model="searchFormData" class="instructions-issued-search" label-width="50px">
<el-col :span="12">
<el-form-item label="站位:">
<el-select v-model="searchFormData.postion" placeholder="站位" @change="changePostion">
<el-option
v-for="item in postionList"
:key="item.id"
:label="item.extcode"
:value="item.id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班组:">
<el-select v-model="searchFormData.group" placeholder="班组" @change="changeGroup">
......@@ -153,7 +165,8 @@ export default {
data() {
return {
searchFormData: {
group: ''
group: '',
postion: ''
},
groupList: [],
groupUserList: [],
......@@ -242,7 +255,8 @@ export default {
],
groupUserTotal: 0,
groupUserPage: 1,
mainUserId: null
mainUserId: null,
postionList: []
}
},
computed: {
......@@ -266,9 +280,26 @@ export default {
}
},
created() {
this.getGroup()
this.getStation()
// this.getGroup()
},
methods: {
getStation() {
this.$api.searchApi('ExtStandPosition', {}).then(res => {
if (res.items.content && res.items.content.length > 0) {
this.postionList = res.items.content
this.$set(this.searchFormData, 'postion', this.postionList[0].id)
this.$set(this.searchFormData, 'postionName', this.postionList[0].extcode)
this.getGroup()
}
}).catch(err => console.log(err)).finally(() => {
})
},
changePostion() {
const postion = this.postionList.find(r => r.id === this.searchFormData.postion)
this.$set(this.searchFormData, 'postionName', postion && postion.extcode || '')
this.getGroup()
},
getGroup() {
this.groupList = []
this.$set(this.searchFormData, 'group', '')
......@@ -278,6 +309,11 @@ export default {
'children': [
{
'items': [
{
'fieldName': 'extStandPositionId',
'operator': 'EQ',
'value': this.searchFormData.postion
},
{
'fieldName': 'extProcessSkillUsers.dxUserInfoId',
'operator': 'EQ',
......@@ -315,7 +351,7 @@ export default {
'toValidateKeys': ''
}
post('/ExtProcessSkill/search', params).then(res => {
if (res.items && res.items.content) {
if (res.items && res.items.content && res.items.content.length > 0) {
this.groupList = res.items.content.map(row => {
return {
value: row.id,
......
......@@ -160,39 +160,43 @@ export default {
icon: '/icons/o-Referencedoc.png',
handler: {
click: () => {
this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const arr = []
this.selectionRow.map(item => {
arr.push(
{
id: item.id,
operator: 'MODIFY',
planState: 'Issued',
extProcessSkillId: item.skill,
extProcessSkillIdType: item.skillType
}
)
})
post('/JoExecutePlan/recursions', arr)
.then((res) => {
this.$message({
type: 'success',
message: '提交成功!'
})
this.getInstructionsIssuedListTo()
if (this.status !== 'New') {
this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const arr = []
this.selectionRow.map(item => {
arr.push(
{
id: item.id,
operator: 'MODIFY',
planState: 'Issued',
extProcessSkillId: item.skill,
extProcessSkillIdType: item.skillType
}
)
})
.catch((err) => console.log(err))
.finally(() => {})
}).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// })
})
post('/JoExecutePlan/recursions', arr)
.then((res) => {
this.$message({
type: 'success',
message: '提交成功!'
})
this.getInstructionsIssuedListTo()
})
.catch((err) => console.log(err))
.finally(() => {})
}).catch(() => {
// this.$message({
// type: 'info',
// message: '已取消'
// })
})
} else {
this.$utils.showMessageWarning('该站位还没开工')
}
}
}
}
......@@ -231,8 +235,8 @@ export default {
this.wordImgUrl = '/icons/startWork2.png'
this.title = '已开工'
} else {
this.wordImgUrl = '/icons/startWork1.png'
this.title = '未开工'
this.wordImgUrl = '/icons/startWork2.png'
this.title = '已完工'
}
},
deep: true
......@@ -570,7 +574,7 @@ export default {
this.$utils.showMessageWarning('没有站位')
return
}
this.$utils.showMessageWarning('该站位不能开工')
// this.$utils.showMessageWarning('该站位不能开工')
return
}
const params = {
......
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