remarkDialog.vue
2.56 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<!-- 备注 -->
<template>
<GLDialog bigTitle="备注"
:visible.sync="dialogShow"
class="accountDailog"
width="600px"
mode="big"
:close-on-click-modal="false"
:before-close="handleClose"
@onOk="handleAddConfirm"
@onCancel="dialogShow = false">
<el-form label-width="120px"
:model="infoForm"
ref="formRef"
:rules="formRules"
:inline="true">
<el-form-item label="备注:"
prop="yqMerchantId">
<el-input type="textarea"
class="default-width"
placeholder="请输入内容"
v-model="infoForm.remark"
maxlength="15"
:rows="4"
show-word-limit></el-input>
</el-form-item>
</el-form>
</GLDialog>
</template>
<script>
export default {
name: 'RemarkDialog',
data() {
return {
infoForm: {
remark: ''
},
dialogConfig: {
title: '备注',
width: '600px'
},
rejectRef: 'rejectRef',
formRules: {
// remark: [{ required: true, message: '请输入驳回原因', trigger: 'blur' }]
},
editFormData: [
{
label: '备注',
name: 'remark',
type: 'input',
maxlength: 15,
inputType: 'textarea',
showLimit: true,
rows: 4
}
],
baseData: {}
}
},
props: {
visible: {
type: Boolean,
default: false
},
paramsObj: {
type: Object,
default: null
}
},
computed: {
dialogShow: {
get() {
return this.visible
},
set(newVal) {
this.$emit('dialogClose', { flag: newVal })
}
}
},
mounted() {
console.log('paramsObj', this.paramsObj)
this.infoForm.remark = this.$common.utils.deepClone(this.paramsObj.remark)
},
methods: {
handleAddConfirm() {
this.$refs.formRef.validate(valid => {
if (valid) {
var params = {}
params.remark = this.infoForm.remark
params.inviteFollowRecordId = this.paramsObj.inviteFollowRecordId
this.$apis.invitation.followRecordUpdate(params).then(res => {
this.$notify({
type: 'success',
title: '操作成功'
})
this.dialogShow = true
})
}
})
}
}
}
</script>
<style lang="scss" scoped>
.reject-dialog {
margin-top: 20px;
}
.default-width {
width: 400px;
}
</style>