gaoluyang
2024-07-31 38e6f27a8082e1173e3c02a33da5da39b6c6872c
src/components/view/b1-report-preparation.vue
@@ -153,12 +153,10 @@
<script>
  import ValueTable from '../tool/value-table.vue'
  import Word from '../tool/word.vue'
  import onlyoffice from '../tool/onlyoffice.vue'
  export default {
    components: {
      ValueTable,
      Word,
      onlyoffice
    },
    data() {
@@ -279,6 +277,7 @@
          },
          selectField: {},
          requiredAdd: [],
          needSort: ['createTime', 'state', 'writeTime', 'isExamine', 'examineTime', 'ratifyTime'],
          requiredUp: []
        },
        entityCopy: {},
@@ -332,8 +331,8 @@
      // }
    },
    methods: {
      refreshTable() {
        this.$refs['ValueTable'].selectList()
      refreshTable(e) {
        this.$refs['ValueTable'].selectList(e)
      },
      refresh() {
        this.componentData.entity = this.HaveJson(this.entityCopy)
@@ -438,13 +437,14 @@
        document.body.appendChild(link);
        link.click();
      },
      // 还原操作
      handleRestore(row) {
        this.$axios.post(this.$api.insReport.upReportUrl, {
          id: row.id
        }).then(res => {
          if (res.code === 200) {
            this.$message.success('操作成功')
            this.refreshTable()
            this.refreshTable('page')
          }
        })
      },
@@ -466,6 +466,7 @@
          }
          this.issuedVisible = true;
      },
      // 审核通过
      subIssued() {
        this.loadingIssued = true;
        this.$axios.post(this.$api.insReport.examineReport, {
@@ -477,7 +478,7 @@
            return
          }
          this.$message.success('提交成功')
          this.refreshTable()
          this.refreshTable('page')
          this.currentInfo = null;
          this.issuedVisible = false;
        }).catch(e => {
@@ -503,6 +504,7 @@
          }
        this.approveVisible = true;
      },
      // 批准通过
      subApprove() {
        this.loadingApprove = true;
        this.$axios.post(this.$api.insReport.ratifyReport, {
@@ -515,11 +517,12 @@
            return
          }
          this.$message.success('已批准')
          this.refreshTable()
          this.refreshTable('page')
          this.currentInfo = null;
          this.approveVisible = false;
        })
      },
      // 提交操作
      handleSubmit(row) {
        this.$confirm('是否提交当前报告?', "提交", {
          confirmButtonText: "提交",
@@ -533,12 +536,13 @@
              return
            }
            this.$message.success('提交成功')
            this.refreshTable()
            this.refreshTable('page')
          }).catch(e => {
            this.$message.error('提交失败')
          })
        }).catch(() => {})
      },
      // 审核不通过原因提交
      handleIssuedReason() {
        if (!this.reason) {
          return this.$message.error('请输入原因')
@@ -554,7 +558,7 @@
            return
          }
          this.$message.success('操作成功')
          this.refreshTable()
          this.refreshTable('page')
          this.currentInfo = null;
          this.reason = '';
          this.issuedVisible = false;
@@ -564,6 +568,7 @@
          this.loadingIssuedReason = false;
        })
      },
      // 不批准原因提交
      handleApproveReason() {
        if (!this.reason) {
          return this.$message.error('请输入原因')
@@ -579,7 +584,7 @@
            return
          }
          this.$message.success('操作成功')
          this.refreshTable()
          this.refreshTable('page')
          this.currentInfo = null;
          this.reason = '';
          this.issuedVisible = false;