|
@@ -31,6 +31,15 @@
|
|
<subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
<subarea id="shortageStatisticsCList-subarea" v-model="queryParam.subareaSn"></subarea>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-model-item label="省份">
|
|
|
|
+ <a-form-model-item prop="provinceSn">
|
|
|
|
+ <a-select id="shortageStatisticsCList-provinceSn" allowClear v-model="queryParam.provinceSn" placeholder="请选择省">
|
|
|
|
+ <a-select-option v-for="item in addrProvinceList" :value="item.areaSn" :key="item.areaSn + 'a'">{{ item.name }}</a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-form-model-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="产品分类">
|
|
<a-form-item label="产品分类">
|
|
<a-cascader
|
|
<a-cascader
|
|
@@ -45,13 +54,42 @@
|
|
v-model="productType" />
|
|
v-model="productType" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="品牌">
|
|
|
|
+ <a-select
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ id="shortageStatisticsCList-productBrandSn"
|
|
|
|
+ allowClear
|
|
|
|
+ v-model="queryParam.productBrandSn"
|
|
|
|
+ :showSearch="true"
|
|
|
|
+ option-filter-prop="children"
|
|
|
|
+ :filter-option="filterOption">
|
|
|
|
+ <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn">{{ item.brandName }}</a-select-option>
|
|
|
|
+ </a-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="品牌分类">
|
|
|
|
+ <v-select code="BRAND_TYPE" id="shortageStatisticsCList-brandType" v-model="queryParam.brandType" allowClear placeholder="请选择品牌分类"></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="销售单号">
|
|
<a-form-item label="销售单号">
|
|
<a-input id="shortageStatisticsCList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
<a-input id="shortageStatisticsCList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
|
|
+ <a-col :md="5" :sm="24">
|
|
|
|
+ <a-form-item label="客户类型">
|
|
|
|
+ <v-select code="DEALER_TYPE" id="shortageStatisticsCList-dealerType" v-model="queryParam.dealerType" allowClear placeholder="请选择客户类型"></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
|
+ <a-form-item label="产品状态">
|
|
|
|
+ <v-select code="PRODUCT_STATUS" id="shortageStatisticsCList-state" v-model="queryParam.state" allowClear placeholder="请选择产品状态"></v-select>
|
|
|
|
+ </a-form-item>
|
|
|
|
+ </a-col>
|
|
</template>
|
|
</template>
|
|
- <a-col :md="6" :sm="24">
|
|
|
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 8px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="shortageStatisticsCList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsCList-reset">重置</a-button>
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="shortageStatisticsCList-reset">重置</a-button>
|
|
<a-button
|
|
<a-button
|
|
@@ -98,7 +136,7 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:data="loadData"
|
|
:data="loadData"
|
|
- :scroll="{ x: 1010, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ x: 2220, y: tableHeight }"
|
|
bordered>
|
|
bordered>
|
|
<!-- 单号 -->
|
|
<!-- 单号 -->
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
<template slot="salesBillNo" slot-scope="text, record">
|
|
@@ -117,14 +155,16 @@ import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import custList from '@/views/common/custList.vue'
|
|
import subarea from '@/views/common/subarea.js'
|
|
import subarea from '@/views/common/subarea.js'
|
|
|
|
+import { getArea } from '@/api/data'
|
|
import { productTypeQuery } from '@/api/productType'
|
|
import { productTypeQuery } from '@/api/productType'
|
|
|
|
+import { productBrandQuery } from '@/api/productBrand'
|
|
import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
|
|
import { oosBuyerList, oosBuyerDetailCount, oosBuyerDetailPageCount, oosDetailExport } from '@/api/oos'
|
|
export default {
|
|
export default {
|
|
components: { STable, VSelect, custList, subarea, rangeDate },
|
|
components: { STable, VSelect, custList, subarea, rangeDate },
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
- advanced: true, // 高级搜索 展开/关闭
|
|
|
|
|
|
+ advanced: false, // 高级搜索 展开/关闭
|
|
tableHeight: 0, // 表格高度
|
|
tableHeight: 0, // 表格高度
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
beginDate: getDate.getCurrMonthDays().starttime,
|
|
beginDate: getDate.getCurrMonthDays().starttime,
|
|
@@ -136,7 +176,12 @@ export default {
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn1: '', // 产品一级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn2: '', // 产品二级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
productTypeSn3: '', // 产品三级分类
|
|
- salesBillNo: ''
|
|
|
|
|
|
+ salesBillNo: '',
|
|
|
|
+ provinceSn: undefined,
|
|
|
|
+ dealerType: undefined,
|
|
|
|
+ brandType: undefined,
|
|
|
|
+ productBrandSn: undefined,
|
|
|
|
+ state: undefined
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
@@ -145,13 +190,25 @@ export default {
|
|
getDate.getCurrMonthDays().endtime
|
|
getDate.getCurrMonthDays().endtime
|
|
], // 创建时间
|
|
], // 创建时间
|
|
columns: [
|
|
columns: [
|
|
- { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
|
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
|
|
+ { title: '区域', dataIndex: 'subareaNames', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, align: 'center' },
|
|
{ title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, align: 'center' },
|
|
|
|
+ { title: '省份', dataIndex: 'dealerEntity.provinceName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户名称', dataIndex: 'dealerEntity.dealerName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '客户类型', dataIndex: 'dealerEntity.dealerTypeDictValue', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '品牌', dataIndex: 'productEntity.productBrandName', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '二级分类', dataIndex: 'productEntity.productTypeName2', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '产品编码', dataIndex: 'productCode', width: 180, align: 'center', customRender: function (text) { return text || '--' } },
|
|
- { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 60, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
|
+ { title: '产品状态', dataIndex: 'productEntity.stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '缺货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '缺货数量', dataIndex: 'qty', width: 80, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '客户名称', dataIndex: 'buyerName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
|
|
|
|
|
|
+ { title: '缺货成本金额', dataIndex: 'totalCostAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '缺货实售金额', dataIndex: 'totalSalesAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '缺货开单金额', dataIndex: 'totalAmount', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
+ { title: '操作员', dataIndex: 'operatorName', width: 100, 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 || '--' } }
|
|
],
|
|
],
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
@@ -172,6 +229,8 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ addrProvinceList: [], // 省下拉
|
|
|
|
+ productBrandList: [], // 品牌下拉数据
|
|
productType: [],
|
|
productType: [],
|
|
productTypeList: [], // 分类下拉数据
|
|
productTypeList: [], // 分类下拉数据
|
|
productTotal: null,
|
|
productTotal: null,
|
|
@@ -220,6 +279,11 @@ export default {
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn2 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.productTypeSn3 = ''
|
|
this.queryParam.salesBillNo = ''
|
|
this.queryParam.salesBillNo = ''
|
|
|
|
+ this.queryParam.provinceSn = undefined
|
|
|
|
+ this.queryParam.dealerType = undefined
|
|
|
|
+ this.queryParam.brandType = undefined
|
|
|
|
+ this.queryParam.productBrandSn = undefined
|
|
|
|
+ this.queryParam.state = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
this.$refs.table.refresh(true)
|
|
this.$refs.table.refresh(true)
|
|
},
|
|
},
|
|
@@ -279,6 +343,49 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 产品品牌 列表
|
|
|
|
+ getProductBrand () {
|
|
|
|
+ productBrandQuery({}).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ this.productBrandList = res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.productBrandList = []
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ filterOption (input, option) {
|
|
|
|
+ return (
|
|
|
|
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
|
|
+ )
|
|
|
|
+ },
|
|
|
|
+ // 省/市/区
|
|
|
|
+ getArea (leve, sn) {
|
|
|
|
+ let params
|
|
|
|
+ if (leve == 'province') {
|
|
|
|
+ params = { type: '2' }
|
|
|
|
+ } else {
|
|
|
|
+ params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
|
|
|
|
+ }
|
|
|
|
+ getArea(params).then(res => {
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
+ if (leve == 'province') {
|
|
|
|
+ this.addrProvinceList = res.data || []
|
|
|
|
+ } else if (leve == 'city') {
|
|
|
|
+ this.addrCityList = res.data || []
|
|
|
|
+ } else if (leve == 'district') {
|
|
|
|
+ this.addrDistrictList = res.data || []
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if (leve == 'province') {
|
|
|
|
+ this.addrProvinceList = []
|
|
|
|
+ } else if (leve == 'city') {
|
|
|
|
+ this.addrCityList = []
|
|
|
|
+ } else if (leve == 'district') {
|
|
|
|
+ this.addrDistrictList = []
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
this.tableHeight = window.innerHeight - tableSearchH - 250
|
|
@@ -301,6 +408,8 @@ export default {
|
|
beforeRouteEnter (to, from, next) {
|
|
beforeRouteEnter (to, from, next) {
|
|
next(vm => {
|
|
next(vm => {
|
|
vm.getProductType()
|
|
vm.getProductType()
|
|
|
|
+ vm.getProductBrand()
|
|
|
|
+ vm.getArea('province')
|
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|