|
@@ -121,15 +121,17 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 售价 -->
|
|
<!-- 售价 -->
|
|
<template slot="salePrice" slot-scope="text, record">
|
|
<template slot="salePrice" slot-scope="text, record">
|
|
- <div @dblclick.stop>
|
|
|
|
|
|
+ <div style="display: flex;align-items: center;" @dblclick.stop>
|
|
<a-input-number
|
|
<a-input-number
|
|
size="small"
|
|
size="small"
|
|
- v-model="record.salePrice"
|
|
|
|
|
|
+ v-model="record.price"
|
|
:precision="2"
|
|
:precision="2"
|
|
:min="0"
|
|
:min="0"
|
|
:max="999999"
|
|
:max="999999"
|
|
style="width: 100%;"
|
|
style="width: 100%;"
|
|
placeholder="请输入" />
|
|
placeholder="请输入" />
|
|
|
|
+ <span style="color: red;margin: 0 2px;font-size: 14px;" v-if="record.origSalePriceFlag == 1">原</span>
|
|
|
|
+ <span v-else> </span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<!-- 销售数量 -->
|
|
<!-- 销售数量 -->
|
|
@@ -280,16 +282,16 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '产品编码', dataIndex: 'productCode', width: '14%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', width: '18%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '原厂编码', dataIndex: 'productOrigCode', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '品牌', dataIndex: 'brandName', width: '10%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '品牌', dataIndex: 'brandName', width: '11%', align: 'center', sorter: true, customRender: function (text) { return text || '--' } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '仓位', dataIndex: 'warehouseLocationName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '库存数量', dataIndex: 'currentQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '库存数量', dataIndex: 'currentQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '单位', dataIndex: 'unit', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '7%', align: 'center' },
|
|
{ title: '售价', dataIndex: 'salePrice', scopedSlots: { customRender: 'salePrice' }, width: '7%', align: 'center' },
|
|
- { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '7%', align: 'center' },
|
|
|
|
|
|
+ { title: '销售数量', dataIndex: 'salesNums', scopedSlots: { customRender: 'nums' }, width: '6%', align: 'center' },
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
|
|
{ title: '操作', dataIndex: 'action', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
|
|
]
|
|
]
|
|
if (this.cost) {
|
|
if (this.cost) {
|
|
@@ -329,6 +331,7 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].salesNums = 1
|
|
data.list[i].salesNums = 1
|
|
data.list[i].currentQty = data.list[i].currentQty || 0
|
|
data.list[i].currentQty = data.list[i].currentQty || 0
|
|
|
|
+ data.list[i].price = data.list[i].lastSalePrice ? data.list[i].lastSalePrice : data.list[i].salePrice
|
|
}
|
|
}
|
|
if (!params.vinCode) {
|
|
if (!params.vinCode) {
|
|
_this.vinInfoData = null
|
|
_this.vinInfoData = null
|
|
@@ -407,7 +410,21 @@ export default {
|
|
},
|
|
},
|
|
// 选择配件
|
|
// 选择配件
|
|
handleAdd (row) {
|
|
handleAdd (row) {
|
|
- this.$emit('add', row)
|
|
|
|
|
|
+ const _this = this
|
|
|
|
+ console.log(row.price, row.lastSalePrice, row.salePrice, row.lastSalePrice < row.salePrice)
|
|
|
|
+ if (row.lastSalePrice && (row.price < row.salePrice)) {
|
|
|
|
+ _this.$confirm({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '售价低于定价,是否仍继续添加?',
|
|
|
|
+ centered: true,
|
|
|
|
+ closable: true,
|
|
|
|
+ onOk () {
|
|
|
|
+ _this.$emit('add', row)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ _this.$emit('add', row)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 销售记录
|
|
// 销售记录
|
|
handleDetail (row) {
|
|
handleDetail (row) {
|