Commit 3e0c5d5b authored by jingnan's avatar jingnan 👀

Merge branch 'dev' of http://94.191.100.41/tfmom/tf-mom-web into dev

parents d322f0dd ad2dc80b
...@@ -2,6 +2,18 @@ ...@@ -2,6 +2,18 @@
<div class="instructions-disptach"> <div class="instructions-disptach">
<div class="instructions-issued-top"> <div class="instructions-issued-top">
<el-form :inline="true" :model="searchFormData" class="instructions-issued-search" label-width="50px"> <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-col :span="12">
<el-form-item label="班组:"> <el-form-item label="班组:">
<el-select v-model="searchFormData.group" placeholder="班组" @change="changeGroup"> <el-select v-model="searchFormData.group" placeholder="班组" @change="changeGroup">
...@@ -153,7 +165,8 @@ export default { ...@@ -153,7 +165,8 @@ export default {
data() { data() {
return { return {
searchFormData: { searchFormData: {
group: '' group: '',
postion: ''
}, },
groupList: [], groupList: [],
groupUserList: [], groupUserList: [],
...@@ -242,7 +255,8 @@ export default { ...@@ -242,7 +255,8 @@ export default {
], ],
groupUserTotal: 0, groupUserTotal: 0,
groupUserPage: 1, groupUserPage: 1,
mainUserId: null mainUserId: null,
postionList: []
} }
}, },
computed: { computed: {
...@@ -266,9 +280,26 @@ export default { ...@@ -266,9 +280,26 @@ export default {
} }
}, },
created() { created() {
this.getGroup() this.getStation()
// this.getGroup()
}, },
methods: { 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() { getGroup() {
this.groupList = [] this.groupList = []
this.$set(this.searchFormData, 'group', '') this.$set(this.searchFormData, 'group', '')
...@@ -278,6 +309,11 @@ export default { ...@@ -278,6 +309,11 @@ export default {
'children': [ 'children': [
{ {
'items': [ 'items': [
{
'fieldName': 'extStandPositionId',
'operator': 'EQ',
'value': this.searchFormData.postion
},
{ {
'fieldName': 'extProcessSkillUsers.dxUserInfoId', 'fieldName': 'extProcessSkillUsers.dxUserInfoId',
'operator': 'EQ', 'operator': 'EQ',
...@@ -315,7 +351,7 @@ export default { ...@@ -315,7 +351,7 @@ export default {
'toValidateKeys': '' 'toValidateKeys': ''
} }
post('/ExtProcessSkill/search', params).then(res => { 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 => { this.groupList = res.items.content.map(row => {
return { return {
value: row.id, value: row.id,
......
...@@ -160,6 +160,7 @@ export default { ...@@ -160,6 +160,7 @@ export default {
icon: '/icons/o-Referencedoc.png', icon: '/icons/o-Referencedoc.png',
handler: { handler: {
click: () => { click: () => {
if (this.status !== 'New') {
this.$confirm('您确认执行该操作吗?', '提示', { this.$confirm('您确认执行该操作吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -193,6 +194,9 @@ export default { ...@@ -193,6 +194,9 @@ export default {
// message: '已取消' // message: '已取消'
// }) // })
}) })
} else {
this.$utils.showMessageWarning('该站位还没开工')
}
} }
} }
} }
...@@ -231,8 +235,8 @@ export default { ...@@ -231,8 +235,8 @@ export default {
this.wordImgUrl = '/icons/startWork2.png' this.wordImgUrl = '/icons/startWork2.png'
this.title = '已开工' this.title = '已开工'
} else { } else {
this.wordImgUrl = '/icons/startWork1.png' this.wordImgUrl = '/icons/startWork2.png'
this.title = '未开工' this.title = '已完工'
} }
}, },
deep: true deep: true
...@@ -570,7 +574,7 @@ export default { ...@@ -570,7 +574,7 @@ export default {
this.$utils.showMessageWarning('没有站位') this.$utils.showMessageWarning('没有站位')
return return
} }
this.$utils.showMessageWarning('该站位不能开工') // this.$utils.showMessageWarning('该站位不能开工')
return return
} }
const params = { 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