Browse Source

优化分配任务接口

master
李磊 3 years ago
parent
commit
f663aa49e0
  1. 60
      src/views/allot/components/chengya_list.vue

60
src/views/allot/components/chengya_list.vue

@ -187,9 +187,9 @@ export default {
pageNum: 1, //
pageSize: 20, //
orderBy: 'shouliriqi desc',
shiyongdanwei: undefined,
shebeizhongleidaima: '',
bjState: '2'
shiyongdanwei: undefined,
shebeizhongleidaima: '',
bjState: '2'
},
renwudan: {
teamId: '',
@ -214,7 +214,7 @@ export default {
showLoading: true,
allotSbzl: '',
teams: [],
bjdids: '',
bjdIds: [],
dialogXianchangVisible: false,
dialogXcjyVisible: false,
bjdZhongjian: {
@ -298,13 +298,8 @@ export default {
this.$message({ message: '请在列表选择要操作的数据。', type: 'warning' })
return false
}
for (let i = 0; i < this.multipleSelection.length; i++) {
if (i === 0) {
this.bjdIds = this.multipleSelection[i].bjdId
} else {
this.bjdIds = this.bjdIds + ',' + this.multipleSelection[i].bjdId
}
}
this.bjdIds.length = 0
this.bjdIds = this.$refs.list.selection.map(rw => rw.bjdId)
this.apibjd({
url: '/renwu/getAllotBaseList',
method: 'post',
@ -333,14 +328,8 @@ export default {
this.$message({ message: '请在列表选择要退回的数据。', type: 'warning' })
return false
}
let bjdIds = ''
for (let i = 0; i < this.multipleSelection.length; i++) {
if (i === 0) {
bjdIds = this.multipleSelection[i].bjdId
} else {
bjdIds = bjdIds + ',' + this.multipleSelection[i].bjdId
}
}
this.bjdIds.length = 0
this.bjdIds = this.$refs.list.selection.map(rw => rw.bjdId)
//
for (let i = 0; i < this.multipleSelection.length; i++) {
if (this.multipleSelection[i].allotNum !== this.multipleSelection[i].totalNum) {
@ -356,7 +345,7 @@ export default {
url: '/bjd/returnToBjd',
method: 'get',
params: {
bjdIds: bjdIds,
bjdIds: this.bjdIds,
reason: value
}
}).then(data => {
@ -378,15 +367,13 @@ export default {
this.$message({ message: '请在列表选择要作废的数据。', type: 'warning' })
return false
}
let bjdIds = ''
for (let i = 0; i < this.multipleSelection.length; i++) {
if (i === 0) {
bjdIds = this.multipleSelection[i].bjdId
} else {
bjdIds = bjdIds + ',' + this.multipleSelection[i].bjdId
}
if (this.multipleSelection.length > 1) {
this.$message({ message: '请选择单条报检单进行作废。', type: 'warning' })
return false
}
this.$prompt('共选择了' + this.multipleSelection.length + '台设备进行作废,请输入作废原因!', '提示', {
this.bjdIds.length = 0
this.bjdIds = this.$refs.list.selection[0].bjdId
this.$prompt('请输入作废原因!', '提示', {
inputType: 'textarea',
confirmButtonText: '确定',
cancelButtonText: '取消'
@ -399,9 +386,7 @@ export default {
url: '/bjd/zfDbRenwuByBjdId',
method: 'get',
params: {
bjdIds: this.$refs.list.selection.map(rw => {
return rw.bjdId
}).join(','),
bjdIds: this.bjdIds[0],
reason: value
}
}).then(data => {
@ -434,12 +419,12 @@ export default {
return false
}
this.allotList = []
this.bjdIds = bjdid
this.bjdIds = [bjdid]
this.apibjd({
url: '/renwu/getAllotBaseList',
method: 'post',
data: {
bjdIds: bjdid
bjdIds: this.bjdIds
}
}).then(data => {
this.allotList = data.list
@ -452,7 +437,7 @@ export default {
})
},
clearSearch() {
this.listQuery.bjState="2"
this.listQuery.bjState="2"
this.getList()
},
// getAllotListByBjdId
@ -526,7 +511,7 @@ export default {
url: '/renwu/getAllotBaseList',
method: 'post',
data: {
bjdIds: this.multipleSelection[0].bjdId
bjdIds: [this.multipleSelection[0].bjdId]
}
}).then(data => {
this.allotList = data.list
@ -594,7 +579,10 @@ export default {
renwuList: this.selection,
renlingren: this.renlingren,
renwudan: this.renwudan,
bjdids: this.bjdIds
bjdIds: this.bjdIds
},
paramsSerializer: function(data) {
return require('qs').stringify(data, { indices: false })
}
}).then(() => {
this.multipleSelection = []

Loading…
Cancel
Save