|
|
@@ -994,41 +994,42 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
handWithdraw(row) {
|
|
|
- if (row.isComplete) {
|
|
|
-
|
|
|
- this.$modal
|
|
|
- .confirm("因不存在已完成任务,撤回后将删除所有生成任务")
|
|
|
- .then(function () {
|
|
|
- return withdraw(row.id);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("撤回成功");
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
- }else{
|
|
|
- if (row.planCycle==0) {
|
|
|
- this.$modal
|
|
|
- .confirm("存在已完成任务,无周期任务不允许撤回,如需删除下发任务请点击“删除”。")
|
|
|
- .then(() => {
|
|
|
- this.getList();
|
|
|
+ getPlan(row.id).then((response) => {
|
|
|
+ console.log("handWithdraw",response)
|
|
|
+ if (response.data.isComplete) {
|
|
|
+ if (row.planCycle==0) {
|
|
|
+ this.$modal
|
|
|
+ .confirm("存在已完成任务,无周期任务不允许撤回,如需删除下发任务请点击“删除”。")
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
|
|
|
- })
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.$modal
|
|
|
+ .confirm("因存在已完成任务,撤回后下周期起将不再生成任务")
|
|
|
+ .then(function () {
|
|
|
+ return withdraw(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("撤回成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ }
|
|
|
+
|
|
|
}else{
|
|
|
- this.$modal
|
|
|
- .confirm("因存在已完成任务,撤回后下周期起将不再生成任务")
|
|
|
- .then(function () {
|
|
|
- return withdraw(row.id);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.getList();
|
|
|
- this.$modal.msgSuccess("撤回成功");
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+
|
|
|
+ this.$modal.confirm("因不存在已完成任务,撤回后将删除所有生成任务")
|
|
|
+ .then(function () {
|
|
|
+ return withdraw(row.id);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$modal.msgSuccess("撤回成功");
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
}
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
+ });
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|