|
@@ -31,10 +31,11 @@
|
|
|
<ProductType id="inventoryWarningList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="仓库">
|
|
|
+ <a-col :md="6" :sm="24" v-if="isShowWarehouse">
|
|
|
+ <a-form-item label="仓库">
|
|
|
<warehouse
|
|
|
v-model="queryParam.warehouseSn"
|
|
|
+ isPermission
|
|
|
id="inventoryWarningList-warehouseSn"
|
|
|
placeholder="请选择仓库"
|
|
|
/>
|
|
@@ -77,7 +78,7 @@
|
|
|
ref="table"
|
|
|
:style="{ height: tableHeight+84.5+'px' }"
|
|
|
size="small"
|
|
|
- :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: 40 }:null"
|
|
|
+ :row-selection="$hasPermissions('B_inventoryWarning_refresh')?{ columnWidth: '4%' }:null"
|
|
|
:rowKey="(record) => record.id"
|
|
|
@rowSelection="rowSelectionFun"
|
|
|
:columns="columns"
|
|
@@ -191,22 +192,6 @@ export default {
|
|
|
exportLoading: false, // 导出loading
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
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%', 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: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '在途数(个)', scopedSlots: { customRender: 'inTransit' }, width: '6%', align: 'center' },
|
|
|
- { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
- { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '6%', align: 'center' },
|
|
|
- { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '6%', 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 => {
|
|
|
this.disabled = true
|
|
@@ -237,6 +222,30 @@ export default {
|
|
|
rowSelectionInfo: null
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ columns () {
|
|
|
+ const _this = this
|
|
|
+ const arr = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', width: '12%', 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: 'inTransit' }, width: '6%', align: 'center' },
|
|
|
+ { title: '总库存数(个)', dataIndex: 'currentStockQty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '最大库存数(个)', scopedSlots: { customRender: 'upperLimit' }, width: '6%', align: 'center' },
|
|
|
+ { title: '最小库存数(个)', scopedSlots: { customRender: 'lowerLimit' }, width: '6%', 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' }
|
|
|
+ ]
|
|
|
+ if(this.isShowWarehouse){
|
|
|
+ arr.splice(6, 0, { title: '仓库', dataIndex: 'warehouseName', width: '8%', align: 'center', customRender: function (text) { return text || '--' } })
|
|
|
+ }
|
|
|
+ return arr
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 表格选中项
|
|
|
rowSelectionFun (obj) {
|