|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<a-card :bordered="false" v-show="visible">
|
|
|
- <a-row :gutter="8" >
|
|
|
+ <a-row :gutter="8">
|
|
|
<a-col :span="24">
|
|
|
<div>
|
|
|
<div class="table-page-search-wrapper">
|
|
@@ -9,44 +9,40 @@
|
|
|
<a-row :gutter="48">
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="关键字">
|
|
|
- <a-input v-model.trim="queryParam.keyword" placeholder="设备编号"/>
|
|
|
+ <a-input v-model.trim="queryParam.keyword" placeholder="设备编号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="车间位置">
|
|
|
<a-select v-model="queryParam.positionId" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="({id,name}) in sbPositionData"
|
|
|
- :key="id"
|
|
|
- :label="name"
|
|
|
- :value="id">{{ name }}
|
|
|
+ <a-select-option v-for="({id,name}) in sbPositionData" :key="id" :label="name" :value="id">{{ name }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备名称">
|
|
|
- <a-input v-model.trim="queryParam.name" placeholder="名称"/>
|
|
|
+ <a-input v-model.trim="queryParam.name" placeholder="名称" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="父位号">
|
|
|
- <a-input v-model.trim="queryParam.ppNo" placeholder="父位号"/>
|
|
|
+ <a-input v-model.trim="queryParam.ppNo" placeholder="父位号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备位号">
|
|
|
- <a-input v-model.trim="queryParam.positionNo" placeholder="设备位号"/>
|
|
|
+ <a-input v-model.trim="queryParam.positionNo" placeholder="设备位号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="生产商">
|
|
|
- <a-input v-model.trim="queryParam.producerId" placeholder="生产商"/>
|
|
|
+ <a-input v-model.trim="queryParam.producerId" placeholder="生产商" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="资产编号">
|
|
|
- <a-input v-model.trim="queryParam.financingNo" placeholder="资产编号"/>
|
|
|
+ <a-input v-model.trim="queryParam.financingNo" placeholder="资产编号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<!-- <a-col :md="6" :sm="24">
|
|
@@ -57,11 +53,7 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备等级">
|
|
|
<a-select v-model="queryParam.level" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in levelMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ <a-select-option v-for="(label,value) in levelMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -85,38 +77,24 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="有效日期范围">
|
|
|
- <a-range-picker v-model="dateRange"/>
|
|
|
+ <a-range-picker v-model="dateRange" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="规格型号">
|
|
|
- <a-input v-model="queryParam.model" placeholder="规格型号"/>
|
|
|
+ <a-input v-model="queryParam.model" placeholder="规格型号" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备类型">
|
|
|
- <a-tree-select
|
|
|
- style="width: 100%"
|
|
|
- :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
|
- :treeData="treeData"
|
|
|
- :treeNodeFilterProp="'title'"
|
|
|
- v-model="dd"
|
|
|
- :showSearch="true"
|
|
|
- placeholder="请选择"
|
|
|
- @change="handleChange"
|
|
|
- >
|
|
|
+ <a-tree-select style="width: 100%" :dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }" :treeData="treeData" :treeNodeFilterProp="'title'" v-model="dd" :showSearch="true" placeholder="请选择" @change="handleChange">
|
|
|
</a-tree-select>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="设备状态">
|
|
|
<a-select v-model="queryParam.status" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in statusMap"
|
|
|
- :key="value"
|
|
|
- :defaultValue="DictCache.VALUE.SB_INFO_STATUS.IN_USE"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ <a-select-option v-for="(label,value) in statusMap" :key="value" :defaultValue="DictCache.VALUE.SB_INFO_STATUS.IN_USE" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -133,11 +111,7 @@
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="电力线路">
|
|
|
<a-select v-model="queryParam.baoyangTimes" placeholder="请选择">
|
|
|
- <a-select-option
|
|
|
- v-for="(label,value) in lineMap"
|
|
|
- :key="value"
|
|
|
- :label="label"
|
|
|
- :value="parseInt(value)">{{ label }}
|
|
|
+ <a-select-option v-for="(label,value) in lineMap" :key="value" :label="label" :value="parseInt(value)">{{ label }}
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
@@ -160,11 +134,11 @@
|
|
|
新增导入
|
|
|
</a-button>-->
|
|
|
<a-button style="margin-left:8px;" type="primary" @click="doImportStandard">
|
|
|
- <a-icon type="upload"/>
|
|
|
+ <a-icon type="upload" />
|
|
|
导入
|
|
|
</a-button>
|
|
|
<a-button style="margin-left:8px;" type="primary" @click="doImportForUpdate">
|
|
|
- <a-icon type="upload"/>
|
|
|
+ <a-icon type="upload" />
|
|
|
修改导入
|
|
|
</a-button>
|
|
|
<a-button style="margin-left: 8px" type="primary" icon="printer" @click="handlePrintBatch()">批量打印</a-button>
|
|
@@ -191,19 +165,7 @@
|
|
|
</a-dropdown>
|
|
|
</div>
|
|
|
|
|
|
- <s-table
|
|
|
- ref="table"
|
|
|
- @expand="onExpand"
|
|
|
- size="default"
|
|
|
- rowKey="id"
|
|
|
- :widthSpace="true"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :alert="options.alert"
|
|
|
- :rowSelection="options.rowSelection"
|
|
|
- :scroll="{x: 1500, y: BaseTool.Constant.scrollY}"
|
|
|
- showPagination="auto"
|
|
|
- >
|
|
|
+ <s-table ref="table" @expand="onExpand" size="default" rowKey="id" :widthSpace="true" :columns="columns" :data="loadData" :alert="options.alert" :rowSelection="options.rowSelection" :scroll="{x: 1500, y: BaseTool.Constant.scrollY}" showPagination="auto">
|
|
|
<template #positionNo="text,record">
|
|
|
<a @click="showChangeLog(record)">{{ text }}</a>
|
|
|
</template>
|
|
@@ -224,10 +186,10 @@
|
|
|
<a-menu-item key="1">
|
|
|
<a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="2" v-if="isMeasure===1" >
|
|
|
+ <a-menu-item key="2" v-if="isMeasure===1">
|
|
|
<a @click="batchIncorrect(record)">检定</a>
|
|
|
</a-menu-item>
|
|
|
- <a-menu-item key="3" v-if="isMeasure===1" >
|
|
|
+ <a-menu-item key="3" v-if="isMeasure===1">
|
|
|
<a @click="batchIncorrectInStore(record)">入库</a>
|
|
|
</a-menu-item>
|
|
|
<a-menu-item v-if="record.status != 2" key="2">
|
|
@@ -256,33 +218,29 @@
|
|
|
</template>
|
|
|
</span>
|
|
|
<span slot="status" slot-scope="text">
|
|
|
- <badge
|
|
|
- :status="DictCache.COLOR.SB_INFO_STATUS[text]"
|
|
|
- :text="statusMap[text]" />
|
|
|
+ <badge :status="DictCache.COLOR.SB_INFO_STATUS[text]" :text="statusMap[text]" />
|
|
|
</span>
|
|
|
<span slot="measureStatus" slot-scope="text">
|
|
|
- <badge
|
|
|
- :status="DictCache.COLOR.SB_MEASURE_STATUS[text]"
|
|
|
- :text="yesNoMap[text]" />
|
|
|
+ <badge :status="DictCache.COLOR.SB_MEASURE_STATUS[text]" :text="yesNoMap[text]" />
|
|
|
</span>
|
|
|
</s-table>
|
|
|
</div>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-card>
|
|
|
- <base-form ref="baseModal" :parent-id="queryParam.parentId" :parent-name="queryParam.parentName" @ok="handleOk"/>
|
|
|
- <base-form-status-log ref="baseModalStatusLog" @ok="handleOk"/>
|
|
|
- <detail ref="detailModal" @ok="handleOk"/>
|
|
|
- <download-modal ref="downloadModal"/>
|
|
|
- <preview-modal ref="previewModal"/>
|
|
|
- <import-form-add ref="importModal" @ok="handleOk"/>
|
|
|
- <import-form-add-standard ref="importModalStandard" @ok="handleOk"/>
|
|
|
- <import-form-update ref="importModalUpdate" @ok="handleOk"/>
|
|
|
- <print-sb-code ref="printSbCode"/>
|
|
|
- <print-in-sb-info-batch ref="printInSbInfoBatch" @ok="handleOk"/>
|
|
|
- <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk"/>
|
|
|
- <base-form-measure ref="baseModalMeasure" @ok="handleOk"/>
|
|
|
- <base-form-measure-in-store ref="baseModalMeasureInStore" @ok="handleOk"/>
|
|
|
+ <base-form ref="baseModal" :parent-id="queryParam.parentId" :parent-name="queryParam.parentName" @ok="handleOk" />
|
|
|
+ <base-form-status-log ref="baseModalStatusLog" @ok="handleOk" />
|
|
|
+ <detail ref="detailModal" @ok="handleOk" />
|
|
|
+ <download-modal ref="downloadModal" />
|
|
|
+ <preview-modal ref="previewModal" />
|
|
|
+ <import-form-add ref="importModal" @ok="handleOk" />
|
|
|
+ <import-form-add-standard ref="importModalStandard" @ok="handleOk" />
|
|
|
+ <import-form-update ref="importModalUpdate" @ok="handleOk" />
|
|
|
+ <print-sb-code ref="printSbCode" />
|
|
|
+ <print-in-sb-info-batch ref="printInSbInfoBatch" @ok="handleOk" />
|
|
|
+ <detail-sb-measure ref="detailSbMeasureModal" @ok="handleOk" />
|
|
|
+ <base-form-measure ref="baseModalMeasure" @ok="handleOk" />
|
|
|
+ <base-form-measure-in-store ref="baseModalMeasureInStore" @ok="handleOk" />
|
|
|
<base-form-location ref="baseFormLocation" @ok="handleOk" />
|
|
|
<SbChangeLogSelectModal ref="sbChangeRecordSelectModal" @ok="handleOk" />
|
|
|
<SbBomSyncSelectModal type="checkbox" ref="sbBomSyncSelectModal" @ok="handleOk" />
|
|
@@ -301,7 +259,15 @@ import BaseFormMeasureInStore from './modules/BaseFormMeasureInStore'
|
|
|
import BaseFormLocation from './modules/BaseFormLocation'
|
|
|
import DownloadModal from '@/views/download/DownloadModal'
|
|
|
import PreviewModal from '@/views/preview/PreviewModal'
|
|
|
-import { getSbInfoPage, deleteSbInfos, querySbInfo, fetchSbInfo, fetchSbInfos, exportSbInfo, batchLocationList } from '@/api/sb/info'
|
|
|
+import {
|
|
|
+ getSbInfoPage,
|
|
|
+ deleteSbInfos,
|
|
|
+ querySbInfo,
|
|
|
+ fetchSbInfo,
|
|
|
+ fetchSbInfos,
|
|
|
+ exportSbInfo,
|
|
|
+ batchLocationList,
|
|
|
+} from '@/api/sb/info'
|
|
|
import { queryDept } from '@/api/upms/dept'
|
|
|
import { generateSbCodeAll } from '@/api/upms/code'
|
|
|
import { fetchSbTypeTree } from '@/api/sb/type'
|
|
@@ -332,39 +298,39 @@ export default {
|
|
|
BaseFormLocation,
|
|
|
BaseFormStatusLog,
|
|
|
SbChangeLogSelectModal,
|
|
|
- SbBomSyncSelectModal
|
|
|
+ SbBomSyncSelectModal,
|
|
|
},
|
|
|
props: {
|
|
|
filter: {
|
|
|
type: Number,
|
|
|
- default: -1
|
|
|
+ default: -1,
|
|
|
},
|
|
|
useType: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
correctType: {
|
|
|
type: Number,
|
|
|
- default: 1
|
|
|
+ default: 1,
|
|
|
},
|
|
|
measureStatus: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
isMeasure: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
isSelf: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
+ default: null,
|
|
|
},
|
|
|
status: {
|
|
|
type: Number,
|
|
|
- default: null
|
|
|
- }
|
|
|
+ default: null,
|
|
|
+ },
|
|
|
},
|
|
|
- data () {
|
|
|
+ data() {
|
|
|
return {
|
|
|
// 查询参数
|
|
|
queryParam: {
|
|
@@ -375,7 +341,7 @@ export default {
|
|
|
isSelf: this.isSelf,
|
|
|
id: this.$route.query.id,
|
|
|
typeId: this.$route.query.typeId,
|
|
|
- status: this.$route.query.status || this.status
|
|
|
+ status: this.$route.query.status || this.status,
|
|
|
},
|
|
|
depreciationTypeMap: {},
|
|
|
visible: true,
|
|
@@ -416,26 +382,26 @@ export default {
|
|
|
title: '设备位置',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'positionName'
|
|
|
+ dataIndex: 'positionName',
|
|
|
},
|
|
|
{
|
|
|
title: '设备名称',
|
|
|
checked: true,
|
|
|
width: 200,
|
|
|
- dataIndex: 'name'
|
|
|
+ dataIndex: 'name',
|
|
|
},
|
|
|
{
|
|
|
title: '设备位号',
|
|
|
dataIndex: 'positionNo',
|
|
|
width: 150,
|
|
|
scopedSlots: { customRender: 'positionNo' },
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '父位号',
|
|
|
dataIndex: 'ppNo',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
|
|
|
{
|
|
@@ -445,7 +411,7 @@ export default {
|
|
|
width: 150,
|
|
|
customRender: (text, record, index) => {
|
|
|
return record.typeName
|
|
|
- }
|
|
|
+ },
|
|
|
},
|
|
|
/* {
|
|
|
title: '设备等级',
|
|
@@ -460,19 +426,19 @@ export default {
|
|
|
title: '规格型号',
|
|
|
dataIndex: 'model',
|
|
|
width: 150,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '设备编号',
|
|
|
dataIndex: 'no',
|
|
|
width: 150,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '巡检序号',
|
|
|
dataIndex: 'sortNum',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '自定义类型',
|
|
@@ -507,43 +473,43 @@ export default {
|
|
|
title: '出厂编号',
|
|
|
dataIndex: 'zzh',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '设备识别码',
|
|
|
dataIndex: 'identifyNo',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '使用证号',
|
|
|
dataIndex: 'useNo',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '设备代号',
|
|
|
dataIndex: 'sbCode',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '安装单位',
|
|
|
dataIndex: 'installUnit',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '检验结论',
|
|
|
dataIndex: 'examResult',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
{
|
|
|
title: '单位内部使用地点',
|
|
|
dataIndex: 'usePosition',
|
|
|
width: 120,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '是否显示',
|
|
@@ -615,7 +581,7 @@ export default {
|
|
|
dataIndex: 'nextCheckDate',
|
|
|
fixed: 'right',
|
|
|
width: 150,
|
|
|
- checked: true
|
|
|
+ checked: true,
|
|
|
},
|
|
|
/* {
|
|
|
title: '检定截止',
|
|
@@ -636,7 +602,7 @@ export default {
|
|
|
dataIndex: 'status',
|
|
|
fixed: 'right',
|
|
|
width: 100,
|
|
|
- scopedSlots: { customRender: 'status' }
|
|
|
+ scopedSlots: { customRender: 'status' },
|
|
|
},
|
|
|
{
|
|
|
title: '检定状态',
|
|
@@ -644,7 +610,7 @@ export default {
|
|
|
dataIndex: 'measureStatus',
|
|
|
fixed: 'right',
|
|
|
width: 100,
|
|
|
- scopedSlots: { customRender: 'measureStatus' }
|
|
|
+ scopedSlots: { customRender: 'measureStatus' },
|
|
|
},
|
|
|
{
|
|
|
title: '操作',
|
|
@@ -653,40 +619,44 @@ export default {
|
|
|
fixed: 'right',
|
|
|
align: 'center',
|
|
|
width: '120',
|
|
|
- scopedSlots: { customRender: 'action' }
|
|
|
- }
|
|
|
+ scopedSlots: { customRender: 'action' },
|
|
|
+ },
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
- loadData: parameter => {
|
|
|
+ loadData: (parameter) => {
|
|
|
parameter = {
|
|
|
...parameter,
|
|
|
...this.queryParam,
|
|
|
typeList: this.typeList,
|
|
|
dataScope: {
|
|
|
sortBy: 'asc',
|
|
|
- sortName: 'no'
|
|
|
- }
|
|
|
+ sortName: 'no',
|
|
|
+ },
|
|
|
}
|
|
|
this.selectedRowKeys = []
|
|
|
- return getSbInfoPage(Object.assign(parameter, this.queryParam))
|
|
|
- .then(res => {
|
|
|
- return res.data
|
|
|
- })
|
|
|
+ return getSbInfoPage(Object.assign(parameter, this.queryParam)).then((res) => {
|
|
|
+ return res.data
|
|
|
+ })
|
|
|
},
|
|
|
selectedRowKeys: [],
|
|
|
selectedRows: [],
|
|
|
|
|
|
options: {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ },
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
- onChange: this.onSelectChange
|
|
|
- }
|
|
|
+ onChange: this.onSelectChange,
|
|
|
+ },
|
|
|
},
|
|
|
- optionAlertShow: false
|
|
|
+ optionAlertShow: false,
|
|
|
}
|
|
|
},
|
|
|
- created () {
|
|
|
+ created() {
|
|
|
console.log('this.$route.query.parentId: ' + this.$route.query.parentId)
|
|
|
this.queryParam.parentId = this.$route.query.parentId
|
|
|
this.queryParam.parentName = this.$route.query.parentName
|
|
@@ -701,37 +671,42 @@ export default {
|
|
|
this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
|
|
|
this.lineMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.REMOTE_LINE)
|
|
|
this.yesNoMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
|
|
|
- querySbPosition().then(res => {
|
|
|
+ querySbPosition().then((res) => {
|
|
|
this.sbPositionData = res.data
|
|
|
})
|
|
|
},
|
|
|
methods: {
|
|
|
- tableOption () {
|
|
|
+ tableOption() {
|
|
|
this.setTree()
|
|
|
if (!this.optionAlertShow) {
|
|
|
this.options = {
|
|
|
- alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
|
|
|
+ alert: {
|
|
|
+ show: true,
|
|
|
+ clear: () => {
|
|
|
+ this.selectedRowKeys = []
|
|
|
+ },
|
|
|
+ },
|
|
|
rowSelection: {
|
|
|
selectedRowKeys: this.selectedRowKeys,
|
|
|
onChange: this.onSelectChange,
|
|
|
- getCheckboxProps: record => ({
|
|
|
+ getCheckboxProps: (record) => ({
|
|
|
props: {
|
|
|
disabled: false,
|
|
|
- name: record.id
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ name: record.id,
|
|
|
+ },
|
|
|
+ }),
|
|
|
+ },
|
|
|
}
|
|
|
this.optionAlertShow = true
|
|
|
} else {
|
|
|
this.options = {
|
|
|
alert: false,
|
|
|
- rowSelection: null
|
|
|
+ rowSelection: null,
|
|
|
}
|
|
|
this.optionAlertShow = false
|
|
|
}
|
|
|
},
|
|
|
- batchDelete (id) {
|
|
|
+ batchDelete(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -739,56 +714,56 @@ export default {
|
|
|
this.$message.info('请选择要删除的记录')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
} else {
|
|
|
ids = [id]
|
|
|
}
|
|
|
- deleteSbInfos(ids).then(res => {
|
|
|
+ deleteSbInfos(ids).then((res) => {
|
|
|
this.$message.info('删除成功')
|
|
|
this.handleOk()
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- batchGenerate () {
|
|
|
+ batchGenerate() {
|
|
|
this.confirmLoading = true
|
|
|
this.$message.info('正在生成请稍后')
|
|
|
- generateSbCodeAll().then(res => {
|
|
|
+ generateSbCodeAll().then((res) => {
|
|
|
this.confirmLoading = false
|
|
|
this.$message.info('生成成功')
|
|
|
this.handleOk()
|
|
|
this.$refs.table.clearSelected()
|
|
|
})
|
|
|
},
|
|
|
- handleEdit (record) {
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ handleEdit(record) {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handlePrint (record) {
|
|
|
+ handlePrint(record) {
|
|
|
this.visible = false
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
const modal = this.$refs.printInSbInfoBatch
|
|
|
modal.base([res.data])
|
|
|
})
|
|
|
},
|
|
|
- batchLocation () {
|
|
|
+ batchLocation() {
|
|
|
let ids = []
|
|
|
const length = this.selectedRows.length
|
|
|
if (length === 0) {
|
|
|
this.$message.info('请选择设备')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
console.log(ids)
|
|
|
- batchLocationList({ ids }).then(res => {
|
|
|
+ batchLocationList({ ids }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.baseFormLocation
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- batchIncorrect (id) {
|
|
|
+ batchIncorrect(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -804,7 +779,7 @@ export default {
|
|
|
const modal = this.$refs.baseModalMeasure
|
|
|
modal.base(ids, this.correctType)
|
|
|
},
|
|
|
- batchIncorrectInStore (id) {
|
|
|
+ batchIncorrectInStore(id) {
|
|
|
let ids = []
|
|
|
if (this.BaseTool.String.isBlank(id)) {
|
|
|
const length = this.selectedRows.length
|
|
@@ -820,11 +795,11 @@ export default {
|
|
|
const modal = this.$refs.baseModalMeasureInStore
|
|
|
modal.base(ids, this.correctType)
|
|
|
},
|
|
|
- handleMeasureBatch () {
|
|
|
+ handleMeasureBatch() {
|
|
|
const modal = this.$refs.detailSbMeasureModal
|
|
|
modal.base()
|
|
|
},
|
|
|
- handlePrintBatch () {
|
|
|
+ handlePrintBatch() {
|
|
|
this.visible = false
|
|
|
let ids = []
|
|
|
const length = this.selectedRows.length
|
|
@@ -832,13 +807,13 @@ export default {
|
|
|
this.$message.info('请选择要打印的设备')
|
|
|
return
|
|
|
}
|
|
|
- ids = this.selectedRows.map(item => item.id)
|
|
|
- fetchSbInfos(ids).then(res => {
|
|
|
+ ids = this.selectedRows.map((item) => item.id)
|
|
|
+ fetchSbInfos(ids).then((res) => {
|
|
|
const modal = this.$refs.printInSbInfoBatch
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- handleStart (record) {
|
|
|
+ handleStart(record) {
|
|
|
const modal = this.$refs.baseModalStatusLog
|
|
|
modal.base(null, {
|
|
|
sbId: record.id,
|
|
@@ -846,10 +821,10 @@ export default {
|
|
|
changeUserId: this.$store.getters.userInfo.userId,
|
|
|
actualUser: this.$store.getters.userInfo.realName,
|
|
|
preStatus: record.status,
|
|
|
- afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_USE
|
|
|
+ afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_USE,
|
|
|
})
|
|
|
},
|
|
|
- handleStop (record) {
|
|
|
+ handleStop(record) {
|
|
|
const modal = this.$refs.baseModalStatusLog
|
|
|
modal.base(null, {
|
|
|
sbId: record.id,
|
|
@@ -857,54 +832,62 @@ export default {
|
|
|
changeUserId: this.$store.getters.userInfo.userId,
|
|
|
actualUser: this.$store.getters.userInfo.realName,
|
|
|
preStatus: record.status,
|
|
|
- afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_STOP
|
|
|
+ afterStatus: this.DictCache.VALUE.SB_INFO_STATUS.IN_STOP,
|
|
|
})
|
|
|
},
|
|
|
- handleAdd () {
|
|
|
+ handleAdd() {
|
|
|
this.visible = false
|
|
|
this.$refs.baseModal.base()
|
|
|
},
|
|
|
- handleView (record) {
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ handleView(record) {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
this.visible = false
|
|
|
const modal = this.$refs.detailModal
|
|
|
modal.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
- showChangeLog (record) {
|
|
|
+ showChangeLog(record) {
|
|
|
console.log(record)
|
|
|
console.log(this.$refs)
|
|
|
this.$refs.sbChangeRecordSelectModal.base({}, { sbId: record.id })
|
|
|
},
|
|
|
- handleCopy (record) {
|
|
|
+ handleCopy(record) {
|
|
|
this.visible = false
|
|
|
- fetchSbInfo({ id: record.id }).then(res => {
|
|
|
+ fetchSbInfo({ id: record.id }).then((res) => {
|
|
|
const modal = this.$refs.baseModal
|
|
|
modal.base(res.data, 1)
|
|
|
})
|
|
|
},
|
|
|
- handleOk () {
|
|
|
+ handleOk() {
|
|
|
this.visible = true
|
|
|
this.setTree()
|
|
|
if (this.dateRange != null) {
|
|
|
this.queryParam.nextCheckDateStart = this.dateRange[0]
|
|
|
this.queryParam.nextCheckDateEnd = this.dateRange[1]
|
|
|
- this.queryParam.nextCheckDateStart = this.queryParam.nextCheckDateStart ? this.queryParam.nextCheckDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
- this.queryParam.nextCheckDateEnd = this.queryParam.nextCheckDateEnd ? this.queryParam.nextCheckDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
+ this.queryParam.nextCheckDateStart = this.queryParam.nextCheckDateStart
|
|
|
+ ? this.queryParam.nextCheckDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
+ this.queryParam.nextCheckDateEnd = this.queryParam.nextCheckDateEnd
|
|
|
+ ? this.queryParam.nextCheckDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
}
|
|
|
if (this.dateRangeCheck != null) {
|
|
|
this.queryParam.checkDateStart = this.dateRangeCheck[0]
|
|
|
this.queryParam.checkDateEnd = this.dateRangeCheck[1]
|
|
|
- this.queryParam.checkDateStart = this.queryParam.checkDateStart ? this.queryParam.checkDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
- this.queryParam.checkDateEnd = this.queryParam.checkDateEnd ? this.queryParam.checkDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
|
|
|
+ this.queryParam.checkDateStart = this.queryParam.checkDateStart
|
|
|
+ ? this.queryParam.checkDateStart.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
+ this.queryParam.checkDateEnd = this.queryParam.checkDateEnd
|
|
|
+ ? this.queryParam.checkDateEnd.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
|
|
|
+ : null
|
|
|
}
|
|
|
this.$refs.table.refresh()
|
|
|
},
|
|
|
- onSelectChange (selectedRowKeys, selectedRows) {
|
|
|
+ onSelectChange(selectedRowKeys, selectedRows) {
|
|
|
this.selectedRowKeys = selectedRowKeys
|
|
|
this.selectedRows = selectedRows
|
|
|
},
|
|
|
- resetSearchForm () {
|
|
|
+ resetSearchForm() {
|
|
|
this.queryParam = {
|
|
|
filter: this.filter,
|
|
|
useType: this.useType,
|
|
@@ -913,31 +896,31 @@ export default {
|
|
|
isSelf: this.isSelf,
|
|
|
id: this.$route.query.id,
|
|
|
typeId: this.$route.query.typeId,
|
|
|
- status: this.$route.query.status || this.status
|
|
|
+ status: this.$route.query.status || this.status,
|
|
|
}
|
|
|
this.typeList = []
|
|
|
this.dd = undefined
|
|
|
this.visible = true
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- doExport () {
|
|
|
+ doExport() {
|
|
|
const parameter = {
|
|
|
...this.queryParam,
|
|
|
sbIds: this.selectedRowKeys,
|
|
|
dataScope: {
|
|
|
sortBy: 'asc',
|
|
|
- sortName: 'no'
|
|
|
- }
|
|
|
+ sortName: 'no',
|
|
|
+ },
|
|
|
}
|
|
|
- exportSbInfo(parameter).then(file => {
|
|
|
+ exportSbInfo(parameter).then((file) => {
|
|
|
this.BaseTool.UPLOAD.downLoadExportExcel(file)
|
|
|
})
|
|
|
},
|
|
|
- setTree (record = {}) {
|
|
|
- queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then(res => {
|
|
|
+ setTree(record = {}) {
|
|
|
+ queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then((res) => {
|
|
|
this.areaList = res.data
|
|
|
})
|
|
|
- fetchSbTypeTree().then(res => {
|
|
|
+ fetchSbTypeTree().then((res) => {
|
|
|
this.treeData = res.data
|
|
|
})
|
|
|
},
|
|
@@ -946,35 +929,36 @@ export default {
|
|
|
this.queryParam.typeId = selectedKeys.length > 0 ? selectedKeys[0] : ''
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
- onExpand (expanded, record) { // expanded判断展开or收缩操作,record当前行数据
|
|
|
+ onExpand(expanded, record) {
|
|
|
+ // expanded判断展开or收缩操作,record当前行数据
|
|
|
console.log(expanded)
|
|
|
if (expanded) {
|
|
|
- querySbInfo({ positionNo: record.positionNo }).then(res => {
|
|
|
+ querySbInfo({ positionNo: record.positionNo }).then((res) => {
|
|
|
record.children = res.data
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- doImport () {
|
|
|
+ doImport() {
|
|
|
this.$refs.importModal.base(null, null)
|
|
|
},
|
|
|
- doImportStandard () {
|
|
|
+ doImportStandard() {
|
|
|
// this.$refs.importModalStandard.base()
|
|
|
this.$refs.importModalUpdate.base(null, 1)
|
|
|
},
|
|
|
- doImportForUpdate () {
|
|
|
+ doImportForUpdate() {
|
|
|
this.$refs.importModalUpdate.base(null, 2)
|
|
|
},
|
|
|
- handleChange (value, label, extra) {
|
|
|
- const data = this.treeData.find(item => item.id === value)
|
|
|
+ handleChange(value, label, extra) {
|
|
|
+ const data = this.treeData.find((item) => item.id === value)
|
|
|
if (data && data.children && data.children.length > 0) {
|
|
|
- this.typeList = data.children.map(item => item.id)
|
|
|
+ this.typeList = data.children.map((item) => item.id)
|
|
|
} else {
|
|
|
this.typeList = [value]
|
|
|
}
|
|
|
},
|
|
|
- handleSync (record) {
|
|
|
+ handleSync(record) {
|
|
|
this.$refs.sbBomSyncSelectModal.base({ sbId: record.id })
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|