revocationDialog.vue 2.44 KB
<!-- 驳回 -->
<template>
  <d2-dialog
    title="提示"
    :is-visible="visible"
    @closeDialog="handleClose"
    @confirmDialog="handleAddConfirm"
  >
    <div class="reject-dialog">
      <glsx-combi-form
        class="edit-form-container"
        ref="formRef"
        label-width="112px"
        default-width="390px"
        :form-ref="rejectRef"
        :form-obj="infoForm"
        :form-data="editFormData"
        :form-rules="formRules"
      ></glsx-combi-form>
    </div>
  </d2-dialog>
</template>
  
  <script>
// import { cancelDeduct, getScoreDetail } from "@api/point"
export default {
  name: "RejectDialog",
  data() {
    return {
      infoForm: {
        remark: ""
      },
      dialogConfig: {
        title: "提示",
        width: "576px",
        height: "315px"
      },
      rejectRef: "rejectRef",
      formRules: {
        // remark: [{ required: true, message: "请输入撤销原因", trigger: "blur" }]
      },
      editFormData: [
        {
          label: "撤销原因",
          name: "remark",
          type: "input",
          maxlength: 20,
          inputType: "textarea",
          showLimit: true,
          rows: 4
        }
      ],
      baseData: {}
    }
  },

  props: {
    visible: {
      type: Boolean,
      default: false
    },
    id: {
      type: String,
      default: ""
    }
  },
  computed: {
    isVisible: {
      get() {
        return this.visible
      },
      set(newVal) {}
    }
  },

  mounted() {},

  methods: {
    // handleAddConfirm() {
    //   this.$refs.formRef.$refs[this.rejectRef].validate(async (valid) => {
    //     if (valid) {
    //       let detailData = await getScoreDetail({ id: this.id })
    //       let params = {}
    //       params.remark = this.infoForm.remark
    //       params.orderCode = detailData.orderCode
    //       params.scoreId = this.id
    //       cancelDeduct(params).then((res) => {
    //         console.log(res)
    //         if (res) {
    //           this.$emit("handleConfirm", false)
    //           this.notice.okTips("操作成功")
    //         }
    //       })
    //     }
    //   })
    // },
    handleClose() {
      this.$emit("dialogClose", false)
    }
  }
}
</script>
  <style lang="scss" scoped>
.reject-dialog {
  margin: 21px 0 83px;

  ::v-deep .el-textarea__inner {
    height: 70px;
  }
  ::v-deep .el-input__count {
    right: 15px !important;
    bottom: 3px !important;
    font-size: 12px;
    color: #999999;
  }
}
</style>