Browse Source

修复作废失败的问题

master
李磊 3 years ago
parent
commit
863d3e5c5d
  1. 21
      src/views/bjd/dj_list.vue
  2. 23
      src/views/bjd/dt_list.vue
  3. 21
      src/views/bjd/jj_list.vue

21
src/views/bjd/dj_list.vue

@ -393,27 +393,17 @@ export default {
})
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
this.$prompt('请输入作废原因', '共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
}).then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: { reason: value, bjdId: this.ids },
params: { reason: value, bjdId: this.multipleSelection[i].id },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
@ -421,15 +411,14 @@ export default {
this.$notify.success('操作成功!')
this.getList()
})
})
.catch(() => {
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
})
})
}
}
},
// ---
delBjd: function() {

23
src/views/bjd/dt_list.vue

@ -245,29 +245,17 @@ export default {
})
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
this.$prompt('请输入作废原因', '共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
}).then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: { reason: value, bjdId: this.multipleSelection.map(rw => {
return rw.id
}) },
params: { reason: value, bjdId: this.multipleSelection[i].id },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
@ -275,15 +263,14 @@ export default {
this.$notify.success('操作成功!')
this.getList()
})
})
.catch(() => {
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消作废'
})
})
}
}
},
// ---

21
src/views/bjd/jj_list.vue

@ -304,28 +304,17 @@ export default {
return false
} else {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.$prompt(
'请输入作废原因',
'共' +
this.multipleSelection.length +
'条报检项目将作废,是否继续?',
{
this.$prompt('请输入作废原因', '共' + this.multipleSelection.length + '条报检项目将作废,是否继续?', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\S/,
inputErrorMessage: '作废原因不能为空'
}
)
.then(({ value }) => {
}).then(({ value }) => {
for (let i = 0; i < this.multipleSelection.length; i++) {
this.ids.push(this.multipleSelection[i].id)
}
this.apibjd({
url: '/bjd/updBjdToZf',
method: 'get',
params: { reason: value, bjdId: this.multipleSelection.map(rw => {
return rw.id
}) },
params: { reason: value, bjdId: this.multipleSelection[i].id },
paramsSerializer: function(params) {
return qs.stringify(params, { indices: false })
}
@ -333,8 +322,8 @@ export default {
this.$notify.success('操作成功!')
this.getList()
})
})
.catch(() => {
}
}).catch(() => {
this.$message({
type: 'info',
message: '已取消作废'

Loading…
Cancel
Save