| | |
| | | selectedRowKeys: this.selectedRowKeys, |
| | | }; |
| | | }, |
| | | importExcelUrl(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importUrl}`; |
| | | importExcelUrl: function(){ |
| | | return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | icon="reload" |
| | | >重置</a-button> |
| | | <a-tag color="#55acee" style="height:15px"></a-tag>库存积压;<a-tag color="#cd201f" style="height:15px"></a-tag>库存不足 |
| | | <a-button |
| | | type="primary" |
| | | icon="download" |
| | | @click="handleExportXls('库存信息')" |
| | | >导出</a-button> |
| | | <a-upload |
| | | name="file" |
| | | :showUploadList="false" |
| | | :multiple="false" |
| | | :headers="tokenHeader" |
| | | :action="importExcelUrl" |
| | | @change="handleImportExcel"> |
| | | <a-button type="primary" icon="import">导入</a-button> |
| | | </a-upload> |
| | | </div> |
| | | |
| | | <a-table |
| | |
| | | ], |
| | | url: { |
| | | list: "/spare/sparePart/sparePartInventoryList", |
| | | importExcelUrl:'/spare/SparesPartInventory/importExcel' |
| | | }, |
| | | //新增、编辑、删除、批量删除操作改变数据后刷新关联的组件的监听属性 |
| | | alterFlag: "", |
| | |
| | | //禁用状态样式 |
| | | tableRowClass(record, index) { |
| | | if (record.totalMainQuantity < record.inventoryLowerLimit) { |
| | | return 'downLimit' |
| | | return 'error' |
| | | }else if(record.totalMainQuantity > record.inventoryUpperLimit){ |
| | | return 'upLimit' |
| | | return 'yellow' |
| | | } |
| | | |
| | | |
| | | }, |
| | | searchReset() { |
| | | this.queryParam = {}; |
| | |
| | | color: red; |
| | | } |
| | | |
| | | .downLimit { |
| | | color: red; |
| | | } |
| | | |
| | | .upLimit { |
| | | color: blue; |
| | | .yellow { |
| | | color: yellow; |
| | | } |
| | | |
| | | .fontweight { |
| | |
| | | rowKey="id" |
| | | :columns="columns" |
| | | :dataSource="dataSource" |
| | | :pagination=false |
| | | :pagination="ipagination" |
| | | :loading="loading" |
| | | @change="handleTableChange" |
| | | > |
| | |
| | | data() { |
| | | return { |
| | | description: '适配设备', |
| | | ipagination:{ |
| | | current: 1, |
| | | pageSize: 10, |
| | | pageSizeOptions: ['10', '20', '30'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + "-" + range[1] + " 共" + total + "条" |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | // 表头 |
| | | columns: [ |
| | | { |