4927ce37
wuxw
开发完成报修功能
|
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
|
<div slot="footer" class="dialog-footer">
<el-button @click="visible = false">
{{ $t('common.cancel') }}
</el-button>
<el-button type="primary" @click="submitVisit">
{{ $t('common.submit') }}
</el-button>
</div>
</el-dialog>
</template>
<script>
import { saveRepairReturnVisit } from '@/api/work/repairReturnVisitApi'
export default {
name: 'VisitOwnerRepair',
data() {
return {
visible: false,
formData: {
repairId: '',
visitType: '',
context: ''
},
rules: {
visitType: [
{ required: true, message: this.$t('repairReturnVisit.satisfactionRequired'), trigger: 'change' }
],
context: [
{ required: true, message: this.$t('repairReturnVisit.visitContentRequired'), trigger: 'blur' },
{ max: 1000, message: this.$t('repairReturnVisit.visitContentMaxLength'), trigger: 'blur' }
]
}
}
},
methods: {
open(repairPool) {
this.formData = {
repairId: repairPool.repairId,
visitType: '',
context: '',
|
4927ce37
wuxw
开发完成报修功能
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
}
this.visible = true
},
resetForm() {
this.$refs.visitForm.resetFields()
},
submitVisit() {
this.$refs.visitForm.validate(async valid => {
if (valid) {
try {
await saveRepairReturnVisit(this.formData)
this.$message.success(this.$t('common.submitSuccess'))
this.visible = false
this.$emit('success')
} catch (error) {
console.error('保存回访记录失败:', error)
}
}
})
}
}
}
</script>
|