licp
2024-04-25 a24f5347bfd2331f8a4819b215f79555776534cd
src/components/view/b1-report-preparation.vue
@@ -88,9 +88,11 @@
               :key="upIndex"/>
         </div>
      </div>
    <el-dialog title="在线编制" :visible.sync="claimVisible" width="22cm" :modal-append-to-body="false" :fullscreen="fullscreen">
    <el-dialog title="在线编制" :visible.sync="claimVisible" width="22cm" :modal-append-to-body="false"
      :fullscreen="fullscreen">
      <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;"
          v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
      </div>
      <Word style="height:70vh" :class="{fullscreen:fullscreen}" v-if="claimVisible" ref="Word" :value="value"/>
@@ -99,7 +101,8 @@
            <el-button type="primary" @click="confirmClaim">确 定</el-button>
         </span>
      </el-dialog>
    <el-dialog title="报告审核" :visible.sync="issuedVisible" width="400px" :modal-append-to-body="false" :fullscreen="fullscreen">
    <el-dialog title="报告审核" :visible.sync="issuedVisible" width="400px" :modal-append-to-body="false"
      :fullscreen="fullscreen">
      <!-- <div class="full-screen">
        <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i>
        <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" >
@@ -116,8 +119,7 @@
    <el-dialog title="不通过原因" :visible.sync="issuedReasonVisible" width="400px" :modal-append-to-body="false">
      <div class="search_thing">
        <div class="search_label">不通过原因:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="reason"></el-input></div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="reason"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="issuedReasonVisible=false" :disabled="loadingIssuedReason">取消</el-button>
@@ -141,8 +143,7 @@
    <el-dialog title="不批准原因" :visible.sync="approveReasonVisible" width="400px" :modal-append-to-body="false">
      <div class="search_thing">
        <div class="search_label">不批准原因:</div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable
            v-model="reason"></el-input></div>
        <div class="search_input"><el-input size="small" placeholder="请输入" clearable v-model="reason"></el-input></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="approveReasonVisible=false" :disabled="loadingApproveReason">取消</el-button>
@@ -156,7 +157,9 @@
  import ValueTable from '../tool/value-table.vue'
  import Word from '../tool/word.vue'
  import file from '../../util/file';
  import { convertToHtml } from 'mammoth';
  import {
    convertToHtml
  } from 'mammoth';
   export default {
      components: {
         ValueTable,
@@ -233,9 +236,11 @@
            type: 'text',
            method: 'handleApprove',
            disabFun: (row, index) => {
              return row.state == null||row.state == 0||row.isExamine == 0||row.isExamine == null ||row.isRatify==1
                return row.state == null || row.state == 0 || row.isExamine == 0 || row.isExamine == null || row
                  .isRatify == 1
            }
          }],
            }
          ],
          linkEvent: {
            // code: {
            //   method: 'selectAllByOne'
@@ -432,12 +437,12 @@
                        id: this.currentInfo.id,
                isExamine: 1
          }).then(res => {
          this.loadingIssued = false;
            if (res.code === 201) {
              return
            }
            this.$message.success('提交成功')
            this.refreshTable()
            this.loadingIssued = false;
            this.currentInfo = null;
            this.issuedVisible = false;
          }).catch(e => {
@@ -451,6 +456,20 @@
      },
      subApprove(){
        this.loadingApprove = true;
        this.$axios.post(this.$api.insReport.ratifyReport, {
          id: this.currentInfo.id,
          isRatify: 1
        }).then(res => {
          this.loadingApprove = false;
          if (res.code == 201) {
            this.$message.error('批准失败')
            return
          }
          this.$message.success('已批准')
          this.refreshTable()
          this.currentInfo = null;
          this.approveVisible = false;
        })
      },
      handleSubmit(row){
        this.$confirm('是否提交当前报告?', "提交", {
@@ -481,12 +500,12 @@
                isExamine: 0,
                examineTell:this.reason
          }).then(res => {
          this.loadingIssuedReason = false;
            if (res.code === 201) {
              return
            }
            this.$message.success('操作成功')
            this.refreshTable()
            this.loadingIssuedReason = false;
            this.currentInfo = null;
            this.reason = '';
            this.issuedVisible = false;
@@ -501,6 +520,25 @@
          return this.$message.error('请输入原因')
        }
        this.loadingApproveReason = true
        this.$axios.post(this.$api.insReport.examineReport, {
          id: this.currentInfo.id,
          isExamine: 0,
          examineTell: this.reason
        }).then(res => {
          this.loadingApproveReason = false
          if (res.code === 201) {
            return
          }
          this.$message.success('操作成功')
          this.refreshTable()
          this.currentInfo = null;
          this.reason = '';
          this.issuedVisible = false;
          this.issuedReasonVisible = false;
        }).catch(e => {
          this.$message.error('操作失败')
          this.loadingIssuedReason = false;
        })
      }
    }
  }