You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!-- -- >
< template >
< div >
< xy -dialog :form ="form" :rules ="rules" ref = "dialog" type = "form" :is-show.sync ="isShow" title = "修改备注" @submit ="submit" >
< template v -slot : comment >
< div class = "xy-table-item" >
< div class = "xy-table-item-label" >
备注 :
< / div >
< div class = "xy-table-item-content" >
< el -input type = "textarea" :autosize ="{minRows:2}" placeholder = "请输入备注" clearable v-model ="form.comment" style="width: 300px;"></el-input>
</div>
</div>
</template>
</xy-dialog>
</div>
</template>
<script>
import {changeremark} from "@/api/finance"
import { Message } from 'element-ui'
export default {
data() {
return {
isShow:false,
id:'',
form:{
comment:''
},
comment:'',
rules:{
}
}
},
methods: {
submit(){
changeremark({
id:this.id,
comment:this.form.comment
}).then(res => {
Message({
type:'success',
message:'修改成功'
})
this.isShow = false
this.$emit('refresh')
})
return
}
},
watch:{
isShow(val){
if(val){
this.form.comment = this.comment
}else{
this.$refs['dialog'].reset()
this.id=''
this.comment = ''
}
}
}
}
</script>
<style scoped lang="scss" >
< / style >