update
parent
1d1d04d05d
commit
8928c7ac07
|
|
@ -277,6 +277,7 @@ export default {
|
|||
_renderRichTextArr(item) {
|
||||
const { value, editorModules } = this
|
||||
const { key, disabled = false, options } = item
|
||||
const length = value[key].length
|
||||
const removeItem = (index) => {
|
||||
value[key].splice(index, 1)
|
||||
// this.$set(this.value, key, richArr)
|
||||
|
|
@ -285,6 +286,16 @@ export default {
|
|||
value[key].push({ title: '', content: '' })
|
||||
// this.$set(this.value, key, richArr)
|
||||
}
|
||||
const handlerMove = (index, type) => {
|
||||
const _item = value[key][index]
|
||||
if (type === 'up') {
|
||||
value[key].splice(index, 1)
|
||||
value[key].splice(index - 1, 0, _item)
|
||||
} else {
|
||||
value[key].splice(index, 1)
|
||||
value[key].splice(index + 1, 0, _item)
|
||||
}
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
{value[key].map((item, index) => (
|
||||
|
|
@ -304,22 +315,42 @@ export default {
|
|||
</div>
|
||||
<SpRichText v-model={item.content} />
|
||||
</div>
|
||||
<el-popconfirm
|
||||
confirm-button-type='danger'
|
||||
confirm-button-text='删除'
|
||||
cancel-button-text='取消'
|
||||
icon='el-icon-info'
|
||||
icon-color='red'
|
||||
onConfirm={() => removeItem(index)}
|
||||
title='确认删除当前项?'
|
||||
>
|
||||
<div
|
||||
slot='reference'
|
||||
class='iconfont icon-trash-alt1'
|
||||
// onClick={() => removeItem(index)}
|
||||
style='font-size: 30px;padding: 0px 20px; margin-left: 50px; color: #F56C6C;'
|
||||
/>
|
||||
</el-popconfirm>
|
||||
<div style='display: flex;flex-direction:column;juctify-content:center;padding: 0px 20px; margin-left: 50px;'>
|
||||
{index !== 0 && (
|
||||
<el-tooltip class='item' effect='dark' content='向上移动' placement='top'>
|
||||
<i
|
||||
class='el-icon-top'
|
||||
style='font-size: 30px; color: #000;margin-bottom: 10px'
|
||||
onClick={() => handlerMove(index, 'up')}
|
||||
/>
|
||||
</el-tooltip>
|
||||
)}
|
||||
<el-popconfirm
|
||||
confirm-button-type='danger'
|
||||
confirm-button-text='删除'
|
||||
cancel-button-text='取消'
|
||||
icon='el-icon-info'
|
||||
icon-color='red'
|
||||
onConfirm={() => removeItem(index)}
|
||||
title='确认删除当前项?'
|
||||
>
|
||||
<div
|
||||
slot='reference'
|
||||
class='iconfont icon-trash-alt1'
|
||||
// onClick={() => removeItem(index)}
|
||||
style='font-size: 30px; color: #F56C6C;'
|
||||
/>
|
||||
</el-popconfirm>
|
||||
{index < length - 1 && (
|
||||
<el-tooltip class='item' effect='dark' content='向下移动' placement='bottom'>
|
||||
<i
|
||||
class='el-icon-bottom'
|
||||
style='font-size: 30px; color: #000;margin-top: 10px'
|
||||
onClick={() => handlerMove(index, 'down')}
|
||||
/>
|
||||
</el-tooltip>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
<el-button type='warning' size='small' onClick={addItem} style='margin:20px 0 0 20px;'>
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@
|
|||
:name="item.value"
|
||||
/>
|
||||
<el-table v-loading="loading" border :data="tableList">
|
||||
<el-table-column width="220" prop="order_id" label="订单信息">
|
||||
<el-table-column width="200" prop="order_id" label="订单信息">
|
||||
<template slot-scope="scope">
|
||||
<div class="order-num">
|
||||
{{ scope.row.order_id }}
|
||||
|
|
@ -205,13 +205,17 @@
|
|||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column width="100" label="商品货号">
|
||||
<template slot-scope="{ row }">
|
||||
<p v-for="item in row.items">{{ item.item_bn }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="total_fee" width="120" label="订单金额(¥)">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.total_fee / 100).toFixed(2) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="100" label="运费(¥)">
|
||||
<el-table-column width="0" label="运费(¥)">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.freight_fee || 0) / 100 }}
|
||||
</template>
|
||||
|
|
|
|||
|
|
@ -75,11 +75,16 @@
|
|||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="item_spec_desc" label="规格">
|
||||
<el-table-column prop="item_spec_desc" width="120" label="规格">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.item_spec_desc ? scope.row.item_spec_desc : '单规格' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="item_spec_desc" width="100" label="商品货号">
|
||||
<template slot-scope="{ row }">
|
||||
<p>{{ row.item_bn }}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="price" label="单价(¥)" width="100">
|
||||
<template slot-scope="scope">
|
||||
{{ (scope.row.price / 100).toFixed(2) }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue