|
@@ -162,7 +162,7 @@ import { productTypeQuery } from '@/api/productType'
|
|
|
import { stockWarnList, stockWarnSaveBatch } from '@/api/stock'
|
|
|
import ProductBrand from '@/views/common/productBrand.js'
|
|
|
export default {
|
|
|
- components: { STable, VSelect,ProductBrand },
|
|
|
+ components: { STable, VSelect, ProductBrand },
|
|
|
data () {
|
|
|
return {
|
|
|
spinning: false,
|
|
@@ -184,20 +184,20 @@ export default {
|
|
|
productTypeList: [], // 产品类别下拉数据
|
|
|
productType: [],
|
|
|
columns: [
|
|
|
- { title: '序号', dataIndex: 'no', width:'4%', align: 'center' },
|
|
|
- { title: '产品编码', dataIndex: 'productCode', width:'7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品名称', dataIndex: 'productName', width:'12.5%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
- { title: '原厂编码', dataIndex: 'productOrigCode', width:'7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品品牌', dataIndex: 'productBrandName', width:'6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '产品分类', scopedSlots: { customRender: 'productType' }, width:'10%', align: 'center' },
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '12.5%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '原厂编码', dataIndex: 'productOrigCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品品牌', dataIndex: 'productBrandName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品分类', scopedSlots: { customRender: 'productType' }, width: '10%', align: 'center' },
|
|
|
// { title: '实时库存数(个)', scopedSlots: { customRender: 'stockQty' }, width: 110, align: 'center' },
|
|
|
- { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width:'9.5%', align: 'center' },
|
|
|
- { title: '总库存数(个)', dataIndex: 'currentStockQty', width:'7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width:'9.5%', align: 'center' },
|
|
|
- { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width:'9.5%', align: 'center' },
|
|
|
- { title: '差异数量', dataIndex: 'differenceNum', width:'6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '预警提示', scopedSlots: { customRender: 'stockState' },width:'6%', align: 'center' },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width:'6%', align: 'center' }
|
|
|
+ { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '9.5%', align: 'center' },
|
|
|
+ { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '7%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '9.5%', align: 'center' },
|
|
|
+ { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '9.5%', align: 'center' },
|
|
|
+ { title: '差异数量', dataIndex: 'differenceNum', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '预警提示', scopedSlots: { customRender: 'stockState' }, width: '6%', align: 'center' },
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: '6%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -408,6 +408,11 @@ export default {
|
|
|
this.pageInit()
|
|
|
this.resetSearchForm()
|
|
|
}
|
|
|
+ // 仅刷新列表,不重置页面
|
|
|
+ if (this.$store.state.app.updateList) {
|
|
|
+ this.pageInit()
|
|
|
+ this.$refs.table.refresh()
|
|
|
+ }
|
|
|
},
|
|
|
beforeRouteEnter (to, from, next) {
|
|
|
next(vm => {})
|