|
@@ -141,6 +141,7 @@
|
|
:table-data="dataSource"
|
|
:table-data="dataSource"
|
|
row-key-field-name="id"
|
|
row-key-field-name="id"
|
|
:checkbox-option="checkboxOption"
|
|
:checkbox-option="checkboxOption"
|
|
|
|
+ :cell-style-option="cellStyleOption"
|
|
/>
|
|
/>
|
|
<div v-show="dataSource.length==0" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
|
|
<div v-show="dataSource.length==0" class="empty-data"><a-empty description="暂无数据" :image="simpleImage"/></div>
|
|
</a-spin>
|
|
</a-spin>
|
|
@@ -224,6 +225,13 @@ export default {
|
|
// column resize min width
|
|
// column resize min width
|
|
minWidth: 50
|
|
minWidth: 50
|
|
},
|
|
},
|
|
|
|
+ cellStyleOption: {
|
|
|
|
+ headerCellClass: ({ column, rowIndex }) => {
|
|
|
|
+ if (column.align != 'center') {
|
|
|
|
+ return 'table-header-cell-center'
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
dataSource: [],
|
|
dataSource: [],
|
|
showSearchBox: true, // 是否显示筛选条件
|
|
showSearchBox: true, // 是否显示筛选条件
|
|
openWarehouseModal: false, // 打开仓库设置
|
|
openWarehouseModal: false, // 打开仓库设置
|
|
@@ -289,14 +297,14 @@ export default {
|
|
return data || data == 0 ? data : '--'
|
|
return data || data == 0 ? data : '--'
|
|
}
|
|
}
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '', field: '', key: '0', width: 40, type: 'checkbox', align: 'center' },
|
|
|
|
- { title: '序号', field: 'no', key: '1', width: 50, align: 'center', operationColumn: false },
|
|
|
|
|
|
+ { title: '', field: '', key: '0', width: 30, type: 'checkbox', align: 'center' },
|
|
|
|
+ { title: '序号', field: 'no', key: '1', width: 30, align: 'center', operationColumn: false },
|
|
{
|
|
{
|
|
title: '产品编码',
|
|
title: '产品编码',
|
|
field: 'productCode',
|
|
field: 'productCode',
|
|
key: '2',
|
|
key: '2',
|
|
- align: 'center',
|
|
|
|
- width: 120,
|
|
|
|
|
|
+ align: 'left',
|
|
|
|
+ width: 100,
|
|
operationColumn: false,
|
|
operationColumn: false,
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
return (
|
|
return (
|
|
@@ -311,12 +319,32 @@ export default {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- { title: '产品名称', field: 'productName', key: '3', width: 150, align: 'center', operationColumn: false, ellipsis: { showTitle: true }, renderBodyCell: ({ row, column, rowIndex }, h) => { return row.productEntity.name || '--' } },
|
|
|
|
|
|
+ {
|
|
|
|
+ title: '产品名称',
|
|
|
|
+ field: 'productName',
|
|
|
|
+ key: '3',
|
|
|
|
+ width: 150,
|
|
|
|
+ align: 'left',
|
|
|
|
+ operationColumn: false,
|
|
|
|
+ ellipsis: { showTitle: true },
|
|
|
|
+ renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
|
|
+ return (
|
|
|
|
+ <div class="ellipsisCon">
|
|
|
|
+ <a-tooltip placement="rightBottom">
|
|
|
|
+ <template slot="title">
|
|
|
|
+ <span>{ row.productEntity.name || '--' }</span>
|
|
|
|
+ </template>
|
|
|
|
+ <span class="ellipsisText">{ row.productEntity.name || '--' }</span>
|
|
|
|
+ </a-tooltip>
|
|
|
|
+ </div>
|
|
|
|
+ )
|
|
|
|
+ }
|
|
|
|
+ },
|
|
{
|
|
{
|
|
title: '规则数量',
|
|
title: '规则数量',
|
|
field: 'rulesNums',
|
|
field: 'rulesNums',
|
|
key: '4',
|
|
key: '4',
|
|
- width: 60,
|
|
|
|
|
|
+ width: 50,
|
|
align: 'center',
|
|
align: 'center',
|
|
operationColumn: false,
|
|
operationColumn: false,
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
@@ -339,7 +367,7 @@ export default {
|
|
</a-popover> : '--'
|
|
</a-popover> : '--'
|
|
)
|
|
)
|
|
} },
|
|
} },
|
|
- { title: '起订量', field: 'promoUnit', key: '5', width: 100, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
|
|
|
|
|
|
+ { title: '起订量', field: 'promoUnit', key: '5', width: 60, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } },
|
|
{
|
|
{
|
|
title: '销售数量',
|
|
title: '销售数量',
|
|
field: 'salesNums',
|
|
field: 'salesNums',
|
|
@@ -388,7 +416,7 @@ export default {
|
|
{
|
|
{
|
|
title: '出库仓库',
|
|
title: '出库仓库',
|
|
field: 'warehouseBox',
|
|
field: 'warehouseBox',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 80,
|
|
key: '8',
|
|
key: '8',
|
|
align: 'center',
|
|
align: 'center',
|
|
operationColumn: false,
|
|
operationColumn: false,
|
|
@@ -417,7 +445,7 @@ export default {
|
|
{
|
|
{
|
|
title: '操作',
|
|
title: '操作',
|
|
field: 'action',
|
|
field: 'action',
|
|
- width: 100,
|
|
|
|
|
|
+ width: 80,
|
|
key: 'action',
|
|
key: 'action',
|
|
align: 'center',
|
|
align: 'center',
|
|
fixed: 'right',
|
|
fixed: 'right',
|
|
@@ -452,23 +480,28 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
]
|
|
- if (this.showStockCol) {
|
|
|
|
- arr.splice(7, 0, { title: '第三方库存', field: 'thirdStockQty', key: 'thirdStockQty', width: 80, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
|
|
|
|
- }
|
|
|
|
// 售价权限
|
|
// 售价权限
|
|
- if (this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
|
|
- arr.splice(4, 0, { title: '售价(原价)',
|
|
|
|
|
|
+ if (_this.$hasPermissions('B_salesEdit_salesPrice')) {
|
|
|
|
+ arr.splice(4, 0, {
|
|
|
|
+ title: '售价(原价)',
|
|
field: 'price',
|
|
field: 'price',
|
|
- width: 120,
|
|
|
|
|
|
+ width: 100,
|
|
key: 'price',
|
|
key: 'price',
|
|
- align: 'center',
|
|
|
|
|
|
+ align: 'right',
|
|
operationColumn: false,
|
|
operationColumn: false,
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
renderBodyCell: ({ row, column, rowIndex }, h) => {
|
|
return <div>{_this.toThousands(row[column.field])}<span style="color:#666;margin-left:3px;" title="原价">({_this.toThousands(row.origPrice)})</span></div>
|
|
return <div>{_this.toThousands(row[column.field])}<span style="color:#666;margin-left:3px;" title="原价">({_this.toThousands(row.origPrice)})</span></div>
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- arr.splice(5, 0, { title: '价格级别', field: 'priceLevelDictValue', width: 80, key: 'priceLevel', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } })
|
|
|
|
- arr.splice((_this.showStockCol ? 10 : 9), 0, { title: '售价小计', field: 'totalAmount', key: 'totalAmount', width: 80, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
|
|
|
|
|
|
+ arr.splice(5, 0, { title: '价格级别', field: 'priceLevelDictValue', width: 60, key: 'priceLevel', align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return row[column.field] || '--' } })
|
|
|
|
+ if (_this.showStockCol) {
|
|
|
|
+ arr.splice(10, 0, { title: '第三方库存', field: 'thirdStockQty', key: 'thirdStockQty', width: 60, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
|
|
|
|
+ }
|
|
|
|
+ arr.splice((_this.showStockCol ? 11 : 10), 0, { title: '售价小计', field: 'totalAmount', key: 'totalAmount', width: 60, align: 'right', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return priceFormat(row[column.field]) } })
|
|
|
|
+ } else {
|
|
|
|
+ if (_this.showStockCol) {
|
|
|
|
+ arr.splice(8, 0, { title: '第三方库存', field: 'thirdStockQty', key: 'thirdStockQty', width: 60, align: 'center', operationColumn: false, renderBodyCell: ({ row, column, rowIndex }, h) => { return numsFormat(row[column.field]) } })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
return arr
|
|
return arr
|
|
}
|
|
}
|
|
@@ -557,8 +590,8 @@ export default {
|
|
},
|
|
},
|
|
// 查询第三方库存
|
|
// 查询第三方库存
|
|
searchThreeStockOk () {
|
|
searchThreeStockOk () {
|
|
- this.showStockCol = true
|
|
|
|
this.resetSearchForm()
|
|
this.resetSearchForm()
|
|
|
|
+ this.showStockCol = true
|
|
},
|
|
},
|
|
// 表格选中项
|
|
// 表格选中项
|
|
rowSelectionFun (obj) {
|
|
rowSelectionFun (obj) {
|
|
@@ -585,7 +618,6 @@ export default {
|
|
this.rowSelectionInfo = null
|
|
this.rowSelectionInfo = null
|
|
this.getTableData()
|
|
this.getTableData()
|
|
this.clearTableSelect()
|
|
this.clearTableSelect()
|
|
- this.showStockCol = false
|
|
|
|
},
|
|
},
|
|
// 查询产品,不重置
|
|
// 查询产品,不重置
|
|
searchProduct () {
|
|
searchProduct () {
|
|
@@ -928,36 +960,11 @@ export default {
|
|
position: absolute;
|
|
position: absolute;
|
|
bottom: 50px;
|
|
bottom: 50px;
|
|
width: 100%;
|
|
width: 100%;
|
|
|
|
+ }
|
|
|
|
+ .table-header-cell-center{
|
|
|
|
+ text-align: center!important;
|
|
}
|
|
}
|
|
.ant-input-number-sm input{
|
|
.ant-input-number-sm input{
|
|
text-align: center;
|
|
text-align: center;
|
|
}
|
|
}
|
|
- .alert-bar{
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- align-items: center;
|
|
|
|
- .countData{
|
|
|
|
- span{
|
|
|
|
- margin: 0 2px;
|
|
|
|
- color: rgb(0, 153, 255);
|
|
|
|
- }
|
|
|
|
- span.cor1{
|
|
|
|
- color: rgb(248, 132, 0);
|
|
|
|
- }
|
|
|
|
- b{
|
|
|
|
- font-weight: bold;
|
|
|
|
- span{
|
|
|
|
- color: red;
|
|
|
|
- font-weight: normal;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- > div{
|
|
|
|
- &:first-child{
|
|
|
|
- flex-grow: 1;
|
|
|
|
- width:70%;
|
|
|
|
- padding-right: 100px;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
</style>
|
|
</style>
|