linwe
2024-05-23 3bce353d07a91c0861b776636446fe673801ed32
src/views/place/components/auditBase.vue
@@ -1,95 +1,93 @@
<template>
    <div class="cur-container-box">
        <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
  <div class="cur-container-box">
    <avue-form ref="replyForm" :option="option" v-model="form" :close-on-click-modal="false">
            <template slot-scope="{size}" slot="menuForm">
                <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
                <el-button :size="size" @click="handleReset">驳 回</el-button>
            </template>
      <template slot-scope="{size}" slot="menuForm">
        <el-button type="primary" :size="size" @click="handleSubmit">通 过</el-button>
        <el-button :size="size" @click="handleReset">驳 回</el-button>
      </template>
        </avue-form>
    </div>
    </avue-form>
  </div>
</template>
<script>
import {
  import {
    setCheckPlaceExt
} from "@/api/place/place"
  } from "@/api/place/place"
export default {
  export default {
    inject: ["placeElement"],
    data () {
        return {
            form: {},
            option: {
                submitBtn: false,
                emptyBtn: false,
                column: [
                    {
                        span: 23,
                        row: true,
                        label: "审批意见",
                        prop: "confirmNotion",
                        type: 'textarea',
                        minRows: 3,
                        maxRows: 5,
                        rules: [],
                    }
                ]
            },
        }
    data() {
      return {
        form: {},
        option: {
          submitBtn: false,
          emptyBtn: false,
          column: [{
            span: 23,
            row: true,
            label: "审批意见",
            prop: "confirmNotion",
            type: 'textarea',
            minRows: 3,
            maxRows: 5,
            rules: [],
          }]
        },
      }
    },
    methods: {
        handleSubmit () {
            setCheckPlaceExt({
                confirmFlag: 2,
                id: this.placeElement.curAuditRow.placeExtId,
                confirmNotion: this.form.confirmNotion
            }).then(() => {
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
                this.$refs.replyForm && this.$refs.replyForm.resetForm()
                this.placeElement.auditBasePopup = false
      handleSubmit() {
        setCheckPlaceExt({
          confirmFlag: 2,
          id: this.placeElement.curAuditRow.placeExtId,
          confirmNotion: this.form.confirmNotion
        }).then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          this.$refs.replyForm && this.$refs.replyForm.resetForm()
          this.placeElement.auditBasePopup = false
                this.placeElement.onLoad(this.placeElement.page)
            })
        },
          this.placeElement.onLoad(this.placeElement.page)
        })
      },
        handleReset () {
            if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
                this.$message({
                    type: 'warning',
                    message: "请输入审批意见!",
                })
      handleReset() {
        if ('confirmNotion' in this.form && this.form.confirmNotion.trim() == '' || !this.form.confirmNotion) {
          this.$message({
            type: 'warning',
            message: "请输入审批意见!",
          })
                return
            }
          return
        }
            setCheckPlaceExt({
                confirmFlag: 3,
                id: this.placeElement.curAuditRow.placeExtId,
                confirmNotion: this.form.confirmNotion
            }).then(() => {
                this.$message({
                    type: "success",
                    message: "操作成功!",
                })
                this.$refs.replyForm && this.$refs.replyForm.resetForm()
                this.placeElement.auditBasePopup = false
        setCheckPlaceExt({
          confirmFlag: 3,
          id: this.placeElement.curAuditRow.placeExtId,
          confirmNotion: this.form.confirmNotion
        }).then(() => {
          this.$message({
            type: "success",
            message: "操作成功!",
          })
          this.$refs.replyForm && this.$refs.replyForm.resetForm()
          this.placeElement.auditBasePopup = false
                this.placeElement.onLoad(this.placeElement.page)
            })
        },
          this.placeElement.onLoad(this.placeElement.page)
        })
      },
    }
}
  }
</script>
<style lang="scss" scoped>
.cur-container-box {
  .cur-container-box {
    display: flex;
    flex-direction: column;
    width: 100%;
@@ -97,18 +95,18 @@
    overflow: hidden;
    .content-box {
        margin: 0 4px;
        padding: 0 16px;
        height: 0;
        flex: 1;
        overflow: hidden;
        overflow-y: auto;
      margin: 0 4px;
      padding: 0 16px;
      height: 0;
      flex: 1;
      overflow: hidden;
      overflow-y: auto;
    }
    .footer-btn-box {
        margin-top: 10px;
        display: flex;
        justify-content: center;
      margin-top: 10px;
      display: flex;
      justify-content: center;
    }
}
  }
</style>