| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <template>
- <div class="fanghong_wrapper">
- <el-container style="height:520px;">
- <el-main style="border:1px solid #d5d5ff;margin-left:5px;padding:0px;">
- <p style="font-weight:bolder;background-color:#d5d5ff;padding:3px;">信息填报</p>
- <el-form :model="addObj" :label-width="formLabelWidth" ref="ruleForm" :rules="rules">
- <el-form-item label="存在问题原因分析">
- <el-input type="textarea" v-model="addObj.pblmCasNls" style="width: 420px"></el-input>
- </el-form-item>
- <el-form-item label="整改意见">
- <el-input type="textarea" v-model="addObj.rctfOptn" style="width: 420px"></el-input>
- </el-form-item>
- <el-form-item label="备注">
- <el-input type="textarea" v-model="addObj.note" style="width: 420px"></el-input>
- </el-form-item>
- <el-form-item label>
- <el-button type="primary" @click="makesure">保 存</el-button>
- </el-form-item>
- </el-form>
- </el-main>
- </el-container>
- </div>
- </template>
- <script>
- import request from "@util/gw_ajax_request.js";
- import {getReasonAndSuggestionInfo} from '@api/duChaTianBao.js'
- export default {
- components: {
- },
- props: ['currentObjectId','currentObjectName','currentObjectRgstrId','currentResCode','rowData'],
- data() {
- return {
- dialogFormVisible: false,
- formLabelWidth: "180px",
- loading: true,
- addObj: {
- pblmCasNls: '',
- rctfOptn: '',
- note: ''
- },
- operationType: "",
- rules: {
- },
- };
- },
- computed: {
- recPersId() {
- return localStorage.getItem("userid") ? localStorage.getItem("userid") : "1098101939614724096";
- }
- },
- created(){
- },
- mounted() {
- this.getformList();
- },
- methods: {
- getformList() {
- let _self = this;
- getReasonAndSuggestionInfo(_self.currentObjectRgstrId).then(res => {
- if (res.success) {
- if (res.data && Object.keys(res.data).length) {
- _self.addObj = res.data;
- _self.operationType = "update";
- } else {
- _self.addObj = {};
- _self.operationType = "add";
- }
- } else {
- this.$message.error(res.message)
- }
- });
- },
- //保存
- makesure() {
- let _self = this;
- this.addObj["rgstrId"] = this.currentObjectRgstrId;
- this.addObj["recPersId"] = this.recPersId;
- this.addObj["status"] = '1';
- // 更改填报状态 to-do: 需要确认填报状态的字段是什么
- if (
- this.addObj.pblmCasNls ||
- this.addObj.rctfOptn ||
- this.addObj.note
- ) {
- this.addObj.status = "1";
- }
- if (
- this.addObj.pblmCasNls &&
- this.addObj.rctfOptn &&
- this.addObj.note
- ) {
- this.addObj.status = "2";
- }
- if (
- this.addObj.pblmCasNls == undefined &&
- this.addObj.rctfOptn == undefined &&
- this.addObj.note == undefined
- ) {
- this.addObj.status = "0";
- }
- this.$refs['ruleForm'].validate((valid) => {
- if (valid) {
- this.$confirm("确认保存填写的信息吗?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- }).then(() => {
- request.post("/bis/insp/rsfco/rgstr/aoeparo", _self.addObj).then(res => {
- if (res.success) {
- _self.$message.success("保存成功");
- _self.$emit("addShuiKuSuccess");
- _self.getformList();
- }
- });
- }).catch((err)=>{
- this.$message.info(err)
- });
- }else{
- this.$message.warning('请检查填写信息')
- return
- }
-
- });
- },
- cancelHandler() {
- this.$emit("cancelHandler");
- },
- handleCheckedChange(){
- }
- },
- watch: {
- currentObjectRgstrId(n, o) {
- this.getformList();
- }
- }
- };
- </script>
- <style lang="scss">
- #dcdxHeader {
- padding: 15px 20px;
- }
- #dxdcFooter {
- text-align: center;
- }
- #dxdcAside {
- border: 1px solid #d5d5ff;
- }
- .fanghong_wrapper label.el-radio {
- width: 60px;
- }
- .fanghong_wrapper .el-form{
- margin-top: 10px;
- }
- .fanghong_wrapper
- .add-problem-icon{
- font-size: 16px;
- }
- </style>
|