This commit is contained in:
jjLv 2024-10-31 19:08:20 +08:00
parent 18e0272b6b
commit aafbf5d30d
2 changed files with 14 additions and 10 deletions

View File

@ -31,7 +31,7 @@ export function bindKeeper(data) {
export function noBindKeeper(data) { export function noBindKeeper(data) {
return request({ return request({
url: '/material/ma_type_keeper', url: '/material/ma_type_keeper',
method: 'put', method: 'delete',
data: data, data: data,
}) })
} }

View File

@ -553,19 +553,21 @@ export default {
/** 解绑按钮操作 */ /** 解绑按钮操作 */
handleNoBind() { handleNoBind() {
if (this.userIdTemp == -1) {
this.$alert("未勾选绑定人,无法绑定", "提示", {
type: "warning",
confirmButtonText: "确定",
});
return;
}
if (this.ids.length == 0) { if (this.ids.length == 0) {
this.$alert("未进行勾选,无法解绑", "提示", { this.$alert("未进行勾选,无法解绑", "提示", {
type: "warning", type: "warning",
confirmButtonText: "确定", confirmButtonText: "确定",
}); });
return; return;
}else{
noBindKeeper(this.userList).then((response) => {
this.$modal.msgSuccess("解绑成功");
this.ids = null;
this.userList = null;
this.getTreeData();
this.getList();
this.$refs.multipleTable.clearSelection();
});
} }
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
@ -584,10 +586,12 @@ export default {
handleUpdateKeep(row) { handleUpdateKeep(row) {
const typeId = row.typeId; const typeId = row.typeId;
const userId = row.keeperUserId; const userId = row.keeperUserId;
noBindKeeper({ const userTwo = [];
userTwo.push({
typeId: typeId, typeId: typeId,
userId: userId, userId: userId,
}).then((response) => { })
noBindKeeper(userTwo).then((response) => {
this.$modal.msgSuccess("解绑成功"); this.$modal.msgSuccess("解绑成功");
this.getList(); this.getList();
}); });