|
@@ -109,44 +109,44 @@
|
|
<!-- alert -->
|
|
<!-- alert -->
|
|
<div class="tongji-bar">
|
|
<div class="tongji-bar">
|
|
<div>
|
|
<div>
|
|
- 总客户数:<strong>{{ productTotal && (productTotal.totalBuyerQty || productTotal.totalBuyerQty==0) ? productTotal.totalBuyerQty : '--' }}</strong>,
|
|
|
|
- 总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
|
|
|
|
- 缺货总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
|
|
|
|
- 缺货总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>,
|
|
|
|
- <span v-if="$hasPermissions('M_shortageStatisticsCList_salesPrice')">缺货总金额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? toThousands(productTotal.totalAmount) : '--' }}</strong></span>
|
|
|
|
|
|
+ <div>
|
|
|
|
+ 总客户数:<strong>{{ productTotal && (productTotal.totalBuyerQty || productTotal.totalBuyerQty==0) ? productTotal.totalBuyerQty : '--' }}</strong>,
|
|
|
|
+ 总单数:<strong>{{ productTotal && (productTotal.totalRecord || productTotal.totalRecord==0) ? productTotal.totalRecord : '--' }}</strong>,
|
|
|
|
+ 缺货总款数:<strong>{{ productTotal && (productTotal.totalCategory || productTotal.totalCategory==0) ? productTotal.totalCategory : '--' }}</strong>,
|
|
|
|
+ 缺货总数量:<strong>{{ productTotal && (productTotal.totalQty || productTotal.totalQty==0) ? productTotal.totalQty : '--' }}</strong>,
|
|
|
|
+ <span v-if="$hasPermissions('M_shortageStatisticsCList_salesPrice')">缺货总金额:<strong>{{ productTotal && (productTotal.totalAmount || productTotal.totalAmount==0) ? toThousands(productTotal.totalAmount) : '--' }}</strong></span>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ 本页客户数:<strong>{{ currentTotal && (currentTotal.totalBuyerQty || currentTotal.totalBuyerQty==0) ? currentTotal.totalBuyerQty : '--' }}</strong>,
|
|
|
|
+ 本页总单数:<strong>{{ currentTotal && (currentTotal.totalRecord || currentTotal.totalRecord==0) ? currentTotal.totalRecord : '--' }}</strong>,
|
|
|
|
+ 本页缺货总款数:<strong>{{ currentTotal && (currentTotal.totalCategory || currentTotal.totalCategory==0) ? currentTotal.totalCategory : '--' }}</strong>,
|
|
|
|
+ 本页缺货总数量:<strong>{{ currentTotal && (currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--' }}</strong>,
|
|
|
|
+ <span v-if="$hasPermissions('M_shortageStatisticsCList_salesPrice')">本页缺货总金额:<strong>{{ currentTotal && (currentTotal.totalAmount || currentTotal.totalAmount==0) ? toThousands(currentTotal.totalAmount) : '--' }}</strong></span>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- 本页客户数:<strong>{{ currentTotal && (currentTotal.totalBuyerQty || currentTotal.totalBuyerQty==0) ? currentTotal.totalBuyerQty : '--' }}</strong>,
|
|
|
|
- 本页总单数:<strong>{{ currentTotal && (currentTotal.totalRecord || currentTotal.totalRecord==0) ? currentTotal.totalRecord : '--' }}</strong>,
|
|
|
|
- 本页缺货总款数:<strong>{{ currentTotal && (currentTotal.totalCategory || currentTotal.totalCategory==0) ? currentTotal.totalCategory : '--' }}</strong>,
|
|
|
|
- 本页缺货总数量:<strong>{{ currentTotal && (currentTotal.totalQty || currentTotal.totalQty==0) ? currentTotal.totalQty : '--' }}</strong>,
|
|
|
|
- <span v-if="$hasPermissions('M_shortageStatisticsCList_salesPrice')">本页缺货总金额:<strong>{{ currentTotal && (currentTotal.totalAmount || currentTotal.totalAmount==0) ? toThousands(currentTotal.totalAmount) : '--' }}</strong></span>
|
|
|
|
|
|
+ <hideCellMenus :defHiddenKes="defHiddenKes" v-model="hidekey"></hideCellMenus>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- 列表 -->
|
|
<!-- 列表 -->
|
|
- <s-table
|
|
|
|
|
|
+ <v-table
|
|
class="sTable fixPagination"
|
|
class="sTable fixPagination"
|
|
ref="table"
|
|
ref="table"
|
|
- :style="{ height: tableHeight+65+'px' }"
|
|
|
|
|
|
+ :style="{ height: tableHeight+32+'px' }"
|
|
size="small"
|
|
size="small"
|
|
- :rowKey="(record) => record.no"
|
|
|
|
rowKeyName="no"
|
|
rowKeyName="no"
|
|
- :pageSize="30"
|
|
|
|
|
|
+ :pagination="{pageSize:30}"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
:defaultLoadData="false"
|
|
:defaultLoadData="false"
|
|
- :scroll="{ x: 2020, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
- <!-- 单号 -->
|
|
|
|
- <template slot="salesBillNo" slot-scope="text, record">
|
|
|
|
- {{ record.salesBillNo }}
|
|
|
|
- </template>
|
|
|
|
<template slot="productCode" slot-scope="text, record">
|
|
<template slot="productCode" slot-scope="text, record">
|
|
- <span style="padding-right: 15px;">{{ text }}</span>
|
|
|
|
- <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'80%' }"></a-badge>
|
|
|
|
- <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'80%' }"></a-badge>
|
|
|
|
|
|
+ <span style="padding-right: 10px;">{{ text }}</span>
|
|
|
|
+ <a-badge count="促" v-if="record.promotionFlag=='GIFT'" :number-style="{ backgroundColor: '#52c41a', zoom:'0.8' }"></a-badge>
|
|
|
|
+ <a-badge count="特" v-if="record.promotionFlag=='DISCOUNT'" :number-style="{ backgroundColor: '#faad14', zoom:'0.8' }"></a-badge>
|
|
</template>
|
|
</template>
|
|
- </s-table>
|
|
|
|
|
|
+ </v-table>
|
|
</a-spin>
|
|
</a-spin>
|
|
</a-card>
|
|
</a-card>
|
|
</div>
|
|
</div>
|
|
@@ -156,7 +156,7 @@
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import moment from 'moment'
|
|
import moment from 'moment'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
-import { STable, VSelect } from '@/components'
|
|
|
|
|
|
+import { VTable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
@@ -166,11 +166,12 @@ import ProductBrand from '@/views/common/productBrand.js'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import chooseWarehouse from '@/views/common/chooseWarehouse'
|
|
import customerService from '@/views/common/customerService'
|
|
import customerService from '@/views/common/customerService'
|
|
import dealerType from '@/views/common/dealerType.js'
|
|
import dealerType from '@/views/common/dealerType.js'
|
|
|
|
+import hideCellMenus from '@/views/common/hideCellMenus'
|
|
import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
|
|
import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
|
|
export default {
|
|
export default {
|
|
name: 'ShortageStatisticsCList',
|
|
name: 'ShortageStatisticsCList',
|
|
mixins: [commonMixin],
|
|
mixins: [commonMixin],
|
|
- components: { STable, VSelect, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType, chooseWarehouse, customerService, dealerType },
|
|
|
|
|
|
+ components: { VTable, VSelect, hideCellMenus, dealerSubareaScopeList, subarea, Area, rangeDate, ProductBrand, ProductType, chooseWarehouse, customerService, dealerType },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
@@ -221,6 +222,8 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
if (data.list[i].dealerEntity.dealerTypeName1) {
|
|
if (data.list[i].dealerEntity.dealerTypeName1) {
|
|
data.list[i].dealerTypeName = data.list[i].dealerEntity.dealerTypeName1 + '>' + data.list[i].dealerEntity.dealerTypeName2
|
|
data.list[i].dealerTypeName = data.list[i].dealerEntity.dealerTypeName1 + '>' + data.list[i].dealerEntity.dealerTypeName2
|
|
|
|
+ data.list[i].offlineReasonType = data.list[i].productEntity.offlineReasonType
|
|
|
|
+ data.list[i].commonCode = data.list[i].productEntity.commonCode
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.disabled = false
|
|
this.disabled = false
|
|
@@ -233,43 +236,45 @@ export default {
|
|
},
|
|
},
|
|
productType: [],
|
|
productType: [],
|
|
productTotal: null,
|
|
productTotal: null,
|
|
- currentTotal: null
|
|
|
|
|
|
+ currentTotal: null,
|
|
|
|
+ defHiddenKes: [
|
|
|
|
+ { title: '操作员', key: 'operatorName', checked: false },
|
|
|
|
+ { title: '缺货说明', key: 'offlineReasonType', checked: false },
|
|
|
|
+ { title: '通用编码', key: 'commonCode', checked: false }
|
|
|
|
+ ],
|
|
|
|
+ hidekey: []
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
columns () {
|
|
columns () {
|
|
const arr = [
|
|
const arr = [
|
|
- { title: '区域', dataIndex: 'subareaArea.subareaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: 100, align: 'center' },
|
|
|
|
- { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 60, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: 140, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- { title: '仓库', dataIndex: 'warehouseName', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
- // { title: '客户类型', dataIndex: 'dealerTypeName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: 120, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '区域', dataIndex: 'subareaArea.subareaName', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '销售单号', dataIndex: 'salesBillNo', width: 100, align: 'center' },
|
|
|
|
+ { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: 120, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '仓库', dataIndex: 'warehouseName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '品牌', dataIndex: 'productEntity.productBrandName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '品牌', dataIndex: 'productEntity.productBrandName', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品名称', dataIndex: 'productName', width: 180, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品名称', dataIndex: 'productName', width: 180, align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 120, align: 'left', scopedSlots: { customRender: 'productCode' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 120, align: 'left', scopedSlots: { customRender: 'productCode' } },
|
|
- { title: '单位', dataIndex: 'productEntity.unit', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 40, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品状态', dataIndex: 'productEntity.stateDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品状态', dataIndex: 'productEntity.stateDictValue', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '缺货数量', dataIndex: 'qty', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '缺货数量', dataIndex: 'qty', width: 60, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- // { title: '缺货成本金额', dataIndex: 'totalCostAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- // { title: '缺货实售金额', dataIndex: 'totalSalesAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- // { title: '缺货开单金额', dataIndex: 'totalAmount', width: 90, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
- { title: '操作员', dataIndex: 'operatorName', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '缺货说明', dataIndex: 'productEntity.offlineReasonType', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
- { title: '通用编码', dataIndex: 'productEntity.commonCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } }
|
|
|
|
|
|
+ { title: '操作员', dataIndex: 'operatorName', key: 'operatorName', width: 50, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '缺货说明', dataIndex: 'offlineReasonType', key: 'offlineReasonType', width: 80, align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
+ { title: '通用编码', dataIndex: 'commonCode', key: 'commonCode', width: 80, align: 'center', customRender: function (text) { return text || '--' } }
|
|
]
|
|
]
|
|
if (this.$hasPermissions('M_shortageStatisticsCList_costPrice')) { // 成本价权限
|
|
if (this.$hasPermissions('M_shortageStatisticsCList_costPrice')) { // 成本价权限
|
|
- arr.splice(15, 0, { title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: 90, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
|
|
+ arr.splice(15, 0, { title: '缺货成本金额', dataIndex: 'totalShowCostAmount', width: 80, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
}
|
|
}
|
|
if (this.$hasPermissions('M_shortageStatisticsCList_salesPrice')) { // 售价权限
|
|
if (this.$hasPermissions('M_shortageStatisticsCList_salesPrice')) { // 售价权限
|
|
const ind = this.$hasPermissions('M_shortageStatisticsCList_costPrice') ? 16 : 15
|
|
const ind = this.$hasPermissions('M_shortageStatisticsCList_costPrice') ? 16 : 15
|
|
- arr.splice(ind, 0, { title: '缺货实售金额', dataIndex: 'totalRealSaleAmount', width: 90, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
- arr.splice(ind + 1, 0, { title: '缺货开单金额', dataIndex: 'totalAmount', width: 90, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
|
|
+ arr.splice(ind, 0, { title: '缺货实售金额', dataIndex: 'totalRealSaleAmount', width: 80, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
|
|
+ arr.splice(ind + 1, 0, { title: '缺货开单金额', dataIndex: 'totalAmount', width: 80, align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') })
|
|
}
|
|
}
|
|
- return arr
|
|
|
|
|
|
+ return arr.filter(item => !this.hidekey.includes(item.key))
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
@@ -395,7 +400,7 @@ export default {
|
|
},
|
|
},
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 240
|
|
|
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 210
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -437,5 +442,10 @@ export default {
|
|
.sTable{
|
|
.sTable{
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
|
|
+ .tongji-bar{
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content:space-between;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|