master
fanfan 4 months ago
parent 39e416a9e7
commit 321b1fc341
  1. 20
      src/api/order/event.js
  2. 1
      src/components/Table/STable.js
  3. 1
      src/views/goods/category/modules/AddForm.vue
  4. 29
      src/views/order/Detail.vue
  5. 42
      src/views/order/modules/RemarkFormAdd.vue
  6. 93
      src/views/order/modules/RemarkFormDetails.vue
  7. 128
      src/views/order/modules/RemarkFormEdit.vue
  8. 5
      src/views/order/modules/index.js

@ -9,7 +9,25 @@ const api = {
extract: '/order.event/extract', extract: '/order.event/extract',
printer: '/order.event/printer' printer: '/order.event/printer'
} }
// 修改商家备注c查看
export function getRemark (params) {
return axios({
url: '/order.event/getRemark',
method: 'get',
params
})
}
/**
* 修改商家备注新增
* @param {*} data
*/
export function addRemark (data) {
return axios({
url: '/order.event/addRemark',
method: 'post',
data
})
}
/** /**
* 修改订单价格 * 修改订单价格
* @param {*} data * @param {*} data

@ -158,6 +158,7 @@ export default {
...filters ...filters
} }
) )
console.log(this.data,'KKKKKK')
// console.log('params', params) // console.log('params', params)
const result = this.data(params) const result = this.data(params)
// 对接自己的通用数据接口需要修改下方代码中的 r.page, r.totalCount, r.data // 对接自己的通用数据接口需要修改下方代码中的 r.page, r.totalCount, r.data

@ -111,7 +111,6 @@ export default {
confirmLoading: false, confirmLoading: false,
// //
form: this.$form.createForm(this), form: this.$form.createForm(this),
// //
categoryListTree: [] categoryListTree: []
} }

@ -135,7 +135,7 @@
<a-descriptions-item label="商家备注"> <a-descriptions-item label="商家备注">
<!-- <div v-html="record.merchant_remark" v-if="record.merchant_remark"></div> --> <!-- <div v-html="record.merchant_remark" v-if="record.merchant_remark"></div> -->
<!-- <Ueditor v-if="record.merchant_remark" v-decorator="['record.merchant_remark']" /> --> <!-- <Ueditor v-if="record.merchant_remark" v-decorator="['record.merchant_remark']" /> -->
<span style="color: #d6893b; cursor: pointer" @click="handleMerchantRemark">查看备注</span> <span style="color: #d6893b; cursor: pointer" @click="handleLookRemark">查看备注</span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item v-if="record.trade" label="第三方支付订单号"> <a-descriptions-item v-if="record.trade" label="第三方支付订单号">
<span>{{ record.trade ? record.trade.out_trade_no : '-' }}</span> <span>{{ record.trade ? record.trade.out_trade_no : '-' }}</span>
@ -278,8 +278,8 @@
<div class="deliver-goods-list clearfix"> <div class="deliver-goods-list clearfix">
<div class="goods-item" v-for="(goods, idx) in item.goods" :key="idx"> <div class="goods-item" v-for="(goods, idx) in item.goods" :key="idx">
<a-tooltip> <a-tooltip>
<template slot="title">{{ goods.goods_name?goods.goods_name:'' }}</template> <template slot="title">{{ goods.goods_name ? goods.goods_name : '' }}</template>
<img class="goods-img" :src="goods.goods_image?goods.goods_image:''" alt="商品图片" /> <img class="goods-img" :src="goods.goods_image ? goods.goods_image : ''" alt="商品图片" />
<div class="title">{{ goods.delivery_num }}</div> <div class="title">{{ goods.delivery_num }}</div>
</a-tooltip> </a-tooltip>
</div> </div>
@ -370,7 +370,8 @@
<CancelForm ref="CancelForm" @handleSubmit="handleRefresh" /> <CancelForm ref="CancelForm" @handleSubmit="handleRefresh" />
<PrinterForm ref="PrinterForm" @handleSubmit="handleRefresh" /> <PrinterForm ref="PrinterForm" @handleSubmit="handleRefresh" />
<PriceForm ref="PriceForm" @handleSubmit="handleRefresh" /> <PriceForm ref="PriceForm" @handleSubmit="handleRefresh" />
<RemarkForm ref="RemarkForm" @handleSubmit="handleRefresh" /> <RemarkFormEdit ref="RemarkFormEdit" @handleSubmit="handleRefresh" />
<RemarkFormAdd ref="RemarkFormAdd" @handleSubmit="handleRefresh" />
<JingDong ref="JingDong" @handleSubmit="handleRefresh" /> <JingDong ref="JingDong" @handleSubmit="handleRefresh" />
</div> </div>
</template> </template>
@ -379,7 +380,16 @@
import { inArray } from '@/utils/util' import { inArray } from '@/utils/util'
import * as Api from '@/api/order' import * as Api from '@/api/order'
import { GoodsItem, UserItem } from '@/components/Table' import { GoodsItem, UserItem } from '@/components/Table'
import { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm, JingDong } from './modules' import {
DeliveryForm,
ExtractForm,
CancelForm,
PrinterForm,
PriceForm,
RemarkFormEdit,
JingDong,
RemarkFormAdd,
} from './modules'
import { Ueditor } from '@/components' import { Ueditor } from '@/components'
import { import {
OrderTypeEnum, OrderTypeEnum,
@ -435,9 +445,10 @@ export default {
CancelForm, CancelForm,
PrinterForm, PrinterForm,
PriceForm, PriceForm,
RemarkForm,
Ueditor, Ueditor,
JingDong, JingDong,
RemarkFormAdd,
RemarkFormEdit,
}, },
data() { data() {
return { return {
@ -584,7 +595,11 @@ export default {
// //
handleMerchantRemark() { handleMerchantRemark() {
const { record } = this const { record } = this
this.$refs.RemarkForm.show(record) this.$refs.RemarkFormAdd.show(record)
},
handleLookRemark() {
const { record } = this
this.$refs.RemarkFormEdit.show(record)
}, },
// //
onClickJongDongLink() { onClickJongDongLink() {

@ -11,13 +11,17 @@
> >
<a-spin :spinning="isLoading"> <a-spin :spinning="isLoading">
<a-form :form="form"> <a-form :form="form">
<a-form-item <a-form-item label="备注内容" :labelCol="labelCol" :wrapperCol="wrapperCol">
label="备注内容" <a-textarea
:labelCol="labelCol" v-decorator="['remark', { rules: [{ required: true, message: '备注内容不能为空' }] }]"
:wrapperCol="wrapperCol" :autoSize="{ minRows: 4, maxRows: 6 }"
extra="商家备注内容仅后台可见,用户端不可见" autocomplete="off"
> />
<Ueditor v-decorator="['content']" /> </a-form-item>
</a-form>
<a-form :form="form">
<a-form-item label="备注图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage ref="childComponent" multiple :maxNum="10" v-decorator="['image_id']" />
</a-form-item> </a-form-item>
</a-form> </a-form>
</a-spin> </a-spin>
@ -27,10 +31,10 @@
<script> <script>
import _ from 'lodash' import _ from 'lodash'
import * as Api from '@/api/order/event' import * as Api from '@/api/order/event'
import { Ueditor } from '@/components' import { SelectImage } from '@/components'
export default { export default {
components: { components: {
Ueditor, SelectImage,
}, },
data() { data() {
return { return {
@ -56,25 +60,9 @@ export default {
show(record) { show(record) {
// //
this.visible = true this.visible = true
//
this.record = record this.record = record
// //
this.setFieldsValue()
},
//
setFieldsValue() {
const {
record,
$nextTick,
form: { setFieldsValue },
} = this
$nextTick(() => {
setFieldsValue({ content: record.merchant_remark })
console.log(content)
})
}, },
// //
handleSubmit(e) { handleSubmit(e) {
e.preventDefault() e.preventDefault()
@ -97,7 +85,7 @@ export default {
// api // api
onFormSubmit(values) { onFormSubmit(values) {
this.isLoading = true this.isLoading = true
Api.updateRemark({ orderId: this.record.order_id, form: values }) Api.addRemark({ orderId: this.record.order_id, form: values })
.then((result) => { .then((result) => {
// //
this.$message.success(result.message, 1.5) this.$message.success(result.message, 1.5)

@ -0,0 +1,93 @@
<template>
<a-modal
:title="title"
:width="560"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:maskClosable="false"
@cancel="handleCancel"
:footer="null"
>
<a-spin :spinning="isLoading" style="padding-bottom: 30px">
<a-form :form="form">
<a-form-item label="备注内容" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea
v-decorator="['remark', { rules: [{ required: true, message: '备注内容不能为空' }] }]"
:autoSize="{ minRows: 4, maxRows: 6 }"
autocomplete="off"
/>
</a-form-item>
</a-form>
<a-form :form="form">
<a-form-item label="备注图片" :labelCol="labelCol" :wrapperCol="wrapperCol">
<SelectImage
ref="childComponent"
:defaultList="record.image_url"
multiple
:maxNum="10"
v-decorator="['image_id']"
/>
</a-form-item>
</a-form>
</a-spin>
</a-modal>
</template>
<script>
import _ from 'lodash'
import * as Api from '@/api/order/event'
import { SelectImage } from '@/components'
export default {
components: {
SelectImage,
},
data() {
return {
//
title: '商家备注',
//
labelCol: { span: 6 },
//
wrapperCol: { span: 14 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
form: this.$form.createForm(this),
//
record: {},
}
},
created() {},
methods: {
//
show(record) {
//
this.visible = true
this.record = record
this.setFieldsValue()
//
},
//
setFieldsValue() {
const {
form: { setFieldsValue },
} = this
//
this.$nextTick(() => {
setFieldsValue(
// eslint-disable-next-line no-undef
_.pick(this.record, ['remark'])
)
})
},
//
handleCancel() {
this.visible = false
this.form.resetFields()
},
},
}
</script>

@ -0,0 +1,128 @@
<template>
<a-modal
:title="title"
:width="800"
:visible="visible"
:isLoading="isLoading"
:confirmLoading="isLoading"
:destroyOnClose="true"
@cancel="handleCancel"
:footer="null"
>
<a-spin :spinning="isLoading" style="padding-bottom:30px">
<table style="width: 100%">
<thead class="ant-table-thead">
<tr>
<th v-for="(item, index) in columns" :key="index">
<span class="ant-table-header-column">
<div>
<span class="ant-table-column-title">{{ item.title }}</span>
</div>
</span>
</th>
</tr>
</thead>
<tbody class="ant-table-tbody">
<template>
<!-- <div :key="`order_${item.order_id}_1`">{{ item.copy_text }}</div> -->
<tr v-for="(item, goodsIdx) in remarkList" :key="item.id">
<td>
<img width="50" height="50" :src="item.image_url[0].preview_url" alt="备注图片" />
</td>
<td>{{ item.remark }}</td>
<td>{{ item.create_time }}</td>
<td><a @click="handleLookRemarkDetails(item)">详情</a></td>
</tr>
</template>
</tbody>
</table>
</a-spin>
<RemarkFormDetails ref="RemarkFormDetails" />
</a-modal>
</template>
<script>
import _ from 'lodash'
import * as Api from '@/api/order/event'
import { SelectImage, STable } from '@/components'
import RemarkFormDetails from './RemarkFormDetails.vue'
const columns = [
{
title: '备注图片',
dataIndex: 'image_url',
scopedSlots: { customRender: 'image_url' },
},
{
title: '备注名称',
dataIndex: 'remark',
},
{
title: '添加时间',
width: '180px',
dataIndex: 'create_time',
},
{
title: '操作',
dataIndex: 'action',
width: '150px',
scopedSlots: { customRender: 'action' },
},
]
export default {
components: {
SelectImage,
STable,
RemarkFormDetails,
},
data() {
return {
//
title: '商家备注',
//
labelCol: { span: 6 },
//
wrapperCol: { span: 14 },
// modal()
visible: false,
// modal() loading
isLoading: false,
//
form: this.$form.createForm(this),
//
record: {},
columns,
remarkList: [],
}
},
created() {},
methods: {
handleLookRemarkDetails(record) {
this.$refs.RemarkFormDetails.show(record)
},
//
show(record) {
//
this.visible = true
//
this.record = record
//
this.getRemark()
},
//
getRemark() {
this.isLoading = true
return Api.getRemark({ orderId: this.record.order_id })
.then((response) => {
this.remarkList = response.data.list
})
.finally(() => (this.isLoading = false))
},
//
handleCancel() {
this.visible = false
this.form.resetFields()
},
},
}
</script>

@ -3,7 +3,8 @@ import ExtractForm from './ExtractForm'
import CancelForm from './CancelForm' import CancelForm from './CancelForm'
import PrinterForm from './PrinterForm' import PrinterForm from './PrinterForm'
import PriceForm from './PriceForm' import PriceForm from './PriceForm'
import RemarkForm from './RemarkForm' import RemarkFormAdd from './RemarkFormAdd'
import RemarkFormEdit from './RemarkFormEdit'
import JingDong from './JingDong' import JingDong from './JingDong'
export { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm, RemarkForm,JingDong } export { DeliveryForm, ExtractForm, CancelForm, PrinterForm, PriceForm,RemarkFormEdit, RemarkFormAdd,JingDong }

Loading…
Cancel
Save