bugfix 0922

This commit is contained in:
lb
2023-09-22 14:41:11 +08:00
parent 33d13b3eb4
commit 506cab65a4
8 changed files with 111 additions and 13 deletions

View File

@@ -236,6 +236,60 @@ export default {
case "destroy-order":
// 结束订单
case "end-order": {
this.$prompt("确认结束请输入结束备注", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
})
.then(({ value }) => {
return value;
})
.catch(() => {
this.$message({
type: "info",
message: "取消输入",
});
return Promise.reject();
})
.then((value) => {
return this.$http({
method: "post",
url: "/pms/order/end",
headers: {
"Content-Type": "application/json",
},
data: {
id: data,
description: value,
},
});
})
.then(({ data: res }) => {
if (res.code === 0) {
// success
this.$message({
message: "已结束订单!",
type: "success",
duration: 2000,
onClose: () => {
this.getAList(
Object.assign({}, this.listQuery, this.extraSearchConditions, this.params)
);
this.$emit("refresh-tables", ["finished"]);
},
});
} else {
// failed
throw new Error(res.msg);
}
})
.catch((err) => {
this.$message({
type: "error",
message: err,
});
});
return;
this.$confirm(`确定${type === "end-order" ? "结束订单" : "废除订单"}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@@ -344,6 +398,22 @@ export default {
this.openDialog(data); /** data is ==> id */
break;
}
case "copy": {
this.$http({
url: "/pms/order/copy",
method: "post",
headers: {
"Content-Type": "application/json",
},
data,
}).then(({ data: res }) => {
if (res.code === 0) {
this.$message.success("复制成功!");
this.getAList(Object.assign({}, this.listQuery, this.extraSearchConditions, this.params));
}
});
break;
}
case "view":
case "view-detail-action": {
this.openDialog(data, true);