xiongchao 3 years ago
parent
commit
29ec21e8f2

+ 1 - 1
public/big-screen/big.html

@@ -4,7 +4,7 @@
 	<head>
 		<meta charset="utf-8" />
 		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
-		<title>西安建工资管集团大数据综合展示</title>
+		<title>大数据综合展示</title>
 		<link rel="stylesheet" type="text/css" href="static/big/css/app.css" />
     <link rel="stylesheet" type="text/css" href="static/big/css/power-float/common.css" />
     <link rel="stylesheet" type="text/css" href="static/big/css/power-float/powerFloat.css" />

+ 4 - 1
src/router/generator-platform-routers.js

@@ -76,6 +76,8 @@ const constantRouterComponents = {
   'SbInfo': () => import('@/views/sb/info/SbInfo'),
   // 测量设备基础信息
   'MeasureSbInfo': () => import('@/views/sb/info/MeasureSbInfo'),
+  // 特种设备基础信息
+  'SpecialSbInfo': () => import('@/views/sb/info/SpecialSbInfo'),
   // 父子设备树
   'ParentSbInfo': () => import('@/views/sb/info/ParentSbInfo'),
   // 设别型号库
@@ -280,7 +282,8 @@ const constantRouterComponents = {
   // 设备盘点
   'SbStoreCheckPlan': () => import('@/views/sb/storecheckplan/StoreCheckPlan'),
   'SbStoreCheckJob': () => import('@/views/sb/storecheckjob/StoreCheckJob'),
-
+  // 保养任务日程表
+  'CheckJobCalendar': () => import('@/views/check/checkjob/CheckJobCalendar')
 }
 
 // 前端未找到页面路由(固定不用改)

+ 2 - 2
src/views/check/checkjob/CheckJob.vue

@@ -176,11 +176,11 @@ export default {
           dataIndex: 'startTime',
           checked: true
         },
-        {
+/*        {
           title: '截至日期',
           dataIndex: 'endTime',
           checked: true
-        },
+        },*/
         {
           title: '标准工时',
           dataIndex: 'standardHours'

+ 255 - 0
src/views/check/checkjob/CheckJobCalendar.vue

@@ -0,0 +1,255 @@
+<template>
+  <a-calendar class="custom" @select="onSelect" @panelChange="onPanelChange">
+    <ul slot="dateCellRender" slot-scope="value" class="events">
+      <li v-for="item in getListData(value)" :key="item.id">
+        <a-badge :status="item.status" :text="item.name" />
+      </li>
+    </ul>
+    <template slot="monthCellRender" slot-scope="value">
+      <div v-if="getMonthData(value)" class="notes-month">
+        <section>{{ getMonthData(value) }}</section>
+        <span>Backlog number</span>
+      </div>
+    </template>
+  </a-calendar>
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import { queryCheckJob, getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob } from '@/api/check/checkjob'
+import BaseTool from '@/utils/tool'
+
+export default {
+  name: 'CheckJobList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail
+  },
+  props: {
+    /**
+     * 检查类型: 1-负责 2-巡检
+     */
+    checkType: {
+      type: Number,
+      default: 2
+    },
+    filter: {
+      type: Number,
+      default: -1
+    }
+  },
+  data () {
+    return {
+      panelChange: true,
+      // 查询参数
+      queryParam: {
+        type: this.checkType,
+        filter: this.filter
+      },
+      data: [],
+      // 下拉框map
+      statusMap: {},
+      sbStatusMap: {},
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getCheckJobPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+      preListData: [],
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created () {
+    // 下拉框map
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.CHECK_JOB_STATUS)
+    this.sbStatusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.YES_NO)
+    this.tableOption()
+  },
+  methods: {
+    onSelect (value) {
+      this.panelChange = false
+      console.log('onSelect: ' + BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN))
+      this.value = value
+      this.selectedValue = value
+      // this.queryParam.searchDay = BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+
+    },
+    onPanelChange (value) {
+      this.panelChange = true
+      console.log('onPanelChange: ' + BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN))
+      this.value = value
+      this.queryParam.searchMonth = BaseTool.Date.formatter(value, BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      queryCheckJob(this.queryParam)
+        .then(res => {
+          this.data = res.data
+          for (var i = 0; i < this.data.length; i++) {
+            if (this.data[i].status === 1) {
+              this.data[i].status = 'warning'
+            } else if (this.data[i].status === 2) {
+              this.data[i].status = 'processing'
+            } else if (this.data[i].status === 3) {
+              this.data[i].status = 'success'
+            } else {
+              this.data[i].status = 'error'
+            }
+          }
+        })
+    },
+    getListData (value) {
+      console.log('getListData: ' + BaseTool.Date.formatter(value, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN))
+      const listData = []
+      for (var i = 0; i < this.data.length; i++) {
+        console.log('value: ' + BaseTool.Date.formatter(value, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN))
+        console.log('this.data[i]: ' + BaseTool.Date.formatter(this.data[i].startTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN))
+        if (BaseTool.Date.formatter(value, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) === BaseTool.Date.formatter(this.data[i].startTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)) {
+          console.log('this.data[i].name: ' + this.data[i].name)
+          listData.push(this.data[i])
+        }
+      }
+      this.preListData = listData
+      return listData || []
+    },
+    getMonthData (value) {
+      if (value.month() === 8) {
+        return 1394
+      }
+    },
+    tableOption () {
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteCheckJobs(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleEdit (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleFinish (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    handleExecute (record) {
+      executeJob({ id: record.id }).then(res => {
+        this.handleOk()
+      })
+    },
+    handleView (record) {
+      fetchCheckJob({ id: record.id }).then(res => {
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleOk () {
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+      }
+      this.$refs.table.refresh(true)
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportCheckJob(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+.events {
+  list-style: none;
+  margin: 0;
+  padding: 0;
+}
+.events .ant-badge-status {
+  overflow: hidden;
+  white-space: nowrap;
+  width: 100%;
+  text-overflow: ellipsis;
+  font-size: 12px;
+}
+.notes-month {
+  text-align: center;
+  font-size: 28px;
+}
+.notes-month section {
+  font-size: 28px;
+}
+.ant-fullcalendar-header .ant-radio-group-default {
+  display:none !important
+}
+
+.custom .ant-fullcalendar-header .ant-radio-group-default {
+  display:none !important
+}
+</style>

+ 0 - 1
src/views/check/checkjob/modules/Detail.vue

@@ -9,7 +9,6 @@
   >
     <detail-list title="" :col="2">
       <detail-list-item term="任务名称">{{ model.name }}</detail-list-item>
-      <detail-list-item term="计划名称">{{ model.planName }}</detail-list-item>
       <detail-list-item :term="names[checkType-1]+'设备'">{{ model.sbName }}</detail-list-item>
       <!--<detail-list-item :term="names[checkType-1]+'部件'">{{ model.partName }}</detail-list-item>
       <detail-list-item term="部件编号">{{ model.partNo}}</detail-list-item>-->

+ 1 - 1
src/views/check/checkstandard/modules/BaseForm.vue

@@ -101,7 +101,7 @@
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['standardHours']" suffix="小时"/>
+              v-decorator="['standardHours']" suffix="分钟"/>
           </a-form-item>
         </row-item>
         <row-item>

+ 2 - 2
src/views/repair/application-form/modules/DetailRepair.vue

@@ -32,8 +32,8 @@
           <!--<detail-list-item term="故障描述">{{ BaseTool.Object.getField(this.descripitionMap, model.content) }}</detail-list-item>-->
           <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
         </detail-list>
-        <detail-list title="修图片:" :col="6">
-          <upload-image-detail :images-list="model.repairFileList"/>
+        <detail-list title="修图片:" :col="6">
+          <upload-image-detail :images-list="model.applicationFileList"/>
         </detail-list>
         <a-divider orientation="left">维修详情</a-divider>
         <detail-list title="" :col="3">

+ 38 - 87
src/views/sb/info/MeasureSbInfo.vue

@@ -80,25 +80,38 @@
           >
             <span slot="action" slot-scope="record">
               <template>
-                <a @click="handleView(record)">查看</a>
-                <a-divider type="vertical" />
-                <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
-                <!--<a-divider type="vertical" />
-                  <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
-                    <a>删除</a>
-                  </a-popconfirm>
-                  <a-divider type="vertical" />
-                  <a @click="handleCopy(record)">复制</a>-->
-                <a-divider v-if="record.status != 2" type="vertical" />
-                <a-popconfirm v-if="record.status != 2" title="是否要启用该设备?" @confirm="handleStart(record)">
-                  <a>启用</a>
-                </a-popconfirm>
-                <a-divider v-if="record.status != 7" type="vertical" />
-                <a-popconfirm v-if="record.status != 7" title="是否要停用该设备?" @confirm="handleStop(record)">
-                  <a>停用</a>
-                </a-popconfirm>
-                <a-divider type="vertical" />
-                <a @click="printQcode(record)">打印</a>
+                <div>
+                  <!--<a-divider type="vertical" />
+                    <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
+                      <a>删除</a>
+                    </a-popconfirm>
+                    <a-divider type="vertical" />
+                    <a @click="handleCopy(record)">复制</a>-->
+                  <a-dropdown>
+                    <a-menu slot="overlay">
+                      <a-menu-item key="0">
+                        <a @click="handleView(record)">查看</a>
+                      </a-menu-item>
+                      <a-menu-item key="1">
+                         <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 2" key="2">
+                         <a-popconfirm  title="是否要启用该设备?" @confirm="handleStart(record)">
+                          <a>启用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 7"  key="3">
+                         <a-popconfirm title="是否要停用该设备?" @confirm="handleStop(record)">
+                          <a>停用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                       <a-menu-item key="4">
+                         <a @click="printQcode(record)">打印</a>
+                      </a-menu-item>
+                    </a-menu>
+                    <a-button> 操作 <a-icon type="down" /> </a-button>
+                  </a-dropdown>
+                </div>
               </template>
             </span>
             <span slot="status" slot-scope="text">
@@ -132,7 +145,7 @@
 
       </a-col>
     </a-row>
-    <base-form ref="baseModal" @ok="handleOk"/>
+    <base-form ref="baseModal" :useType="4" @ok="handleOk"/>
     <detail ref="detailModal" @ok="handleOk"/>
     <download-modal ref="downloadModal"/>
     <preview-modal ref="previewModal"/>
@@ -156,7 +169,7 @@ import ImportFormAdd from './modules/ImportFormAdd'
 import PrintSbCode from '@/views/sb/info/modules/PrintSbCode'
 
 export default {
-  name: 'SbInfoList',
+  name: 'MeasureSbInfoList',
   components: {
     STable,
     Ellipsis,
@@ -178,7 +191,7 @@ export default {
       // 查询参数
       queryParam: {
         filter: this.filter,
-        useType: this.DictCache.VALUE.SB_USE_TYPE.BGCL
+        useType: 4
       },
       depreciationTypeMap: {},
       visible: true,
@@ -214,25 +227,11 @@ export default {
           dataIndex: 'no',
           checked: true
         },
-        {
-          title: '自编号',
-          checked: true,
-          dataIndex: 'zbh'
-        },
-        {
-          title: '车牌号',
-          checked: true,
-          dataIndex: 'cph'
-        },
-        {
+   /*     {
           title: '规格型号',
           checked: true,
           dataIndex: 'model'
-        },
-        {
-          title: '财务编码',
-          dataIndex: 'financingNo'
-        },
+        },*/
         {
           title: '设备类型',
           checked: true,
@@ -241,14 +240,6 @@ export default {
             return record.typeName
           }
         },
-        {
-          title: '自定义类型',
-          checked: true,
-          dataIndex: 'useType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.useTypeMap, text)
-          }
-        },
         {
           title: '设备等级',
           checked: true,
@@ -264,17 +255,6 @@ export default {
             return this.BaseTool.Amount.formatter(text)
           }
         },
-        {
-          title: '计量单位',
-          dataIndex: 'unit',
-          customRender: (text, record, index) => {
-            return BaseTool.Object.getField(this.unitMap, text)
-          }
-        },
-        {
-          title: '保管人',
-          dataIndex: 'saveUser'
-        },
         {
           title: '购置日期',
           dataIndex: 'buyDate'
@@ -287,36 +267,7 @@ export default {
           title: '下次检定日期',
           dataIndex: 'nextCheckDate'
         },
-        {
-          title: '总行驶里程',
-          dataIndex: 'totalMiles'
-        },
-        {
-          title: '总行驶小时',
-          dataIndex: 'totalHours'
-        },
-        {
-          title: '保修截至日期',
-          dataIndex: 'guaranteeDate'
-
-        },
-        {
-          title: '预计工作年限',
-          dataIndex: 'workYear'
-
-        },
-        {
-          title: '预计报废日期',
-          dataIndex: 'retirementDate'
 
-        },
-        {
-          title: '折旧方式',
-          dataIndex: 'depreciationType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.depreciationTypeMap, text)
-          }
-        },
         {
           title: '状态',
           checked: true,
@@ -328,7 +279,7 @@ export default {
           key: 'action',
           checked: true,
           align: 'center',
-          // fixed: 'right',
+          width: '300',
           scopedSlots: { customRender: 'action' }
         }
       ],

+ 40 - 54
src/views/sb/info/SbInfo.vue

@@ -78,25 +78,38 @@
           >
             <span slot="action" slot-scope="record">
               <template>
-                <a @click="handleView(record)">查看</a>
-                <a-divider type="vertical" />
-                <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
-                <!--<a-divider type="vertical" />
-                  <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
-                    <a>删除</a>
-                  </a-popconfirm>
-                  <a-divider type="vertical" />
-                  <a @click="handleCopy(record)">复制</a>-->
-                <a-divider v-if="record.status != 2" type="vertical" />
-                <a-popconfirm v-if="record.status != 2" title="是否要启用该设备?" @confirm="handleStart(record)">
-                  <a>启用</a>
-                </a-popconfirm>
-                <a-divider v-if="record.status != 7" type="vertical" />
-                <a-popconfirm v-if="record.status != 7" title="是否要停用该设备?" @confirm="handleStop(record)">
-                  <a>停用</a>
-                </a-popconfirm>
-                <a-divider type="vertical" />
-                <a @click="printQcode(record)">打印</a>
+                <div>
+                  <!--<a-divider type="vertical" />
+                    <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
+                      <a>删除</a>
+                    </a-popconfirm>
+                    <a-divider type="vertical" />
+                    <a @click="handleCopy(record)">复制</a>-->
+                  <a-dropdown>
+                    <a-menu slot="overlay">
+                      <a-menu-item key="0">
+                        <a @click="handleView(record)">查看</a>
+                      </a-menu-item>
+                      <a-menu-item key="1">
+                         <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 2" key="2">
+                         <a-popconfirm  title="是否要启用该设备?" @confirm="handleStart(record)">
+                          <a>启用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 7"  key="3">
+                         <a-popconfirm title="是否要停用该设备?" @confirm="handleStop(record)">
+                          <a>停用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                       <a-menu-item key="4">
+                         <a @click="printQcode(record)">打印</a>
+                      </a-menu-item>
+                    </a-menu>
+                    <a-button> 操作 <a-icon type="down" /> </a-button>
+                  </a-dropdown>
+                </div>
               </template>
             </span>
             <span slot="status" slot-scope="text">
@@ -171,6 +184,7 @@ export default {
       sourceTypeMap: {},
       treeData: [],
       // 表头
+      // 表头
       columns: [
         {
           title: '序号',
@@ -186,24 +200,10 @@ export default {
           dataIndex: 'name'
         },
         {
-          title: '号',
+          title: '设备编号',
           dataIndex: 'no',
           checked: true
         },
-        {
-          title: '旧号',
-          dataIndex: 'zbh',
-          checked: true
-        },
-        {
-          title: '规格型号',
-          checked: true,
-          dataIndex: 'model'
-        },
-        {
-          title: '资产编码',
-          dataIndex: 'financingNo'
-        },
         {
           title: '设备类型',
           checked: true,
@@ -212,14 +212,6 @@ export default {
             return record.typeName
           }
         },
-     /*   {
-          title: '自定义类型',
-          checked: true,
-          dataIndex: 'useType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Object.getField(this.useTypeMap, text)
-          }
-        },*/
         {
           title: '设备等级',
           checked: true,
@@ -235,17 +227,6 @@ export default {
             return this.BaseTool.Amount.formatter(text)
           }
         },
-        {
-          title: '计量单位',
-          dataIndex: 'unit',
-          customRender: (text, record, index) => {
-            return BaseTool.Object.getField(this.unitMap, text)
-          }
-        },
-        {
-          title: '保管人',
-          dataIndex: 'saveUser'
-        },
         {
           title: '购置日期',
           dataIndex: 'buyDate'
@@ -254,6 +235,11 @@ export default {
           title: '投用日期',
           dataIndex: 'startDate'
         },
+        {
+          title: '下次检定日期',
+          dataIndex: 'nextCheckDate'
+        },
+
         {
           title: '状态',
           checked: true,
@@ -265,7 +251,7 @@ export default {
           key: 'action',
           checked: true,
           align: 'center',
-          width: 200,
+          width: '300',
           scopedSlots: { customRender: 'action' }
         }
       ],

+ 513 - 0
src/views/sb/info/SpecialSbInfo.vue

@@ -0,0 +1,513 @@
+<template>
+  <a-card :bordered="false">
+    <a-row :gutter="8" v-show="visible">
+      <a-col :span="4">
+        <a-tree
+          @expand="onExpand"
+          :expandedKeys="expandedKeys"
+          :autoExpandParent="true"
+          @select="onSelect"
+          :selectedKeys="selectedKeys"
+          :treeData="treeData"
+        />
+      </a-col>
+      <a-col :span="20">
+        <div>
+          <div class="table-page-search-wrapper">
+            <a-form layout="inline">
+              <a-row :gutter="48">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="关键字">
+                    <a-input v-model="queryParam.keyword" placeholder="请输入名称/设备新号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="设备旧号">
+                    <a-input v-model="queryParam.zbh" placeholder="请输入设备旧号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="8" :sm="24">
+                  <a-form-item label="设备状态">
+                    <a-select @change="handleDeptChange" v-model="queryParam.status" placeholder="请选择">
+                      <a-select-option
+                        v-for="(label,value) in statusMap"
+                        :key="value"
+                        :label="label"
+                        :value="parseInt(value)">{{ label }}
+                      </a-select-option>
+                    </a-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="6 || 24" :sm="24">
+                  <span class="table-page-search-submitButtons">
+                    <a-button type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                    <a-button style="margin-left: 8px" @click="resetSearchForm">重置</a-button>
+                  </span>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+
+          <div class="table-operator">
+            <a-button v-if="$auth('sb-infos-add')" type="primary" icon="plus" @click="handleAdd">新增</a-button>
+            <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" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImport">初始化导入</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="doImportDe">折旧导入</a-button>
+            <a-button style="margin-left: 8px" v-if="$auth('sb-infos-export')" type="primary" icon="upload" @click="printQcode()">打印</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()">
+                  <a-menu-item key="1"><a-icon type="delete" /><a>删除</a></a-menu-item>
+                </a-popconfirm>
+              </a-menu>
+              <a-button style="margin-left: 8px">
+                批量操作 <a-icon type="down" />
+              </a-button>
+            </a-dropdown>
+          </div>
+
+          <s-table
+            ref="table"
+            size="default"
+            rowKey="id"
+            :widthSpace="true"
+            :columns="columns"
+            :data="loadData"
+            :alert="options.alert"
+            :rowSelection="options.rowSelection"
+            :scroll="{x: BaseTool.Constant.scrollX, y: BaseTool.Constant.scrollY }"
+            showPagination="auto"
+          >
+            <span slot="action" slot-scope="record">
+              <template>
+                <div>
+                  <!--<a-divider type="vertical" />
+                    <a-popconfirm v-if="$auth('sb-infos-del')" title="是否要删除该设备?" @confirm="batchDelete(record.id)">
+                      <a>删除</a>
+                    </a-popconfirm>
+                    <a-divider type="vertical" />
+                    <a @click="handleCopy(record)">复制</a>-->
+                  <a-dropdown>
+                    <a-menu slot="overlay">
+                      <a-menu-item key="0">
+                        <a @click="handleView(record)">查看</a>
+                      </a-menu-item>
+                      <a-menu-item key="1">
+                         <a v-if="$auth('sb-infos-edit')" @click="handleEdit(record)">修改</a>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 2" key="2">
+                         <a-popconfirm  title="是否要启用该设备?" @confirm="handleStart(record)">
+                          <a>启用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                      <a-menu-item v-if="record.status != 7"  key="3">
+                         <a-popconfirm title="是否要停用该设备?" @confirm="handleStop(record)">
+                          <a>停用</a>
+                        </a-popconfirm>
+                      </a-menu-item>
+                       <a-menu-item key="4">
+                         <a @click="printQcode(record)">打印</a>
+                      </a-menu-item>
+                    </a-menu>
+                    <a-button> 操作 <a-icon type="down" /> </a-button>
+                  </a-dropdown>
+                </div>
+              </template>
+            </span>
+            <span slot="status" slot-scope="text">
+              <badge
+                :status="DictCache.COLOR.SB_INFO_STATUS[text]"
+                :text="statusMap[text]" />
+            </span>
+            <span slot="wbFile" slot-scope="record">
+              <template>
+                <a @click="handleRepairFilePreview(record)">预览</a>
+                <a-divider type="vertical" />
+                <a @click="handleRepairFileDownload(record)">下载</a>
+              </template>
+            </span>
+            <span slot="useFile" slot-scope="record">
+              <template>
+                <a @click="handleUseFilePreview(record)">预览</a>
+                <a-divider type="vertical" />
+                <a @click="handleUseFileDownload(record)">下载</a>
+              </template>
+            </span>
+            <span slot="checkFile" slot-scope="record">
+              <template>
+                <a @click="handleCheckFilePreview(record)">预览</a>
+                <a-divider type="vertical" />
+                <a @click="handleCheckFileDownload(record)">下载</a>
+              </template>
+            </span>
+          </s-table>
+        </div>
+
+      </a-col>
+    </a-row>
+    <base-form ref="baseModal" :useType="5" @ok="handleOk"/>
+    <detail ref="detailModal" @ok="handleOk"/>
+    <download-modal ref="downloadModal"/>
+    <preview-modal ref="previewModal"/>
+    <import-form-add ref="importModal" @ok="handleOk"/>
+    <print-sb-code ref="printSbCode"/>
+  </a-card>
+
+</template>
+
+<script>
+import { STable, Ellipsis } from '@/components'
+import BaseForm from './modules/BaseForm'
+import Detail from './modules/Detail'
+import DownloadModal from '@/views/download/DownloadModal'
+import PreviewModal from '@/views/preview/PreviewModal'
+import { updateSbInfo, getSbInfoPage, deleteSbInfos, fetchSbInfo, exportSbInfo } from '@/api/sb/info'
+import { queryDept, getDeptsAllByParentId } from '@/api/upms/dept'
+import BaseTool from '../../../utils/tool'
+import { fetchSbTypeTree } from '@/api/sb/type'
+import ImportFormAdd from './modules/ImportFormAdd'
+import PrintSbCode from '@/views/sb/info/modules/PrintSbCode'
+
+export default {
+  name: 'SpecialSbInfoList',
+  components: {
+    STable,
+    Ellipsis,
+    BaseForm,
+    Detail,
+    DownloadModal,
+    PreviewModal,
+    PrintSbCode,
+    ImportFormAdd
+  },
+  props: {
+    filter: {
+      type: Number,
+      default: -1
+    }
+  },
+  data () {
+    return {
+      // 查询参数
+      queryParam: {
+        filter: this.filter,
+        useType: this.DictCache.VALUE.SB_USE_TYPE.TZSB
+      },
+      depreciationTypeMap: {},
+      visible: true,
+      levelMap: {},
+      unitMap: {},
+      areaList: {},
+      companyList: {},
+      projectList: {},
+      deptList: {},
+      useTypeMap: {},
+      statusMap: {},
+      expandedKeys: [],
+      selectedKeys: [],
+      sourceTypeMap: {},
+      treeData: [],
+      // 表头
+      columns: [
+        {
+          title: '序号',
+          dataIndex: 'index',
+          checked: true,
+          customRender: (text, record, index) => {
+            return `${(this.$refs.table.localPagination.current - 1) * this.$refs.table.localPagination.pageSize + index + 1}`
+          }
+        },
+        {
+          title: '设备名称',
+          checked: true,
+          dataIndex: 'name'
+        },
+        {
+          title: '设备编号',
+          dataIndex: 'no',
+          checked: true
+        },
+        {
+          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: 'initialValue',
+          customRender: (text, record, index) => {
+            return this.BaseTool.Amount.formatter(text)
+          }
+        },
+        {
+          title: '购置日期',
+          dataIndex: 'buyDate'
+        },
+        {
+          title: '投用日期',
+          dataIndex: 'startDate'
+        },
+        {
+          title: '下次检定日期',
+          dataIndex: 'nextCheckDate'
+        },
+
+        {
+          title: '状态',
+          checked: true,
+          dataIndex: 'status',
+          scopedSlots: { customRender: 'status' }
+        },
+        {
+          title: '操作',
+          key: 'action',
+          checked: true,
+          align: 'center',
+          width: '300',
+          scopedSlots: { customRender: 'action' }
+        }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        parameter = {
+          ...parameter,
+          ...this.queryParam,
+          dataScope: {
+            sortBy: 'desc',
+            sortName: 'update_time'
+          }
+        }
+        return getSbInfoPage(Object.assign(parameter, this.queryParam))
+          .then(res => {
+            return res.data
+          })
+      },
+      selectedRowKeys: [],
+      selectedRows: [],
+
+      options: {
+        alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+        rowSelection: {
+          selectedRowKeys: this.selectedRowKeys,
+          onChange: this.onSelectChange
+        }
+      },
+      optionAlertShow: false
+    }
+  },
+  created () {
+    this.tableOption()
+    this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
+    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
+    this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
+  },
+  methods: {
+    tableOption () {
+      this.setTree()
+      if (!this.optionAlertShow) {
+        this.options = {
+          alert: { show: true, clear: () => { this.selectedRowKeys = [] } },
+          rowSelection: {
+            selectedRowKeys: this.selectedRowKeys,
+            onChange: this.onSelectChange,
+            getCheckboxProps: record => ({
+              props: {
+                disabled: false,
+                name: record.id
+              }
+            })
+          }
+        }
+        this.optionAlertShow = true
+      } else {
+        this.options = {
+          alert: false,
+          rowSelection: null
+        }
+        this.optionAlertShow = false
+      }
+    },
+    batchDelete (id) {
+      let ids = []
+      if (this.BaseTool.String.isBlank(id)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要删除的记录')
+          return
+        }
+        ids = this.selectedRows.map(item => item.id)
+      } else {
+        ids = [id]
+      }
+      deleteSbInfos(ids).then(res => {
+        this.$message.info('删除成功')
+        this.handleOk()
+        this.$refs.table.clearSelected()
+      })
+    },
+    handleEdit (record) {
+      fetchSbInfo({ id: record.id }).then(res => {
+        this.visible = false
+        const modal = this.$refs.baseModal
+        modal.base(res.data)
+      })
+    },
+    printQcode (record) {
+      let recordList = []
+      console.log(record, this.selectedRows)
+      if (this.BaseTool.String.isBlank(record)) {
+        const length = this.selectedRows.length
+        if (length === 0) {
+          this.$message.info('请选择要打印的记录')
+          return
+        }
+        recordList = this.selectedRows
+      } else {
+        recordList = [record]
+      }
+      this.$refs.printSbCode.base(recordList)
+    },
+    handleStart (record) {
+      record.status = 2
+      updateSbInfo(record).then(res => {
+        this.$message.info('已启用')
+      })
+    },
+    handleStop (record) {
+      record.status = 7
+      updateSbInfo(record).then(res => {
+        this.$message.info('已停用')
+      })
+    },
+    handleAdd () {
+      this.visible = false
+      this.$refs.baseModal.base()
+    },
+    handleView (record) {
+      fetchSbInfo({ id: record.id }).then(res => {
+        this.visible = false
+        const modal = this.$refs.detailModal
+        modal.base(res.data)
+      })
+    },
+    handleAreaChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.FEN_GONG_SI }).then(res => {
+        this.companyList = res.data
+      })
+    },
+    handleCompanyChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.XIANG_MU_BU }).then(res => {
+        this.projectList = res.data
+      })
+    },
+    handleProjectChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BU_MEN }).then(res => {
+        this.deptList = res.data
+      })
+    },
+    handleDeptChange (value) {
+      getDeptsAllByParentId({ deptId: value, nature: this.DictCache.VALUE.SYS_DEPT_NATURE.BAN_ZU }).then(res => {
+        this.groupList = res.data
+      })
+    },
+    handleCopy (record) {
+      this.visible = false
+      fetchSbInfo({ id: record.id }).then(res => {
+        const modal = this.$refs.baseModal
+        res.data.id = null
+        modal.base(res.data)
+      })
+    },
+    handleOk () {
+      this.visible = true
+      this.setTree()
+      this.$refs.table.refresh()
+    },
+    onSelectChange (selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    resetSearchForm () {
+      this.queryParam = {
+        filter: this.filter
+      }
+      this.visible = true
+      this.$refs.table.refresh(true)
+    },
+    doExport () {
+      const parameter = {
+        ...this.queryParam
+      }
+      exportSbInfo(parameter).then(file => {
+        this.BaseTool.UPLOAD.downLoadExportExcel(file)
+      })
+    },
+    setTree (record = {}) {
+      queryDept({ nature: this.DictCache.VALUE.SYS_DEPT_NATURE.JITUAN }).then(res => {
+        this.areaList = res.data
+      })
+      fetchSbTypeTree().then(res => {
+        this.treeData = res.data
+      })
+    },
+    onSelect: function (selectedKeys, info) {
+      this.selectedKeys = selectedKeys
+      this.queryParam.typeId = selectedKeys.length > 0 ? selectedKeys[0] : ''
+      this.$refs.table.refresh(true)
+    },
+    onExpand (expandedKeys) {
+      this.expandedKeys = expandedKeys
+      this.autoExpandParent = false
+    },
+    handleRepairFilePreview (record) {
+      console.log(record, 87878)
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_REPAIRFILE)
+    },
+    handleRepairFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_REPAIRFILE, getDownloadUrl(record.id))
+    },
+    handleUseFilePreview (record) {
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_USEFILE)
+    },
+    handleUseFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_USEFILE, getDownloadUrl(record.id))
+    },
+    handleCheckFilePreview (record) {
+      this.$refs.previewModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_RECHECKFILE)
+    },
+    handleCheckFileDownload (record) {
+      // this.$refs.downloadModal.base(record.id, this.DictCache.VALUE.FILE_MODULE.SBINFO_RECHECKFILE, getDownloadUrl(record.id))
+    },
+    doImport () {
+      if (this.queryParam.useCompany == null) {
+        this.$message.error('请先选择公司')
+        return
+      }
+      if (this.queryParam.useProject == null) {
+        this.$message.error('请先选择项目部')
+        return
+      }
+      this.$refs.importModal.base(this.queryParam.useCompany, this.queryParam.useProject)
+    },
+    doImportDe () {
+      this.queryParam.useCompany = null
+      this.queryParam.useProject = null
+      this.$refs.importModal.base()
+    }
+  }
+}
+</script>

+ 340 - 34
src/views/sb/info/modules/BaseForm.vue

@@ -114,13 +114,13 @@
           </a-form-item>
         </a-col>
 
-        <a-col :lg="12" :md="24" :sm="24">
+<!--        <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
             label="自定义类型"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select v-decorator="['useType', {rules: [{required: true, message: '自定义类型不能为空'}]}]" placeholder="请选择">
+            <a-select @change="handleChange" disabled v-decorator="['useType', {rules: [{required: true, message: '自定义类型不能为空'}]}]" placeholder="请选择">
               <a-select-option
                 v-for="(label,value) in useTypeMap"
                 :key="value"
@@ -129,7 +129,7 @@
               </a-select-option>
             </a-select>
           </a-form-item>
-        </a-col>
+        </a-col>-->
       </a-row>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
@@ -172,7 +172,7 @@
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="系列号"
+            label="系列号(出厂编号)"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
@@ -216,7 +216,6 @@
           </a-form-item>
         </a-col>
       </a-row>
-      <title-divider title="基本信息" width="90px"></title-divider>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
@@ -306,8 +305,23 @@
               v-decorator="['remark', {rules: [{required: false, message: '备注不能为空'}]}]" />
           </a-form-item>
         </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="使用机台"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['saveUser', {rules: [{required: true, message: '项目部不能为空'}]}]" placeholder="请选择">
+              <a-select-option
+                v-for="({userId, realName}) in userList"
+                :key="userId"
+                :label="realName"
+                :value="userId">{{ realName }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
       </a-row>
-      <title-divider title="使用信息" width="90px"></title-divider>
       <!--      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
@@ -396,11 +410,11 @@
         </a-col>-->
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="保管人"
+            label="维修人"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select v-decorator="['saveUser', {rules: [{required: true, message: '项目部不能为空'}]}]" placeholder="请选择">
+            <a-select v-decorator="['repairUser']" placeholder="请选择">
               <a-select-option
                 v-for="({userId, realName}) in userList"
                 :key="userId"
@@ -412,11 +426,11 @@
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="维修人"
+            label="第二维修人"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-select v-decorator="['repairUser']" placeholder="请选择">
+            <a-select v-decorator="['repairUserSecond']" placeholder="请选择">
               <a-select-option
                 v-for="({userId, realName}) in userList"
                 :key="userId"
@@ -427,7 +441,6 @@
           </a-form-item>
         </a-col>
       </a-row>
-      <title-divider title="日期信息" width="90px"></title-divider>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
@@ -454,6 +467,255 @@
           </a-form-item>
         </a-col>
       </a-row>
+      <title-divider v-show="useType == 5" title="特种信息" width="90px"></title-divider>
+      <div v-show="useType == 5" >
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="注册代码"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['registerNo']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="介质属性"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['characterType']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="设备批号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['batchNo']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="使用登记证编号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['usedNo']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="维护供应商"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['supplier']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="登记日期"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-date-picker
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+                v-decorator="['registerDate']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="预计工作年限"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                style="width: 100%"
+                suffix="年"
+                :formatter="BaseTool.Amount.formatter"
+                :parser="BaseTool.Amount.parser"
+                v-decorator="['workYear']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="设计到期年限"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-date-picker
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+                v-decorator="['retirementDate']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </div>
+      <title-divider v-show="useType == 4" title="计量信息" width="90px"></title-divider>
+      <div v-show="useType == 4" >
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="测量设备编号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['cardNo']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="准确度等级"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['fdjxh']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定单位"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['dph']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定人"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['zaiz']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定结论"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['rlType']" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in rlTypeMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="是否周检查"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-select v-decorator="['color']" placeholder="请选择">
+                <a-select-option
+                  v-for="(label,value) in colorMap"
+                  :key="value"
+                  :label="label"
+                  :value="parseInt(value)">{{ label }}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定证书编号"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                v-decorator="['sbdh']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="预警天数"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input-number
+                style="width: 100%"
+                :min="0"
+                :step="0.01"
+                :formatter="BaseTool.Amount.formatter"
+                :parser="BaseTool.Amount.parser"
+                v-decorator="['seatNumber']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定日期"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-date-picker
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+                v-decorator="['checkDate']" />
+            </a-form-item>
+          </a-col>
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="检定周期"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-input
+                style="width: 100%"
+                suffix="月"
+                :formatter="BaseTool.Amount.formatter"
+                :parser="BaseTool.Amount.parser"
+                v-decorator="['checkPeriod']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+          <a-col :lg="12" :md="24" :sm="24">
+            <a-form-item
+              label="有效日期至"
+              :labelCol="BaseTool.Constant.labelCol"
+              :wrapperCol="BaseTool.Constant.wrapperCol"
+            >
+              <a-date-picker
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+                v-decorator="['nextCheckDate']" />
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </div>
       <title-divider title="文件信息" width="90px"></title-divider>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
@@ -564,14 +826,12 @@ export default {
       confirmLoading: false,
       modalTitle: null,
       form: this.$form.createForm(this),
-
       areaList: {},
       companyList: {},
       projectList: {},
       deptList: {},
       groupList: {},
       visible: false,
-
       sbTypeTreeData: [],
       // sbInfoTreeData: [],
       // sourceSbInfoTreeData: [],
@@ -603,6 +863,10 @@ export default {
     }
   },
   props: {
+    useType: {
+      type: Number,
+      default: 3
+    }
   },
   created () {
     this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
@@ -627,6 +891,7 @@ export default {
         this.clearFileList()
         return
       }
+      this.useType = record.useType
       this.modalTitle = '编辑'
       this.qrcodesrc = record.qrCode
       this.repairFileList = record.repairFileList
@@ -663,46 +928,59 @@ export default {
 
       const { form: { setFieldsValue } } = this
       // 日期处理
-      if (this.BaseTool.Object.isBlank(record.buyDate)) {
-        record.buyDate = '2017-04-19'
-      }
-      record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      record.startDate = this.BaseTool.Moment(record.startDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      record.nextCheckDate = this.BaseTool.Moment(record.nextCheckDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      record.guaranteeDate = this.BaseTool.Moment(record.guaranteeDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      record.retirementDate = this.BaseTool.Moment(record.retirementDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.startDate = this.BaseTool.Moment(record.startDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.nextCheckDate = this.BaseTool.Moment(record.nextCheckDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.guaranteeDate = this.BaseTool.Moment(record.guaranteeDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      // record.retirementDate = this.BaseTool.Moment(record.retirementDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
 
       // record.lastRepaireTime = this.BaseTool.Moment(record.lastRepaireTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
       // record.lastBaoyangTime = this.BaseTool.Moment(record.lastBaoyangTime, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
-      if (record.jbdDate != null) {
-        record.jbdDate = this.BaseTool.Moment(record.jbdDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (record.buyDate != null) {
+        record.buyDate = this.BaseTool.Moment(record.buyDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         this.$nextTick(() => {
           setFieldsValue(Object.assign(pick(record, [
-            'jbdDate'
+            'buyDate'
           ])))
         })
       }
-      if (record.sbdDate != null) {
-        record.sbdDate = this.BaseTool.Moment(record.sbdDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (record.startDate != null) {
+        record.startDate = this.BaseTool.Moment(record.startDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         this.$nextTick(() => {
           setFieldsValue(Object.assign(pick(record, [
-            'sbdDate'
+            'startDate'
           ])))
         })
       }
-      if (record.sbDate != null) {
-        record.sbDate = this.BaseTool.Moment(record.sbDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (record.checkDate != null) {
+        record.checkDate = this.BaseTool.Moment(record.checkDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         this.$nextTick(() => {
           setFieldsValue(Object.assign(pick(record, [
-            'sbDate'
+            'checkDate'
           ])))
         })
       }
-      if (record.spDate != null) {
-        record.spDate = this.BaseTool.Moment(record.spDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+      if (record.nextCheckDate != null) {
+        record.nextCheckDate = this.BaseTool.Moment(record.nextCheckDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
         this.$nextTick(() => {
           setFieldsValue(Object.assign(pick(record, [
-            'spDate'
+            'nextCheckDate'
+          ])))
+        })
+      }
+      if (record.retirementDate != null) {
+        record.retirementDate = this.BaseTool.Moment(record.retirementDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'retirementDate'
+          ])))
+        })
+      }
+      if (record.registerDate != null) {
+        record.registerDate = this.BaseTool.Moment(record.registerDate, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN)
+        this.$nextTick(() => {
+          setFieldsValue(Object.assign(pick(record, [
+            'registerDate'
           ])))
         })
       }
@@ -749,7 +1027,30 @@ export default {
           'zz',
           'zjm',
           'jbdh',
-          'useType'
+          'useType',
+
+          'cardNo',
+          'fdjxh',
+          'checkDate',
+          'checkPeriod',
+          'nextCheckDate',
+          'dph',
+          'zaiz',
+          'rlType',
+          'color',
+          'sbdh',
+          'seatNumber',
+
+          'registerNo',
+          'characterType',
+          'usedNo',
+          'supplier',
+          'repairUserSecond',
+          'batchNo',
+          'workYear',
+          'retirementDate',
+          'registerDate'
+
         ])))
       })
     },
@@ -780,6 +1081,8 @@ export default {
         values.useFileList = this.useFileList
         values.recheckFileList = this.recheckFileList
         values.sbFileList = this.sbFileList
+
+        values.useType = this.useType
         if (this.BaseTool.String.isBlank(values.id)) {
           addSbInfo(values)
             .then(() => {
@@ -972,6 +1275,9 @@ export default {
         }))
       })
     },
+    handleChange (value) {
+      this.useType = value
+    },
     handleProducerSelect () {
       const modal = this.$refs.producerSelectModal
       modal.base({}, { type: 1 })

+ 63 - 25
src/views/sb/info/modules/Detail.vue

@@ -21,14 +21,20 @@
         </a-col>
       </a-row>
       <title-divider title="图片信息" width="90px"></title-divider>
+      <a-carousel effect="fade">
+        <div v-for="item in model.sbFileList">
+          <h3>
+            <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
+          </h3>
+        </div>
+      </a-carousel>
       <detail-list title="" :col="3">
-        <detail-list-item v-for="item in model.sbFileList" term="">
-          <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
-        </detail-list-item>
+        <!--        <detail-list-item v-for="item in model.sbFileList" term="">
+                  <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
+                </detail-list-item>-->
         <detail-list-item>
           <img-code :src="model.qrCode" :code-id="model.id" :width="200"></img-code>
         </detail-list-item>
-
       </detail-list>
 
       <title-divider title="基本信息" width="90px"></title-divider>
@@ -41,33 +47,44 @@
         <detail-list-item term="设备类型">{{ model.typeName }}</detail-list-item>
         <detail-list-item term="自定义类型">{{ BaseTool.Object.getField(useTypeMap,model.useType) }}</detail-list-item>
         <detail-list-item term="生产商">{{ model.producerName }}</detail-list-item>
-
         <detail-list-item term="大小尺寸">{{ model.zz }}</detail-list-item>
-        <detail-list-item term="系列号">{{ model.zzh }}</detail-list-item>
+        <detail-list-item term="系列号(出厂编号)">{{ model.zzh }}</detail-list-item>
         <detail-list-item term="状态"><badge :status="DictCache.COLOR.SB_INFO_STATUS[model.status]" :text="statusMap[model.status]"></badge></detail-list-item>
         <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
       </detail-list>
-
-      <title-divider title="使用信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
         <detail-list-item term="使用人">{{ model.saveUserName }}</detail-list-item>
         <detail-list-item term="维修人">{{ model.repairUserName }}</detail-list-item>
+        <detail-list-item term="第二维修人">{{ model.repairUserSecondName }}</detail-list-item>
       </detail-list>
-      <title-divider title="日期信息" width="90px"></title-divider>
       <detail-list title="" :col="3">
         <detail-list-item term="购置日期">{{ model.buyDate }}</detail-list-item>
         <detail-list-item term="投用日期">{{ model.startDate }}</detail-list-item>
-
       </detail-list>
-
-      <title-divider title="生产商" width="90px"></title-divider>
-      <detail-list title="" :col="3" >
-        <detail-list-item v-if="firmProducer != null" term="名称">{{ firmProducer.name }}</detail-list-item>
-        <detail-list-item v-if="firmProducer != null" term="等级">{{ BaseTool.Object.getField(firmProducerLevelMap,firmProducer.level) }}</detail-list-item>
-        <detail-list-item v-if="firmProducer != null" term="联系人">{{ firmProducer.contactPerson }}</detail-list-item>
-        <detail-list-item v-if="firmProducer != null" term="联系电话">{{ firmProducer.phone }}</detail-list-item>
-        <detail-list-item v-if="firmProducer != null" term="联系地址">{{ firmProducer.registerAddress }}</detail-list-item>
-        <detail-list-item v-if="firmProducer != null" term="备注">{{ firmProducer.remark }}</detail-list-item>
+      <title-divider  v-show="model.useType == 5" title="特种信息" width="90px"></title-divider>
+      <detail-list  v-show="model.useType == 5" title="" :col="3">
+        <detail-list-item term="注册代码">{{ model.registerNo }}</detail-list-item>
+        <detail-list-item term="介质属性">{{ model.characterType }}</detail-list-item>
+        <detail-list-item term="使用登记证编号">{{ model.usedNo }}</detail-list-item>
+        <detail-list-item term="维护供应商">{{ model.supplier }}</detail-list-item>
+        <detail-list-item term="设备批号">{{ model.batchNo }}</detail-list-item>
+        <detail-list-item term="预计工作年限">{{ model.workYear }}</detail-list-item>
+        <detail-list-item term="设计到期年限">{{ model.retirementDate }}</detail-list-item>
+        <detail-list-item term="登记日期">{{ model.registerDate }}</detail-list-item>
+      </detail-list>
+      <title-divider v-show="model.useType == 4" title="计量信息" width="90px"></title-divider>
+      <detail-list  v-show="model.useType == 4" title="" :col="3">
+        <detail-list-item term="测量设备编号">{{ model.cardNo }}</detail-list-item>
+        <detail-list-item term="准确度等级">{{ model.fdjxh }}</detail-list-item>
+        <detail-list-item term="检定日期">{{ model.checkDate }}</detail-list-item>
+        <detail-list-item term="检定周期">{{ model.checkPeriod }}</detail-list-item>
+        <detail-list-item term="有效日期">{{ model.nextCheckDate }}</detail-list-item>
+        <detail-list-item term="检定单位">{{ model.dph }}</detail-list-item>
+        <detail-list-item term="检定人">{{ model.zaiz }}</detail-list-item>
+        <detail-list-item term="检定结论">{{ BaseTool.Object.getField(rlTypeMap,model.rlType) }}</detail-list-item>
+        <detail-list-item term="是否周检查">{{ BaseTool.Object.getField(colorMap,model.color) }}</detail-list-item>
+        <detail-list-item term="检定证书编号">{{ model.sbdh }}</detail-list-item>
+        <detail-list-item term="预警天数">{{ model.seatNumber }}</detail-list-item>
       </detail-list>
       <title-divider title="文件信息" width="90px"></title-divider>
       <detail-list title="" :col="4">
@@ -209,8 +226,6 @@ export default {
         'qrCode': null,
         'status': null,
         'remark': null,
-        'createdUserId': null,
-        'updateTime': null,
         'parentName': null,
         'createdUserName': null,
         'typeName': null,
@@ -224,10 +239,16 @@ export default {
         'rlType': null,
         'color': null,
         'seatNumber': null,
-        'zjm': null,
-        'jbdh': null,
-        'sbdh': null,
-        'bxgs': null
+
+        'registerNo': null,
+        'characterType': null,
+        'usedNo': null,
+        'supplier': null,
+        'repairUserSecond': null,
+        'batchNo': null,
+        'workYear': null,
+        'retirementDate': null,
+        'registerDate': null
       },
       numCheckStandard: 0,
       numNumCheckjob: 0,
@@ -348,3 +369,20 @@ export default {
   }
 }
 </script>
+<style scoped>
+/* For demo */
+.ant-carousel {
+  width: 300px;
+  height: 300px;
+}
+.ant-carousel >>> .slick-slide {
+  text-align: center;
+  height: 300px;
+  line-height: 300px;
+  overflow: hidden;
+}
+
+.ant-carousel >>> .slick-slide h3 {
+  color: #fff;
+}
+</style>

+ 362 - 0
src/views/sb/info/modules/DetailBak.vue

@@ -0,0 +1,362 @@
+<template>
+  <a-card :bordered="false" v-show="visibleDetail" class="card" :title="modalTitle">
+    <div v-show="visible">
+      <a-row :gutter="48" slot="extra">
+        <a-col :md="48" :sm="48">
+          <span class="table-page-search-submitButtons" style="float: right">
+            <a-badge :count="numPartInfo" title="设备部位总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="partInfoListView()">设备部位</a-button>
+            </a-badge>
+            <a-badge :count="numModelbom" title="备件总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewBom()">备件BOM</a-button>
+            </a-badge>
+            <a-badge :count="numCheckStandard" title="保养项目总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="handleViewCheck()">保养项目</a-button>
+            </a-badge>
+            <!--            <a-badge :count="numNumCheckjob" title="待保养任务总数" :number-style="{ backgroundColor: '#52c41a' }">
+              <a-button style="margin-left: 16px" type="default" @ok="handleOk" @click="checkJobTableWaitDoListView()">待保养任务</a-button>
+            </a-badge>-->
+            <a-button style="margin-left: 8px" type="primary" @click="handleCancel()">返回</a-button>
+          </span>
+        </a-col>
+      </a-row>
+
+      <a-descriptions bordered title="基本信息">
+        <a-descriptions-item label="设备(新号)">{{ model.no }}</a-descriptions-item>
+        <a-descriptions-item label="设备(旧号)">{{ model.zbh }}</a-descriptions-item>
+        <a-descriptions-item label="设备描述">{{ model.name }}</a-descriptions-item>
+        <a-descriptions-item label="型号">{{ model.model }}</a-descriptions-item>
+        <a-descriptions-item label="ABC 标识">{{ BaseTool.Object.getField(levelMap,model.level) }}</a-descriptions-item>
+        <a-descriptions-item label="设备类型">{{ model.typeName }}</a-descriptions-item>
+        <a-descriptions-item label="自定义类型">{{ BaseTool.Object.getField(useTypeMap,model.useType) }}</a-descriptions-item>
+        <a-descriptions-item label="生产商">{{ model.producerName }}</a-descriptions-item>
+        <a-descriptions-item label="大小尺寸">{{ model.zz }}</a-descriptions-item>
+        <a-descriptions-item label="系列号(出厂编号)">{{ model.zzh }}</a-descriptions-item>
+        <a-descriptions-item label="使用人">{{ model.saveUserName }}</a-descriptions-item>
+        <a-descriptions-item label="维修人">{{ model.repairUserName }}</a-descriptions-item>
+        <a-descriptions-item label="第二维修人">{{ model.repairUserSecondName }}</a-descriptions-item>
+        <a-descriptions-item label="购置日期">{{ model.buyDate }}</a-descriptions-item>
+        <a-descriptions-item label="投用日期">{{ model.startDate }}</a-descriptions-item>
+        <a-descriptions-item label="状态"><badge :status="DictCache.COLOR.SB_INFO_STATUS[model.status]" :text="statusMap[model.status]"></badge></a-descriptions-item>
+        <a-descriptions-item label="备注">{{ model.remark }}</a-descriptions-item>
+        <a-descriptions-item v-show="model.useType == 5" label="注册代码">{{ model.registerNo }}</a-descriptions-item>
+        <a-descriptions-item label="介质属性">{{ model.characterType }}</a-descriptions-item>
+        <a-descriptions-item label="使用登记证编号">{{ model.usedNo }}</a-descriptions-item>
+        <a-descriptions-item label="维护供应商">{{ model.supplier }}</a-descriptions-item>
+        <a-descriptions-item label="设备批号">{{ model.batchNo }}</a-descriptions-item>
+        <a-descriptions-item label="预计工作年限">{{ model.workYear }}</a-descriptions-item>
+        <a-descriptions-item label="设计到期年限">{{ model.retirementDate }}</a-descriptions-item>
+        <a-descriptions-item label="登记日期">{{ model.registerDate }}</a-descriptions-item>
+      </a-descriptions>
+      <a-descriptions bordered v-show="model.useType == 4" title="计量信息">
+        <a-descriptions-item label="测量设备编号">{{ model.cardNo }}</a-descriptions-item>
+        <a-descriptions-item label="准确度等级">{{ model.fdjxh }}</a-descriptions-item>
+        <a-descriptions-item label="检定日期">{{ model.checkDate }}</a-descriptions-item>
+        <a-descriptions-item label="检定周期">{{ model.checkPeriod }}</a-descriptions-item>
+        <a-descriptions-item label="有效日期">{{ model.nextCheckDate }}</a-descriptions-item>
+        <a-descriptions-item label="检定单位">{{ model.dph }}</a-descriptions-item>
+        <a-descriptions-item label="检定人">{{ model.zaiz }}</a-descriptions-item>
+        <a-descriptions-item label="检定结论">{{ BaseTool.Object.getField(rlTypeMap,model.rlType) }}</a-descriptions-item>
+        <a-descriptions-item label="是否周检查">{{ BaseTool.Object.getField(colorMap,model.color) }}</a-descriptions-item>
+        <a-descriptions-item label="检定证书编号">{{ model.sbdh }}</a-descriptions-item>
+        <a-descriptions-item label="预警天数">{{ model.seatNumber }}</a-descriptions-item>
+      </a-descriptions>
+      <a-descriptions bordered title="文件信息">
+        <a-descriptions-item label="维保手册">
+          <a-upload
+            :multiple="true"
+            :fileList="BaseTool.UPLOAD.transImg(model.repairFileList)"
+          >
+          </a-upload>
+        </a-descriptions-item>
+        <a-descriptions-item label="使用手册">
+          <a-upload
+            :multiple="true"
+            :fileList="BaseTool.UPLOAD.transImg(model.useFileList)"
+          >
+          </a-upload>
+        </a-descriptions-item>
+        <a-descriptions-item label="验收文件">
+          <a-upload
+            :multiple="true"
+            :fileList="BaseTool.UPLOAD.transImg(model.recheckFileList)"
+          >
+          </a-upload>
+        </a-descriptions-item>
+      </a-descriptions>
+      <title-divider title="相关数据" width="90px"></title-divider>
+      <q-tabs :activeKey="activeKey" @change="changeTab">
+        <q-tab-pane key="1" tab="报修记录">
+          <repair-application-form-table :type="2" :table-params="{sbId: model.id, sbName: model.name}" ref="repairApplicationFormTable" />
+        </q-tab-pane>
+        <q-tab-pane key="2" tab="配件记录">
+          <spare-part-used-select-table :type="2" :table-params="{sbId: model.id, modelId: model.modelId}" ref="sparePartUsedSelectTable"/>
+        </q-tab-pane>
+        <q-tab-pane key="3" tab="保养任务">
+          <check-job-table :type="2" :check-type="2" :table-params="{sbId: model.id}" ref="spotJobTable" />
+        </q-tab-pane>
+      </q-tabs>
+    </div>
+    <detail-sb-bom ref="detailSbBomModal" @ok="handleOk"/>
+    <detail-sb-check ref="detailSbCheckModal" @ok="handleOk"/>
+    <part-info-list ref="partInfoList" />
+    <!--    <check-job-table-wait-do :type="2" :check-type="2" ref="checkJobTableWaitDo" @ok="handleOk"/>-->
+  </a-card>
+</template>
+
+<script>
+import DetailList from '@/components/tools/DetailList'
+import RepairApplicationFormTable from '@/views/repair/application-form/modules/RepairApplicationFormTable'
+import CheckJobTable from '@/views/check/checkjob/modules/CheckJobTable'
+// import CheckJobTableWaitDo from '@/views/check/checkjob/modules/CheckJobTableWaitDo'
+import { fetchFirmProducer } from '@/api/firm/producer'
+import { queryNumCheckStandard } from '@/api/check/checkstandard'
+import { queryNumCheckjob } from '@/api/check/checkjob'
+import { queryNumPartInfo } from '@/api/part/info'
+import { queryNumModelbom } from '@/api/sb/modelbom'
+import SparePartUsedSelectTable from '@/views/sqarepartmanage/sparepartused/modules/SparePartUsedSelectTable'
+import SbOilPageTable from '@/views/sb/oil/modules/SbOilPageTable'
+import SbRunFillPageTable from '@/views/sb/run-fill/modules/SbRunFillPageTable'
+import SbInspectionFillPageTable from '@/views/sb/inspection-fill/modules/SbInspectionFillPageTable'
+import DetailSbBom from '@/views/sb/modelbom/modules/DetailSbBom'
+import DetailSbCheck from '@/views/check/checkstandard/modules/DetailSbCheck'
+import PartInfoList from '@/views/part/info/modules/PartInfoList'
+const DetailListItem = DetailList.Item
+
+export default {
+  name: 'SbInfoDetail',
+  components: {
+    DetailList,
+    DetailListItem,
+    RepairApplicationFormTable,
+    CheckJobTable,
+    SparePartUsedSelectTable,
+    SbOilPageTable,
+    SbRunFillPageTable,
+    SbInspectionFillPageTable,
+    DetailSbBom,
+    DetailSbCheck,
+    PartInfoList
+  },
+  data () {
+    return {
+      confirmLoading: false,
+      mdl: {},
+      modalTitle: null,
+      visible: false,
+      visibleDetail: false,
+      activeKey: '3',
+      collapseActiveKey: '1',
+      model: {
+        'no': null,
+        'financingNo': null,
+        'name': null,
+        'modelId': null,
+        'typeId': null,
+        'isShow': null,
+        'isChild': null,
+        'parentId': null,
+        'level': null,
+        'useType': null,
+        'rate': null,
+        'month': null,
+        'usedMonth': null,
+        'initialValue': null,
+        'currentValue': null,
+        'cutValue': null,
+        'producerId': null,
+        // 'sourceType': null,
+        // 'sourceSbId': null,
+        // 'parentId': null,
+        'unit': null,
+        // 'position': null,
+        // 'guigeId': null,
+        'useCompanyName': null,
+        'useProjectName': null,
+        'useDeptName': null,
+        'useGroupName': null,
+        'useUserName': null,
+        'saveDeptName': null,
+        'saveUserName': null,
+        'repairUserName': null,
+        'totalMiles': null,
+        'totalHours': null,
+        // 'lastBaoyangTime': null,
+        // 'lastBaoyangMiles': null,
+        // 'lastBaoyangHours': null,
+        // 'baoyangTimes': null,
+        'buyDate': null,
+        'startDate': null,
+        // 'nextCheckDate': null,
+        // 'guaranteeDate': null,
+        // 'workYear': null,
+        // 'retirementDate': null,
+        // 'depreciationType': null,
+        'wbFile': null,
+        'useFile': null,
+        'checkFile': null,
+        'sbImage': null,
+        'sbFileList': null,
+        'qrCode': null,
+        'status': null,
+        'remark': null,
+        'parentName': null,
+        'createdUserName': null,
+        'typeName': null,
+        'producerName': null,
+        'zzh': null,
+        'fdjxh': null,
+        'fdjh': null,
+        'cph': null,
+        'dph': null,
+        'zz': null,
+        'rlType': null,
+        'color': null,
+        'seatNumber': null,
+
+        'registerNo': null,
+        'characterType': null,
+        'usedNo': null,
+        'supplier': null,
+        'repairUserSecond': null,
+        'batchNo': null,
+        'workYear': null,
+        'retirementDate': null,
+        'registerDate': null
+      },
+      numCheckStandard: 0,
+      numNumCheckjob: 0,
+      numModelbom: 0,
+      numPartInfo: 0,
+      firmProducerLevelMap: {},
+      firmSupplier: {},
+      firmProducer: {},
+      statusMap: {},
+      useTypeMap: {},
+      levelMap: {},
+      unitMap: {},
+      colorMap: {},
+      rlTypeMap: {},
+      sourceTypeMap: {}
+    }
+  },
+  created () {
+    this.depreciationTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_DEPRECIATIONTYPE)
+    this.levelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_LEVEL)
+    this.firmProducerLevelMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.FIRM_PRODUCER_LEVEL)
+    this.statusMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_INFO_STATUS)
+    this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
+    this.colorMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_COLOR)
+    this.rlTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.RANLIAO_TYPE)
+    this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
+    this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
+  },
+  computed: {
+  },
+  methods: {
+    handleViewBom (record) {
+      this.visible = false
+      const modal = this.$refs.detailSbBomModal
+      modal.base(this.model)
+    },
+    handleViewCheck (record) {
+      this.visible = false
+      const modal = this.$refs.detailSbCheckModal
+      modal.base(this.model)
+    },
+    base (record) {
+      this.visible = true
+      this.visibleDetail = true
+      this.modalTitle = '详情'
+      this.model = record
+      this.activeKey = '1'
+      this.collapseActiveKey = '0'
+      this.fetchNum()
+      fetchFirmProducer({ id: this.model.producerId }).then(res => {
+        this.firmProducer = res.data
+      })
+    },
+    fetchNum () {
+      Promise.all([queryNumPartInfo({ sbId: this.model.id }), queryNumModelbom({ sbId: this.model.id }), queryNumCheckStandard({ sbId: this.model.id }), queryNumCheckjob({ sbId: this.model.id })])
+        .then((values) => {
+          this.numPartInfo = values[0].data
+          this.numModelbom = values[1].data
+          this.numCheckStandard = values[2].data
+          this.numNumCheckjob = values[3].data
+        })
+    },
+    changeTab (activeKey) {
+      this.activeKey = activeKey
+      if (this.activeKey === '1' && this.BaseTool.Object.isNotBlank(this.$refs.repairApplicationFormTable)) {
+        this.$refs.repairApplicationFormTable.handleOk()
+        return
+      }
+      if (this.activeKey === '2' && this.BaseTool.Object.isNotBlank(this.$refs.sparePartUsedSelectTable)) {
+        this.$refs.sparePartUsedSelectTable.handleOk()
+        return
+      }
+      if (this.activeKey === '3' && this.BaseTool.Object.isNotBlank(this.$refs.spotJobTable)) {
+        this.$refs.spotJobTable.handleOk()
+        return
+      }
+      if (this.activeKey === '4' && this.BaseTool.Object.isNotBlank(this.$refs.pollingJobTable)) {
+        this.$refs.pollingJobTable.handleOk()
+        return
+      }
+      if (this.activeKey === '5' && this.BaseTool.Object.isNotBlank(this.$refs.spotCheckJobTable)) {
+        this.$refs.spotCheckJobTable.handleOk()
+        return
+      }
+      if (this.activeKey === '6' && this.BaseTool.Object.isNotBlank(this.$refs.spotCheckJobTable)) {
+        this.$refs.spotCheckJobTable.handleOk()
+        return
+      }
+      if (this.activeKey === '7' && this.BaseTool.Object.isNotBlank(this.$refs.sbOilPageTable)) {
+        this.$refs.sbOilPageTable.handleOk()
+        return
+      }
+      if (this.activeKey === '8' && this.BaseTool.Object.isNotBlank(this.$refs.sbInspectionFillPageTable)) {
+        this.$refs.sbInspectionFillPageTable.handleOk()
+      }
+    },
+    getQrcodeSrc: (dom) => {
+      console.log(11, 22)
+    },
+    handleCancel (values) {
+      this.visible = false
+      this.visibleDetail = false
+      this.confirmLoading = false
+      this.$emit('ok', values)
+    },
+    handleOk () {
+      this.visible = true
+      this.fetchNum()
+    },
+    partInfoListView () {
+      const modal = this.$refs.partInfoList
+      modal.base({ sbId: this.model.id }, { sbId: this.model.id })
+    },
+    checkJobTableWaitDoListView () {
+      const modal = this.$refs.checkJobTableWaitDo
+      modal.base({ sbId: this.model.id }, { sbId: this.model.id, status: 1 })
+    }
+  }
+}
+</script>
+<style scoped>
+/* For demo */
+.ant-carousel {
+  width: 300px;
+  height: 300px;
+}
+.ant-carousel >>> .slick-slide {
+  text-align: center;
+  height: 300px;
+  line-height: 300px;
+  overflow: hidden;
+}
+
+.ant-carousel >>> .slick-slide h3 {
+  color: #fff;
+}
+</style>