Blame view

src/views/workflow/components/stop.vue 2.28 KB
1
<!--
2
 * @Description:
3
 * @Autor: renchao
4
 * @LastEditTime: 2023-09-27 08:51:13
5
-->
蔡俊立 committed
6 7 8
<template>
  <div class="from-clues">
    <div class="invalid-title">
9 10
      <i class="el-icon-question invalid-icon"></i>
      <div class="invalid-body">您是否确定终止该业务办理?</div>
蔡俊立 committed
11
    </div>
1  
renchao@pashanhoo.com committed
12
    <div class="invalid-reson">退件原因:</div>
13 14 15 16
    <el-input
      v-model="stopMessage"
      placeholder="请输入终止原因"
      type="textarea"
17
      :rows="4"></el-input>
18 19 20 21
    <div style="overflow:hidden;text-align:center;margin-top:10px">
      <el-button @click="cancelBack">取消</el-button>
      <el-button type="primary" @click="onSubmit">退件</el-button>
    </div>
蔡俊立 committed
22 23 24 25
  </div>
</template>

<script>
26
  import { stopTask } from "@/api/workFlow.js";
xiaomiao committed
27
  import { popupCacel } from "@/utils/popup.js";
28 29 30 31 32 33
  export default {
    props: {
      formData: {
        type: Object,
        default: {},
      },
34
    },
35 36 37 38
    data () {
      return {
        stopMessage: "",
      };
蔡俊立 committed
39
    },
40
    methods: {
yuanbo committed
41 42 43 44
      /**
       * @description: onSubmit
       * @author: renchao
       */
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
      onSubmit () {
        stopTask({
          bsmSlsq: this.formData.bsmSlsq,
          bestepid: this.formData.bestepid,
          stopMessage: this.stopMessage,
        }).then((res) => {
          this.$message.success("终止成功");
          setTimeout(() => {
            // window.opener.location.reload(); //刷新父窗口
            if (window.opener && window.opener.getBpageList) {
              window.opener.getBpageList();
            } else {
              window.opener.frames[0].getBpageList();
            }
            window.close();
            this.$emit("input", false);
          }, 1000);
        });
      },
64 65 66 67 68 69 70
      /**
  * @description: closeDialog
  * @author: renchao
  */
      cancelBack () {
        popupCacel();
      },
71 72
    },
  };
蔡俊立 committed
73 74
</script>
<style scoped lang="scss">
75 76 77 78 79 80 81 82 83 84
  @import "~@/styles/mixin.scss";
  .invalid-title {
    display: flex;
    align-content: center;

    .invalid-icon {
      color: rgb(254, 148, 0);
      font-size: 34px;
      margin-right: 10px;
    }
蔡俊立 committed
85

86 87 88 89
    .invalid-body {
      line-height: 40px;
      margin-bottom: 10px;
    }
90
  }
蔡俊立 committed
91

92
  .invalid-reson {
93 94
    margin-bottom: 10px;
  }
蔡俊立 committed
95

96 97 98 99 100
  .dialog-footer {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
  }
蔡俊立 committed
101
</style>