|
@@ -370,28 +370,22 @@ const submitForm = () => {
|
|
|
};
|
|
|
|
|
|
const changeStatus = (row) => {
|
|
|
- modalType.value = "edit";
|
|
|
- let status = row.status == "1" ? 0 : 1;
|
|
|
- proxy.post("/productInfo/detail", { id: row.id }).then((res) => {
|
|
|
- res.status = status;
|
|
|
- formData.data = res;
|
|
|
+ let status = row.status == "1" ? 0 : 1;
|
|
|
ElMessageBox.confirm("你是否确认此操作?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
}).then(() => {
|
|
|
// 删除
|
|
|
- proxy
|
|
|
- .post("/productInfo/" + modalType.value, formData.data)
|
|
|
+ proxy.post("/productInfo/changeStatus", {id:row.id,status:status})
|
|
|
.then((res) => {
|
|
|
- ElMessage({
|
|
|
- message: "操作成功",
|
|
|
- type: "success",
|
|
|
- });
|
|
|
- getList();
|
|
|
+ ElMessage({
|
|
|
+ message: "操作成功",
|
|
|
+ type: "success",
|
|
|
+ });
|
|
|
+ getList();
|
|
|
});
|
|
|
});
|
|
|
- });
|
|
|
};
|
|
|
|
|
|
//编辑详情
|