auditsDialog.vue 5.31 KB
<!-- 运营审核 -->
<template>
  <el-dialog
    id="baseDialog"
    top="15vh"
    :close-on-click-modal="false"
    :close-on-press-escape="true"
    :title="dialogConfig.title"
    :width="dialogConfig.width"
    :visible.sync="visible"
    :show-close="true"
    class="noborder"
  >
    <div class="reject-dialog">
      <div class="dialog-title-box">
        <div class="dialog-name">{{ info.staffName }}</div>
        <div class="dialog-title1">
          <div class="flex">
            <span class="title-text">手机号:</span>
            <span class="title-text1 flex-1">{{ info.staffPhone }}</span>
          </div>
          <div class="flex">
            <span class="title-text">所属门店:</span>
            <span class="title-text1">{{ info.merchantName }}</span>
          </div>
        </div>
        <div class="dialog-title1">
          <div class="flex">
            <span class="title-text">客户姓名:</span>
            <span class="title-text1">{{ info.customerName }}</span>
          </div>
          <div class="flex-1 flex">
            <span class="title-text">缺失原因:</span>
            <span class="title-text1 flex-1">{{ info.reason }}</span>
          </div>
        </div>
      </div>
      <glsx-combi-form
        class="edit-form-container"
        ref="formRef"
        label-width="150px"
        default-width="350px"
        :form-ref="rejectRef"
        :form-obj="infoForm"
        :form-data="editFormData"
        :form-rules="formRules"
      ></glsx-combi-form>
      <!-- <span :style="{ 'margin-left': '150px' }"
        >审核通过后,转账业务单据自动流转至财务确认。</span
      > -->
    </div>
    <div slot="footer">
      <el-button
        v-preventReClick
        @click="visible = false"
        type="info"
        size="small"
      >
        取消
      </el-button>
      <el-button v-preventReClick @click="confirmBtn(2)" size="small">
        驳回
      </el-button>
      <el-button
        size="small"
        type="primary"
        @click="confirmBtn(1)"
        :loading="$store.state.d2admin.loading.value || btnLoding"
      >
        通过
      </el-button>
    </div>
  </el-dialog>
</template>

<script>
import { reportApproval } from "@/api/earlyWarningManager"
export default {
  name: "ExamineDialog",
  data() {
    return {
      userInfo: this.$store.state.d2admin.user.info,
      // txtObj: {
      //   procurementReview: '说明:订单审核后会自动流转至商务进行复审',
      //   procurementBusiness: '说明:订单审核后会自动流转至供应商进行确认并发货'
      // },
      infoForm: {
        remark: ""
      },
      rejectRef: "rejectRef",
      dialogConfig: {
        title: "审核",
        width: "600px"
      },
      examineRef: "examineRef",
      formRules: {},
      editFormData: [
        {
          label: "审核意见",
          name: "remark",
          type: "input",
          maxlength: 50,
          inputType: "textarea",
          showLimit: true,
          rows: 4
        }
      ],
      baseData: {
        // shippingEntityList: []
      }
    }
  },

  props: {
    // fromPage: {
    //   type: String,
    //   default: 'procurementReview'
    // },
    auditsVisible: {
      type: Boolean,
      default: false
    },
    // paramsObj: {
    //   type: Object,
    //   default: {}
    // }
    info: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    visible: {
      get() {
        return this.auditsVisible
      },
      set(newVal) {
        this.$emit("dialogClose", { flag: newVal, attrName: "auditsVisible" })
      }
    }
  },

  mounted() {},

  methods: {
    confirmBtn(type) {
      this.$refs.formRef.$refs[this.rejectRef].validate((valid) => {
        if (valid) {
          var params = {}
          if (type === 2 && !this.infoForm.remark) {
            this.$message.warning("请填写审核意见")
            return
          }
          params.auditOpinion = this.infoForm.remark
          params.id = this.info.id
          params.auditStatus = type
          console.log(params)

          reportApproval(params).then((res) => {
            this.notice.okTips("操作成功")
            this.visible = true
          })
        }
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.reject-dialog {
  .dialog-title-box {
    width: 100%;
    background: #fafafa;
    padding: 10px 20px;
    color: #333333;
    font-size: 16px;
    font-weight: 400;
    box-sizing: border-box;
    margin-bottom: 20px;
    .dialog-name {
      font-weight: 600;
      margin-bottom: 12px;
    }
    .dialog-title1 {
      display: flex;
      color: #333333;
      font-size: 14px;
      font-weight: 400;
      margin-bottom: 8px;
    }
  }
  .title-text {
    width: 80px;
  }
  .title-text1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100px;
    display: block;
  }
  .flex {
    display: flex;
  }
  .flex-1 {
    flex: 1;
  }

  .reject-input {
    ::v-deep .el-textarea__inner {
      height: 70px;
    }
  }

  .el-textarea .el-input__count {
    right: 90px;
    bottom: -10px;
    font-size: 12px;
    color: #999999;
  }

  .tips {
    color: #999999;
  }
}
::v-deep .el-dialog__footer {
  border-top: 1px solid #e5e5e5;
  .el-button {
    width: 80px;
  }
}
::v-deep .el-dialog__header {
  border-bottom: 1px solid #e5e5e5;
}
</style>