待确认
This commit is contained in:
@@ -172,24 +172,27 @@ export default {
|
||||
async searchBarClicked(btn) {
|
||||
switch (btn.btnName) {
|
||||
case 'batchConfirm':
|
||||
const ids = this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
)
|
||||
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
|
||||
this.$message.warning('请选择待确认的设备巡检单');
|
||||
return;
|
||||
}
|
||||
const res = await this.$axios({
|
||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId + '&ids=' + ids,
|
||||
method: 'put',
|
||||
// data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
// (item) => item.id
|
||||
// ),
|
||||
});
|
||||
if (res.code == 0) {
|
||||
this.$message.success('确认成功');
|
||||
this.getList();
|
||||
}
|
||||
this.$modal
|
||||
.confirm('是否确认所有选中保养单"?')
|
||||
.then(() => {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
this.getList();
|
||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||
res.code != 0 && this.$modal.msgError('确认失败');
|
||||
})
|
||||
.catch(() => {});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -388,17 +391,16 @@ export default {
|
||||
},
|
||||
/** 确认 */
|
||||
async handleConfirm(row) {
|
||||
console.log('111', this.$store.getters.userId)
|
||||
this.$modal
|
||||
.confirm('是否确认巡检单"' + row.name + '"?')
|
||||
.then(() => {
|
||||
return this.$axios({
|
||||
url:
|
||||
'/base/equipment-check-order/confirm?confirmPerson=' +
|
||||
this.$store.getters.userId + '&ids=' + [row.id],
|
||||
this.$store.getters.userId,
|
||||
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
|
||||
method: 'put',
|
||||
// data: [row.id],
|
||||
data: [row.id],
|
||||
});
|
||||
})
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user