Blame view

src/components/community/RoomDecorationAcceptance.vue 2.9 KB
6ec243d6   wuxw   v1.9 点击提交后,成功提示没有...
1
  <template>
e4e31451   wuxw   完成物业首页功能
2
3
4
5
6
7
    <el-dialog 
      :title="$t('roomRenovationManage.renovationAcceptance')" 
      :visible.sync="visible"
      width="40%"
      @close="resetForm"
    >
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
8
      <el-form :model="form" ref="form" :rules="rules" label-width="120px">
e4e31451   wuxw   完成物业首页功能
9
10
11
12
13
14
15
        <el-form-item :label="$t('roomRenovationManage.room')" prop="roomName">
          <el-input 
            v-model.trim="form.roomName" 
            disabled
          />
        </el-form-item>
        
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
16
        <el-form-item :label="$t('roomRenovationManage.status')" prop="state" >
e4e31451   wuxw   完成物业首页功能
17
18
19
20
21
22
23
24
25
26
27
28
          <el-select v-model="form.state">
            <el-option 
              :label="$t('roomRenovationManage.acceptanceSuccess')" 
              value="5000" 
            />
            <el-option 
              :label="$t('roomRenovationManage.acceptanceFailed')" 
              value="6000" 
            />
          </el-select>
        </el-form-item>
        
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
29
        <el-form-item :label="$t('roomRenovationManage.acceptanceOpinion')" prop="remark" >
e4e31451   wuxw   完成物业首页功能
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
          <el-input 
            v-model.trim="form.remark" 
            type="textarea"
          />
        </el-form-item>
      </el-form>
      
      <div slot="footer" class="dialog-footer">
        <el-button @click="visible = false">
          {{ $t('roomRenovationManage.cancel') }}
        </el-button>
        <el-button type="primary" @click="saveRoomDecorationAcceptance">
          {{ $t('roomRenovationManage.save') }}
        </el-button>
      </div>
    </el-dialog>
  </template>
  
  <script>
  import { saveRoomRenovationDetail } from '@/api/community/roomRenovationManageApi'
  
  export default {
    name: 'RoomDecorationAcceptance',
    data() {
      return {
        visible: false,
        form: {
          rId: '',
          roomName: '',
7aa2ca34   wuxw   v1.9 修复装修状态不对bug
59
          roomId: '',
e4e31451   wuxw   完成物业首页功能
60
61
62
63
          state: '',
          remark: '',
          detailType: '1001',
          communityId: ''
acfe91a9   wuxw   v1.9 修复客户反馈车位结构图部...
64
65
66
67
68
69
70
71
        },
        rules: {
          state: [
            { required: true, message: this.$t('common.required'), trigger: 'change' }
          ],
          remark: [
            { required: true, message: this.$t('common.required'), trigger: 'blur' }
          ]
e4e31451   wuxw   完成物业首页功能
72
73
74
75
76
77
78
79
        }
      }
    },
    methods: {
      open(row) {
        this.form = {
          rId: row.rId,
          roomName: row.roomName,
7aa2ca34   wuxw   v1.9 修复装修状态不对bug
80
          roomId: row.roomId,
e4e31451   wuxw   完成物业首页功能
81
82
83
          state: '',
          remark: '',
          detailType: '1001',
81955f61   wuxw   优化房屋页面
84
          communityId: this.getCommunityId()
e4e31451   wuxw   完成物业首页功能
85
86
87
88
89
90
91
92
        }
        this.visible = true
      },
      
      resetForm() {
        this.form = {
          rId: '',
          roomName: '',
7aa2ca34   wuxw   v1.9 修复装修状态不对bug
93
          roomId: '',
e4e31451   wuxw   完成物业首页功能
94
95
96
          state: '',
          remark: '',
          detailType: '1001',
81955f61   wuxw   优化房屋页面
97
          communityId: this.getCommunityId()
e4e31451   wuxw   完成物业首页功能
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
        }
      },
      
      async saveRoomDecorationAcceptance() {
        try {
          await saveRoomRenovationDetail(this.form)
          this.$message.success(this.$t('common.operationSuccess'))
          this.visible = false
          this.$emit('success')
        } catch (error) {
          console.error('保存验收信息失败:', error)
          this.$message.error(error.message || this.$t('common.operationFailed'))
        }
      }
    }
  }
  </script>