zhaoxiaoqiang1
2026-01-04 f1d30d03186c79ca2cbcfe60d6d2ce7d73fba97b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<template>
  <div v-loading="loading">
    <el-form label-position="right" :model="form" v-show="!loading" ref="form">
      <el-row>
        <p class="title">审批意见</p>
        <details-input :config.sync="form.phasechoice"></details-input>
        <details-input rows="20" is-text-area="textarea" :config.sync="form.phaseopinion"></details-input>
      </el-row>
      <el-row>
        <el-button type="primary" @click="handleSubmit">提交</el-button>
      </el-row>
    </el-form>
  </div>
</template>
 
<script>
import { qryEnpApproveOpinion, updateEnpApproveOpinion } from '@/api/area/enterprise'
import DetailsInput from './components/DetailsInput'
import { mapState } from 'vuex'
export default {
  components: { DetailsInput },
  data: function() {
    return {
      loading: true,
      form: {
        phasechoice: '',
        phaseopinion: '',
        processtaskno: '',
        serialno: ''
      }
    }
  },
  created() {
    this.initForm()
  },
  computed: {
    ...mapState({
      enterpriseParams: state => state.risk.enterpriseParams
    })
  },
  methods: {
    // 初始化
    async initForm() {
      let params = {
        objectno: this.enterpriseParams.tempSerialNo,
        objecttype: this.enterpriseParams.objectType,
        phaseno: this.enterpriseParams.phaseno
      }
      let res = await qryEnpApproveOpinion(params)
      this._.merge(this.form, res.result)
      this.loading = false
    },
    // 表单提交
    handleSubmit() {
      this.$refs['form'].validate(valid => {
        if (valid) {
          let params = {
            objectno: this.enterpriseParams.tempSerialNo,
            objecttype: this.enterpriseParams.objectType,
            phasechoice: this.form.phasechoice.value,
            phaseopinion: this.form.phaseopinion.value
          }
          updateEnpApproveOpinion(params).then(res => {
            if (res.code === '00') {
              this.$message.success('提交成功!')
            }
          })
        } else {
          this.$message.warning('当前页面存在必填项未录入或数据录入错误,请检查!')
          return false
        }
      })
    },
    async handleSave() {}
  }
}
</script>
 
<style scoped></style>