待确认
This commit is contained in:
@@ -258,17 +258,27 @@ export default {
|
||||
this.$message.warning('请选择待确认的设备保养记录');
|
||||
return;
|
||||
}
|
||||
const res = await this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm',
|
||||
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-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: this.$refs['waiting-list-table'].selectedPlan.map(
|
||||
(item) => item.id
|
||||
),
|
||||
});
|
||||
// if (res.code == 0) {
|
||||
// this.$message.success('确认成功');
|
||||
// this.getList();
|
||||
// }
|
||||
})
|
||||
.then((res) => {
|
||||
this.getList();
|
||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||
res.code != 0 && this.$modal.msgError('确认失败');
|
||||
})
|
||||
.catch(() => {});
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -412,9 +422,13 @@ export default {
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = '添加待确认保养记录';
|
||||
// this.reset();
|
||||
// this.open = true;
|
||||
// this.title = '添加待确认保养记录';
|
||||
this.openUnplannedDrawer = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.unplanned.init();
|
||||
});
|
||||
},
|
||||
|
||||
getConfirmed() {
|
||||
@@ -478,15 +492,25 @@ export default {
|
||||
},
|
||||
/** 确认 */
|
||||
async handleConfirm(row) {
|
||||
const res = await this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: [row.id],
|
||||
});
|
||||
if (res.code == 0) {
|
||||
this.$message.success('确认成功');
|
||||
this.getList();
|
||||
}
|
||||
this.$modal
|
||||
.confirm('是否确认保养单"' + row.maintainOrderNumber + '"?')
|
||||
.then(() => {
|
||||
return this.$axios({
|
||||
url: '/base/equipment-maintain-log/confirm',
|
||||
method: 'put',
|
||||
data: [row.id],
|
||||
});
|
||||
// if (res.code == 0) {
|
||||
// this.$message.success('确认成功');
|
||||
// this.getList();
|
||||
// }
|
||||
})
|
||||
.then((res) => {
|
||||
this.getList();
|
||||
res.code == 0 && this.$modal.msgSuccess('确认成功');
|
||||
res.code != 0 && this.$modal.msgError('确认失败');
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 编辑 */
|
||||
async handleEdit(row) {
|
||||
|
||||
Reference in New Issue
Block a user