富文本回显

main
fanfan 9 months ago
parent 6ac14aeccb
commit 5971a9b182
  1. 6
      src/views/order/Detail.vue
  2. 27
      src/views/order/modules/RemarkForm.vue

@ -130,7 +130,9 @@
<span>{{ record.buyer_remark ? record.buyer_remark : '-' }}</span>
</a-descriptions-item>
<a-descriptions-item label="商家备注">
<span>{{ record.merchant_remark ? record.merchant_remark : '-' }}</span>
<!-- <div v-html="record.merchant_remark" v-if="record.merchant_remark"></div> -->
<!-- <Ueditor v-if="record.merchant_remark" v-decorator="['record.merchant_remark']" /> -->
<span style="color: #d6893b;cursor: pointer;" @click="handleMerchantRemark">查看备注</span>
</a-descriptions-item>
<a-descriptions-item v-if="record.trade" label="第三方支付订单号">
<span>{{ record.trade ? record.trade.out_trade_no : '-' }}</span>
@ -374,6 +376,7 @@ import { inArray } from '@/utils/util'
import * as Api from '@/api/order'
import { GoodsItem, UserItem } from '@/components/Table'
import { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm } from './modules'
import { Ueditor} from '@/components'
import {
OrderTypeEnum,
DeliveryStatusEnum,
@ -429,6 +432,7 @@ export default {
PrinterForm,
PriceForm,
RemarkForm,
Ueditor
},
data() {
return {

@ -30,7 +30,7 @@ import * as Api from '@/api/order/event'
import { Ueditor } from '@/components'
export default {
components: {
Ueditor
Ueditor,
},
data() {
return {
@ -47,13 +47,11 @@ export default {
//
form: this.$form.createForm(this),
//
record: {}
record: {},
}
},
created () {
},
created() {},
methods: {
//
show(record) {
//
@ -66,7 +64,11 @@ export default {
//
setFieldsValue() {
const { record, $nextTick, form: { setFieldsValue } } = this
const {
record,
$nextTick,
form: { setFieldsValue },
} = this
$nextTick(() => {
setFieldsValue({ content: record.merchant_remark })
})
@ -76,7 +78,9 @@ export default {
handleSubmit(e) {
e.preventDefault()
//
const { form: { validateFields } } = this
const {
form: { validateFields },
} = this
validateFields((errors, values) => {
// api
!errors && this.onFormSubmit(values)
@ -93,7 +97,7 @@ export default {
onFormSubmit(values) {
this.isLoading = true
Api.updateRemark({ orderId: this.record.order_id, form: values })
.then(result => {
.then((result) => {
//
this.$message.success(result.message, 1.5)
//
@ -101,9 +105,8 @@ export default {
//
this.$emit('handleSubmit', values)
})
.finally(() => this.isLoading = false)
}
}
.finally(() => (this.isLoading = false))
},
},
}
</script>

Loading…
Cancel
Save