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') } } }; });