|
@@ -51,9 +51,9 @@
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="预警提示">
|
|
<a-form-item label="预警提示">
|
|
<v-select
|
|
<v-select
|
|
- v-model="queryParam.warnTip"
|
|
|
|
- ref="warnTip"
|
|
|
|
- id="inventoryWarningList-warnTip"
|
|
|
|
|
|
+ v-model="queryParam.stockState"
|
|
|
|
+ ref="stockState"
|
|
|
|
+ id="inventoryWarningList-stockState"
|
|
code="STOCK_WARN_TIP"
|
|
code="STOCK_WARN_TIP"
|
|
placeholder="请选择预警提示"
|
|
placeholder="请选择预警提示"
|
|
allowClear
|
|
allowClear
|
|
@@ -95,8 +95,9 @@
|
|
:rowKey="(record) => record.id"
|
|
:rowKey="(record) => record.id"
|
|
:columns="columns"
|
|
:columns="columns"
|
|
:dataSource="loadData"
|
|
:dataSource="loadData"
|
|
- :scroll="{ x: 2120, y: tableHeight }"
|
|
|
|
|
|
+ :scroll="{ x: 2220, y: tableHeight }"
|
|
:pagination="paginationProps"
|
|
:pagination="paginationProps"
|
|
|
|
+ :loading="tableLoading"
|
|
bordered>
|
|
bordered>
|
|
<!-- 产品分类 -->
|
|
<!-- 产品分类 -->
|
|
<template slot="productType" slot-scope="text, record">
|
|
<template slot="productType" slot-scope="text, record">
|
|
@@ -109,8 +110,8 @@
|
|
<span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
|
|
<span v-if="record.freezeQty">(冻结{{ record.freezeQty }})</span>
|
|
</template>
|
|
</template>
|
|
<!-- 预警提示 -->
|
|
<!-- 预警提示 -->
|
|
- <template slot="warnTip" slot-scope="text, record">
|
|
|
|
- <span v-if="record.warnTipDictValue" :class="[record.warnTip=='OVERFLOW'?'yellow':record.warnTip=='NOT_ENOUGH'?'red':record.warnTip=='LACK'?'blue':record.warnTip=='NORMAL'?'green':'']">{{ record.warnTipDictValue }}</span>
|
|
|
|
|
|
+ <template slot="stockState" slot-scope="text, record">
|
|
|
|
+ <span v-if="record.stockStateDictValue" :class="[record.stockState=='OVERFLOW'?'yellow':record.stockState=='NOT_ENOUGH'?'red':record.stockState=='LACK'?'blue':record.stockState=='NORMAL'?'green':'']">{{ record.stockStateDictValue }}</span>
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
<!-- 在途数 -->
|
|
<!-- 在途数 -->
|
|
@@ -177,10 +178,11 @@ export default {
|
|
productTypeSn1: undefined,
|
|
productTypeSn1: undefined,
|
|
productTypeSn2: undefined,
|
|
productTypeSn2: undefined,
|
|
productTypeSn3: undefined,
|
|
productTypeSn3: undefined,
|
|
- warnTip: undefined
|
|
|
|
|
|
+ stockState: undefined
|
|
},
|
|
},
|
|
exportLoading: false, // 导出loading
|
|
exportLoading: false, // 导出loading
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
|
+ tableLoading: false, // 表格加载中
|
|
productBrandList: [], // 产品品牌下拉数据
|
|
productBrandList: [], // 产品品牌下拉数据
|
|
productTypeList: [], // 产品类别下拉数据
|
|
productTypeList: [], // 产品类别下拉数据
|
|
productType: [],
|
|
productType: [],
|
|
@@ -193,11 +195,11 @@ export default {
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
{ title: '产品分类', scopedSlots: { customRender: 'productType' }, width: 200, align: 'center' },
|
|
{ title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 180, align: 'center' },
|
|
{ title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 180, align: 'center' },
|
|
{ title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 130, align: 'center' },
|
|
{ title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: 130, align: 'center' },
|
|
- { title: '总库存数(个)', dataIndex: 'totalStockQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
|
|
|
+ { title: '总库存数(个)', dataIndex: 'totalQty', width: 130, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 130, align: 'center' },
|
|
{ title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: 130, align: 'center' },
|
|
{ title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 130, align: 'center' },
|
|
{ title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: 130, align: 'center' },
|
|
{ title: '差异数量', dataIndex: 'differenceNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
{ title: '差异数量', dataIndex: 'differenceNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
- { title: '预警提示', scopedSlots: { customRender: 'warnTip' }, width: 100, align: 'center' },
|
|
|
|
|
|
+ { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: 100, align: 'center' },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
],
|
|
],
|
|
loadData: [],
|
|
loadData: [],
|
|
@@ -240,6 +242,7 @@ export default {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
this.pageNo = pageNo || this.pageNo
|
|
this.pageNo = pageNo || this.pageNo
|
|
const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
const params = Object.assign({ pageNo: this.pageNo, pageSize: this.pageSize }, this.queryParam)
|
|
|
|
+ this.tableLoading = true
|
|
stockWarnList(params).then(res => {
|
|
stockWarnList(params).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
const data = res.data
|
|
const data = res.data
|
|
@@ -250,6 +253,7 @@ export default {
|
|
data.list[i].no = no + i + 1
|
|
data.list[i].no = no + i + 1
|
|
}
|
|
}
|
|
this.loadData = data.list
|
|
this.loadData = data.list
|
|
|
|
+ this.tableLoading = false
|
|
this.disabled = false
|
|
this.disabled = false
|
|
} else {
|
|
} else {
|
|
this.paginationProps.total = 0
|
|
this.paginationProps.total = 0
|
|
@@ -326,7 +330,7 @@ export default {
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn1 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|
|
this.queryParam.productTypeSn2 = undefined
|
|
this.queryParam.productTypeSn3 = undefined
|
|
this.queryParam.productTypeSn3 = undefined
|
|
- this.queryParam.warnTip = undefined
|
|
|
|
|
|
+ this.queryParam.stockState = undefined
|
|
this.productType = []
|
|
this.productType = []
|
|
this.pageInit(1)
|
|
this.pageInit(1)
|
|
},
|
|
},
|