<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>
|