|
@@ -23,7 +23,7 @@
|
|
:max="999999"
|
|
:max="999999"
|
|
:min="1"
|
|
:min="1"
|
|
:precision="0"
|
|
:precision="0"
|
|
- @change="onCellChange(record.id, 'qty', $event)" />
|
|
|
|
|
|
+ @change="onCellChange(record, $event)" />
|
|
</template>
|
|
</template>
|
|
<!-- 操作 -->
|
|
<!-- 操作 -->
|
|
<template slot="action" slot-scope="text, record">
|
|
<template slot="action" slot-scope="text, record">
|
|
@@ -41,15 +41,16 @@
|
|
<script>
|
|
<script>
|
|
import { salesDetailList } from '@/api/salesDetail'
|
|
import { salesDetailList } from '@/api/salesDetail'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
|
|
+import EditableCell from '@/views/common/editInput.js'
|
|
export default {
|
|
export default {
|
|
name: 'Promotable',
|
|
name: 'Promotable',
|
|
- components: { STable, VSelect },
|
|
|
|
|
|
+ components: { STable, VSelect, EditableCell },
|
|
props: {
|
|
props: {
|
|
salesBillSn: {
|
|
salesBillSn: {
|
|
type: [Number, String],
|
|
type: [Number, String],
|
|
default: ''
|
|
default: ''
|
|
},
|
|
},
|
|
- newLoading: Boolean
|
|
|
|
|
|
+ delLoading: Boolean
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -65,7 +66,7 @@ export default {
|
|
{ title: '成本价', dataIndex: 'showCost', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '成本价', dataIndex: 'showCost', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '原售价', dataIndex: 'origPrice', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '原售价', dataIndex: 'origPrice', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '促销价', dataIndex: 'price', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '促销价', dataIndex: 'price', width: 150, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
- { title: '数量', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
|
|
|
|
|
|
+ { title: '数量', dataIndex: 'qty', scopedSlots: { customRender: 'salesNums' }, width: 150, align: 'center' },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '促销类型', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '促销类型', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return '¥' + (text || 0) } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 200, align: 'center', fixed: 'right' }
|
|
@@ -90,8 +91,8 @@ export default {
|
|
this.$refs.table.refresh()
|
|
this.$refs.table.refresh()
|
|
},
|
|
},
|
|
// 修改数量
|
|
// 修改数量
|
|
- onCellChange (id, key, $event) {
|
|
|
|
- this.$emit('onCellChange', id, key, $event)
|
|
|
|
|
|
+ onCellChange (row, $event) {
|
|
|
|
+ this.$emit('onCellChange', row, $event)
|
|
},
|
|
},
|
|
// 删除
|
|
// 删除
|
|
handleDel (row) {
|
|
handleDel (row) {
|