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.
60 lines
1.6 KiB
60 lines
1.6 KiB
define([
|
|
"kefu-assets/api/kefu",
|
|
'text!./index.html',
|
|
'css!./index.css'
|
|
], function (kefuApi, template) {
|
|
return {
|
|
template,
|
|
name: "remarks",
|
|
props: {
|
|
remarkId: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
orderType: {
|
|
type: Number,
|
|
default: ""
|
|
},
|
|
content: {
|
|
type: String,
|
|
default: ""
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
formValidate: {
|
|
con: this.content
|
|
},
|
|
ruleInline: {
|
|
con: [
|
|
{ required: true, message: '请输入备注信息', trigger: 'change' }
|
|
],
|
|
}
|
|
}
|
|
},
|
|
methods: {
|
|
handleSubmit(name) {
|
|
this.$refs[name].validate((valid) => {
|
|
if (valid) {
|
|
kefuApi.orderRemark({
|
|
order_id: this.remarkId,
|
|
remark: this.formValidate.con,
|
|
order_type: this.orderType
|
|
}).then(res => {
|
|
this.$Message.success(res.msg)
|
|
this.$emit('remarkSuccess', this.formValidate.con);
|
|
}).catch(error => {
|
|
this.$Message.error(error.msg)
|
|
})
|
|
} else {
|
|
|
|
}
|
|
})
|
|
},
|
|
close() {
|
|
this.$emit('close')
|
|
}
|
|
}
|
|
};
|
|
|
|
}); |