|
@@ -26,7 +26,7 @@
|
|
</td>
|
|
</td>
|
|
<td>
|
|
<td>
|
|
<el-button
|
|
<el-button
|
|
- v-if="!attachment.isExposed && IS_APPLY"
|
|
|
|
|
|
+ v-if="!attachment.isExposed && (IS_APPLY || IS_AUDIT_APPLY)"
|
|
type="text"
|
|
type="text"
|
|
class="btn-primary"
|
|
class="btn-primary"
|
|
@click="toUpload(attachment)"
|
|
@click="toUpload(attachment)"
|
|
@@ -322,9 +322,16 @@
|
|
v-if="IS_AUDIT"
|
|
v-if="IS_AUDIT"
|
|
type="primary"
|
|
type="primary"
|
|
:disabled="isSubmit"
|
|
:disabled="isSubmit"
|
|
- @click="toAuditApply"
|
|
|
|
|
|
+ @click="toAuditSubmit"
|
|
>确定</el-button
|
|
>确定</el-button
|
|
>
|
|
>
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="IS_AUDIT_APPLY"
|
|
|
|
+ type="primary"
|
|
|
|
+ :disabled="isSubmit"
|
|
|
|
+ @click="toAuditApply"
|
|
|
|
+ >提交</el-button
|
|
|
|
+ >
|
|
<el-button @click="cancel">取消</el-button>
|
|
<el-button @click="cancel">取消</el-button>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
@@ -360,6 +367,7 @@ import {
|
|
taskApplyDetail,
|
|
taskApplyDetail,
|
|
updateTaskApply,
|
|
updateTaskApply,
|
|
updateTaskReview,
|
|
updateTaskReview,
|
|
|
|
+ taskAuditApply,
|
|
switchCardCreateMethod,
|
|
switchCardCreateMethod,
|
|
taskAllFlowSetups,
|
|
taskAllFlowSetups,
|
|
taskAllApproverPeople,
|
|
taskAllApproverPeople,
|
|
@@ -425,6 +433,7 @@ export default {
|
|
abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
|
|
abc: "abcdefghijklmnopqrstuvwxyz".toUpperCase(),
|
|
task: {},
|
|
task: {},
|
|
reason: "",
|
|
reason: "",
|
|
|
|
+ TASK_AUDIT_RESULT: { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" },
|
|
// audit
|
|
// audit
|
|
flows: [],
|
|
flows: [],
|
|
setups: [],
|
|
setups: [],
|
|
@@ -494,18 +503,15 @@ export default {
|
|
: this.curTaskApply.setup !== null && this.curTaskApply.setup <= 0;
|
|
: this.curTaskApply.setup !== null && this.curTaskApply.setup <= 0;
|
|
},
|
|
},
|
|
IS_AUDIT() {
|
|
IS_AUDIT() {
|
|
- return this.editType
|
|
|
|
|
|
+ const IS_COMMON_AUDIT = this.editType
|
|
? this.editType === "AUDIT"
|
|
? this.editType === "AUDIT"
|
|
: this.curTaskApply.setup > 1;
|
|
: this.curTaskApply.setup > 1;
|
|
|
|
+ return IS_COMMON_AUDIT && !this.IS_AUDIT_APPLY;
|
|
},
|
|
},
|
|
- IS_PRELAST_STEP() {
|
|
|
|
|
|
+ IS_AUDIT_APPLY() {
|
|
|
|
+ // IS_PRELAST_STEP
|
|
return this.curTaskApply.setup === this.flows.length - 1;
|
|
return this.curTaskApply.setup === this.flows.length - 1;
|
|
},
|
|
},
|
|
- TASK_AUDIT_RESULT() {
|
|
|
|
- return this.IS_PRELAST_STEP
|
|
|
|
- ? { PASS: "通过" }
|
|
|
|
- : { ...TASK_AUDIT_RESULT, EXCHANGE: "转他人审批" };
|
|
|
|
- },
|
|
|
|
cardTodoName() {
|
|
cardTodoName() {
|
|
let name = "创建答题卡";
|
|
let name = "创建答题卡";
|
|
if (this.curTaskApply.cardId) {
|
|
if (this.curTaskApply.cardId) {
|
|
@@ -909,7 +915,7 @@ export default {
|
|
this.$message.success("提交成功!");
|
|
this.$message.success("提交成功!");
|
|
this.$emit("modified");
|
|
this.$emit("modified");
|
|
},
|
|
},
|
|
- async toAuditApply() {
|
|
|
|
|
|
+ async toAuditSubmit() {
|
|
const valid = await this.$refs.auditModalComp.validate().catch(() => {});
|
|
const valid = await this.$refs.auditModalComp.validate().catch(() => {});
|
|
if (!valid) return;
|
|
if (!valid) return;
|
|
|
|
|
|
@@ -951,6 +957,23 @@ export default {
|
|
this.$message.success("审批成功!");
|
|
this.$message.success("审批成功!");
|
|
this.$emit("modified");
|
|
this.$emit("modified");
|
|
},
|
|
},
|
|
|
|
+ async toAuditApply() {
|
|
|
|
+ const result = await this.$confirm("确定提交该任务吗?", "提示", {
|
|
|
|
+ type: "warning"
|
|
|
|
+ }).catch(() => {});
|
|
|
|
+ if (result !== "confirm") return;
|
|
|
|
+
|
|
|
|
+ const datas = {
|
|
|
|
+ examTaskDetail: this.getTaskData(),
|
|
|
|
+ flowTaskId: this.curTaskApply.flowTaskId,
|
|
|
|
+ approvePass: "PASS"
|
|
|
|
+ };
|
|
|
|
+ const data = await taskAuditApply(datas).catch(() => {});
|
|
|
|
+ if (!data) return;
|
|
|
|
+
|
|
|
|
+ this.$message.success("审批成功!");
|
|
|
|
+ this.$emit("modified");
|
|
|
|
+ },
|
|
// image-preview
|
|
// image-preview
|
|
toPreview(index) {
|
|
toPreview(index) {
|
|
this.curImageIndex = index;
|
|
this.curImageIndex = index;
|