|
@@ -44,7 +44,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="table-operator" style="margin-bottom: 8px;">
|
|
|
- <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="download" @click="doExport">导出</a-button>
|
|
|
+ <a-button style="margin-left: 8px" type="primary" icon="download" @click="doExport">导出</a-button>
|
|
|
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && $auth('sb-infos-del')">
|
|
|
<a-menu slot="overlay">
|
|
|
<a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
|
|
@@ -100,7 +100,7 @@ import BaseForm from './modules/BaseForm'
|
|
|
import Detail from './modules/Detail'
|
|
|
import DownloadModal from '@/views/download/DownloadModal'
|
|
|
import PreviewModal from '@/views/preview/PreviewModal'
|
|
|
-import { getSbInfoPage, deleteSbInfos, fetchSbInfo, exportSbInfo } from '@/api/sb/info'
|
|
|
+import { getSpareList, deleteSbInfos, fetchSbInfo, exportSpareBom } from '@/api/sb/info'
|
|
|
import { selectSpareInfoListByModelId } from '@/api/sb/modelbom'
|
|
|
import { fetchSbTypeTree } from '@/api/sb/type'
|
|
|
import { querySbPosition } from '@/api/sb/position'
|
|
@@ -146,58 +146,83 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- title: '设备名称',
|
|
|
+ title: '备件编号',
|
|
|
checked: true,
|
|
|
- dataIndex: 'name'
|
|
|
+ dataIndex: 'no'
|
|
|
},
|
|
|
{
|
|
|
- title: '设备型号',
|
|
|
+ title: '备件名称',
|
|
|
checked: true,
|
|
|
- dataIndex: 'model'
|
|
|
+ dataIndex: 'spareName'
|
|
|
},
|
|
|
- // {
|
|
|
- // title: '名称型号',
|
|
|
- // checked: true,
|
|
|
- // dataIndex: 'nameModel'
|
|
|
- // },
|
|
|
{
|
|
|
- title: '设备类型',
|
|
|
+ title: '备件规格',
|
|
|
checked: true,
|
|
|
- dataIndex: 'type',
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return record.typeName
|
|
|
- }
|
|
|
+ dataIndex: 'ggxh'
|
|
|
},
|
|
|
{
|
|
|
- title: '设备等级',
|
|
|
+ title: '备件数量',
|
|
|
checked: true,
|
|
|
- dataIndex: 'level',
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return this.BaseTool.Object.getField(this.levelMap, text)
|
|
|
- }
|
|
|
+ dataIndex: 'num'
|
|
|
},
|
|
|
{
|
|
|
- title: '生产商',
|
|
|
- dataIndex: 'producerId',
|
|
|
+ title: '设备名称',
|
|
|
checked: true,
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return record.producerName
|
|
|
- }
|
|
|
+ dataIndex: 'sbName'
|
|
|
},
|
|
|
-
|
|
|
{
|
|
|
- title: '计量单位',
|
|
|
- dataIndex: 'unit',
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return BaseTool.Object.getField(this.unitMap, text)
|
|
|
- }
|
|
|
+ title: '设备位号',
|
|
|
+ checked: true,
|
|
|
+ dataIndex: 'positionNo'
|
|
|
},
|
|
|
{
|
|
|
- title: '状态',
|
|
|
+ title: '设备位置',
|
|
|
checked: true,
|
|
|
- dataIndex: 'status',
|
|
|
- scopedSlots: { customRender: 'status' }
|
|
|
+ dataIndex: 'positionName'
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '名称型号',
|
|
|
+ // checked: true,
|
|
|
+ // dataIndex: 'nameModel'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '设备类型',
|
|
|
+ // checked: true,
|
|
|
+ // dataIndex: 'type',
|
|
|
+ // customRender: (text, record, index) => {
|
|
|
+ // return record.typeName
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '设备等级',
|
|
|
+ // checked: true,
|
|
|
+ // dataIndex: 'level',
|
|
|
+ // customRender: (text, record, index) => {
|
|
|
+ // return this.BaseTool.Object.getField(this.levelMap, text)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '生产商',
|
|
|
+ // dataIndex: 'producerId',
|
|
|
+ // checked: true,
|
|
|
+ // customRender: (text, record, index) => {
|
|
|
+ // return record.producerName
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ //
|
|
|
+ // {
|
|
|
+ // title: '计量单位',
|
|
|
+ // dataIndex: 'unit',
|
|
|
+ // customRender: (text, record, index) => {
|
|
|
+ // return BaseTool.Object.getField(this.unitMap, text)
|
|
|
+ // }
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '状态',
|
|
|
+ // checked: true,
|
|
|
+ // dataIndex: 'status',
|
|
|
+ // scopedSlots: { customRender: 'status' }
|
|
|
+ // },
|
|
|
{
|
|
|
title: '操作',
|
|
|
key: 'action',
|
|
@@ -212,13 +237,13 @@ export default {
|
|
|
loadData: parameter => {
|
|
|
parameter = {
|
|
|
...parameter,
|
|
|
- ...this.queryParam,
|
|
|
- dataScope: {
|
|
|
- sortBy: 'desc',
|
|
|
- sortName: 'update_time'
|
|
|
- }
|
|
|
+ ...this.queryParam
|
|
|
+ // dataScope: {
|
|
|
+ // sortBy: 'desc',
|
|
|
+ // sortName: 'update_time'
|
|
|
+ // }
|
|
|
}
|
|
|
- return getSbInfoPage(Object.assign(parameter, this.queryParam))
|
|
|
+ return getSpareList(Object.assign(parameter, this.queryParam))
|
|
|
.then(res => {
|
|
|
return res.data
|
|
|
})
|
|
@@ -331,7 +356,7 @@ export default {
|
|
|
const parameter = {
|
|
|
...this.queryParam
|
|
|
}
|
|
|
- exportSbInfo(parameter).then(file => {
|
|
|
+ exportSpareBom(parameter).then(file => {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|