一日流程评估评估完毕自动刷新list
一日流程跨月不能继续评估
This commit is contained in:
parent
1c3020987c
commit
375934d3e9
ruoyi-ui/src/views/benyi/dayflowassessment
@ -211,13 +211,23 @@ export default {
|
||||
type: "warning",
|
||||
callback: (action) => {
|
||||
if (action === "confirm") {
|
||||
this.loading = true;
|
||||
this.form.list = this.dayflowstandardList;
|
||||
this.form.status = "1";
|
||||
addDayflowassessment(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("评估成功");
|
||||
this.loading = false;
|
||||
// 自动关闭 tab
|
||||
this.$store.state.tagsView.visitedViews.splice(
|
||||
this.$store.state.tagsView.visitedViews.findIndex(
|
||||
(item) => item.path === this.$route.path
|
||||
),
|
||||
1
|
||||
);
|
||||
this.$router.push(
|
||||
this.$store.state.tagsView.visitedViews[
|
||||
this.$store.state.tagsView.visitedViews.length - 1
|
||||
].path
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -235,13 +245,23 @@ export default {
|
||||
type: "warning",
|
||||
callback: (action) => {
|
||||
if (action === "confirm") {
|
||||
this.loading = true;
|
||||
this.form.list = this.dayflowstandardList;
|
||||
this.form.status = "0";
|
||||
addDayflowassessment(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("保存成功");
|
||||
this.loading = false;
|
||||
// 自动关闭 tab
|
||||
this.$store.state.tagsView.visitedViews.splice(
|
||||
this.$store.state.tagsView.visitedViews.findIndex(
|
||||
(item) => item.path === this.$route.path
|
||||
),
|
||||
1
|
||||
);
|
||||
this.$router.push(
|
||||
this.$store.state.tagsView.visitedViews[
|
||||
this.$store.state.tagsView.visitedViews.length - 1
|
||||
].path
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ import { listUser } from "@/api/system/user";
|
||||
import { listDetail, getDetail } from "@/api/benyi/dayflow/dayflowmanger";
|
||||
|
||||
export default {
|
||||
name: "Dayflowassessment",
|
||||
name: "Dayflowassessment_1",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
@ -332,9 +332,23 @@ export default {
|
||||
},
|
||||
//控制按钮可用
|
||||
checkUpdateable(row) {
|
||||
//console.log(row.createTime);
|
||||
var status = row.status;
|
||||
var nowdate = new Date();
|
||||
var y = nowdate.getFullYear();
|
||||
var m = (nowdate.getMonth() + 1).toString().padStart(2, "0");
|
||||
//console.log(date.toLocaleDateString());
|
||||
return status == "1";
|
||||
|
||||
return status == "1" || !this.CompareDate(row.createTime, y + "/" + m);
|
||||
},
|
||||
//比较日期大小
|
||||
CompareDate(d1, d2) {
|
||||
//return new Date(d1.replace(/-/g, "/")) > new Date(d2.replace(/-/g, "/"));
|
||||
//console.log(d1.replace(/-/g, "/").substring(0, 7));
|
||||
//console.log(d2.replace(/-/g, "/").substring(0, 7));
|
||||
var d3 = d1.replace(/-/g, "/").substring(0, 7);
|
||||
var d4 = d2.replace(/-/g, "/").substring(0, 7);
|
||||
return d3 == d4;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -259,13 +259,23 @@ export default {
|
||||
type: "warning",
|
||||
callback: (action) => {
|
||||
if (action === "confirm") {
|
||||
this.loading = true;
|
||||
this.form.list = this.dayflowstandardList;
|
||||
this.form.status = "1";
|
||||
addDayflowassessment(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("评估成功");
|
||||
this.loading = false;
|
||||
// 自动关闭 tab
|
||||
this.$store.state.tagsView.visitedViews.splice(
|
||||
this.$store.state.tagsView.visitedViews.findIndex(
|
||||
(item) => item.path === this.$route.path
|
||||
),
|
||||
1
|
||||
);
|
||||
this.$router.push(
|
||||
this.$store.state.tagsView.visitedViews[
|
||||
this.$store.state.tagsView.visitedViews.length - 1
|
||||
].path
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -286,13 +296,23 @@ export default {
|
||||
type: "warning",
|
||||
callback: (action) => {
|
||||
if (action === "confirm") {
|
||||
this.loading = true;
|
||||
this.form.list = this.dayflowstandardList;
|
||||
this.form.status = "0";
|
||||
addDayflowassessment(this.form).then((response) => {
|
||||
if (response.code === 200) {
|
||||
this.msgSuccess("保存成功");
|
||||
this.loading = false;
|
||||
// 自动关闭 tab
|
||||
this.$store.state.tagsView.visitedViews.splice(
|
||||
this.$store.state.tagsView.visitedViews.findIndex(
|
||||
(item) => item.path === this.$route.path
|
||||
),
|
||||
1
|
||||
);
|
||||
this.$router.push(
|
||||
this.$store.state.tagsView.visitedViews[
|
||||
this.$store.state.tagsView.visitedViews.length - 1
|
||||
].path
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user