|
@@ -158,6 +158,7 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ documentState: 0, // 草稿状态
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async mounted() {
|
|
async mounted() {
|
|
@@ -179,7 +180,6 @@ export default {
|
|
},
|
|
},
|
|
async getAllOrgan() {
|
|
async getAllOrgan() {
|
|
// 获取分部
|
|
// 获取分部
|
|
- console.log(this.tenantId, "tenantId");
|
|
|
|
if (this.userType.indexOf("SYSTEM") != -1) {
|
|
if (this.userType.indexOf("SYSTEM") != -1) {
|
|
await queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
|
|
await queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
@@ -229,10 +229,10 @@ export default {
|
|
userId: this.userId,
|
|
userId: this.userId,
|
|
}).then((response) => {
|
|
}).then((response) => {
|
|
let tempData = response.data.tpls;
|
|
let tempData = response.data.tpls;
|
|
- console.log(response);
|
|
|
|
|
|
+ // console.log(response);
|
|
// 获取对应模板中,下拉框的key, value
|
|
// 获取对应模板中,下拉框的key, value
|
|
let selectList = this.getSelectValueObject(tempData);
|
|
let selectList = this.getSelectValueObject(tempData);
|
|
- console.log(selectList);
|
|
|
|
|
|
+ // console.log(selectList);
|
|
|
|
|
|
// 获取对应模板中,需要隐藏的字段
|
|
// 获取对应模板中,需要隐藏的字段
|
|
let hiddenFormList = this.getSelectValueObject(
|
|
let hiddenFormList = this.getSelectValueObject(
|
|
@@ -498,7 +498,7 @@ export default {
|
|
this.ruleForm.tpls.form_data = values;
|
|
this.ruleForm.tpls.form_data = values;
|
|
const formData = values[0];
|
|
const formData = values[0];
|
|
const tplInfo = this.processStructureValue.tpls[0]; // 默认只用第一个模板
|
|
const tplInfo = this.processStructureValue.tpls[0]; // 默认只用第一个模板
|
|
- console.log(this.ruleForm.tpls.form_data);
|
|
|
|
|
|
+ // console.log(this.ruleForm.tpls.form_data);
|
|
// 校验数据
|
|
// 校验数据
|
|
const res = await checkCourseReturnFee({
|
|
const res = await checkCourseReturnFee({
|
|
tplInfoId: tplInfo.id,
|
|
tplInfoId: tplInfo.id,
|
|
@@ -509,6 +509,7 @@ export default {
|
|
.then((response) => {
|
|
.then((response) => {
|
|
if (response.code === 200) {
|
|
if (response.code === 200) {
|
|
this.$message.success("工单申请成功");
|
|
this.$message.success("工单申请成功");
|
|
|
|
+ this.documentState = 1;
|
|
this.$router.push({ path: "/process/my-create" });
|
|
this.$router.push({ path: "/process/my-create" });
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -526,6 +527,26 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ compareData() {},
|
|
|
|
+ },
|
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
|
+ if (this.documentState == 0) {
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ // 做是否离开判断?
|
|
|
|
+ // 还是做是否保存判断?
|
|
|
|
+ this.$confirm("您的申请尚未提交,是否确认返回?", "提示", {
|
|
|
|
+ confirmButtonText: "确认",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ next();
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ }, 200);
|
|
|
|
+ } else {
|
|
|
|
+ next();
|
|
|
|
+ }
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|